ia64/xen-unstable

changeset 13232:63fb88610e1e

[HVM] Rationalise OEM and Creator IDs and Table Revisions.
Create virtualised IDs and use them consistently.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@localhost.localdomain
date Sat Dec 30 15:45:13 2006 +0000 (2006-12-30)
parents a578c9703416
children d275951acf10
files tools/firmware/hvmloader/acpi/Makefile tools/firmware/hvmloader/acpi/acpi2_0.h tools/firmware/hvmloader/acpi/build.c tools/firmware/hvmloader/acpi/dsdt.asl tools/firmware/hvmloader/acpi/dsdt.c tools/firmware/hvmloader/acpi/ssdt_tpm.asl tools/firmware/hvmloader/acpi/ssdt_tpm.h tools/firmware/hvmloader/acpi/static_tables.c tools/firmware/vmxassist/vm86.c
line diff
     1.1 --- a/tools/firmware/hvmloader/acpi/Makefile	Sat Dec 30 12:49:31 2006 +0000
     1.2 +++ b/tools/firmware/hvmloader/acpi/Makefile	Sat Dec 30 15:45:13 2006 +0000
     1.3 @@ -24,7 +24,7 @@ C_SRC = build.c dsdt.c static_tables.c
     1.4  H_SRC = $(wildcard *.h)
     1.5  OBJS  = $(patsubst %.c,%.o,$(C_SRC))
     1.6  
     1.7 -IASL_VER = acpica-unix-20050513
     1.8 +IASL_VER = acpica-unix-20060707
     1.9  IASL_URL = http://developer.intel.com/technology/iapc/acpi/downloads/$(IASL_VER).tar.gz
    1.10  
    1.11  # Disable PIE/SSP if GCC supports them. They can break us.
     2.1 --- a/tools/firmware/hvmloader/acpi/acpi2_0.h	Sat Dec 30 12:49:31 2006 +0000
     2.2 +++ b/tools/firmware/hvmloader/acpi/acpi2_0.h	Sat Dec 30 15:45:13 2006 +0000
     2.3 @@ -50,17 +50,18 @@ struct acpi_header {
     2.4      uint8_t  revision;
     2.5      uint8_t  checksum;
     2.6      uint8_t  oem_id[6];
     2.7 -    uint64_t oem_table_id;
     2.8 +    uint8_t  oem_table_id[8];
     2.9      uint32_t oem_revision;
    2.10      uint32_t creator_id;
    2.11      uint32_t creator_revision;
    2.12  };
    2.13  
    2.14 -#define ACPI_OEM_ID             {'I','N','T','E','L',' '}
    2.15 -#define ACPI_OEM_TABLE_ID       ASCII32(' ','T','B','D')
    2.16 -#define ACPI_OEM_REVISION       0x00000002
    2.17 -#define ACPI_CREATOR_ID         0x00       /* TBD */
    2.18 -#define ACPI_CREATOR_REVISION   0x00000002
    2.19 +#define ACPI_OEM_ID             "Xen"
    2.20 +#define ACPI_OEM_TABLE_ID       "HVM"
    2.21 +#define ACPI_OEM_REVISION       0
    2.22 +
    2.23 +#define ACPI_CREATOR_ID         ASCII32('H','V','M','L') /* HVMLoader */
    2.24 +#define ACPI_CREATOR_REVISION   0
    2.25  
    2.26  /*
    2.27   * ACPI 2.0 Generic Address Space definition.
    2.28 @@ -121,7 +122,6 @@ struct acpi_20_rsdt {
    2.29      struct acpi_header header;
    2.30      uint32_t entry[1];
    2.31  };
    2.32 -#define ACPI_2_0_RSDT_REVISION 0x01
    2.33  
    2.34  /*
    2.35   * Extended System Description Table (XSDT).
    2.36 @@ -130,7 +130,6 @@ struct acpi_20_xsdt {
    2.37      struct acpi_header header;
    2.38      uint64_t entry[1];
    2.39  };
    2.40 -#define ACPI_2_0_XSDT_REVISION 0x01
    2.41  
    2.42  /*
    2.43   * TCG Hardware Interface Table (TCPA)
    2.44 @@ -141,8 +140,6 @@ struct acpi_20_tcpa {
    2.45      uint32_t laml;
    2.46      uint64_t lasa;
    2.47  };
    2.48 -
    2.49 -#define ACPI_2_0_TCPA_REVISION 0x02
    2.50  #define ACPI_2_0_TCPA_LAML_SIZE (64*1024)
    2.51  
    2.52  /*
    2.53 @@ -202,7 +199,6 @@ struct acpi_20_fadt {
    2.54      struct acpi_20_generic_address x_gpe0_blk;
    2.55      struct acpi_20_generic_address x_gpe1_blk;
    2.56  };
    2.57 -#define ACPI_2_0_FADT_REVISION 0x03
    2.58  
    2.59  /*
    2.60   * FADT Boot Architecture Flags.
    2.61 @@ -254,8 +250,6 @@ struct acpi_20_madt {
    2.62      uint32_t flags;
    2.63  };
    2.64  
    2.65 -#define ACPI_2_0_MADT_REVISION 0x01
    2.66 -
    2.67  
    2.68  /*
    2.69   * HPET Description Table
    2.70 @@ -268,8 +262,6 @@ struct acpi_20_hpet {
    2.71      uint16_t           min_tick;
    2.72      uint8_t            page_protect;
    2.73  };
    2.74 -
    2.75 -#define ACPI_2_0_HPET_REVISION 0x01
    2.76  #define ACPI_HPET_ADDRESS 0xFED00000UL
    2.77  
    2.78  /*
    2.79 @@ -343,6 +335,17 @@ struct acpi_20_madt_intsrcovr {
    2.80  #define ACPI_2_0_TCPA_SIGNATURE ASCII32('T','C','P','A')
    2.81  #define ACPI_2_0_HPET_SIGNATURE ASCII32('H','P','E','T')
    2.82  
    2.83 +/*
    2.84 + * Table revision numbers.
    2.85 + */
    2.86 +#define ACPI_2_0_RSDP_REVISION 0x02
    2.87 +#define ACPI_2_0_FADT_REVISION 0x04
    2.88 +#define ACPI_2_0_MADT_REVISION 0x02
    2.89 +#define ACPI_2_0_RSDT_REVISION 0x01
    2.90 +#define ACPI_2_0_XSDT_REVISION 0x01
    2.91 +#define ACPI_2_0_TCPA_REVISION 0x02
    2.92 +#define ACPI_2_0_HPET_REVISION 0x01
    2.93 +
    2.94  #pragma pack ()
    2.95  
    2.96  #define ACPI_PHYSICAL_ADDRESS 0xEA000
     3.1 --- a/tools/firmware/hvmloader/acpi/build.c	Sat Dec 30 12:49:31 2006 +0000
     3.2 +++ b/tools/firmware/hvmloader/acpi/build.c	Sat Dec 30 15:45:13 2006 +0000
     3.3 @@ -57,8 +57,8 @@ int construct_madt(struct acpi_20_madt *
     3.4      memset(madt, 0, sizeof(*madt));
     3.5      madt->header.signature    = ACPI_2_0_MADT_SIGNATURE;
     3.6      madt->header.revision     = ACPI_2_0_MADT_REVISION;
     3.7 -    strncpy(madt->header.oem_id, "INTEL ", 6);
     3.8 -    madt->header.oem_table_id = ACPI_OEM_TABLE_ID;
     3.9 +    strncpy(madt->header.oem_id, ACPI_OEM_ID, 6);
    3.10 +    strncpy(madt->header.oem_table_id, ACPI_OEM_TABLE_ID, 8);
    3.11      madt->header.oem_revision = ACPI_OEM_REVISION;
    3.12      madt->header.creator_id   = ACPI_CREATOR_ID;
    3.13      madt->header.creator_revision = ACPI_CREATOR_REVISION;
    3.14 @@ -129,8 +129,8 @@ int construct_hpet(struct acpi_20_hpet *
    3.15      memset(hpet, 0, sizeof(*hpet));
    3.16      hpet->header.signature    = ACPI_2_0_HPET_SIGNATURE;
    3.17      hpet->header.revision     = ACPI_2_0_HPET_REVISION;
    3.18 -    strncpy(hpet->header.oem_id, "INTEL ", 6);
    3.19 -    hpet->header.oem_table_id = ACPI_OEM_TABLE_ID;
    3.20 +    strncpy(hpet->header.oem_id, ACPI_OEM_ID, 6);
    3.21 +    strncpy(hpet->header.oem_table_id, ACPI_OEM_TABLE_ID, 8);
    3.22      hpet->header.oem_revision = ACPI_OEM_REVISION;
    3.23      hpet->header.creator_id   = ACPI_CREATOR_ID;
    3.24      hpet->header.creator_revision = ACPI_CREATOR_REVISION;
    3.25 @@ -184,12 +184,11 @@ int construct_secondary_tables(uint8_t *
    3.26          tcpa->header.signature = ACPI_2_0_TCPA_SIGNATURE;
    3.27          tcpa->header.length    = sizeof(*tcpa);
    3.28          tcpa->header.revision  = ACPI_2_0_TCPA_REVISION;
    3.29 -        strncpy(tcpa->header.oem_id, "IBM   ", 6);
    3.30 -        tcpa->header.oem_table_id = ASCII64(' ', ' ', ' ', ' ',
    3.31 -                                            ' ', 'x', 'e', 'n');
    3.32 -        tcpa->header.oem_revision = 1;
    3.33 -        tcpa->header.creator_id   = ASCII32('I', 'B', 'M', ' ');
    3.34 -        tcpa->header.creator_revision = 1;
    3.35 +        strncpy(tcpa->header.oem_id, ACPI_OEM_ID, 6);
    3.36 +        strncpy(tcpa->header.oem_table_id, ACPI_OEM_TABLE_ID, 8);
    3.37 +        tcpa->header.oem_revision = ACPI_OEM_REVISION;
    3.38 +        tcpa->header.creator_id   = ACPI_CREATOR_ID;
    3.39 +        tcpa->header.creator_revision = ACPI_CREATOR_REVISION;
    3.40          tcpa->lasa = e820_malloc(
    3.41              ACPI_2_0_TCPA_LAML_SIZE, E820_RESERVED, (uint32_t)~0);
    3.42          if ( tcpa->lasa )
     4.1 --- a/tools/firmware/hvmloader/acpi/dsdt.asl	Sat Dec 30 12:49:31 2006 +0000
     4.2 +++ b/tools/firmware/hvmloader/acpi/dsdt.asl	Sat Dec 30 15:45:13 2006 +0000
     4.3 @@ -17,7 +17,7 @@
     4.4   * Place - Suite 330, Boston, MA 02111-1307 USA.
     4.5   */
     4.6  
     4.7 -DefinitionBlock ("DSDT.aml", "DSDT", 1, "INTEL","int-xen", 2006)
     4.8 +DefinitionBlock ("DSDT.aml", "DSDT", 2, "Xen", "HVM", 0)
     4.9  {
    4.10      Name (\PMBS, 0x0C00)
    4.11      Name (\PMLN, 0x08)
     5.1 --- a/tools/firmware/hvmloader/acpi/dsdt.c	Sat Dec 30 12:49:31 2006 +0000
     5.2 +++ b/tools/firmware/hvmloader/acpi/dsdt.c	Sat Dec 30 15:45:13 2006 +0000
     5.3 @@ -1,22 +1,22 @@
     5.4  /*
     5.5   * 
     5.6   * Intel ACPI Component Architecture
     5.7 - * ASL Optimizing Compiler / AML Disassembler version 20050513 [Aug 11 2006]
     5.8 - * Copyright (C) 2000 - 2005 Intel Corporation
     5.9 - * Supports ACPI Specification Revision 3.0
    5.10 + * ASL Optimizing Compiler version 20060707 [Dec 30 2006]
    5.11 + * Copyright (C) 2000 - 2006 Intel Corporation
    5.12 + * Supports ACPI Specification Revision 3.0a
    5.13   * 
    5.14 - * Compilation of "dsdt.asl" - Thu Dec 21 10:37:33 2006
    5.15 + * Compilation of "dsdt.asl" - Sat Dec 30 15:31:23 2006
    5.16   * 
    5.17   * C source code output
    5.18   *
    5.19   */
    5.20 -unsigned char AmlCode[] = 
    5.21 +unsigned char AmlCode[] =
    5.22  {
    5.23      0x44,0x53,0x44,0x54,0xD9,0x0D,0x00,0x00,  /* 00000000    "DSDT...." */
    5.24 -    0x01,0xED,0x49,0x4E,0x54,0x45,0x4C,0x00,  /* 00000008    "..INTEL." */
    5.25 -    0x69,0x6E,0x74,0x2D,0x78,0x65,0x6E,0x00,  /* 00000010    "int-xen." */
    5.26 -    0xD6,0x07,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
    5.27 -    0x13,0x05,0x05,0x20,0x08,0x50,0x4D,0x42,  /* 00000020    "... .PMB" */
    5.28 +    0x02,0xFB,0x58,0x65,0x6E,0x00,0x00,0x00,  /* 00000008    "..Xen..." */
    5.29 +    0x48,0x56,0x4D,0x00,0x00,0x00,0x00,0x00,  /* 00000010    "HVM....." */
    5.30 +    0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
    5.31 +    0x07,0x07,0x06,0x20,0x08,0x50,0x4D,0x42,  /* 00000020    "... .PMB" */
    5.32      0x53,0x0B,0x00,0x0C,0x08,0x50,0x4D,0x4C,  /* 00000028    "S....PML" */
    5.33      0x4E,0x0A,0x08,0x08,0x49,0x4F,0x42,0x31,  /* 00000030    "N...IOB1" */
    5.34      0x00,0x08,0x49,0x4F,0x4C,0x31,0x00,0x08,  /* 00000038    "..IOL1.." */
     6.1 --- a/tools/firmware/hvmloader/acpi/ssdt_tpm.asl	Sat Dec 30 12:49:31 2006 +0000
     6.2 +++ b/tools/firmware/hvmloader/acpi/ssdt_tpm.asl	Sat Dec 30 15:45:13 2006 +0000
     6.3 @@ -17,7 +17,7 @@
     6.4  
     6.5  //*  SSDT for TPM TIS Interface for Xen with Qemu device model
     6.6  
     6.7 -DefinitionBlock ("SSDT_TPM.aml", "SSDT", 1, "IBM","xen", 2006)
     6.8 +DefinitionBlock ("SSDT_TPM.aml", "SSDT", 2, "Xen", "HVM", 0)
     6.9  {
    6.10      Device (TPM) {
    6.11          Name (_HID, EisaId ("PNP0C31"))
    6.12 @@ -26,4 +26,4 @@ DefinitionBlock ("SSDT_TPM.aml", "SSDT",
    6.13              Memory32Fixed (ReadWrite, 0xFED40000, 0x5000,)
    6.14          })
    6.15      }
    6.16 -}
    6.17 \ No newline at end of file
    6.18 +}
     7.1 --- a/tools/firmware/hvmloader/acpi/ssdt_tpm.h	Sat Dec 30 12:49:31 2006 +0000
     7.2 +++ b/tools/firmware/hvmloader/acpi/ssdt_tpm.h	Sat Dec 30 15:45:13 2006 +0000
     7.3 @@ -1,11 +1,11 @@
     7.4  /*
     7.5   * 
     7.6   * Intel ACPI Component Architecture
     7.7 - * ASL Optimizing Compiler version 20060707 [Sep 11 2006]
     7.8 + * ASL Optimizing Compiler version 20060707 [Dec 30 2006]
     7.9   * Copyright (C) 2000 - 2006 Intel Corporation
    7.10   * Supports ACPI Specification Revision 3.0a
    7.11   * 
    7.12 - * Compilation of "acpi_ssdt_tpm.asl" - Mon Oct 30 11:28:27 2006
    7.13 + * Compilation of "ssdt_tpm.asl" - Sat Dec 30 15:31:27 2006
    7.14   * 
    7.15   * C source code output
    7.16   *
    7.17 @@ -13,9 +13,9 @@
    7.18  unsigned char AmlCode_TPM[] =
    7.19  {
    7.20      0x53,0x53,0x44,0x54,0x4C,0x00,0x00,0x00,  /* 00000000    "SSDTL..." */
    7.21 -    0x01,0x6D,0x49,0x42,0x4D,0x00,0x00,0x00,  /* 00000008    ".mIBM..." */
    7.22 -    0x78,0x65,0x6E,0x00,0x00,0x00,0x00,0x00,  /* 00000010    "xen....." */
    7.23 -    0xD6,0x07,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
    7.24 +    0x02,0x56,0x58,0x65,0x6E,0x00,0x00,0x00,  /* 00000008    ".VXen..." */
    7.25 +    0x48,0x56,0x4D,0x00,0x00,0x00,0x00,0x00,  /* 00000010    "HVM....." */
    7.26 +    0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
    7.27      0x07,0x07,0x06,0x20,0x5B,0x82,0x26,0x54,  /* 00000020    "... [.&T" */
    7.28      0x50,0x4D,0x5F,0x08,0x5F,0x48,0x49,0x44,  /* 00000028    "PM_._HID" */
    7.29      0x0C,0x41,0xD0,0x0C,0x31,0x08,0x5F,0x43,  /* 00000030    ".A..1._C" */
     8.1 --- a/tools/firmware/hvmloader/acpi/static_tables.c	Sat Dec 30 12:49:31 2006 +0000
     8.2 +++ b/tools/firmware/hvmloader/acpi/static_tables.c	Sat Dec 30 15:45:13 2006 +0000
     8.3 @@ -118,7 +118,7 @@ struct acpi_20_xsdt Xsdt = {
     8.4          .signature    = ACPI_2_0_XSDT_SIGNATURE,
     8.5          .length       = sizeof(struct acpi_header),
     8.6          .revision     = ACPI_2_0_XSDT_REVISION,
     8.7 -        .oem_id       = ACPI_OEM_ID, 
     8.8 +        .oem_id       = ACPI_OEM_ID,
     8.9          .oem_table_id = ACPI_OEM_TABLE_ID,
    8.10          .oem_revision = ACPI_OEM_REVISION,
    8.11          .creator_id   = ACPI_CREATOR_ID,
    8.12 @@ -130,7 +130,7 @@ struct acpi_20_xsdt Xsdt = {
    8.13  struct acpi_20_rsdp Rsdp = {
    8.14      .signature = ACPI_2_0_RSDP_SIGNATURE,
    8.15      .oem_id    = ACPI_OEM_ID,
    8.16 -    .revision  = ACPI_OEM_REVISION, 
    8.17 +    .revision  = ACPI_2_0_RSDP_REVISION,
    8.18      .length    = sizeof(struct acpi_20_rsdp)
    8.19  };
    8.20  
     9.1 --- a/tools/firmware/vmxassist/vm86.c	Sat Dec 30 12:49:31 2006 +0000
     9.2 +++ b/tools/firmware/vmxassist/vm86.c	Sat Dec 30 15:45:13 2006 +0000
     9.3 @@ -961,9 +961,9 @@ protected_mode(struct regs *regs)
     9.4  
     9.5  	/* initialize jump environment to warp back to protected mode */
     9.6  	regs->uss = DATA_SELECTOR;
     9.7 -	regs->uesp = stack_top;
     9.8 +	regs->uesp = (unsigned long)stack_top;
     9.9  	regs->cs = CODE_SELECTOR;
    9.10 -	regs->eip = (unsigned) switch_to_protected_mode;
    9.11 +	regs->eip = (unsigned long)switch_to_protected_mode;
    9.12  
    9.13  	/* this should get us into 32-bit mode */
    9.14  }