]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/IndustryStandard/WatchdogResourceTable.h
fixed Typo in MdePkg.
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / WatchdogResourceTable.h
1 /**
2 @file
3 ACPI Watchdog Resource Table as defined at
4 Microsoft Hardware Watchdog Timer Specification.
5
6 Copyright (c) 2006 - 2007, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 **/
15
16 #ifndef _WATCHDOG_RESOURCE_TABLE_H_
17 #define _WATCHDOG_RESOURCE_TABLE_H_
18
19 #include <IndustryStandard/Acpi.h>
20
21 //
22 // Ensure proper structure formats
23 //
24 #pragma pack(1)
25 //
26 // Watchdog Resource Table definition.
27 //
28 typedef struct {
29 EFI_ACPI_DESCRIPTION_HEADER Header;
30 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ControlRegisterAddress;
31 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE CountRegisterAddress;
32 UINT16 PCIDeviceID;
33 UINT16 PCIVendorID;
34 UINT8 PCIBusNumber;
35 UINT8 PCIDeviceNumber;
36 UINT8 PCIFunctionNumber;
37 UINT8 PCISegment;
38 UINT16 MaxCount;
39 UINT8 Units;
40 } EFI_ACPI_WATCHDOG_RESOURCE_1_0_TABLE;
41
42 typedef struct {
43 EFI_ACPI_DESCRIPTION_HEADER Header;
44 UINT32 WatchdogHeaderLength;
45 UINT8 PCISegment;
46 UINT8 PCIBusNumber;
47 UINT8 PCIDeviceNumber;
48 UINT8 PCIFunctionNumber;
49 UINT32 TimerPeriod;
50 UINT32 MaxCount;
51 UINT32 MinCount;
52 UINT8 WatchdogFlags;
53 UINT8 Reserved_57[3];
54 UINT32 NumberWatchdogInstructionEntries;
55 } EFI_ACPI_WATCHDOG_RESOURCE_2_0_TABLE;
56
57 typedef struct {
58 UINT8 WatchdogAction;
59 UINT8 InstructionFlags;
60 UINT8 Reserved_2;
61 UINT8 RegisterSize;
62 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
63 UINT32 Value;
64 UINT32 Mask;
65 } EFI_ACPI_WATCHDOG_RESOURCE_2_0_WATCHDOG_ACTION_INSTRUCTION_ENTRY;
66
67 #pragma pack()
68
69 //
70 // WDRT Revision (defined in spec)
71 //
72 #define EFI_ACPI_WATCHDOG_RESOURCE_1_0_TABLE_REVISION 0x01
73 #define EFI_ACPI_WATCHDOG_RESOURCE_2_0_TABLE_REVISION 0x02
74
75 //
76 // WDRT 1.0 Count Unit
77 //
78 #define EFI_ACPI_WDRT_1_0_COUNT_UNIT_1_SEC_PER_COUNT 1
79 #define EFI_ACPI_WDRT_1_0_COUNT_UNIT_100_MILLISEC_PER_COUNT 2
80 #define EFI_ACPI_WDRT_1_0_COUNT_UNIT_10_MILLISEC_PER_COUNT 3
81
82 //
83 // WDRT 2.0 Flags
84 //
85 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ENABLED 0x1
86 #define EFI_ACPI_WDRT_2_0_WATCHDOG_STOPPED_IN_SLEEP_STATE 0x80
87
88 //
89 // WDRT 2.0 Watchdog Actions
90 //
91 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_RESET 0x1
92 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_CURRENT_COUNTDOWN_PERIOD 0x4
93 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_COUNTDOWN_PERIOD 0x5
94 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_SET_COUNTDOWN_PERIOD 0x6
95 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_RUNNING_STATE 0x8
96 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_SET_RUNNING_STATE 0x9
97 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_STOPPED_STATE 0xA
98 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_SET_STOPPED_STATE 0xB
99 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_REBOOT 0x10
100 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_SET_REBOOT 0x11
101 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_SHUTDOWN 0x12
102 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_SET_SHUTDOWN 0x13
103 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_WATCHDOG_STATUS 0x20
104 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_SET_WATCHDOG_STATUS 0x21
105
106 //
107 // WDRT 2.0 Watchdog Action Entry Instruction Flags
108 //
109 #define EFI_ACPI_WDRT_2_0_WATCHDOG_INSTRUCTION_READ_VALUE 0x0
110 #define EFI_ACPI_WDRT_2_0_WATCHDOG_INSTRUCTION_READ_COUNTDOWN 0x1
111 #define EFI_ACPI_WDRT_2_0_WATCHDOG_INSTRUCTION_WRITE_VALUE 0x2
112 #define EFI_ACPI_WDRT_2_0_WATCHDOG_INSTRUCTION_WRITE_COUNTDOWN 0x3
113 #define EFI_ACPI_WDRT_2_0_WATCHDOG_INSTRUCTION_PRESERVE_REGISTER 0x80
114
115 #endif