forked from ghuntley/seaslic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathseabios.patch
41 lines (36 loc) · 1.1 KB
/
seabios.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- a/src/acpi.c 2013-01-19 06:44:54.000000000 +0600
+++ b/src/acpi.c 2013-05-07 01:16:30.000000000 +0600
@@ -214,6 +214,11 @@
#include "acpi-dsdt.hex"
+#define CONFIG_OEM_SLIC
+#ifdef CONFIG_OEM_SLIC
+#include "acpi-slic.hex"
+#endif
+
static void
build_header(struct acpi_table_header *h, u32 sig, int len, u8 rev)
{
@@ -226,6 +231,10 @@
h->oem_revision = cpu_to_le32(1);
memcpy(h->asl_compiler_id, CONFIG_APPNAME4, 4);
h->asl_compiler_revision = cpu_to_le32(1);
+ #ifdef CONFIG_OEM_SLIC
+ if (sig == RSDT_SIGNATURE) // only RSDT is checked by win7 & vista
+ memcpy(h->oem_id, ((struct acpi_table_header*)SLIC)->oem_id, 14);
+ #endif
h->checksum -= checksum(h, len);
}
@@ -827,6 +836,15 @@
ACPI_INIT_TABLE(build_srat());
if (pci->device == PCI_DEVICE_ID_INTEL_ICH9_LPC)
ACPI_INIT_TABLE(build_mcfg_q35());
+ #ifdef CONFIG_OEM_SLIC
+ void *buf = malloc_high(sizeof(SLIC));
+ if (!buf)
+ warn_noalloc();
+ else {
+ memcpy(buf, SLIC, sizeof(SLIC));
+ ACPI_INIT_TABLE(buf);
+ }
+ #endif
u16 i, external_tables = qemu_cfg_acpi_additional_tables();