PlatformPeiLib produces the EarlyPL011BaseAddress GUID HOB, and FdtPL011SerialPortLib consumes it. Extend the HOB such that it also carry the base address of the PL011 UART meant for DebugLib usage -- namely the first UART that is *not* designated by the /chosen node's "stdout-path" property. Implement this policy in PlatformPeiLib. Note that as far as the SerialPortLib+console UART is concerned, this patch makes no difference. That selection remains consistent with the pre-patch state, and therefore consistent with EarlyFdtPL011SerialPortLib. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Leif Lindholm <quic_llindhol@quicinc.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20231008153912.175941-6-lersek@redhat.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4577 [lersek@redhat.com: add TianoCore BZ reference]
33 lines
775 B
C
33 lines
775 B
C
/** @file
|
|
GUID for the HOB that caches the base address(es) of the PL011 serial port(s),
|
|
for when PCD access is not available.
|
|
|
|
Copyright (C) 2014, Red Hat, Inc.
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#ifndef __EARLY_PL011_BASE_ADDRESS_H__
|
|
#define __EARLY_PL011_BASE_ADDRESS_H__
|
|
|
|
#define EARLY_PL011_BASE_ADDRESS_GUID {\
|
|
0xB199DEA9, 0xFD5C, 0x4A84, \
|
|
{ 0x80, 0x82, 0x2F, 0x41, 0x70, 0x78, 0x03, 0x05 } \
|
|
}
|
|
|
|
extern EFI_GUID gEarlyPL011BaseAddressGuid;
|
|
|
|
typedef struct {
|
|
//
|
|
// for SerialPortLib and console IO
|
|
//
|
|
UINT64 ConsoleAddress;
|
|
//
|
|
// for DebugLib; may equal ConsoleAddress if there's only one PL011 UART
|
|
//
|
|
UINT64 DebugAddress;
|
|
} EARLY_PL011_BASE_ADDRESS;
|
|
|
|
#endif
|