Clean up Acpi definitions according to Code Review results.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6136 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2008-10-20 08:58:14 +00:00
parent 6767917b10
commit 2b1cf49a31
4 changed files with 28 additions and 37 deletions

View File

@ -2,7 +2,7 @@
This file contains the latest ACPI definitions that are This file contains the latest ACPI definitions that are
consumed by drivers that do not care about ACPI versions. consumed by drivers that do not care about ACPI versions.
Copyright (c) 2006, Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -16,6 +16,6 @@
#ifndef _ACPI_H_ #ifndef _ACPI_H_
#define _ACPI_H_ #define _ACPI_H_
#include <IndustryStandard/Acpi3_0.h> #include <IndustryStandard/Acpi30.h>
#endif #endif

View File

@ -1,7 +1,7 @@
/** @file /** @file
ACPI 1.0b definitions from the ACPI Specification, revision 1.0b ACPI 1.0b definitions from the ACPI Specification, revision 1.0b
Copyright (c) 2006 - 2007, Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -42,11 +42,14 @@ typedef struct {
#pragma pack() #pragma pack()
// //
// Define for Pci Host Bridge Resource Allocation // Define for Desriptor
// //
#define ACPI_ADDRESS_SPACE_DESCRIPTOR 0x8A #define ACPI_ADDRESS_SPACE_DESCRIPTOR 0x8A
#define ACPI_END_TAG_DESCRIPTOR 0x79 #define ACPI_END_TAG_DESCRIPTOR 0x79
//
// Resource Type
//
#define ACPI_ADDRESS_SPACE_TYPE_MEM 0x00 #define ACPI_ADDRESS_SPACE_TYPE_MEM 0x00
#define ACPI_ADDRESS_SPACE_TYPE_IO 0x01 #define ACPI_ADDRESS_SPACE_TYPE_IO 0x01
#define ACPI_ADDRESS_SPACE_TYPE_BUS 0x02 #define ACPI_ADDRESS_SPACE_TYPE_BUS 0x02
@ -56,11 +59,11 @@ typedef struct {
/// ///
#define ACPI_TIMER_FREQUENCY 3579545 #define ACPI_TIMER_FREQUENCY 3579545
//
// Make sure structures match spec
//
#pragma pack(1)
//
// The commond definition of QWORD, DWORD, and WORD
// Address Space Descriptors
//
typedef struct { typedef struct {
UINT8 Desc; UINT8 Desc;
UINT16 Len; UINT16 Len;
@ -115,9 +118,6 @@ typedef struct {
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION (1 << 5) #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_TRANSLATION (1 << 5)
#define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC (0 << 5) #define EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_TYPE_STATIC (0 << 5)
#pragma pack()
// //
// Ensure proper structure formats // Ensure proper structure formats
// //
@ -139,8 +139,8 @@ typedef struct {
// //
// Root System Description Table // Root System Description Table
// No definition needed as it is a common description table header followed by a // No definition needed as it is a common description table header, the same with
// variable number of UINT32 table pointers. // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
// //
/// ///
@ -256,7 +256,7 @@ typedef struct {
// //
// Multiple APIC Description Table APIC structure types // Multiple APIC Description Table APIC structure types
// All other values between 0x09 an 0xFF are reserved and // All other values between 0x05 an 0xFF are reserved and
// will be ignored by OSPM. // will be ignored by OSPM.
// //
#define EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC 0x00 #define EFI_ACPI_1_0_PROCESSOR_LOCAL_APIC 0x00

View File

@ -1,7 +1,7 @@
/** @file /** @file
ACPI 2.0 definitions from the ACPI Specification, revision 2.0 ACPI 2.0 definitions from the ACPI Specification, revision 2.0
Copyright (c) 2006 - 2007, Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -20,10 +20,6 @@
// Ensure proper structure formats // Ensure proper structure formats
// //
#pragma pack(1) #pragma pack(1)
//
// ACPI Specification Revision
//
#define EFI_ACPI_2_0_REVISION 0x02
/// ///
/// ACPI 2.0 Generic Address Space definition /// ACPI 2.0 Generic Address Space definition
@ -81,8 +77,8 @@ typedef struct {
// //
// Root System Description Table // Root System Description Table
// No definition needed as it is a common description table header followed by a // No definition needed as it is a common description table header, the same with
// variable number of UINT32 table pointers. // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
// //
/// ///
@ -92,8 +88,8 @@ typedef struct {
// //
// Extended System Description Table // Extended System Description Table
// No definition needed as it is a common description table header followed by a // No definition needed as it is a common description table header, the same with
// variable number of UINT64 table pointers. // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
// //
/// ///

View File

@ -1,5 +1,5 @@
/** @file /** @file
ACPI 3.0 definitions from the ACPI Specification Revision 3.0 September 2, 2004 ACPI 3.0 definitions from the ACPI Specification Revision 3.0b October 10, 2006
Copyright (c) 2006 - 2008, Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
@ -21,11 +21,6 @@
// //
#pragma pack(1) #pragma pack(1)
///
/// ACPI Specification Revision
///
#define EFI_ACPI_3_0_REVISION 0x03
/// ///
/// ACPI 3.0 Generic Address Space definition /// ACPI 3.0 Generic Address Space definition
/// ///
@ -76,9 +71,9 @@ typedef struct {
} EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER; } EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER;
/// ///
/// RSD_PTR Revision (as defined in ACPI 3.0 spec.) /// RSD_PTR Revision (as defined in ACPI 3.0b spec.)
/// ///
#define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 // ACPISpec30 (Revision 3.0 September 2, 2004) says current value is 2 #define EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION 0x02 ///< ACPISpec (Revision 3.0b) says current value is 2
/// ///
/// Common table header, this prefaces all ACPI tables, including FACS, but /// Common table header, this prefaces all ACPI tables, including FACS, but
@ -91,8 +86,8 @@ typedef struct {
// //
// Root System Description Table // Root System Description Table
// No definition needed as it is a common description table header followed by a // No definition needed as it is a common description table header, the same with
// variable number of UINT32 table pointers. // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT32 table pointers.
// //
/// ///
@ -102,8 +97,8 @@ typedef struct {
// //
// Extended System Description Table // Extended System Description Table
// No definition needed as it is a common description table header followed by a // No definition needed as it is a common description table header, the same with
// variable number of UINT64 table pointers. // EFI_ACPI_DESCRIPTION_HEADER, followed by a variable number of UINT64 table pointers.
// //
/// ///
@ -251,8 +246,8 @@ typedef struct {
// Differentiated System Description Table, // Differentiated System Description Table,
// Secondary System Description Table // Secondary System Description Table
// and Persistent System Description Table, // and Persistent System Description Table,
// no definition needed as they are common description table header followed by a // no definition needed as they are common description table header, the same with
// definition block. // EFI_ACPI_DESCRIPTION_HEADER, followed by a definition block.
// //
#define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 #define EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02
#define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02 #define EFI_ACPI_3_0_SECONDARY_SYSTEM_DESCRIPTION_TABLE_REVISION 0x02