ia64/xen-unstable

changeset 7917:750b19fec820

Add a trivial namespace to the fake ACPI DSDT.
This simply defines the root scope and adds a processor object.
This eliminates the last guest ACPI CA warning and you should now
have /proc/acpi/processor/CPU0 on the guest. Patch versus current
xen-ia64-unstable.hg

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author djm@kirby.fc.hp.com
date Tue Nov 22 16:10:27 2005 -0600 (2005-11-22)
parents 90b9e8569dfb
children e97c20d1f68f
files xen/arch/ia64/xen/dom_fw.c
line diff
     1.1 --- a/xen/arch/ia64/xen/dom_fw.c	Tue Nov 22 12:19:11 2005 -0600
     1.2 +++ b/xen/arch/ia64/xen/dom_fw.c	Tue Nov 22 16:10:27 2005 -0600
     1.3 @@ -481,6 +481,7 @@ struct fake_acpi_tables {
     1.4  	struct fadt_descriptor_rev2 fadt;
     1.5  	struct facs_descriptor_rev2 facs;
     1.6  	struct acpi_table_header dsdt;
     1.7 +	u8 aml[16];
     1.8  	struct acpi_table_madt madt;
     1.9  	struct acpi_table_lsapic lsapic;
    1.10  	u8 pm1a_evt_blk[4];
    1.11 @@ -564,17 +565,26 @@ dom_fw_fake_acpi(struct fake_acpi_tables
    1.12  	                                        ACPI_RSDP_CHECKSUM_LENGTH);
    1.13  	rsdp->ext_checksum = generate_acpi_checksum(rsdp, rsdp->length);
    1.14  
    1.15 -	/*
    1.16 -	 * setup DSDT - ACPI generates a warning because there's no AML
    1.17 -	 * in the DSDT.  Revisit to add dummy AML stub.
    1.18 -	 */ 
    1.19 +	/* setup DSDT with trivial namespace. */ 
    1.20  	strncpy(dsdt->signature, DSDT_SIG, 4);
    1.21  	dsdt->revision = 1;
    1.22 -	dsdt->length = sizeof(struct acpi_table_header);
    1.23 +	dsdt->length = sizeof(struct acpi_table_header) + sizeof(tables->aml);
    1.24  	strcpy(dsdt->oem_id, "XEN");
    1.25  	strcpy(dsdt->oem_table_id, "Xen/ia64");
    1.26  	strcpy(dsdt->asl_compiler_id, "XEN");
    1.27  	dsdt->asl_compiler_revision = (XEN_VERSION<<16)|(XEN_SUBVERSION);
    1.28 +
    1.29 +	/* Trivial namespace, avoids ACPI CA complaints */
    1.30 +	tables->aml[0] = 0x10; /* Scope */
    1.31 +	tables->aml[1] = 0x12; /* length/offset to next object */
    1.32 +	strncpy(&tables->aml[2], "_SB_", 4);
    1.33 +
    1.34 +	/* The processor object isn't absolutely necessary, revist for SMP */
    1.35 +	tables->aml[6] = 0x5b; /* processor object */
    1.36 +	tables->aml[7] = 0x83;
    1.37 +	tables->aml[8] = 0x0b; /* next */
    1.38 +	strncpy(&tables->aml[9], "CPU0", 4);
    1.39 +
    1.40  	dsdt->checksum = generate_acpi_checksum(dsdt, dsdt->length);
    1.41  
    1.42  	/* setup MADT */