Changeset View
Changeset View
Standalone View
Standalone View
stand/efi/loader/main.c
Show First 20 Lines • Show All 1,149 Lines • ▼ Show 20 Lines | #endif | ||||
* the boot protocol and also allow an escape hatch for users wishing | * the boot protocol and also allow an escape hatch for users wishing | ||||
* to try something different. | * to try something different. | ||||
*/ | */ | ||||
if (find_currdev(uefi_boot_mgr, is_last, boot_info, bisz) != 0) | if (find_currdev(uefi_boot_mgr, is_last, boot_info, bisz) != 0) | ||||
if (uefi_boot_mgr && | if (uefi_boot_mgr && | ||||
!interactive_interrupt("Failed to find bootable partition")) | !interactive_interrupt("Failed to find bootable partition")) | ||||
return (EFI_NOT_FOUND); | return (EFI_NOT_FOUND); | ||||
autoload_font(false); /* Set up the font list for console. */ | |||||
efi_init_environment(); | efi_init_environment(); | ||||
#if !defined(__arm__) | #if !defined(__arm__) | ||||
for (k = 0; k < ST->NumberOfTableEntries; k++) { | for (k = 0; k < ST->NumberOfTableEntries; k++) { | ||||
guid = &ST->ConfigurationTable[k].VendorGuid; | guid = &ST->ConfigurationTable[k].VendorGuid; | ||||
if (!memcmp(guid, &smbios, sizeof(EFI_GUID))) { | if (!memcmp(guid, &smbios, sizeof(EFI_GUID))) { | ||||
char buf[40]; | char buf[40]; | ||||
▲ Show 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | if (EFI_ERROR(status)) { | ||||
printf("invalid mode %d\n", mode); | printf("invalid mode %d\n", mode); | ||||
return (CMD_ERROR); | return (CMD_ERROR); | ||||
} | } | ||||
status = conout->SetMode(conout, mode); | status = conout->SetMode(conout, mode); | ||||
if (EFI_ERROR(status)) { | if (EFI_ERROR(status)) { | ||||
printf("couldn't set mode %d\n", mode); | printf("couldn't set mode %d\n", mode); | ||||
return (CMD_ERROR); | return (CMD_ERROR); | ||||
} | } | ||||
(void) efi_cons_update_mode(); | (void) cons_update_mode(true); | ||||
return (CMD_OK); | return (CMD_OK); | ||||
} | } | ||||
printf("Current mode: %d\n", conout->Mode->Mode); | printf("Current mode: %d\n", conout->Mode->Mode); | ||||
for (i = 0; i <= conout->Mode->MaxMode; i++) { | for (i = 0; i <= conout->Mode->MaxMode; i++) { | ||||
status = conout->QueryMode(conout, i, &cols, &rows); | status = conout->QueryMode(conout, i, &cols, &rows); | ||||
if (EFI_ERROR(status)) | if (EFI_ERROR(status)) | ||||
continue; | continue; | ||||
▲ Show 20 Lines • Show All 266 Lines • Show Last 20 Lines |