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

EmbeddedPkg/ResetRuntimeDxe/reset.c

Go to the documentation of this file.
00001 
00015 #include <PiDxe.h>
00016 #include <Protocol/Reset.h>
00017 #include <Library/DebugLib.h>
00018 #include <Library/UefiDriverEntryPoint.h>
00019 #include <Library/UefiBootServicesTableLib.h>
00020 #include <Library/EfiResetSystemLib.h>
00021 
00022 
00034 VOID
00035 EFIAPI
00036 ResetSystemViaLib (
00037   IN EFI_RESET_TYPE   ResetType,
00038   IN EFI_STATUS       ResetStatus,
00039   IN UINTN            DataSize,
00040   IN VOID             *ResetData OPTIONAL
00041   )
00042 {
00043   LibResetSystem (ResetType, ResetStatus, DataSize, ResetData);
00044   return;
00045 }
00046 
00047 
00048 
00049 EFI_STATUS
00050 EFIAPI
00051 InitializeReset (
00052   IN EFI_HANDLE        ImageHandle,
00053   IN EFI_SYSTEM_TABLE  *SystemTable
00054   )
00055 {
00056   EFI_STATUS  Status;
00057   EFI_HANDLE  Handle;
00058 
00059   LibInitializeResetSystem (ImageHandle, SystemTable);
00060   
00061   SystemTable->RuntimeServices->ResetSystem = ResetSystemViaLib;
00062 
00063   Handle = NULL;
00064   Status = gBS->InstallMultipleProtocolInterfaces (
00065                   &Handle,
00066                   &gEfiResetArchProtocolGuid,
00067                   NULL,
00068                   NULL
00069                   );
00070   ASSERT_EFI_ERROR (Status);
00071 
00072   return Status;
00073 }
00074 
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines