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_
25 // Ensure proper structure formats
29 // Watchdog Resource Table definition.
32 EFI_ACPI_DESCRIPTION_HEADER Header
;
33 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE ControlRegisterAddress
;
34 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE CountRegisterAddress
;
38 UINT8 PCIDeviceNumber
;
39 UINT8 PCIFunctionNumber
;
43 } EFI_ACPI_WATCHDOG_RESOURCE_1_0_TABLE
;
46 EFI_ACPI_DESCRIPTION_HEADER Header
;
47 UINT32 WatchdogHeaderLength
;
50 UINT8 PCIDeviceNumber
;
51 UINT8 PCIFunctionNumber
;
57 UINT32 NumberWatchdogInstructionEntries
;
58 } EFI_ACPI_WATCHDOG_RESOURCE_2_0_TABLE
;
62 UINT8 InstructionFlags
;
65 EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE RegisterRegion
;
68 } EFI_ACPI_WATCHDOG_RESOURCE_2_0_WATCHDOG_ACTION_INSTRUCTION_ENTRY
;
73 // WDRT Revision (defined in spec)
75 #define EFI_ACPI_WATCHDOG_RESOURCE_1_0_TABLE_REVISION 0x01
76 #define EFI_ACPI_WATCHDOG_RESOURCE_2_0_TABLE_REVISION 0x02
79 // WDRT 1.0 Count Unit
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
88 #define EFI_ACPI_WDRT_2_0_WATCHDOG_ENABLED 0x1
89 #define EFI_ACPI_WDRT_2_0_WATCHDOG_STOPPED_IN_SLEEP_STATE 0x80
92 // WDRT 2.0 Watchdog Actions
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
110 // WDRT 2.0 Watchdog Action Entry Instruction Flags
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