On 22 May 2014 11:32, Rafael EspĂndola <rafael.espindola_at_gmail.com> wrote: > > The ConsoleControl.h file is copied from > EdkCompatibilityPkg/Foundation/Protocol/ConsoleControl in > https://github.com/tianocore/edk2. I'm not aware of the full ancestry of our EFI include files, but it looks like the initial import made some attempt to bring them to FreeBSD style. For example, our eficon.h is a version of SimpleTextOut.h and efiser.h is SerialIo.h. For consistency with the existing files I'll probably rename this one to eficonctl.h. printf(" \n>> FreeBSD EFI boot block\n"); printf(" Loader path: %s\n", path); + EFI_BOOT_SERVICES *BS = systab->BootServices; + EFI_CONSOLE_CONTROL_PROTOCOL *ConsoleControl = NULL; + status = BS->LocateProtocol(&ConsoleControlGUID, NULL, (VOID **)& ConsoleControl); + if (EFI_ERROR(status)) + panic("No console control protocol located"); + + status = ConsoleControl->SetMode(ConsoleControl, EfiConsoleControlScreenText); + if (EFI_ERROR(status)) + panic("Could not switch to text mode"); I think we want to move the mode setting earlier so those printfs work, and it probably makes sense to silently ignore failure from LocateProtocol or SetMode. If we're already in text mode the failure doesn't matter, and if we're not, the panic won't help diagnose the problem. Anyhow, I'll commit a version of this soon.Received on Fri May 23 2014 - 18:35:38 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:49 UTC