VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/EmbeddedPkg/ResetRuntimeDxe/reset.c@ 99396

Last change on this file since 99396 was 85718, checked in by vboxsync, 5 years ago

Devices/EFI: Merge edk-stable202005 and make it build, bugref:4643

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1/** @file
2
3 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#include <PiDxe.h>
10#include <Protocol/Reset.h>
11#include <Library/DebugLib.h>
12#include <Library/UefiDriverEntryPoint.h>
13#include <Library/UefiBootServicesTableLib.h>
14#include <Library/EfiResetSystemLib.h>
15
16
17/**
18 Resets the entire platform.
19
20 @param ResetType The type of reset to perform.
21 @param ResetStatus The status code for the reset.
22 @param DataSize The size, in bytes, of WatchdogData.
23 @param ResetData For a ResetType of EfiResetCold, EfiResetWarm, or
24 EfiResetShutdown the data buffer starts with a Null-terminated
25 Unicode string, optionally followed by additional binary data.
26
27**/
28VOID
29EFIAPI
30ResetSystemViaLib (
31 IN EFI_RESET_TYPE ResetType,
32 IN EFI_STATUS ResetStatus,
33 IN UINTN DataSize,
34 IN VOID *ResetData OPTIONAL
35 )
36{
37 LibResetSystem (ResetType, ResetStatus, DataSize, ResetData);
38 return;
39}
40
41
42
43EFI_STATUS
44EFIAPI
45InitializeReset (
46 IN EFI_HANDLE ImageHandle,
47 IN EFI_SYSTEM_TABLE *SystemTable
48 )
49{
50 EFI_STATUS Status;
51 EFI_HANDLE Handle;
52
53 LibInitializeResetSystem (ImageHandle, SystemTable);
54
55 SystemTable->RuntimeServices->ResetSystem = ResetSystemViaLib;
56
57 Handle = NULL;
58 Status = gBS->InstallMultipleProtocolInterfaces (
59 &Handle,
60 &gEfiResetArchProtocolGuid,
61 NULL,
62 NULL
63 );
64 ASSERT_EFI_ERROR (Status);
65
66 return Status;
67}
68
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette