TianoCore EDK2 master
Loading...
Searching...
No Matches
XenPlatformHasAcpiDtDxe.c
Go to the documentation of this file.
1
12#include <Library/BaseLib.h>
13#include <Library/DebugLib.h>
15
17EFIAPI
18XenPlatformHasAcpiDt (
19 IN EFI_HANDLE ImageHandle,
20 IN EFI_SYSTEM_TABLE *SystemTable
21 )
22{
23 EFI_STATUS Status;
24
25 //
26 // If we fail to install any of the necessary protocols below, the OS will be
27 // unbootable anyway (due to lacking hardware description), so tolerate no
28 // errors here.
29 //
30 // Always make ACPI available on 64-bit systems.
31 //
32 if (MAX_UINTN == MAX_UINT64) {
33 Status = gBS->InstallProtocolInterface (
34 &ImageHandle,
35 &gEdkiiPlatformHasAcpiGuid,
37 NULL
38 );
39 if (EFI_ERROR (Status)) {
40 goto Failed;
41 }
42 }
43
44 //
45 // Expose the Device Tree unconditionally.
46 //
47 Status = gBS->InstallProtocolInterface (
48 &ImageHandle,
49 &gEdkiiPlatformHasDeviceTreeGuid,
51 NULL
52 );
53 if (EFI_ERROR (Status)) {
54 goto Failed;
55 }
56
57 return Status;
58
59Failed:
60 ASSERT_EFI_ERROR (Status);
61 CpuDeadLoop ();
62 //
63 // Keep compilers happy.
64 //
65 return Status;
66}
VOID EFIAPI CpuDeadLoop(VOID)
Definition: CpuDeadLoop.c:25
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
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