]>
Commit | Line | Data |
---|---|---|
3cbfba02 DW |
1 | /*++\r |
2 | \r | |
3 | Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved\r | |
4 | \r | |
5 | This program and the accompanying materials are licensed and made available under\r | |
6 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
7 | The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php.\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | \r | |
14 | \r | |
15 | Module Name:\r | |
16 | \r | |
17 | Hpet.c\r | |
18 | \r | |
19 | Abstract:\r | |
20 | \r | |
21 | This file contains a structure definition for the ACPI HPET Table.\r | |
22 | --*/\r | |
23 | \r | |
24 | //\r | |
25 | // Statements that include other files\r | |
26 | //\r | |
27 | #ifdef ECP_FLAG\r | |
28 | #include <Tiano.h>\r | |
29 | #endif\r | |
30 | #include <Hpet.h>\r | |
31 | #include "AcpiTablePlatform.h"\r | |
32 | \r | |
33 | // Hpet Table\r | |
34 | EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_HEADER HPET = {\r | |
35 | {\r | |
36 | EFI_ACPI_3_0_HIGH_PRECISION_EVENT_TIMER_TABLE_SIGNATURE,\r | |
37 | sizeof (EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_HEADER),\r | |
38 | EFI_ACPI_HIGH_PRECISION_EVENT_TIMER_TABLE_REVISION,\r | |
39 | 0, // to make sum of entire table == 0\r | |
40 | EFI_ACPI_OEM_ID, // OEMID is a 6 bytes long field\r | |
41 | EFI_ACPI_OEM_TABLE_ID, // OEM table identification(8 bytes long)\r | |
42 | EFI_ACPI_OEM_REVISION, // OEM revision\r | |
43 | EFI_ACPI_CREATOR_ID, // ASL compiler vendor ID\r | |
44 | EFI_ACPI_CREATOR_REVISION // ASL compiler revision number\r | |
45 | },\r | |
46 | 0x0, // EventTimerBlockId\r | |
47 | {\r | |
48 | 0x00, // Address_Space_ID = System Memory\r | |
49 | 0x40, // Register_Bit_Width = 32 bits, mentioned about write failures when in 64bit in SCU HAS\r | |
50 | 0x00, // Register_Bit_offset\r | |
51 | 0x00, // Dword access\r | |
52 | HPET_BASE_ADDRESS, // Base addresse of HPET\r | |
53 | },\r | |
54 | 0x0, // Only HPET's _UID in Namespace\r | |
55 | MAIN_COUNTER_MIN_PERIODIC_CLOCK_TICKS,\r | |
56 | 0x0\r | |
57 | };\r | |
58 | \r | |
59 | VOID*\r | |
60 | ReferenceAcpiTable (\r | |
61 | VOID\r | |
62 | )\r | |
63 | {\r | |
64 | //\r | |
65 | // Reference the table being generated to prevent the optimizer from\r | |
66 | // removing the data structure from the executable\r | |
67 | //\r | |
68 | return (VOID*)&HPET;\r | |
69 | }\r |