On Tue, May 15, 2012 at 12:46:25PM +0200, Gerd Hoffmann wrote: > Write the pci window location to memory and add a pointer to the SSDT > (BDAT region). Turn \\SB.PCI0._CRS into a method which looks up the > information there and updates the ressources accordingly. > > Signed-off-by: Gerd Hoffmann <[email protected]> [...] > diff --git a/src/acpi.c b/src/acpi.c > index 30888b9..a13298d 100644 > --- a/src/acpi.c > +++ b/src/acpi.c > @@ -415,7 +415,8 @@ build_ssdt(void) > int length = ((1+3+4) > + (acpi_cpus * SD_SIZEOF) > + (1+2+5+(12*acpi_cpus)) > - + (6+2+1+(1*acpi_cpus))); > + + (6+2+1+(1*acpi_cpus)) > + + 17); > u8 *ssdt = malloc_high(sizeof(struct acpi_table_header) + length); > if (! ssdt) { > warn_noalloc(); > @@ -477,6 +478,31 @@ build_ssdt(void) > for (i=0; i<acpi_cpus; i++) > *(ssdt_ptr++) = (i < CountCPUs) ? 0x01 : 0x00; > > + // store pci io windows: start, end, length > + // this way we don't have to do the math in the dsdt > + u64 *pcimem = malloc_high(sizeof(*pcimem) * 6); > + pcimem[0] = pcimem_start; > + pcimem[1] = pcimem_end - 1; > + pcimem[2] = pcimem_end - pcimem_start - 1; > + pcimem[3] = pcimem64_start; > + pcimem[4] = pcimem64_end - 1; > + pcimem[5] = pcimem64_end - pcimem64_start - 1;
I think we should really define a struct here instead of an array - that should make it more obvious what's going on. -Kevin _______________________________________________ SeaBIOS mailing list [email protected] http://www.seabios.org/mailman/listinfo/seabios
