summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-28 08:36:46 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2007-06-28 08:36:46 +0000
commitde4c8a308017f1e55326887251a13a5b80162631 (patch)
tree1790ebf3bcdf29193aba0049aa81e7550911941c
parent2a90cfc2016a61952e5495d5cbf4c29cda2696ab (diff)
downloadedk2-de4c8a308017f1e55326887251a13a5b80162631.zip
edk2-de4c8a308017f1e55326887251a13a5b80162631.tar.gz
edk2-de4c8a308017f1e55326887251a13a5b80162631.tar.bz2
1) Add MdeModulePkg\Universal\WatchDogTimerDxe driver. Because this driver use ReportStatus so this module is dependent on IntelFrameworkPkg now.
2) Write ReportStatusCodeLib.inf for IntelFrameworkPkg\Library\ReportStatusCodeLibFramework and add it into IntelFrameworkPkg.dec git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2837 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--BaseTools/Conf/FrameworkDatabase.template3
-rw-r--r--IntelFrameworkPkg/IntelFrameworkPkg.dec1
-rw-r--r--IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf116
-rw-r--r--MdeModulePkg/MdeModulePkg.dsc1
-rw-r--r--MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c329
-rw-r--r--MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.dxs31
-rw-r--r--MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h62
-rw-r--r--MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf96
-rw-r--r--MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.msa61
-rw-r--r--Nt32Pkg/Nt32.dsc15
10 files changed, 707 insertions, 8 deletions
diff --git a/BaseTools/Conf/FrameworkDatabase.template b/BaseTools/Conf/FrameworkDatabase.template
index 30c2748..51df5f1 100644
--- a/BaseTools/Conf/FrameworkDatabase.template
+++ b/BaseTools/Conf/FrameworkDatabase.template
@@ -23,7 +23,8 @@
<Filename>MdePkg/MdePkg.nspd</Filename>
<Filename>MdeModulePkg/MdeModulePkg.nspd</Filename>
<Filename>IntelFrameworkModulePkg/IntelFrameworkModulePkg.nspd</Filename>
- <Filename>Nt32Pkg/Nt32Pkg.spd</Filename>
+ <Filename>IntelFrameworkPkg/IntelFrameworkPkg.nspd</Filename>
+ <Filename>Nt32Pkg/Nt32Pkg.nspd</Filename>
<Filename>ShellBinPkg/ShellBinPkg.nspd</Filename>
</PackageList>
</FrameworkDatabase>
diff --git a/IntelFrameworkPkg/IntelFrameworkPkg.dec b/IntelFrameworkPkg/IntelFrameworkPkg.dec
index 90f6c88..cd1a23c 100644
--- a/IntelFrameworkPkg/IntelFrameworkPkg.dec
+++ b/IntelFrameworkPkg/IntelFrameworkPkg.dec
@@ -60,6 +60,7 @@
################################################################################
[Guids.common]
gEfiStatusCodeDataTypeDebugGuid = { 0x9A4E9246, 0xD553, 0x11D5, { 0x87, 0xE2, 0x00, 0x06, 0x29, 0x45, 0xC3, 0xB9 }}
+ gEfiStatusCodeSpecificDataGuid = { 0x335984bd, 0xe805, 0x409a, { 0xb8, 0xf8, 0xd2, 0x7e, 0xce, 0x5f, 0xf7, 0xa6 }}
gEfiMiscProducerGuid = { 0x62512c92, 0x63c4, 0x4d80, { 0x82, 0xb1, 0xc1, 0xa4, 0xdc, 0x44, 0x80, 0xe5 }}
gEfiMiscSubClassGuid = { 0x772484B2, 0x7482, 0x4b91, { 0x9f, 0x9a, 0xad, 0x43, 0xf8, 0x1c, 0x58, 0x81 }}
gEfiMemorySubClassGuid = { 0x4E8F4EBB, 0x64B9, 0x4e05, { 0x9b, 0x18, 0x4c, 0xfe, 0x49, 0x23, 0x50, 0x97 }}
diff --git a/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf b/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
new file mode 100644
index 0000000..bb60920
--- /dev/null
+++ b/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
@@ -0,0 +1,116 @@
+#/** @file
+# DXE report status code library
+#
+# Retrieve status code and report status code in DXE phase
+# Copyright (c) 2006 - 2007, Intel Corporation.
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+#**/
+
+################################################################################
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+################################################################################
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = DxeReportStatusCodeLib
+ FILE_GUID = 3ddc3b12-99ea-4364-b315-6310a2050be5
+ MODULE_TYPE = DXE_DRIVER
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = ReportStatusCodeLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER
+ EDK_RELEASE_VERSION = 0x00020000
+ EFI_SPECIFICATION_VERSION = 0x00020000
+
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 IPF EBC
+#
+
+################################################################################
+#
+# Sources Section - list of files that are required for the build to succeed.
+#
+################################################################################
+
+[Sources.common]
+ ReportStatusCodeLib.c
+
+
+################################################################################
+#
+# Includes Section - list of Include locations that are required for
+# this module.
+#
+################################################################################
+
+[Includes]
+
+
+################################################################################
+#
+# Package Dependency Section - list of Package files that are required for
+# this module.
+#
+################################################################################
+
+[Packages]
+ MdePkg/MdePkg.dec
+ IntelFrameworkPkg/IntelFrameworkPkg.dec
+
+
+################################################################################
+#
+# Library Class Section - list of Library Classes that are required for
+# this module.
+#
+################################################################################
+
+[LibraryClasses]
+ PcdLib
+ BaseMemoryLib
+ BaseLib
+ UefiBootServicesTableLib
+ DebugLib
+
+
+################################################################################
+#
+# Guid C Name Section - list of Guids that this module uses or produces.
+#
+################################################################################
+
+[Guids]
+ gEfiStatusCodeSpecificDataGuid # ALWAYS_CONSUMED
+ gEfiStatusCodeDataTypeDebugGuid # ALWAYS_CONSUMED
+
+
+################################################################################
+#
+# Protocol C Name Section - list of Protocol and Protocol Notify C Names
+# that this module uses or produces.
+#
+################################################################################
+
+[Protocols]
+ gEfiStatusCodeRuntimeProtocolGuid # PROTOCOL ALWAYS_CONSUMED
+
+
+################################################################################
+#
+# Pcd FIXED_AT_BUILD - list of PCDs that this module is coded for.
+#
+################################################################################
+
+[PcdsFixedAtBuild.common]
+ PcdReportStatusCodePropertyMask|gEfiMdePkgTokenSpaceGuid
+
diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index f574cc8..a536735 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -318,3 +318,4 @@
${WORKSPACE}/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwLite.inf
#${WORKSPACE}/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.inf
${WORKSPACE}/MdeModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.inf
+ ${WORKSPACE}/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf \ No newline at end of file
diff --git a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c
new file mode 100644
index 0000000..ec43aec
--- /dev/null
+++ b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.c
@@ -0,0 +1,329 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ WatchDogTimer.c
+
+Abstract:
+
+ Generic watchdog timer implemenetation using EFI APIs
+
+Revision History
+
+--*/
+
+//
+// The package level header files this module uses
+//
+#include <PiDxe.h>
+#include <FrameworkDxe.h>
+//
+// The protocols, PPI and GUID defintions for this module
+//
+//
+// The Library classes this module consumes
+//
+#include <Library/DebugLib.h>
+#include <Library/UefiDriverEntryPoint.h>
+#include <Library/ReportStatusCodeLib.h>
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/UefiRuntimeServicesTableLib.h>
+#include <Protocol/WatchDogTimer.h>
+
+#include "WatchDogTimer.h"
+
+//
+// Handle for the Watchdog Timer Architectural Protocol instance produced by this driver
+//
+EFI_HANDLE mWatchdogTimerHandle = NULL;
+
+//
+// The Watchdog Timer Architectural Protocol instance produced by this driver
+//
+EFI_WATCHDOG_TIMER_ARCH_PROTOCOL mWatchdogTimer = {
+ WatchdogTimerDriverRegisterHandler,
+ WatchdogTimerDriverSetTimerPeriod,
+ WatchdogTimerDriverGetTimerPeriod
+};
+
+//
+// The watchdog timer period in 100 nS units
+//
+UINT64 mWatchdogTimerPeriod = 0;
+
+//
+// The notification function to call if the watchdig timer fires
+//
+EFI_WATCHDOG_TIMER_NOTIFY mWatchdogTimerNotifyFunction = NULL;
+
+//
+// The one-shot timer event that is armed when the watchdog timer is enabled
+//
+EFI_EVENT mWatchdogTimerEvent;
+
+//
+// Worker Functions
+//
+STATIC
+VOID
+EFIAPI
+WatchdogTimerDriverExpires (
+ IN EFI_EVENT Timer,
+ IN VOID *Context
+ )
+/*++
+
+ Routine Description:
+
+ Notification function that is called if the watchdog timer is fired. If a
+ handler has been registered with the Watchdog Timer Architectural Protocol,
+ then that handler is called passing in the time period that has passed that
+ cause the watchdog timer to fire. Then, a call to the Runtime Service
+ ResetSystem() is made to reset the platform.
+
+ Arguments:
+
+ Timer - The one-shot timer event that was signaled when the watchdog timer
+ expired.
+
+ Context - The context that was registered when the event Timer was created.
+
+ Returns:
+
+ None.
+
+--*/
+{
+ //
+ // Report error code before exiting
+ //
+ REPORT_STATUS_CODE (
+ EFI_ERROR_CODE | EFI_ERROR_MINOR,
+ (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_TIMER_EXPIRED)
+ );
+
+ //
+ // If a notification function has been registered, then call it
+ //
+ if (mWatchdogTimerNotifyFunction != NULL) {
+ mWatchdogTimerNotifyFunction (mWatchdogTimerPeriod);
+ }
+ //
+ // Reset the platform
+ //
+ gRT->ResetSystem (EfiResetCold, EFI_TIMEOUT, 0, NULL);
+}
+
+EFI_STATUS
+EFIAPI
+WatchdogTimerDriverRegisterHandler (
+ IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
+ IN EFI_WATCHDOG_TIMER_NOTIFY NotifyFunction
+ )
+/*++
+
+Routine Description:
+
+ This function registers a handler that is to be invoked when the watchdog
+ timer fires. By default, the EFI_WATCHDOG_TIMER protocol will call the
+ Runtime Service ResetSystem() when the watchdog timer fires. If a
+ NotifyFunction is registered, then the NotifyFunction will be called before
+ the Runtime Service ResetSystem() is called. If NotifyFunction is NULL, then
+ the watchdog handler is unregistered. If a watchdog handler is registered,
+ then EFI_SUCCESS is returned. If an attempt is made to register a handler
+ when a handler is already registered, then EFI_ALREADY_STARTED is returned.
+ If an attempt is made to uninstall a handler when a handler is not installed,
+ then return EFI_INVALID_PARAMETER.
+
+Arguments:
+
+ This - The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
+
+ NotifyFunction - The function to call when the watchdog timer fires. If this
+ is NULL, then the handler will be unregistered.
+
+Returns:
+
+ EFI_SUCCESS - The watchdog timer handler was registered or
+ unregistered.
+
+ EFI_ALREADY_STARTED - NotifyFunction is not NULL, and a handler is already
+ registered.
+
+ EFI_INVALID_PARAMETER - NotifyFunction is NULL, and a handler was not
+ previously registered.
+
+--*/
+{
+ if (NotifyFunction == NULL && mWatchdogTimerNotifyFunction == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ if (NotifyFunction != NULL && mWatchdogTimerNotifyFunction != NULL) {
+ return EFI_ALREADY_STARTED;
+ }
+
+ mWatchdogTimerNotifyFunction = NotifyFunction;
+
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+EFIAPI
+WatchdogTimerDriverSetTimerPeriod (
+ IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
+ IN UINT64 TimerPeriod
+ )
+/*++
+
+Routine Description:
+
+ This function sets the amount of time to wait before firing the watchdog
+ timer to TimerPeriod 100 nS units. If TimerPeriod is 0, then the watchdog
+ timer is disabled.
+
+Arguments:
+
+ This - The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
+
+ TimerPeriod - The amount of time in 100 nS units to wait before the watchdog
+ timer is fired. If TimerPeriod is zero, then the watchdog
+ timer is disabled.
+
+Returns:
+
+ EFI_SUCCESS - The watchdog timer has been programmed to fire in Time
+ 100 nS units.
+
+ EFI_DEVICE_ERROR - A watchdog timer could not be programmed due to a device
+ error.
+
+--*/
+{
+ mWatchdogTimerPeriod = TimerPeriod;
+
+ return gBS->SetTimer (
+ mWatchdogTimerEvent,
+ (mWatchdogTimerPeriod == 0) ? TimerCancel : TimerRelative,
+ mWatchdogTimerPeriod
+ );
+}
+
+EFI_STATUS
+EFIAPI
+WatchdogTimerDriverGetTimerPeriod (
+ IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
+ IN UINT64 *TimerPeriod
+ )
+/*++
+
+Routine Description:
+
+ This function retrieves the amount of time the system will wait before firing
+ the watchdog timer. This period is returned in TimerPeriod, and EFI_SUCCESS
+ is returned. If TimerPeriod is NULL, then EFI_INVALID_PARAMETER is returned.
+
+Arguments:
+
+ This - The EFI_WATCHDOG_TIMER_ARCH_PROTOCOL instance.
+
+ TimerPeriod - A pointer to the amount of time in 100 nS units that the system
+ will wait before the watchdog timer is fired. If TimerPeriod of
+ zero is returned, then the watchdog timer is disabled.
+
+Returns:
+
+ EFI_SUCCESS - The amount of time that the system will wait before
+ firing the watchdog timer was returned in TimerPeriod.
+
+ EFI_INVALID_PARAMETER - TimerPeriod is NULL.
+
+--*/
+{
+ if (TimerPeriod == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ *TimerPeriod = mWatchdogTimerPeriod;
+
+ return EFI_SUCCESS;
+}
+
+EFI_STATUS
+EFIAPI
+WatchdogTimerDriverInitialize (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+/*++
+
+Routine Description:
+
+ Initialize the Watchdog Timer Architectural Protocol driver
+
+Arguments:
+
+ ImageHandle - ImageHandle of the loaded driver
+
+ SystemTable - Pointer to the System Table
+
+Returns:
+
+ EFI_SUCCESS - Timer Architectural Protocol created
+
+ EFI_OUT_OF_RESOURCES - Not enough resources available to initialize driver.
+
+ EFI_DEVICE_ERROR - A device error occured attempting to initialize the driver.
+
+--*/
+{
+ EFI_STATUS Status;
+
+ REPORT_STATUS_CODE (
+ EFI_PROGRESS_CODE,
+ (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_SW_PC_INIT_BEGIN)
+ );
+ //
+ // Make sure the Watchdog Timer Architectural Protocol is not already installed in the system
+ //
+ ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiWatchdogTimerArchProtocolGuid);
+
+ //
+ // Create the timer event used to implement a simple watchdog timer
+ //
+ Status = gBS->CreateEvent (
+ EVT_TIMER | EVT_NOTIFY_SIGNAL,
+ TPL_NOTIFY,
+ WatchdogTimerDriverExpires,
+ NULL,
+ &mWatchdogTimerEvent
+ );
+ ASSERT_EFI_ERROR (Status);
+
+ //
+ // Install the Watchdog Timer Arch Protocol onto a new handle
+ //
+ Status = gBS->InstallMultipleProtocolInterfaces (
+ &mWatchdogTimerHandle,
+ &gEfiWatchdogTimerArchProtocolGuid,
+ &mWatchdogTimer,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
+
+ REPORT_STATUS_CODE (
+ EFI_PROGRESS_CODE,
+ (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_SW_PC_INIT_END)
+ );
+
+ return Status;
+}
diff --git a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.dxs b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.dxs
new file mode 100644
index 0000000..27e7bf1
--- /dev/null
+++ b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.dxs
@@ -0,0 +1,31 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ WatchDogTimer.dxs
+
+Abstract:
+
+ Dependency expression source file.
+
+--*/
+//
+// Include common header file for this module.
+//
+#include "CommonHeader.h"
+
+#include <DxeDepex.h>
+
+DEPENDENCY_START
+ EFI_TIMER_ARCH_PROTOCOL_GUID
+DEPENDENCY_END
+
diff --git a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h
new file mode 100644
index 0000000..bb1936b
--- /dev/null
+++ b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.h
@@ -0,0 +1,62 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+Module Name:
+
+ WatchDogTimer.h
+
+Abstract:
+
+ Generic watchdog timer implemenetation using EFI APIs
+
+Revision History
+
+--*/
+
+#ifndef _WATCHDOG_TIMER_H_
+#define _WATCHDOG_TIMER_H_
+
+//
+// Function Prototypes
+//
+EFI_STATUS
+EFIAPI
+WatchdogTimerDriverRegisterHandler (
+ IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
+ IN EFI_WATCHDOG_TIMER_NOTIFY NotifyFunction
+ )
+;
+
+EFI_STATUS
+EFIAPI
+WatchdogTimerDriverSetTimerPeriod (
+ IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
+ IN UINT64 TimerPeriod
+ )
+;
+
+EFI_STATUS
+EFIAPI
+WatchdogTimerDriverGetTimerPeriod (
+ IN EFI_WATCHDOG_TIMER_ARCH_PROTOCOL *This,
+ IN UINT64 *TimerPeriod
+ )
+;
+
+EFI_STATUS
+EFIAPI
+WatchdogTimerDriverInitialize (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+;
+
+#endif
diff --git a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf
new file mode 100644
index 0000000..9273830
--- /dev/null
+++ b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf
@@ -0,0 +1,96 @@
+#/** @file
+# Component description file for WatchDogTimer module.
+#
+# Generic watchdog timer implemenetation using EFI APIs.
+# Copyright (c) 2006 - 2007, Intel Corporation
+#
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+#
+#**/
+
+################################################################################
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+################################################################################
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = WatchDogTimer
+ FILE_GUID = F099D67F-71AE-4c36-B2A3-DCEB0EB2B7D8
+ MODULE_TYPE = DXE_DRIVER
+ VERSION_STRING = 1.0
+ EDK_RELEASE_VERSION = 0x00020000
+ EFI_SPECIFICATION_VERSION = 0x00020000
+
+ ENTRY_POINT = WatchdogTimerDriverInitialize
+
+#
+# The following information is for reference only and not required by the build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 IPF EBC
+#
+
+################################################################################
+#
+# Sources Section - list of files that are required for the build to succeed.
+#
+################################################################################
+
+[Sources.common]
+ WatchDogTimer.h
+ WatchDogTimer.c
+
+################################################################################
+#
+# Includes Section - list of Include locations that are required for
+# this module.
+#
+################################################################################
+
+[Includes]
+ $(WORKSPACE)/MdePkg/Include/Library
+
+################################################################################
+#
+# Package Dependency Section - list of Package files that are required for
+# this module.
+#
+################################################################################
+
+[Packages]
+ MdePkg/MdePkg.dec
+ IntelFrameWorkPkg/IntelFrameworkPkg.dec
+
+################################################################################
+#
+# Library Class Section - list of Library Classes that are required for
+# this module.
+#
+################################################################################
+
+[LibraryClasses]
+ UefiRuntimeServicesTableLib
+ UefiBootServicesTableLib
+ ReportStatusCodeLib
+ UefiDriverEntryPoint
+ DebugLib
+
+
+################################################################################
+#
+# Protocol C Name Section - list of Protocol and Protocol Notify C Names
+# that this module uses or produces.
+#
+################################################################################
+
+[Protocols]
+ gEfiWatchdogTimerArchProtocolGuid # PROTOCOL ALWAYS_PRODUCED
+
+[depex]
+ gEfiWatchdogTimerArchProtocolGuid \ No newline at end of file
diff --git a/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.msa b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.msa
new file mode 100644
index 0000000..9231ae5
--- /dev/null
+++ b/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.msa
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <MsaHeader>
+ <ModuleName>WatchDogTimer</ModuleName>
+ <ModuleType>DXE_DRIVER</ModuleType>
+ <GuidValue>F099D67F-71AE-4c36-B2A3-DCEB0EB2B7D8</GuidValue>
+ <Version>1.0</Version>
+ <Abstract>Component description file for WatchDogTimer module.</Abstract>
+ <Description>Generic watchdog timer implemenetation using EFI APIs.</Description>
+ <Copyright>Copyright (c) 2006 - 2007, Intel Corporation</Copyright>
+ <License>All rights reserved. This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.</License>
+ <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION 0x00000052</Specification>
+ </MsaHeader>
+ <ModuleDefinitions>
+ <SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>
+ <BinaryModule>false</BinaryModule>
+ <OutputFileBasename>WatchDogTimer</OutputFileBasename>
+ </ModuleDefinitions>
+ <LibraryClassDefinitions>
+ <LibraryClass Usage="ALWAYS_CONSUMED">
+ <Keyword>DebugLib</Keyword>
+ </LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">
+ <Keyword>UefiDriverEntryPoint</Keyword>
+ </LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">
+ <Keyword>ReportStatusCodeLib</Keyword>
+ </LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">
+ <Keyword>UefiBootServicesTableLib</Keyword>
+ </LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">
+ <Keyword>UefiRuntimeServicesTableLib</Keyword>
+ </LibraryClass>
+ </LibraryClassDefinitions>
+ <SourceFiles>
+ <Filename>WatchDogTimer.c</Filename>
+ <Filename>WatchDogTimer.h</Filename>
+ <Filename>WatchDogTimer.dxs</Filename>
+ </SourceFiles>
+ <PackageDependencies>
+ <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>
+ </PackageDependencies>
+ <Protocols>
+ <Protocol Usage="ALWAYS_PRODUCED">
+ <ProtocolCName>gEfiWatchdogTimerArchProtocolGuid</ProtocolCName>
+ </Protocol>
+ </Protocols>
+ <Externs>
+ <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>
+ <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>
+ <Extern>
+ <ModuleEntryPoint>WatchdogTimerDriverInitialize</ModuleEntryPoint>
+ </Extern>
+ </Externs>
+</ModuleSurfaceArea> \ No newline at end of file
diff --git a/Nt32Pkg/Nt32.dsc b/Nt32Pkg/Nt32.dsc
index 43aa1c3..68b70c2 100644
--- a/Nt32Pkg/Nt32.dsc
+++ b/Nt32Pkg/Nt32.dsc
@@ -121,7 +121,7 @@
EdkPeCoffLoaderLib|$(WORKSPACE)/MdeModulePkg/Library/EdkDxePeCoffLoaderFromHobLib/EdkDxePeCoffLoaderFromHobLib.inf
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
- ReportStatusCodeLib|$(WORKSPACE)/MdePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+ ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
TianoDecompressLib|$(WORKSPACE)/MdeModulePkg/Library/DxeCoreTianoDecompressLibFromHob/DxeCoreTianoDecompressLibFromHob.inf
[LibraryClasses.common]
@@ -151,7 +151,7 @@
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
UefiDriverEntryPoint|$(WORKSPACE)/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
EdkGraphicsLib|$(WORKSPACE)/MdeModulePkg/Library/EdkGraphicsLib/EdkGraphicsLib.inf
- ReportStatusCodeLib|$(WORKSPACE)/MdePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+ ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
PrintLib|$(WORKSPACE)/MdePkg/Library/BasePrintLib/BasePrintLib.inf
DxeServicesTableLib|$(WORKSPACE)/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
UefiDecompressLib|$(WORKSPACE)/MdeModulePkg/Library/DxeCoreUefiDecompressLibFromHob/DxeCoreUefiDecompressLibFromHob.inf
@@ -182,7 +182,7 @@
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
EdkGraphicsLib|$(WORKSPACE)/MdeModulePkg/Library/EdkGraphicsLib/EdkGraphicsLib.inf
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
- ReportStatusCodeLib|$(WORKSPACE)/MdePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+ ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
TianoDecompressLib|$(WORKSPACE)/MdeModulePkg/Library/DxeCoreTianoDecompressLibFromHob/DxeCoreTianoDecompressLibFromHob.inf
UefiRuntimeServicesTableLib|$(WORKSPACE)/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
@@ -220,7 +220,7 @@
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
UefiDriverEntryPoint|$(WORKSPACE)/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
EdkGraphicsLib|$(WORKSPACE)/MdeModulePkg/Library/EdkGraphicsLib/EdkGraphicsLib.inf
- ReportStatusCodeLib|$(WORKSPACE)/MdePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+ ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
PrintLib|$(WORKSPACE)/MdePkg/Library/BasePrintLib/BasePrintLib.inf
DxeServicesTableLib|$(WORKSPACE)/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
UefiDecompressLib|$(WORKSPACE)/MdeModulePkg/Library/DxeCoreUefiDecompressLibFromHob/DxeCoreUefiDecompressLibFromHob.inf
@@ -245,7 +245,7 @@
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
UefiDriverEntryPoint|$(WORKSPACE)/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
EdkGraphicsLib|$(WORKSPACE)/MdeModulePkg/Library/EdkGraphicsLib/EdkGraphicsLib.inf
- ReportStatusCodeLib|$(WORKSPACE)/MdePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+ ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
PrintLib|$(WORKSPACE)/MdePkg/Library/BasePrintLib/BasePrintLib.inf
DxeServicesTableLib|$(WORKSPACE)/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
UefiDecompressLib|$(WORKSPACE)/MdeModulePkg/Library/DxeCoreUefiDecompressLibFromHob/DxeCoreUefiDecompressLibFromHob.inf
@@ -269,7 +269,7 @@
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
UefiDriverEntryPoint|$(WORKSPACE)/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
EdkGraphicsLib|$(WORKSPACE)/MdeModulePkg/Library/EdkGraphicsLib/EdkGraphicsLib.inf
- ReportStatusCodeLib|$(WORKSPACE)/MdePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+ ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
PrintLib|$(WORKSPACE)/MdePkg/Library/BasePrintLib/BasePrintLib.inf
DxeServicesTableLib|$(WORKSPACE)/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
UefiDecompressLib|$(WORKSPACE)/MdeModulePkg/Library/DxeCoreUefiDecompressLibFromHob/DxeCoreUefiDecompressLibFromHob.inf
@@ -301,7 +301,7 @@
MemoryAllocationLib|$(WORKSPACE)/MdePkg/Library/DxeMemoryAllocationLib/DxeMemoryAllocationLib.inf
EdkGraphicsLib|$(WORKSPACE)/MdeModulePkg/Library/EdkGraphicsLib/EdkGraphicsLib.inf
UefiLib|$(WORKSPACE)/MdePkg/Library/UefiLib/UefiLib.inf
- ReportStatusCodeLib|$(WORKSPACE)/MdePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
+ ReportStatusCodeLib|$(WORKSPACE)/IntelFrameworkPkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
TianoDecompressLib|$(WORKSPACE)/MdeModulePkg/Library/DxeCoreTianoDecompressLibFromHob/DxeCoreTianoDecompressLibFromHob.inf
UefiRuntimeServicesTableLib|$(WORKSPACE)/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
@@ -429,3 +429,4 @@
${WORKSPACE}/MdeModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwLite.inf
#${WORKSPACE}/MdeModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.inf
${WORKSPACE}/MdeModulePkg/Bus/Pci/AtapiPassThru/Dxe/AtapiPassThru.inf
+ ${WORKSPACE}/MdeModulePkg/Universal/WatchDogTimerDxe/WatchDogTimer.inf \ No newline at end of file