On 05/18/12 05:07, Kevin O'Connor wrote:
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 kraxel@redhat.com
[...]
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))
u8 *ssdt = malloc_high(sizeof(struct acpi_table_header) + length); if (! ssdt) { warn_noalloc();+ 17);
@@ -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
Done, also created a virtual device in the dsdt to access those fields so we have a single place in the dsdt we have to keep in sync with acpi.h in case we are going to add more stuff there (as discussed for s3).
Comments?
[ for review only, guess we want pin down the w2k8 issue before committing, although that one is less critical than the winxp issue as it triggers only in case something is actually mapped high ... ]
cheers, Gerd