Platform.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /** @file
  2. Platform specific defines for constructing ACPI tables
  3. Copyright (c) 2020, Rebecca Cran <rebecca@bsdio.com>
  4. Copyright (c) 2014, Pluribus Networks, Inc.
  5. Copyright (c) 2012, 2013, Red Hat, Inc.
  6. Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
  7. SPDX-License-Identifier: BSD-2-Clause-Patent
  8. **/
  9. #ifndef _Platform_h_INCLUDED_
  10. #define _Platform_h_INCLUDED_
  11. #include <IndustryStandard/Acpi.h>
  12. #include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>
  13. #include <IndustryStandard/SerialPortConsoleRedirectionTable.h>
  14. //
  15. // ACPI table information used to initialize tables.
  16. //
  17. #define EFI_ACPI_OEM_ID 'B','H','Y','V','E',' ' // OEMID 6 bytes long
  18. #define EFI_ACPI_OEM_REVISION 0x1
  19. #define EFI_ACPI_CREATOR_ID SIGNATURE_32('B','H','Y','V')
  20. #define EFI_ACPI_CREATOR_REVISION 0x00000001
  21. #define INT_MODEL 0x01
  22. #define SCI_INT_VECTOR 0x0009
  23. #define SMI_CMD_IO_PORT 0xB2
  24. #define ACPI_ENABLE 0xA0
  25. #define ACPI_DISABLE 0xA1
  26. #define S4BIOS_REQ 0x00
  27. #define PM1a_EVT_BLK 0x00000400 /* TNXXX */
  28. #define PM1b_EVT_BLK 0x00000000
  29. #define PM1a_CNT_BLK 0x00000404 /* TNXXX */
  30. #define PM1b_CNT_BLK 0x00000000
  31. #define PM2_CNT_BLK 0x00000000
  32. #define PM_TMR_BLK 0x00000408
  33. #define GPE0_BLK 0x00000000
  34. #define GPE1_BLK 0x00000000
  35. #define PM1_EVT_LEN 0x04
  36. #define PM1_CNT_LEN 0x02
  37. #define PM2_CNT_LEN 0x00
  38. #define PM_TM_LEN 0x04
  39. #define GPE0_BLK_LEN 0x00
  40. #define GPE1_BLK_LEN 0x00
  41. #define GPE1_BASE 0x00
  42. #define RESERVED 0x00
  43. #define P_LVL2_LAT 0x0000
  44. #define P_LVL3_LAT 0x0000
  45. #define FLUSH_SIZE 0x0000
  46. #define FLUSH_STRIDE 0x0000
  47. #define DUTY_OFFSET 0x00
  48. #define DUTY_WIDTH 0x00
  49. #define DAY_ALRM 0x00
  50. #define MON_ALRM 0x00
  51. #define CENTURY 0x32
  52. #define IAPC_BOOT_ARCH 0x12 /* 8042 present, disable PCIe ASPM */
  53. #define FACP_FLAGS (EFI_ACPI_1_0_WBINVD | EFI_ACPI_1_0_PROC_C1 | \
  54. EFI_ACPI_1_0_SLP_BUTTON | EFI_ACPI_1_0_TMR_VAL_EXT | \
  55. EFI_ACPI_2_0_RESET_REG_SUP | \
  56. EFI_ACPI_3_0_FORCE_APIC_PHYSICAL_DESTINATION_MODE)
  57. #define FACP_RESET_REG { \
  58. EFI_ACPI_3_0_SYSTEM_IO, /* Address Space ID */ \
  59. 8, /* Bit Width */ \
  60. 0, /* Bit Offset */ \
  61. EFI_ACPI_3_0_BYTE, /* Byte Access */ \
  62. 0xCF9 /* I/O Port */ \
  63. }
  64. #define FACP_RESET_VAL 0x6
  65. #endif