3 ACPI Watchdog Resource Table as defined at
4 Microsoft Hardware Watchdog Timer Specification.
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
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.
16 #ifndef _WATCHDOG_RESOURCE_TABLE_H_
17 #define _WATCHDOG_RESOURCE_TABLE_H_
19 #include <IndustryStandard/Acpi.h>
22 // Ensure proper structure formats
26 // Watchdog Resource Table definition.
29 EFI_ACPI_DESCRIPTION_HEADER Header
;
30 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ControlRegisterAddress
;
31 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE CountRegisterAddress
;
35 UINT8 PCIDeviceNumber
;
36 UINT8 PCIFunctionNumber
;
40 } EFI_ACPI_WATCHDOG_RESOURCE_1_0_TABLE
;
43 EFI_ACPI_DESCRIPTION_HEADER Header
;
44 UINT32 WatchdogHeaderLength
;
47 UINT8 PCIDeviceNumber
;
48 UINT8 PCIFunctionNumber
;
54 UINT32 NumberWatchdogInstructionEntries
;
55 } EFI_ACPI_WATCHDOG_RESOURCE_2_0_TABLE
;
59 UINT8 InstructionFlags
;
62 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion
;
65 } EFI_ACPI_WATCHDOG_RESOURCE_2_0_WATCHDOG_ACTION_INSTRUCTION_ENTRY
;
70 // WDRT Revision (defined in spec)
72 #define EFI_ACPI_WATCHDOG_RESOURCE_1_0_TABLE_REVISION 0x01
73 #define EFI_ACPI_WATCHDOG_RESOURCE_2_0_TABLE_REVISION 0x02
76 // WDRT 1.0 Count Unit
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
85 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ENABLED 0x1
86 #define EFI_ACPI_WDRT_2_0_WATCHDOG_STOPPED_IN_SLEEP_STATE 0x80
89 // WDRT 2.0 Watchdog Actions
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
107 // WDRT 2.0 Watchdog Action Entry Instruction Flags
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