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 SPDX-License-Identifier: BSD-2-Clause-Patent 7 8 **/ 9 10 #ifndef _Platform_h_INCLUDED_ 11 #define _Platform_h_INCLUDED_ 12 13 #include <PiDxe.h> 14 #include <IndustryStandard/Acpi.h> 15 16 // 17 // ACPI table information used to initialize tables. 18 // 19 #define EFI_ACPI_OEM_ID 'O','V','M','F',' ',' ' // OEMID 6 bytes long 20 #define EFI_ACPI_OEM_TABLE_ID SIGNATURE_64('O','V','M','F','E','D','K','2') // OEM table id 8 bytes long 21 #define EFI_ACPI_OEM_REVISION 0x20130221 22 #define EFI_ACPI_CREATOR_ID SIGNATURE_32('O','V','M','F') 23 #define EFI_ACPI_CREATOR_REVISION 0x00000099 24 25 #define SCI_INT_VECTOR 0x0009 26 #define SMI_CMD_IO_PORT 0xB2 27 #define ACPI_ENABLE 0xF1 28 #define ACPI_DISABLE 0xF0 29 #define S4BIOS_REQ 0x00 30 #define PM1a_EVT_BLK 0x0000b000 31 #define PM1a_CNT_BLK 0x0000b004 32 #define PM_TMR_BLK 0x0000b008 33 #define GPE0_BLK 0x0000afe0 34 #define PM1_EVT_LEN 0x04 35 #define PM1_CNT_LEN 0x02 36 #define PM_TM_LEN 0x04 37 #define GPE0_BLK_LEN 0x04 38 #define RESERVED 0x00 39 #define P_LVL2_LAT 0x0065 40 #define P_LVL3_LAT 0x03E9 41 #define FLUSH_SIZE 0x0000 42 #define FLUSH_STRIDE 0x0000 43 #define DUTY_OFFSET 0x00 44 #define DUTY_WIDTH 0x00 45 #define DAY_ALRM 0x00 46 #define MON_ALRM 0x00 47 #define CENTURY 0x00 48 #define FLAG (EFI_ACPI_2_0_WBINVD | \ 49 EFI_ACPI_2_0_PROC_C1 | \ 50 EFI_ACPI_2_0_SLP_BUTTON | \ 51 EFI_ACPI_2_0_RTC_S4 | \ 52 EFI_ACPI_2_0_RESET_REG_SUP) 53 #define RESET_REG 0xCF9 54 #define RESET_VALUE (BIT2 | BIT1) // PIIX3 Reset CPU + System Reset 55 56 // 57 // Byte-aligned IO port register block initializer for 58 // EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE 59 // 60 #define GAS2_IO(Base, Size) { \ 61 EFI_ACPI_2_0_SYSTEM_IO, /* AddressSpaceId */ \ 62 (Size) * 8, /* RegisterBitWidth */ \ 63 0, /* RegisterBitOffset */ \ 64 0, /* Reserved */ \ 65 (Base) /* Address */ \ 66 } 67 68 #endif 69