summaryrefslogtreecommitdiff
path: root/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset
diff options
context:
space:
mode:
authorbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>2006-04-21 22:54:32 +0000
committerbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>2006-04-21 22:54:32 +0000
commit878ddf1fc3540a715f63594ed22b6929e881afb4 (patch)
treec56c44dac138137b510e1fba7c3efe5e4d84bea2 /EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset
downloadedk2-platforms-878ddf1fc3540a715f63594ed22b6929e881afb4.tar.xz
Initial import.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset')
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/Reset.dxs27
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/Reset.mbd45
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/Reset.msa60
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/build.xml47
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/reset.c121
5 files changed, 300 insertions, 0 deletions
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/Reset.dxs b/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/Reset.dxs
new file mode 100644
index 0000000000..5dfb191aef
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/Reset.dxs
@@ -0,0 +1,27 @@
+/*++
+
+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:
+
+ Reset.dxs
+
+Abstract:
+
+ Dependency expression source file.
+
+--*/
+
+#include <AutoGen.h>
+#include <DxeDepex.h>
+
+DEPENDENCY_START
+ TRUE
+DEPENDENCY_END
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/Reset.mbd b/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/Reset.mbd
new file mode 100644
index 0000000000..817bc4ed18
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/Reset.mbd
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<ModuleBuildDescription xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">
+ <MbdHeader>
+ <BaseName>Reset</BaseName>
+ <Guid>BA929954-35B0-4dd3-90CD-9634BD7E1CF1</Guid>
+ <Version>0</Version>
+ <Description>FIX ME!</Description>
+ <Copyright>Copyright (c) 2004-2006, 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>
+ <Created>2006-03-14 17:04</Created>
+ <Modified>2006-03-19 15:17</Modified>
+ </MbdHeader>
+ <Libraries>
+ <Library>UefiBootServicesTableLib</Library>
+ <Library>DxeHobLib</Library>
+ <Library>BaseLib</Library>
+ <Library>UefiLib</Library>
+ <Library>UefiMemoryLib</Library>
+ <Library>UefiDriverEntryPoint</Library>
+ <Library>DxeReportStatusCodeLib</Library>
+ <Library>BaseDebugLibReportStatusCode</Library>
+ <Library>DxeWinNtLib</Library>
+ <Library>DxeMemoryAllocationLib</Library>
+ </Libraries>
+ <BuildOptions ToolChain="MSFT">
+ <ImageEntryPoint>_ModuleEntryPoint</ImageEntryPoint>
+ </BuildOptions>
+</ModuleBuildDescription>
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/Reset.msa b/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/Reset.msa
new file mode 100644
index 0000000000..8887df13d9
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/Reset.msa
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.TianoCore.org/2006/Edk2.0 http://www.TianoCore.org/2006/Edk2.0/SurfaceArea.xsd">
+ <MsaHeader>
+ <BaseName>Reset</BaseName>
+ <ModuleType>DXE_DRIVER</ModuleType>
+ <ComponentType>BS_DRIVER</ComponentType>
+ <Guid>BA929954-35B0-4dd3-90CD-9634BD7E1CF1</Guid>
+ <Version>0</Version>
+ <Abstract>description of file contents</Abstract>
+ <Description>FIX ME!</Description>
+ <Copyright>Copyright (c) 2004-2006, 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>0</Specification>
+ <Created>2006-03-14 17:04</Created>
+ <Updated>2006-03-19 15:17</Updated>
+ </MsaHeader>
+ <LibraryClassDefinitions>
+ <LibraryClass Usage="ALWAYS_CONSUMED">BaseLib</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">DebugLib</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">UefiLib</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">UefiDriverEntryPoint</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">WinNtLib</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">MemoryAllocationLib</LibraryClass>
+ <LibraryClass Usage="ALWAYS_CONSUMED">UefiBootServicesTableLib</LibraryClass>
+ </LibraryClassDefinitions>
+ <SourceFiles>
+ <Filename>Reset.c</Filename>
+ <Filename>Reset.dxs</Filename>
+ </SourceFiles>
+ <Includes>
+ <PackageName>MdePkg</PackageName>
+ <PackageName>EdkModulePkg</PackageName>
+ <PackageName>EdkNt32Pkg</PackageName>
+ </Includes>
+ <Protocols>
+ <Protocol Usage="ALWAYS_PRODUCED">Reset</Protocol>
+ </Protocols>
+ <Externs>
+ <Extern>
+ <ModuleEntryPoint>InitializeNtReset</ModuleEntryPoint>
+ </Extern>
+ </Externs>
+</ModuleSurfaceArea>
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/build.xml b/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/build.xml
new file mode 100644
index 0000000000..f924c6b261
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/build.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- 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.-->
+<project basedir="." default="Reset"><!--Apply external ANT tasks-->
+ <taskdef resource="GenBuild.tasks"/>
+ <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+ <property environment="env"/>
+ <property name="WORKSPACE_DIR" value="${env.WORKSPACE}"/>
+ <import file="${WORKSPACE_DIR}\Tools\Conf\BuildMacro.xml"/><!--MODULE_RELATIVE PATH is relative to PACKAGE_DIR-->
+ <property name="MODULE_RELATIVE_PATH" value="Dxe\WinNtThunk\Chipset\Reset"/>
+ <property name="MODULE_DIR" value="${PACKAGE_DIR}\${MODULE_RELATIVE_PATH}"/>
+ <property name="COMMON_FILE" value="${WORKSPACE_DIR}\Tools\Conf\Common.xml"/>
+ <target name="Reset">
+ <GenBuild baseName="Reset" mbdFilename="${MODULE_DIR}\Reset.mbd" msaFilename="${MODULE_DIR}\Reset.msa"/>
+ </target>
+ <target depends="Reset_clean" name="clean"/>
+ <target depends="Reset_cleanall" name="cleanall"/>
+ <target name="Reset_clean">
+ <OutputDirSetup baseName="Reset" mbdFilename="${MODULE_DIR}\Reset.mbd" msaFilename="${MODULE_DIR}\Reset.msa"/>
+ <if>
+ <available file="${DEST_DIR_OUTPUT}\Reset_build.xml"/>
+ <then>
+ <ant antfile="${DEST_DIR_OUTPUT}\Reset_build.xml" target="clean"/>
+ </then>
+ </if>
+ <delete dir="${DEST_DIR_OUTPUT}" excludes="*.xml"/>
+ </target>
+ <target name="Reset_cleanall">
+ <OutputDirSetup baseName="Reset" mbdFilename="${MODULE_DIR}\Reset.mbd" msaFilename="${MODULE_DIR}\Reset.msa"/>
+ <if>
+ <available file="${DEST_DIR_OUTPUT}\Reset_build.xml"/>
+ <then>
+ <ant antfile="${DEST_DIR_OUTPUT}\Reset_build.xml" target="cleanall"/>
+ </then>
+ </if>
+ <delete dir="${DEST_DIR_OUTPUT}"/>
+ <delete dir="${DEST_DIR_DEBUG}"/>
+ <delete>
+ <fileset dir="${BIN_DIR}" includes="**Reset*"/>
+ </delete>
+ </target>
+</project> \ No newline at end of file
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/reset.c b/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/reset.c
new file mode 100644
index 0000000000..d1b841de39
--- /dev/null
+++ b/EdkNt32Pkg/Dxe/WinNtThunk/Chipset/Reset/reset.c
@@ -0,0 +1,121 @@
+/*++
+
+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:
+
+ Reset.c
+
+Abstract:
+
+ Reset Architectural Protocol as defined in Tiano under NT Emulation
+
+--*/
+
+
+
+EFI_STATUS
+EFIAPI
+InitializeNtReset (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ );
+
+STATIC
+EFI_STATUS
+EFIAPI
+WinNtResetSystem (
+ IN EFI_RESET_TYPE ResetType,
+ IN EFI_STATUS ResetStatus,
+ IN UINTN DataSize,
+ IN CHAR16 *ResetData OPTIONAL
+ );
+
+
+EFI_STATUS
+EFIAPI
+InitializeNtReset (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+/*++
+
+Routine Description:
+
+
+Arguments:
+
+ ImageHandle of the loaded driver
+ Pointer to the System Table
+
+Returns:
+
+ Status
+--*/
+// TODO: SystemTable - add argument and description to function comment
+{
+ EFI_STATUS Status;
+ EFI_HANDLE Handle;
+
+ SystemTable->RuntimeServices->ResetSystem = WinNtResetSystem;
+
+ Handle = NULL;
+ Status = gBS->InstallMultipleProtocolInterfaces (
+ &Handle,
+ &gEfiResetArchProtocolGuid,
+ NULL,
+ NULL
+ );
+ ASSERT_EFI_ERROR (Status);
+
+ return Status;
+}
+
+STATIC
+EFI_STATUS
+EFIAPI
+WinNtResetSystem (
+ IN EFI_RESET_TYPE ResetType,
+ IN EFI_STATUS ResetStatus,
+ IN UINTN DataSize,
+ IN CHAR16 *ResetData OPTIONAL
+ )
+/*++
+
+Routine Description:
+
+ TODO: Add function description
+
+Arguments:
+
+ ResetType - TODO: add argument description
+ ResetStatus - TODO: add argument description
+ DataSize - TODO: add argument description
+ ResetData - TODO: add argument description
+
+Returns:
+
+ EFI_SUCCESS - TODO: Add description for return value
+
+--*/
+{
+ //
+ // BUGBUG Need to kill all console windows later
+ //
+ //
+ // Discard ResetType, always return 0 as exit code
+ //
+ gWinNt->ExitProcess (0);
+
+ //
+ // Should never go here
+ //
+ return EFI_SUCCESS;
+}