VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c

Last change on this file was 101291, checked in by vboxsync, 19 months ago

EFI/FirmwareNew: Make edk2-stable202308 build on all supported platforms (using gcc at least, msvc not tested yet), bugref:4643

  • Property svn:eol-style set to native
File size: 1.0 KB
Line 
1/** @file
2
3 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
5
6**/
7
8#include <Uefi.h>
9
10#include <Library/BaseLib.h>
11#include <Library/DebugLib.h>
12#include <Library/QemuLoadImageLib.h>
13#include <Library/ReportStatusCodeLib.h>
14#include <Library/UefiLib.h>
15
16EFI_STATUS
17TryRunningQemuKernel (
18 VOID
19 )
20{
21 EFI_STATUS Status;
22 EFI_HANDLE KernelImageHandle;
23
24 Status = QemuLoadKernelImage (&KernelImageHandle);
25 if (EFI_ERROR (Status)) {
26 return Status;
27 }
28
29 //
30 // Signal the EVT_SIGNAL_READY_TO_BOOT event
31 //
32 EfiSignalEventReadyToBoot ();
33
34 REPORT_STATUS_CODE (
35 EFI_PROGRESS_CODE,
36 (EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_DXE_BS_PC_READY_TO_BOOT_EVENT)
37 );
38
39 //
40 // Start the image.
41 //
42 Status = QemuStartKernelImage (&KernelImageHandle);
43 if (EFI_ERROR (Status)) {
44 DEBUG ((
45 DEBUG_ERROR,
46 "%a: QemuStartKernelImage(): %r\n",
47 __func__,
48 Status
49 ));
50 }
51
52 QemuUnloadKernelImage (KernelImageHandle);
53
54 return Status;
55}
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