mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-21 12:44:50 +02:00
UefiPayloadPkg: Connect all root bridge in PlatformBootManagerBeforeConsole
Some ConIn or ConOut device may not in the first root bridge, so connect all root bridge before detect ConIn and ConOut device. Reviewed-by: Guo Dong <guo.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Maurice Ma <maurice.ma@intel.com> Cc: Benjamin You <benjamin.you@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
This commit is contained in:
parent
57ebb2994d
commit
ef01d63ef3
@ -61,6 +61,7 @@
|
|||||||
gEfiSmmAccess2ProtocolGuid
|
gEfiSmmAccess2ProtocolGuid
|
||||||
gUniversalPayloadPlatformBootManagerOverrideProtocolGuid
|
gUniversalPayloadPlatformBootManagerOverrideProtocolGuid
|
||||||
gEfiSerialIoProtocolGuid
|
gEfiSerialIoProtocolGuid
|
||||||
|
gEfiPciRootBridgeIoProtocolGuid
|
||||||
|
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut
|
gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut
|
||||||
|
@ -38,9 +38,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
|||||||
0 \
|
0 \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define gPciRootBridge \
|
|
||||||
PNPID_DEVICE_PATH_NODE(0x0A03)
|
|
||||||
|
|
||||||
#define gPnp16550ComPort \
|
#define gPnp16550ComPort \
|
||||||
PNPID_DEVICE_PATH_NODE(0x0501)
|
PNPID_DEVICE_PATH_NODE(0x0501)
|
||||||
|
|
||||||
@ -64,19 +61,6 @@ ACPI_HID_DEVICE_PATH gPnpPs2KeyboardDeviceNode = gPnpPs2Keyboard;
|
|||||||
ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode = gPnp16550ComPort;
|
ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode = gPnp16550ComPort;
|
||||||
VENDOR_DEVICE_PATH gTerminalTypeDeviceNode = gPcAnsiTerminal;
|
VENDOR_DEVICE_PATH gTerminalTypeDeviceNode = gPcAnsiTerminal;
|
||||||
|
|
||||||
//
|
|
||||||
// Predefined platform root bridge
|
|
||||||
//
|
|
||||||
PLATFORM_ROOT_BRIDGE_DEVICE_PATH gPlatformRootBridge0 = {
|
|
||||||
gPciRootBridge,
|
|
||||||
gEndEntire
|
|
||||||
};
|
|
||||||
|
|
||||||
EFI_DEVICE_PATH_PROTOCOL *gPlatformRootBridges[] = {
|
|
||||||
(EFI_DEVICE_PATH_PROTOCOL *)&gPlatformRootBridge0,
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
BOOLEAN mDetectDisplayOnly;
|
BOOLEAN mDetectDisplayOnly;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -447,32 +431,24 @@ DetectAndPreparePlatformPciDevicePaths (
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The function will connect root bridge
|
The function will connect one root bridge
|
||||||
|
|
||||||
@return EFI_SUCCESS Connect RootBridge successfully.
|
@param[in] Handle - The root bridge handle
|
||||||
|
@param[in] Instance - The instance of the root bridge
|
||||||
|
|
||||||
|
@return EFI_SUCCESS Connect RootBridge successfully.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
ConnectRootBridge (
|
EFIAPI
|
||||||
VOID
|
ConnectOneRootBridge (
|
||||||
|
IN EFI_HANDLE Handle,
|
||||||
|
IN VOID *Instance
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_HANDLE RootHandle;
|
|
||||||
|
|
||||||
//
|
Status = gBS->ConnectController (Handle, NULL, NULL, FALSE);
|
||||||
// Make all the PCI_IO protocols on PCI Seg 0 show up
|
|
||||||
//
|
|
||||||
Status = gBS->LocateDevicePath (
|
|
||||||
&gEfiDevicePathProtocolGuid,
|
|
||||||
&gPlatformRootBridges[0],
|
|
||||||
&RootHandle
|
|
||||||
);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = gBS->ConnectController (RootHandle, NULL, NULL, FALSE);
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
@ -491,7 +467,10 @@ PlatformConsoleInit (
|
|||||||
VOID
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ConnectRootBridge ();
|
VisitAllInstancesOfProtocol (
|
||||||
|
&gEfiPciRootBridgeIoProtocolGuid,
|
||||||
|
ConnectOneRootBridge
|
||||||
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Do platform specific PCI Device check and add them to ConOut, ConIn, ErrOut
|
// Do platform specific PCI Device check and add them to ConOut, ConIn, ErrOut
|
||||||
|
Loading…
x
Reference in New Issue
Block a user