3.15.5 Console variables

After loading these drivers in the handle database, the platform can connect the console devices that the user has selected. The device paths for these consoles are stored in the ConIn, ConOut, and ErrOut global UEFI variables (see the Boot Manager chapter of the UEFI Specification). For the purpose of this example, the variables have the following device paths:

ErrOut = Acpi(HWP0002,0,PNP0A03)/Pci(1|1)/Uart(9600N81)/
VenMsg(Vt100+);Acpi(HWP0002,0,PNP0A03)/Pci(4|0)

ConOut = Acpi(HWP0002,0,PNP0A03)/Pci(1|1)/Uart(9600N81)/
VenMsg(Vt100+);Acpi(HWP0002,0,PNP0A03)/Pci(4|0)

ConIn = Acpi(HWP0002,0,PNP0A03)/Pci(1|1)/Uart(9600N81)/ 
VenMsg(Vt100+)

Note the following:

  • The ErrOut and ConOut variables are multi-instance device paths separated by semicolon (;) indicating that the EFI output is mirrored on two different console devices. The mirroring is performed when the ConSplitterDxe driver is connected. In this example, the two devices are a serial terminal and a PCI video controller.

  • The ConIn variable contains a device path to a serial terminal.

  • The ErrOut variable is typically the same as the ConOut variable, but could be redirected to different set of devices. It is important to check how this UEFI variable is configured when developing UEFI drivers because the debug messages from a UEFI Driver are typically directed to the console device(s) specified by ErrOut.ErrOut may not specify the same devices as ConOut

In this example, the two devices are a serial terminal and a PCI video controller. The EDK II provides the DebugLib which is a library that provides services such as DEBUG() and ASSERT() that are used generate debug messages.