|
|
@@ -9,7 +9,10 @@
|
|
|
#include "acpi.h"
|
|
|
#include "bootinfo.h"
|
|
|
#include "paging.h"
|
|
|
+#include "pci.h"
|
|
|
#include "serial.h"
|
|
|
+#include "sys_fs.h"
|
|
|
+#include "timer.h"
|
|
|
|
|
|
struct acpi_rsdp {
|
|
|
char signature[8];
|
|
|
@@ -51,6 +54,29 @@ static int acpi_ok;
|
|
|
* when the firmware points at a real CMOS register. */
|
|
|
static unsigned int rtc_century_reg;
|
|
|
|
|
|
+/* FADT power-management state for ACPI S5 (soft off). The PM1 control
|
|
|
+ * blocks are I/O ports on every x86 machine this kernel targets; the S5
|
|
|
+ * sleep type comes from the DSDT's \_S5 package. Without it the only
|
|
|
+ * shutdown path is the emulator's Bochs/QEMU port. */
|
|
|
+static int fadt_ok;
|
|
|
+static unsigned int fadt_pm1a_cnt;
|
|
|
+static unsigned int fadt_pm1b_cnt;
|
|
|
+static unsigned int fadt_pm1a_evt;
|
|
|
+static unsigned int fadt_pm1_cnt_len;
|
|
|
+static unsigned int fadt_smi_cmd;
|
|
|
+static unsigned int fadt_acpi_enable;
|
|
|
+static unsigned int fadt_flags;
|
|
|
+static unsigned int dsdt_addr;
|
|
|
+static unsigned int ssdt_addr[4];
|
|
|
+static unsigned int nssdt;
|
|
|
+static unsigned int s5a;
|
|
|
+static unsigned int s5b;
|
|
|
+static int s5_ok;
|
|
|
+static const unsigned char *dsdt_ptr;
|
|
|
+static unsigned int dsdt_len;
|
|
|
+
|
|
|
+static void scan_s5_addr(unsigned int addr, int strict);
|
|
|
+
|
|
|
/* Kernel address of a firmware table range (write-back RAM mapping). */
|
|
|
static void *table_ptr(unsigned int addr, unsigned int len)
|
|
|
{
|
|
|
@@ -136,7 +162,181 @@ static const struct acpi_rsdp *find_rsdp(void)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static const struct acpi_sdt *find_madt(const struct acpi_rsdp *rsdp)
|
|
|
+/* True when a table signature is one of the four-character ACPI ids. */
|
|
|
+static int sig_is(const struct acpi_sdt *t, const char *sig)
|
|
|
+{
|
|
|
+ return t->signature[0] == sig[0] && t->signature[1] == sig[1] &&
|
|
|
+ t->signature[2] == sig[2] && t->signature[3] == sig[3];
|
|
|
+}
|
|
|
+
|
|
|
+/* Decode and skip an AML PkgLength field (one to four bytes). */
|
|
|
+static int aml_pkg_length(const unsigned char *p, unsigned int len,
|
|
|
+ unsigned int *used)
|
|
|
+{
|
|
|
+ unsigned int follow;
|
|
|
+
|
|
|
+ if (!len)
|
|
|
+ return -1;
|
|
|
+ follow = (p[0] >> 6) & 3;
|
|
|
+ if (len < follow + 1)
|
|
|
+ return -1;
|
|
|
+ *used = follow + 1;
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+/* Decode one integer package element (0, 1, Byte, Word or DWord prefix). */
|
|
|
+static int s5_elem(const unsigned char *p, unsigned int len, unsigned int *v)
|
|
|
+{
|
|
|
+ if (!len)
|
|
|
+ return -1;
|
|
|
+ switch (p[0]) {
|
|
|
+ case 0x00:
|
|
|
+ *v = 0;
|
|
|
+ return 1;
|
|
|
+ case 0x01:
|
|
|
+ *v = 1;
|
|
|
+ return 1;
|
|
|
+ case 0x0A:
|
|
|
+ if (len < 2)
|
|
|
+ return -1;
|
|
|
+ *v = p[1];
|
|
|
+ return 2;
|
|
|
+ case 0x0B:
|
|
|
+ if (len < 3)
|
|
|
+ return -1;
|
|
|
+ *v = p[1] | ((unsigned int)p[2] << 8);
|
|
|
+ return 3;
|
|
|
+ case 0x0C:
|
|
|
+ if (len < 5)
|
|
|
+ return -1;
|
|
|
+ *v = p[1] | ((unsigned int)p[2] << 8) |
|
|
|
+ ((unsigned int)p[3] << 16) | ((unsigned int)p[4] << 24);
|
|
|
+ return 5;
|
|
|
+ default:
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/* Find \_S5 in one DSDT/SSDT image and decode its PM1a/PM1b sleep types.
|
|
|
+ * The AML Name string is 08 5F 53 35 5F (optionally with a root prefix
|
|
|
+ * 5C); the package's first two integers are the PM1a/PM1b SLP_TYP values.
|
|
|
+ * Anything that does not decode cleanly is ignored: guessing a type could
|
|
|
+ * enter S3/S4 instead of powering the machine off. */
|
|
|
+static void scan_s5(const unsigned char *tbl, unsigned int len)
|
|
|
+{
|
|
|
+ unsigned int i;
|
|
|
+
|
|
|
+ if (s5_ok)
|
|
|
+ return;
|
|
|
+ for (i = 0; i + 5 < len; i++) {
|
|
|
+ const unsigned char *p;
|
|
|
+ unsigned int rem, used, nel, v1, v2;
|
|
|
+ int n;
|
|
|
+
|
|
|
+ if (tbl[i] != 0x08)
|
|
|
+ continue;
|
|
|
+ if (tbl[i + 1] == 0x5C && tbl[i + 2] == '_' &&
|
|
|
+ tbl[i + 3] == 'S' && tbl[i + 4] == '5' &&
|
|
|
+ tbl[i + 5] == '_')
|
|
|
+ p = tbl + i + 6;
|
|
|
+ else if (tbl[i + 1] == '_' && tbl[i + 2] == 'S' &&
|
|
|
+ tbl[i + 3] == '5' && tbl[i + 4] == '_')
|
|
|
+ p = tbl + i + 5;
|
|
|
+ else
|
|
|
+ continue;
|
|
|
+ rem = len - (unsigned int)(p - tbl);
|
|
|
+ if (!rem || *p != 0x12) /* PackageOp */
|
|
|
+ continue;
|
|
|
+ p++;
|
|
|
+ rem--;
|
|
|
+ if (aml_pkg_length(p, rem, &used) != 0)
|
|
|
+ continue;
|
|
|
+ p += used;
|
|
|
+ rem -= used;
|
|
|
+ if (!rem)
|
|
|
+ continue;
|
|
|
+ nel = *p++;
|
|
|
+ rem--;
|
|
|
+ if (nel < 1)
|
|
|
+ continue;
|
|
|
+ n = s5_elem(p, rem, &v1);
|
|
|
+ if (n < 0 || (v1 & ~7u))
|
|
|
+ continue;
|
|
|
+ p += n;
|
|
|
+ rem -= (unsigned int)n;
|
|
|
+ v2 = v1;
|
|
|
+ if (nel >= 2 && rem) {
|
|
|
+ n = s5_elem(p, rem, &v2);
|
|
|
+ if (n < 0 || (v2 & ~7u))
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ s5a = v1;
|
|
|
+ s5b = v2;
|
|
|
+ s5_ok = 1;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/* Map one DSDT/SSDT by address, validate it and scan for \_S5. The DSDT
|
|
|
+ * pointed to by the FADT is scanned even with a bad checksum (some firmware
|
|
|
+ * ships one and still expects the OS to use the table); SSDTs from the RSDT
|
|
|
+ * were already checksum-validated by the table walk. */
|
|
|
+static void scan_s5_addr(unsigned int addr, int strict)
|
|
|
+{
|
|
|
+ const struct acpi_sdt *t;
|
|
|
+ unsigned int len;
|
|
|
+
|
|
|
+ if (s5_ok || !addr || !range_ok(addr, sizeof(struct acpi_sdt)))
|
|
|
+ return;
|
|
|
+ t = table_ptr(addr, sizeof(struct acpi_sdt));
|
|
|
+ if (!t)
|
|
|
+ return;
|
|
|
+ if (!sig_is(t, "DSDT") && !sig_is(t, "SSDT"))
|
|
|
+ return;
|
|
|
+ len = t->length;
|
|
|
+ if (len < sizeof(struct acpi_sdt) || len > 0x100000u ||
|
|
|
+ !range_ok(addr, len))
|
|
|
+ return;
|
|
|
+ t = table_ptr(addr, len);
|
|
|
+ if (!t)
|
|
|
+ return;
|
|
|
+ if (!sum_ok((const unsigned char *)t, len) && strict)
|
|
|
+ return;
|
|
|
+ if (addr == dsdt_addr) {
|
|
|
+ dsdt_ptr = (const unsigned char *)t;
|
|
|
+ dsdt_len = len;
|
|
|
+ }
|
|
|
+ scan_s5((const unsigned char *)t, len);
|
|
|
+}
|
|
|
+
|
|
|
+/* Cache the FADT fields the S5 shutdown needs. */
|
|
|
+static void parse_fadt(const unsigned char *t, unsigned int len)
|
|
|
+{
|
|
|
+ unsigned long long x;
|
|
|
+
|
|
|
+ if (len < 109 || fadt_ok)
|
|
|
+ return;
|
|
|
+ fadt_ok = 1;
|
|
|
+ fadt_pm1a_cnt = *(const unsigned int *)(t + 64);
|
|
|
+ fadt_pm1b_cnt = *(const unsigned int *)(t + 68);
|
|
|
+ fadt_pm1a_evt = *(const unsigned int *)(t + 56);
|
|
|
+ fadt_pm1_cnt_len = t[89];
|
|
|
+ fadt_smi_cmd = *(const unsigned int *)(t + 48);
|
|
|
+ fadt_acpi_enable = t[52];
|
|
|
+ if (len >= 116)
|
|
|
+ fadt_flags = *(const unsigned int *)(t + 112);
|
|
|
+ /* ACPI 2.0+ firmware may publish the DSDT only in X_DSDT. */
|
|
|
+ if (len >= 148) {
|
|
|
+ x = *(const unsigned long long *)(t + 140);
|
|
|
+ if (x && (unsigned int)(x >> 32) == 0)
|
|
|
+ dsdt_addr = (unsigned int)x;
|
|
|
+ }
|
|
|
+ if (!dsdt_addr)
|
|
|
+ dsdt_addr = *(const unsigned int *)(t + 40);
|
|
|
+}
|
|
|
+
|
|
|
+/* Walk the RSDT/XSDT once: pick the MADT, cache the FADT and scan for \_S5. */
|
|
|
+static const struct acpi_sdt *scan_tables(const struct acpi_rsdp *rsdp)
|
|
|
{
|
|
|
unsigned int addr, len, i, step;
|
|
|
const struct acpi_sdt *sdt;
|
|
|
@@ -191,8 +391,7 @@ static const struct acpi_sdt *find_madt(const struct acpi_rsdp *rsdp)
|
|
|
t = table_ptr(taddr, tlen);
|
|
|
if (!t || !sum_ok((const unsigned char *)t, tlen))
|
|
|
continue;
|
|
|
- if (t->signature[0] == 'F' && t->signature[1] == 'A' &&
|
|
|
- t->signature[2] == 'C' && t->signature[3] == 'P') {
|
|
|
+ if (sig_is(t, "FACP")) {
|
|
|
/* FADT "century" is at offset 108 (ACPI 2.0+); 0 means
|
|
|
* the firmware does not provide a century register. */
|
|
|
if (tlen >= 109) {
|
|
|
@@ -202,13 +401,28 @@ static const struct acpi_sdt *find_madt(const struct acpi_rsdp *rsdp)
|
|
|
if (c >= 0x0E && c <= 0x7F)
|
|
|
rtc_century_reg = c;
|
|
|
}
|
|
|
+ parse_fadt((const unsigned char *)t, tlen);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (sig_is(t, "DSDT")) {
|
|
|
+ if (!dsdt_addr)
|
|
|
+ dsdt_addr = taddr;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if (sig_is(t, "SSDT")) {
|
|
|
+ if (nssdt < 4)
|
|
|
+ ssdt_addr[nssdt++] = taddr;
|
|
|
continue;
|
|
|
}
|
|
|
- if (t->signature[0] == 'A' && t->signature[1] == 'P' &&
|
|
|
- t->signature[2] == 'I' && t->signature[3] == 'C' &&
|
|
|
- !madt)
|
|
|
+ if (sig_is(t, "APIC") && !madt)
|
|
|
madt = t;
|
|
|
}
|
|
|
+
|
|
|
+ /* \_S5 normally lives in the DSDT; some firmware splits it into an
|
|
|
+ * SSDT. Scan after the walk so the FADT's DSDT pointer is known. */
|
|
|
+ scan_s5_addr(dsdt_addr, 0);
|
|
|
+ for (i = 0; i < nssdt && !s5_ok; i++)
|
|
|
+ scan_s5_addr(ssdt_addr[i], 1);
|
|
|
return madt;
|
|
|
}
|
|
|
|
|
|
@@ -276,16 +490,35 @@ int acpi_init(void)
|
|
|
ncpu = 0;
|
|
|
nioapics = 0;
|
|
|
rtc_century_reg = 0;
|
|
|
+ fadt_ok = 0;
|
|
|
+ fadt_pm1a_cnt = 0;
|
|
|
+ fadt_pm1b_cnt = 0;
|
|
|
+ fadt_pm1a_evt = 0;
|
|
|
+ fadt_pm1_cnt_len = 0;
|
|
|
+ fadt_smi_cmd = 0;
|
|
|
+ fadt_acpi_enable = 0;
|
|
|
+ fadt_flags = 0;
|
|
|
+ dsdt_addr = 0;
|
|
|
+ nssdt = 0;
|
|
|
+ dsdt_ptr = 0;
|
|
|
+ dsdt_len = 0;
|
|
|
+ s5a = 0;
|
|
|
+ s5b = 0;
|
|
|
+ s5_ok = 0;
|
|
|
bsp_apic = cpuid_apic_id();
|
|
|
- if (bsp_apic == 0xFFFFFFFFu)
|
|
|
- return 0;
|
|
|
|
|
|
rsdp = find_rsdp();
|
|
|
if (!rsdp) {
|
|
|
serial_puts(SERIAL_COM1, "acpi: no RSDP, staying UP\n");
|
|
|
return 0;
|
|
|
}
|
|
|
- madt = find_madt(rsdp);
|
|
|
+ /* Walk the tables even when the CPU has no APIC: the FADT also
|
|
|
+ * carries the S5 shutdown registers. */
|
|
|
+ madt = scan_tables(rsdp);
|
|
|
+ if (bsp_apic == 0xFFFFFFFFu) {
|
|
|
+ serial_puts(SERIAL_COM1, "acpi: no CPUID APIC, staying UP\n");
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
if (!madt) {
|
|
|
serial_puts(SERIAL_COM1, "acpi: no MADT, staying UP\n");
|
|
|
return 0;
|
|
|
@@ -346,10 +579,163 @@ unsigned int acpi_rtc_century_reg(void)
|
|
|
return rtc_century_reg;
|
|
|
}
|
|
|
|
|
|
+/* Put the machine into ACPI S5 (soft off) through the FADT PM1 control
|
|
|
+ * blocks. Returns 0 when the SLP_EN sequence was issued, -1 when the
|
|
|
+ * firmware does not provide a usable path. The caller must halt either
|
|
|
+ * way: a machine that ignores the write will just keep running. */
|
|
|
+static unsigned int pm1_cnt_read(unsigned int port)
|
|
|
+{
|
|
|
+ if (fadt_pm1_cnt_len >= 4)
|
|
|
+ return port_inl((unsigned short)port);
|
|
|
+ return port_inw((unsigned short)port);
|
|
|
+}
|
|
|
+
|
|
|
+static void pm1_cnt_put(unsigned int port, unsigned int v)
|
|
|
+{
|
|
|
+ if (fadt_pm1_cnt_len >= 4)
|
|
|
+ port_outl((unsigned short)port, v);
|
|
|
+ else
|
|
|
+ port_outw((unsigned short)port, (unsigned short)v);
|
|
|
+}
|
|
|
+
|
|
|
+/* Set the sleep type and optionally SLP_EN. SCI_EN and the other live bits
|
|
|
+ * are preserved: clearing SCI_EN can make a real chipset ignore the request.
|
|
|
+ * The type is written first and SLP_EN in a second write because some
|
|
|
+ * chipsets sample SLP_TYP only when SLP_EN is asserted. */
|
|
|
+static void pm1_cnt_set(unsigned int port, unsigned int type, int enable)
|
|
|
+{
|
|
|
+ unsigned int v = pm1_cnt_read(port);
|
|
|
+
|
|
|
+ v &= ~(7u << 10);
|
|
|
+ v |= type << 10;
|
|
|
+ if (enable)
|
|
|
+ v |= 1u << 13;
|
|
|
+ pm1_cnt_put(port, v);
|
|
|
+}
|
|
|
+
|
|
|
+/* The ION/nForce DSDT's _PTS(5): record the sleep state in the BIOS NVS
|
|
|
+ * (ASSB/AOTB/AAXB/OSTP at 0xCFF9E064, field offsets from the DSDT's BIOS
|
|
|
+ * OperationRegion) and arm PS1S/PS1E in the SMI block at 0x4400. The SMM
|
|
|
+ * reads that state when SLP_EN is written; arming PS1E without it hangs. */
|
|
|
+static void nvidia_s5_prepare(unsigned int smi_base)
|
|
|
+{
|
|
|
+ unsigned char *nvs;
|
|
|
+ unsigned char b;
|
|
|
+
|
|
|
+ nvs = ioremap(0xCFF9E064u, 0x100, IOREMAP_RAM);
|
|
|
+ if (!nvs)
|
|
|
+ return;
|
|
|
+ nvs[0x31] = 5; /* ASSB: S5 */
|
|
|
+ nvs[0x32] = 3; /* AOTB: OSFL() for Linux */
|
|
|
+ *(unsigned int *)(nvs + 0x33) = 0; /* AAXB */
|
|
|
+ nvs[0x4D] = 1; /* OSTP: OSYS() for Linux */
|
|
|
+ port_outb(0x80, 5); /* DBG8 */
|
|
|
+ if (smi_base <= 0xFFC0u) {
|
|
|
+ b = port_inb((unsigned short)(smi_base + 1));
|
|
|
+ port_outb((unsigned short)(smi_base + 1),
|
|
|
+ (unsigned char)(b | 0x80));
|
|
|
+ b = port_inb((unsigned short)(smi_base + 5));
|
|
|
+ port_outb((unsigned short)(smi_base + 5),
|
|
|
+ (unsigned char)(b | 0x80));
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+int acpi_poweroff(void)
|
|
|
+{
|
|
|
+ unsigned int t0, sci, smi, cmd;
|
|
|
+
|
|
|
+ if (!fadt_ok || !s5_ok)
|
|
|
+ return -1;
|
|
|
+ if (fadt_flags & (1u << 4)) /* HW_REDUCED_ACPI */
|
|
|
+ return -1;
|
|
|
+ if (!fadt_pm1a_cnt || fadt_pm1a_cnt > 0xFFFFu)
|
|
|
+ return -1;
|
|
|
+
|
|
|
+ /* Some firmware still has ACPI in legacy mode (SCI_EN clear), where
|
|
|
+ * PM1_CNT writes are ignored. Do the SMI handshake first; the FADT
|
|
|
+ * SMI_CMD is authoritative, but a few boards leave it zero and still
|
|
|
+ * use the conventional 0xB2/0xF1 pair. */
|
|
|
+ sci = pm1_cnt_read(fadt_pm1a_cnt) & 1;
|
|
|
+ if (!sci) {
|
|
|
+ smi = fadt_smi_cmd;
|
|
|
+ cmd = fadt_acpi_enable;
|
|
|
+ if (!smi || smi > 0xFFFFu)
|
|
|
+ smi = 0xB2;
|
|
|
+ if (!cmd)
|
|
|
+ cmd = 0xF1;
|
|
|
+ port_outb((unsigned short)smi, (unsigned char)cmd);
|
|
|
+ t0 = get_ticks_ms();
|
|
|
+ while (get_ticks_ms() - t0 < 3000) {
|
|
|
+ if (pm1_cnt_read(fadt_pm1a_cnt) & 1)
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ sci = pm1_cnt_read(fadt_pm1a_cnt) & 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ serial_puts(SERIAL_COM1, "poweroff: S5 ");
|
|
|
+ serial_putdec(SERIAL_COM1, s5a);
|
|
|
+ serial_puts(SERIAL_COM1, "/");
|
|
|
+ serial_putdec(SERIAL_COM1, s5b);
|
|
|
+ serial_puts(SERIAL_COM1, " pm1a ");
|
|
|
+ serial_puthex(SERIAL_COM1, fadt_pm1a_cnt);
|
|
|
+ if (fadt_pm1b_cnt) {
|
|
|
+ serial_puts(SERIAL_COM1, " pm1b ");
|
|
|
+ serial_puthex(SERIAL_COM1, fadt_pm1b_cnt);
|
|
|
+ }
|
|
|
+ serial_puts(SERIAL_COM1, " sci ");
|
|
|
+ serial_putdec(SERIAL_COM1, sci);
|
|
|
+ serial_puts(SERIAL_COM1, "\n");
|
|
|
+
|
|
|
+ /* Set SLP_TYP first, then assert SLP_EN in a separate write. */
|
|
|
+ pm1_cnt_set(fadt_pm1a_cnt, s5a, 0);
|
|
|
+ if (fadt_pm1b_cnt && fadt_pm1b_cnt <= 0xFFFFu)
|
|
|
+ pm1_cnt_set(fadt_pm1b_cnt, s5b, 0);
|
|
|
+ /* Intel-style southbridges route SLP_EN through an SMI while
|
|
|
+ * SMI_EN.SLP_SMI_EN (bit 4 at PMBASE+0x30) is set, so clear it.
|
|
|
+ * NVIDIA nForce/MCP parts go through their firmware SMM as the
|
|
|
+ * DSDT's _PTS(5) describes: nvidia_s5_prepare() records the sleep
|
|
|
+ * state in the BIOS NVS and arms PS1S/PS1E before SLP_EN. */
|
|
|
+ if (fadt_smi_cmd < 0x4000u) {
|
|
|
+ if (fadt_pm1a_evt && fadt_pm1a_evt <= 0xFFC0u) {
|
|
|
+ unsigned int se =
|
|
|
+ port_inl((unsigned short)(fadt_pm1a_evt + 0x30));
|
|
|
+
|
|
|
+ port_outl((unsigned short)(fadt_pm1a_evt + 0x30),
|
|
|
+ se & ~(1u << 4));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ nvidia_s5_prepare(fadt_smi_cmd - 0x2Eu);
|
|
|
+ }
|
|
|
+ pm1_cnt_set(fadt_pm1a_cnt, s5a, 1);
|
|
|
+ if (fadt_pm1b_cnt && fadt_pm1b_cnt <= 0xFFFFu)
|
|
|
+ pm1_cnt_set(fadt_pm1b_cnt, s5b, 1);
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+int acpi_dump_dsdt(const char *path)
|
|
|
+{
|
|
|
+ if (!dsdt_ptr || !dsdt_len)
|
|
|
+ return -1;
|
|
|
+ return sys_write_file(path, dsdt_ptr, dsdt_len);
|
|
|
+}
|
|
|
+
|
|
|
void acpi_dump(void)
|
|
|
{
|
|
|
unsigned int i;
|
|
|
|
|
|
+ if (fadt_ok) {
|
|
|
+ serial_puts(SERIAL_COM1, "acpi: fadt pm1a ");
|
|
|
+ serial_puthex(SERIAL_COM1, fadt_pm1a_cnt);
|
|
|
+ serial_puts(SERIAL_COM1, " s5 ");
|
|
|
+ if (s5_ok) {
|
|
|
+ serial_putdec(SERIAL_COM1, s5a);
|
|
|
+ serial_puts(SERIAL_COM1, "/");
|
|
|
+ serial_putdec(SERIAL_COM1, s5b);
|
|
|
+ } else {
|
|
|
+ serial_puts(SERIAL_COM1, "?");
|
|
|
+ }
|
|
|
+ serial_puts(SERIAL_COM1, "\n");
|
|
|
+ }
|
|
|
if (!acpi_ok) {
|
|
|
serial_puts(SERIAL_COM1, "acpi: unavailable, 1 cpu\n");
|
|
|
return;
|