]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/IndustryStandard/WatchdogResourceTable.h
Check in definition for various ACPI tables and the header files for ACPI spec ranged...
[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 //
20 // Include files
21 //
22 #include "Acpi2_0.h"
23
24 //
25 // Ensure proper structure formats
26 //
27 #pragma pack(1)
28 //
29 // Watchdog Resource Table definition.
30 //
31 typedef struct {
32 EFI_ACPI_DESCRIPTION_HEADER Header;
33 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ControlRegisterAddress;
34 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE CountRegisterAddress;
35 UINT16 PCIDeviceID;
36 UINT16 PCIVendorID;
37 UINT8 PCIBusNumber;
38 UINT8 PCIDeviceNumber;
39 UINT8 PCIFunctionNumber;
40 UINT8 PCISegment;
41 UINT16 MaxCount;
42 UINT8 Units;
43 } EFI_ACPI_WATCHDOG_RESOURCE_1_0_TABLE;
44
45 typedef struct {
46 EFI_ACPI_DESCRIPTION_HEADER Header;
47 UINT32 WatchdogHeaderLength;
48 UINT8 PCISegment;
49 UINT8 PCIBusNumber;
50 UINT8 PCIDeviceNumber;
51 UINT8 PCIFunctionNumber;
52 UINT32 TimerPeriod;
53 UINT32 MaxCount;
54 UINT32 MinCount;
55 UINT8 WatchdogFlags;
56 UINT8 Reserved_57[3];
57 UINT32 NumberWatchdogInstructionEntries;
58 } EFI_ACPI_WATCHDOG_RESOURCE_2_0_TABLE;
59
60 typedef struct {
61 UINT8 WatchdogAction;
62 UINT8 InstructionFlags;
63 UINT8 Reserved_2;
64 UINT8 RegisterSize;
65 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion;
66 UINT32 Value;
67 UINT32 Mask;
68 } EFI_ACPI_WATCHDOG_RESOURCE_2_0_WATCHDOG_ACTION_INSTRUCTION_ENTRY;
69
70 #pragma pack()
71
72 //
73 // WDRT Revision (defined in spec)
74 //
75 #define EFI_ACPI_WATCHDOG_RESOURCE_1_0_TABLE_REVISION 0x01
76 #define EFI_ACPI_WATCHDOG_RESOURCE_2_0_TABLE_REVISION 0x02
77
78 //
79 // WDRT 1.0 Count Unit
80 //
81 #define EFI_ACPI_WDRT_1_0_COUNT_UNIT_1_SEC_PER_COUNT 1
82 #define EFI_ACPI_WDRT_1_0_COUNT_UNIT_100_MILLISEC_PER_COUNT 2
83 #define EFI_ACPI_WDRT_1_0_COUNT_UNIT_10_MILLISEC_PER_COUNT 3
84
85 //
86 // WDRT 2.0 Flags
87 //
88 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ENABLED 0x1
89 #define EFI_ACPI_WDRT_2_0_WATCHDOG_STOPPED_IN_SLEEP_STATE 0x80
90
91 //
92 // WDRT 2.0 Watchdog Actions
93 //
94 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_RESET 0x1
95 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_CURRENT_COUNTDOWN_PERIOD 0x4
96 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_COUNTDOWN_PERIOD 0x5
97 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_SET_COUNTDOWN_PERIOD 0x6
98 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_RUNNING_STATE 0x8
99 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_SET_RUNNING_STATE 0x9
100 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_STOPPED_STATE 0xA
101 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_SET_STOPPED_STATE 0xB
102 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_ REBOOT 0x10
103 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_SET_REBOOT 0x11
104 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_SHUTDOWN 0x12
105 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_SET_SHUTDOWN 0x13
106 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_QUERY_WATCHDOG_STATUS 0x20
107 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ACTION_SET_WATCHDOG_STATUS 0x21
108
109 //
110 // WDRT 2.0 Watchdog Action Entry Instruction Flags
111 //
112 #define EFI_ACPI_WDRT_2_0_WATCHDOG_INSTRUCTION_READ_VALUE 0x0
113 #define EFI_ACPI_WDRT_2_0_WATCHDOG_INSTRUCTION_READ_COUNTDOWN 0x1
114 #define EFI_ACPI_WDRT_2_0_WATCHDOG_INSTRUCTION_WRITE_VALUE 0x2
115 #define EFI_ACPI_WDRT_2_0_WATCHDOG_INSTRUCTION_WRITE_COUNTDOWN 0x3
116 #define EFI_ACPI_WDRT_2_0_WATCHDOG_INSTRUCTION_PRESERVE_REGISTER 0x80
117
118 #endif