Hpet.aslc 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*++
  2. Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved
  3. SPDX-License-Identifier: BSD-2-Clause-Patent
  4. Module Name:
  5. Hpet.c
  6. Abstract:
  7. This file contains a structure definition for the ACPI HPET Table.
  8. --*/
  9. //
  10. // Statements that include other files
  11. //
  12. #ifdef ECP_FLAG
  13. #include <Tiano.h>
  14. #endif
  15. #include <Hpet.h>
  16. #include "AcpiTablePlatform.h"
  17. // Hpet Table
  18. EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_HEADER HPET = {
  19. {
  20. EFI_ACPI_3_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE,
  21. sizeof (EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_HEADER),
  22. EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_REVISION,
  23. 0, // to make sum of entire table == 0
  24. EFI_ACPI_OEM_ID, // OEMID is a 6 bytes long field
  25. EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes long)
  26. EFI_ACPI_OEM_REVISION, // OEM revision
  27. EFI_ACPI_CREATOR_ID, // ASL compiler vendor ID
  28. EFI_ACPI_CREATOR_REVISION // ASL compiler revision number
  29. },
  30. 0x0, // EventTimerBlockId
  31. {
  32. 0x00, // Address_Space_ID = System Memory
  33. 0x40, // Register_Bit_Width = 32 bits, mentioned about write failures when in 64bit in SCU HAS
  34. 0x00, // Register_Bit_offset
  35. 0x00, // Dword access
  36. HPET_BASE_ADDRESS, // Base addresse of HPET
  37. },
  38. 0x0, // Only HPET's _UID in Namespace
  39. MAIN_COUNTER_MIN_PERIODIC_CLOCK_TICKS,
  40. 0x0
  41. };
  42. VOID*
  43. ReferenceAcpiTable (
  44. VOID
  45. )
  46. {
  47. //
  48. // Reference the table being generated to prevent the optimizer from
  49. // removing the data structure from the executable
  50. //
  51. return (VOID*)&HPET;
  52. }