TianoCore EDK2 master
Loading...
Searching...
No Matches
CloudHvHasAcpiDtDxe.c
Go to the documentation of this file.
1
12#include <Library/BaseLib.h>
13#include <Library/DebugLib.h>
14#include <Library/PcdLib.h>
16
29EFIAPI
31 IN EFI_HANDLE ImageHandle,
32 IN EFI_SYSTEM_TABLE *SystemTable
33 )
34{
35 EFI_STATUS Status;
36
37 //
38 // If we fail to install any of the necessary protocols below, the OS will be
39 // unbootable anyway (due to lacking hardware description), so tolerate no
40 // errors here.
41 //
42 if ((MAX_UINTN == MAX_UINT64) &&
43 !PcdGetBool (PcdForceNoAcpi))
44 {
45 Status = gBS->InstallProtocolInterface (
46 &ImageHandle,
47 &gEdkiiPlatformHasAcpiGuid,
49 NULL
50 );
51 if (EFI_ERROR (Status)) {
52 goto Failed;
53 }
54
55 return Status;
56 }
57
58 //
59 // Expose the Device Tree otherwise.
60 //
61 Status = gBS->InstallProtocolInterface (
62 &ImageHandle,
63 &gEdkiiPlatformHasDeviceTreeGuid,
65 NULL
66 );
67 if (EFI_ERROR (Status)) {
68 goto Failed;
69 }
70
71 return Status;
72
73Failed:
74 ASSERT_EFI_ERROR (Status);
75 CpuDeadLoop ();
76 //
77 // Keep compilers happy.
78 //
79 return Status;
80}
VOID EFIAPI CpuDeadLoop(VOID)
Definition: CpuDeadLoop.c:25
EFI_STATUS EFIAPI PlatformHasAcpiDt(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
#define NULL
Definition: Base.h:319
#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_BOOT_SERVICES * gBS
@ EFI_NATIVE_INTERFACE
Definition: UefiSpec.h:1193