On 22 May 2014 11:32, Rafael Espíndola <rafael.espind...@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;
+       status = BS->LocateProtocol(&ConsoleControlGUID, NULL, (VOID
**)& ConsoleControl);
+       if (EFI_ERROR(status))
+               panic("No console control protocol located");
+       status = ConsoleControl->SetMode(ConsoleControl,
+       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

Anyhow, I'll commit a version of this soon.
freebsd-current@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to