EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

Nt32Pkg/ResetRuntimeDxe/reset.c

Go to the documentation of this file.
00001 
00022 #include <Uefi.h>
00023 #include <WinNtDxe.h>
00024 #include <Protocol/Reset.h>
00025 #include <Library/DebugLib.h>
00026 #include <Library/UefiDriverEntryPoint.h>
00027 #include <Library/WinNtLib.h>
00028 #include <Library/UefiBootServicesTableLib.h>
00029 
00030 
00031 EFI_STATUS
00032 EFIAPI
00033 InitializeNtReset (
00034   IN EFI_HANDLE        ImageHandle,
00035   IN EFI_SYSTEM_TABLE  *SystemTable
00036   );
00037 
00038 VOID
00039 EFIAPI
00040 WinNtResetSystem (
00041   IN EFI_RESET_TYPE   ResetType,
00042   IN EFI_STATUS       ResetStatus,
00043   IN UINTN            DataSize,
00044   IN VOID             *ResetData OPTIONAL
00045   );
00046 
00047 
00048 EFI_STATUS
00049 EFIAPI
00050 InitializeNtReset (
00051   IN EFI_HANDLE        ImageHandle,
00052   IN EFI_SYSTEM_TABLE  *SystemTable
00053   )
00054 /*++
00055 
00056 Routine Description:
00057 
00058 
00059 Arguments:
00060 
00061   ImageHandle of the loaded driver
00062   Pointer to the System Table
00063 
00064 Returns:
00065 
00066   Status
00067 --*/
00068 // TODO:    SystemTable - add argument and description to function comment
00069 {
00070   EFI_STATUS  Status;
00071   EFI_HANDLE  Handle;
00072 
00073   SystemTable->RuntimeServices->ResetSystem = WinNtResetSystem;
00074 
00075   Handle = NULL;
00076   Status = gBS->InstallMultipleProtocolInterfaces (
00077                   &Handle,
00078                   &gEfiResetArchProtocolGuid,
00079                   NULL,
00080                   NULL
00081                   );
00082   ASSERT_EFI_ERROR (Status);
00083 
00084   return Status;
00085 }
00086 
00087 VOID
00088 EFIAPI
00089 WinNtResetSystem (
00090   IN EFI_RESET_TYPE   ResetType,
00091   IN EFI_STATUS       ResetStatus,
00092   IN UINTN            DataSize,
00093   IN VOID             *ResetData OPTIONAL
00094   )
00095 /*++
00096 
00097 Routine Description:
00098 
00099   TODO: Add function description
00100 
00101 Arguments:
00102 
00103   ResetType   - TODO: add argument description
00104   ResetStatus - TODO: add argument description
00105   DataSize    - TODO: add argument description
00106   ResetData   - TODO: add argument description
00107 
00108 Returns:
00109 
00110   EFI_SUCCESS - TODO: Add description for return value
00111 
00112 --*/
00113 {
00114   //
00115   // BUGBUG Need to kill all console windows later
00116   //
00117   //
00118   // Discard ResetType, always return 0 as exit code
00119   //
00120   gWinNt->ExitProcess (0);
00121 
00122   //
00123   // Should never go here
00124   //
00125   ASSERT (FALSE);
00126 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines