21extern UINT8 DtPlatformHiiBin[];
22extern UINT8 DtPlatformDxeStrings[];
39 DT_PLATFORM_FORMSET_GUID
43 END_ENTIRE_DEVICE_PATH_SUBTYPE,
45 (UINT8)(END_DEVICE_PATH_LENGTH),
46 (UINT8)((END_DEVICE_PATH_LENGTH) >> 8)
62 Status =
gBS->InstallMultipleProtocolInterfaces (
64 &gEfiDevicePathProtocolGuid,
65 &mDtPlatformDxeVendorDevicePath,
68 if (EFI_ERROR (Status)) {
73 &gDtPlatformFormSetGuid,
80 if (HiiHandle ==
NULL) {
81 gBS->UninstallMultipleProtocolInterfaces (
83 &gEfiDevicePathProtocolGuid,
84 &mDtPlatformDxeVendorDevicePath,
87 return EFI_OUT_OF_RESOURCES;
121 if (EFI_ERROR (Status)) {
124 "%a: no DTB blob could be loaded, defaulting to ACPI (Status == %r)\n",
128 DtAcpiPref.Pref = DT_ACPI_SELECT_ACPI;
133 BufferSize =
sizeof (DtAcpiPref);
134 Status =
gRT->GetVariable (
135 DT_ACPI_VARIABLE_NAME,
136 &gDtPlatformFormSetGuid,
141 if (EFI_ERROR (Status)) {
144 "%a: no DT/ACPI preference found, defaulting to %a\n",
148 DtAcpiPref.Pref =
PcdGetBool (PcdDefaultDtPref) ? DT_ACPI_SELECT_DT
149 : DT_ACPI_SELECT_ACPI;
153 if (!EFI_ERROR (Status) &&
154 (DtAcpiPref.Pref != DT_ACPI_SELECT_ACPI) &&
155 (DtAcpiPref.Pref != DT_ACPI_SELECT_DT))
159 "%a: invalid value for %s, defaulting to %a\n",
161 DT_ACPI_VARIABLE_NAME,
164 DtAcpiPref.Pref =
PcdGetBool (PcdDefaultDtPref) ? DT_ACPI_SELECT_DT
165 : DT_ACPI_SELECT_ACPI;
166 Status = EFI_INVALID_PARAMETER;
172 if (EFI_ERROR (Status)) {
173 Status =
gRT->SetVariable (
174 DT_ACPI_VARIABLE_NAME,
175 &gDtPlatformFormSetGuid,
180 if (EFI_ERROR (Status)) {
185 if (DtAcpiPref.Pref == DT_ACPI_SELECT_ACPI) {
190 Status =
gBS->InstallMultipleProtocolInterfaces (
192 &gEdkiiPlatformHasAcpiGuid,
196 if (EFI_ERROR (Status)) {
199 "%a: failed to install gEdkiiPlatformHasAcpiGuid as a protocol\n",
204 }
else if (DtAcpiPref.Pref == DT_ACPI_SELECT_DT) {
209 Status =
gBS->InstallConfigurationTable (&gFdtTableGuid, Dtb);
210 if (EFI_ERROR (Status)) {
213 "%a: failed to install FDT configuration table\n",
237 return InstallHiiPages ();
#define HARDWARE_DEVICE_PATH
VOID EFIAPI FreePool(IN VOID *Buffer)
EFI_HII_HANDLE EFIAPI HiiAddPackages(IN CONST EFI_GUID *PackageListGuid, IN EFI_HANDLE DeviceHandle OPTIONAL,...)
EFI_RUNTIME_SERVICES * gRT
#define DEBUG(Expression)
#define PcdGetBool(TokenName)
#define EFI_VARIABLE_NON_VOLATILE