Vishal Bhoj | 82c8071 | 2015-12-15 21:13:33 +0530 | [diff] [blame^] | 1 | /** @file
|
| 2 | Platform specific defines for constructing ACPI tables
|
| 3 |
|
| 4 | Copyright (c) 2012, 2013, Red Hat, Inc.
|
| 5 | Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
|
| 6 | This program and the accompanying materials are
|
| 7 | licensed and made available under the terms and conditions of the BSD License
|
| 8 | which accompanies this distribution. The full text of the license may be found at
|
| 9 | http://opensource.org/licenses/bsd-license.php
|
| 10 |
|
| 11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
| 12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
| 13 |
|
| 14 | **/
|
| 15 |
|
| 16 | #ifndef _Platform_h_INCLUDED_
|
| 17 | #define _Platform_h_INCLUDED_
|
| 18 |
|
| 19 | #include <PiDxe.h>
|
| 20 | #include <IndustryStandard/Acpi.h>
|
| 21 |
|
| 22 | //
|
| 23 | // ACPI table information used to initialize tables.
|
| 24 | //
|
| 25 | #define EFI_ACPI_OEM_ID 'O','V','M','F',' ',' ' // OEMID 6 bytes long
|
| 26 | #define EFI_ACPI_OEM_TABLE_ID SIGNATURE_64('O','V','M','F','E','D','K','2') // OEM table id 8 bytes long
|
| 27 | #define EFI_ACPI_OEM_REVISION 0x20130221
|
| 28 | #define EFI_ACPI_CREATOR_ID SIGNATURE_32('O','V','M','F')
|
| 29 | #define EFI_ACPI_CREATOR_REVISION 0x00000099
|
| 30 |
|
| 31 | #define SCI_INT_VECTOR 0x0009
|
| 32 | #define SMI_CMD_IO_PORT 0xB2
|
| 33 | #define ACPI_ENABLE 0xF1
|
| 34 | #define ACPI_DISABLE 0xF0
|
| 35 | #define S4BIOS_REQ 0x00
|
| 36 | #define PM1a_EVT_BLK 0x0000b000
|
| 37 | #define PM1a_CNT_BLK 0x0000b004
|
| 38 | #define PM_TMR_BLK 0x0000b008
|
| 39 | #define GPE0_BLK 0x0000afe0
|
| 40 | #define PM1_EVT_LEN 0x04
|
| 41 | #define PM1_CNT_LEN 0x02
|
| 42 | #define PM_TM_LEN 0x04
|
| 43 | #define GPE0_BLK_LEN 0x04
|
| 44 | #define RESERVED 0x00
|
| 45 | #define P_LVL2_LAT 0x0065
|
| 46 | #define P_LVL3_LAT 0x03E9
|
| 47 | #define FLUSH_SIZE 0x0000
|
| 48 | #define FLUSH_STRIDE 0x0000
|
| 49 | #define DUTY_OFFSET 0x00
|
| 50 | #define DUTY_WIDTH 0x00
|
| 51 | #define DAY_ALRM 0x00
|
| 52 | #define MON_ALRM 0x00
|
| 53 | #define CENTURY 0x00
|
| 54 | #define FLAG (EFI_ACPI_2_0_WBINVD | \
|
| 55 | EFI_ACPI_2_0_PROC_C1 | \
|
| 56 | EFI_ACPI_2_0_SLP_BUTTON | \
|
| 57 | EFI_ACPI_2_0_RTC_S4 | \
|
| 58 | EFI_ACPI_2_0_RESET_REG_SUP)
|
| 59 | #define RESET_REG 0xCF9
|
| 60 | #define RESET_VALUE (BIT2 | BIT1) // PIIX3 Reset CPU + System Reset
|
| 61 |
|
| 62 | //
|
| 63 | // Byte-aligned IO port register block initializer for
|
| 64 | // EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE
|
| 65 | //
|
| 66 | #define GAS2_IO(Base, Size) { \
|
| 67 | EFI_ACPI_2_0_SYSTEM_IO, /* AddressSpaceId */ \
|
| 68 | (Size) * 8, /* RegisterBitWidth */ \
|
| 69 | 0, /* RegisterBitOffset */ \
|
| 70 | 0, /* Reserved */ \
|
| 71 | (Base) /* Address */ \
|
| 72 | }
|
| 73 |
|
| 74 | #endif
|