rebase BIOS patch 0005 to apply against updated BOCHS version
PATCH 1/1 rebase BIOS patch 0005 to apply against updated BOCHS version
Hi,
the update to the new BOCHS BIOS version obviously broke BIOS patch 0005_hpet.patch. "git am" seems to be pickier than a simple "patch", but the patch context lines have changed, so I think this patch is justified. I attached the new version of the file, if the diff against the patch is hard to read. This is a git patch, so the diff is a bit larger than necessary. If you want to stay with the CVS diff, tell me and I will send a new version.
Regards,
Andre.
---
From: Andre Przywara <[email protected]>
rebasing BIOS patch 0005 to apply against updated BOCHS version
pc-bios/bios-pq/0005_hpet.patch +21 -21
@@ -4,13 +4,13 @@ BOCHS BIOS changes to support HPET in QEMU. Signed-off-by Beth Kon <[email protected]> -Index: bochs-2.3.7/bios/acpi-dsdt.dsl -=================================================================== ---- bochs-2.3.7.orig/bios/acpi-dsdt.dsl 2008-10-15 12:39:14.000000000 -0500 -+++ bochs-2.3.7/bios/acpi-dsdt.dsl 2008-10-28 07:58:40.000000000 -0500 -@@ -159,6 +159,26 @@ - Return (MEMP) - } +diff --git a/bios/acpi-dsdt.dsl b/bios/acpi-dsdt.dsl +index 5fc3636..a5bc8b3 100644 +--- a/bios/acpi-dsdt.dsl ++++ b/bios/acpi-dsdt.dsl +@@ -130,6 +130,26 @@ DefinitionBlock ( + ,, , AddressRangeMemory, TypeStatic) + }) } +#ifdef BX_QEMU + Device(HPET) {
@@ -35,11 +35,11 @@ Index: bochs-2.3.7/bios/acpi-dsdt.dsl } Scope(\_SB.PCI0) { -Index: bochs-2.3.7/bios/rombios32.c -=================================================================== ---- bochs-2.3.7.orig/bios/rombios32.c 2008-10-15 12:39:36.000000000 -0500 -+++ bochs-2.3.7/bios/rombios32.c 2008-11-12 14:41:41.000000000 -0600 -@@ -1087,7 +1087,11 @@ +diff --git a/bios/rombios32.c b/bios/rombios32.c +index de2ffed..f81b269 100644 +--- a/bios/rombios32.c ++++ b/bios/rombios32.c +@@ -1141,7 +1141,11 @@ struct rsdp_descriptor /* Root System Descriptor Pointer */ struct rsdt_descriptor_rev1 { ACPI_TABLE_HEADER_DEF /* ACPI common table header */
@@ -51,7 +51,7 @@ Index: bochs-2.3.7/bios/rombios32.c /* ACPI tables */ }; -@@ -1227,6 +1231,32 @@ +@@ -1281,6 +1285,32 @@ struct madt_processor_apic #endif };
@@ -84,9 +84,9 @@ Index: bochs-2.3.7/bios/rombios32.c struct madt_io_apic { APIC_HEADER_DEF -@@ -1237,6 +1267,17 @@ - * lines start */ - }; +@@ -1295,6 +1325,17 @@ struct madt_io_apic + + #pragma pack() +#ifdef BX_QEMU +struct madt_int_override
@@ -102,7 +102,7 @@ Index: bochs-2.3.7/bios/rombios32.c #include "acpi-dsdt.hex" static inline uint16_t cpu_to_le16(uint16_t x) -@@ -1342,6 +1383,10 @@ +@@ -1400,6 +1441,10 @@ void acpi_bios_init(void) struct facs_descriptor_rev1 *facs; struct multiple_apic_table *madt; uint8_t *dsdt, *ssdt;
@@ -113,7 +113,7 @@ Index: bochs-2.3.7/bios/rombios32.c uint32_t base_addr, rsdt_addr, fadt_addr, addr, facs_addr, dsdt_addr, ssdt_addr; uint32_t acpi_tables_size, madt_addr, madt_size; int i; -@@ -1384,10 +1429,21 @@ +@@ -1442,10 +1487,21 @@ void acpi_bios_init(void) madt_addr = addr; madt_size = sizeof(*madt) + sizeof(struct madt_processor_apic) * smp_cpus +
@@ -135,7 +135,7 @@ Index: bochs-2.3.7/bios/rombios32.c acpi_tables_size = addr - base_addr; BX_INFO("ACPI tables: RSDP addr=0x%08lx ACPI DATA addr=0x%08lx size=0x%x\n", -@@ -1410,6 +1466,9 @@ +@@ -1468,6 +1524,9 @@ void acpi_bios_init(void) rsdt->table_offset_entry[0] = cpu_to_le32(fadt_addr); rsdt->table_offset_entry[1] = cpu_to_le32(madt_addr); rsdt->table_offset_entry[2] = cpu_to_le32(ssdt_addr);
@@ -145,7 +145,7 @@ Index: bochs-2.3.7/bios/rombios32.c acpi_build_table_header((struct acpi_table_header *)rsdt, "RSDT", sizeof(*rsdt), 1); -@@ -1448,6 +1507,9 @@ +@@ -1507,6 +1566,9 @@ void acpi_bios_init(void) { struct madt_processor_apic *apic; struct madt_io_apic *io_apic;
@@ -155,7 +155,7 @@ Index: bochs-2.3.7/bios/rombios32.c memset(madt, 0, madt_size); madt->local_apic_address = cpu_to_le32(0xfee00000); -@@ -1467,10 +1529,34 @@ +@@ -1526,10 +1588,34 @@ void acpi_bios_init(void) io_apic->io_apic_id = smp_cpus; io_apic->address = cpu_to_le32(0xfec00000); io_apic->interrupt = cpu_to_le32(0);
From: Beth Kon <[email protected]>
BOCHS BIOS changes to support HPET in QEMU.
Signed-off-by Beth Kon <[email protected]>
bios/acpi-dsdt.dsl +20 -0
@@ -130,6 +130,26 @@ DefinitionBlock ( ,, , AddressRangeMemory, TypeStatic) }) } +#ifdef BX_QEMU + Device(HPET) { + Name(_HID, EISAID("PNP0103")) + Name(_UID, 0) + Method (_STA, 0, NotSerialized) { + Return(0x0F) + } + Name(_CRS, ResourceTemplate() { + DWordMemory( + ResourceConsumer, PosDecode, MinFixed, MaxFixed, + NonCacheable, ReadWrite, + 0x00000000, + 0xFED00000, + 0xFED003FF, + 0x00000000, + 0x00000400 /* 1K memory: FED00000 - FED003FF */ + ) + }) + } +#endif } Scope(\_SB.PCI0) {
bios/rombios32.c +86 -0
143 lines not on this page · raw message