TianoCore EDK2 master
Loading...
Searching...
No Matches
KvmtoolPlatformDxe.c
Go to the documentation of this file.
1
13#include <Guid/VariableFormat.h>
14#include <Library/BaseLib.h>
15#include <Library/DebugLib.h>
17#include <Protocol/FdtClient.h>
18
36 IN EFI_HANDLE ImageHandle
37 )
38{
39 if (!PcdGetBool (PcdForceNoAcpi)) {
40 // Expose ACPI tables
41 return gBS->InstallProtocolInterface (
42 &ImageHandle,
43 &gEdkiiPlatformHasAcpiGuid,
45 NULL
46 );
47 }
48
49 // Expose the Device Tree.
50 return gBS->InstallProtocolInterface (
51 &ImageHandle,
52 &gEdkiiPlatformHasDeviceTreeGuid,
54 NULL
55 );
56}
57
70EFIAPI
72 IN EFI_HANDLE ImageHandle,
73 IN EFI_SYSTEM_TABLE *SystemTable
74 )
75{
76 EFI_STATUS Status;
77
78 if (PcdGetBool (PcdEmuVariableNvModeEnable)) {
79 // The driver implementing the variable service can now be dispatched.
80 Status = gBS->InstallProtocolInterface (
82 &gEdkiiNvVarStoreFormattedGuid,
84 NULL
85 );
86 ASSERT_EFI_ERROR (Status);
87 }
88
89 Status = PlatformHasAcpiDt (ImageHandle);
90 ASSERT_EFI_ERROR (Status);
91
92 return Status;
93}
STATIC EFI_STATUS PlatformHasAcpiDt(IN EFI_HANDLE ImageHandle)
EFI_STATUS EFIAPI KvmtoolPlatformDxeEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
#define NULL
Definition: Base.h:319
#define STATIC
Definition: Base.h:264
#define IN
Definition: Base.h:279
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
#define PcdGetBool(TokenName)
Definition: PcdLib.h:401
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_HANDLE gImageHandle
EFI_BOOT_SERVICES * gBS
@ EFI_NATIVE_INTERFACE
Definition: UefiSpec.h:1193