TianoCore EDK2 master
|
Go to the source code of this file.
Typedefs | |
typedef struct EXTRA_ROOT_BUS_MAP_STRUCT | EXTRA_ROOT_BUS_MAP |
Functions | |
EFI_STATUS | CreateExtraRootBusMap (OUT EXTRA_ROOT_BUS_MAP **ExtraRootBusMap) |
VOID | DestroyExtraRootBusMap (IN EXTRA_ROOT_BUS_MAP *ExtraRootBusMap) |
EFI_STATUS | MapRootBusPosToBusNr (IN CONST EXTRA_ROOT_BUS_MAP *ExtraRootBusMap, IN UINT64 RootBusPos, OUT UINT32 *RootBusNr) |
Map positions of extra PCI root buses to bus numbers.
Copyright (C) 2015, Red Hat, Inc.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file ExtraRootBusMap.h.
typedef struct EXTRA_ROOT_BUS_MAP_STRUCT EXTRA_ROOT_BUS_MAP |
Incomplete ("opaque") data type implementing the map.
Definition at line 15 of file ExtraRootBusMap.h.
EFI_STATUS CreateExtraRootBusMap | ( | OUT EXTRA_ROOT_BUS_MAP ** | ExtraRootBusMap | ) |
Create a structure that maps the relative positions of PCI root buses to bus numbers.
In the "bootorder" fw_cfg file, QEMU refers to extra PCI root buses by their positions, in relative root bus number order, not by their actual PCI bus numbers. The ACPI HID device path nodes however that are associated with PciRootBridgeIo protocol instances in the system have their UID fields set to the bus numbers. Create a map that gives, for each extra PCI root bus's position (ie. "serial number") its actual PCI bus number.
[out] | ExtraRootBusMap | The data structure implementing the map. |
EFI_SUCCESS | ExtraRootBusMap has been populated. |
EFI_OUT_OF_RESOURCES | Memory allocation failed. |
EFI_ALREADY_STARTED | A duplicate root bus number has been found in the system. (This should never happen.) |
Definition at line 128 of file ExtraRootBusMap.c.
VOID DestroyExtraRootBusMap | ( | IN EXTRA_ROOT_BUS_MAP * | ExtraRootBusMap | ) |
Release a map created with CreateExtraRootBusMap().
[in] | ExtraRootBusMap | The map to release. |
Definition at line 278 of file ExtraRootBusMap.c.
EFI_STATUS MapRootBusPosToBusNr | ( | IN CONST EXTRA_ROOT_BUS_MAP * | ExtraRootBusMap, |
IN UINT64 | RootBusPos, | ||
OUT UINT32 * | RootBusNr | ||
) |
Map the position (serial number) of an extra PCI root bus to its bus number.
[in] | ExtraRootBusMap | The map created with CreateExtraRootBusMap(); |
[in] | RootBusPos | The extra PCI root bus position to map. |
[out] | RootBusNr | The bus number belonging to the extra PCI root bus identified by RootBusPos. |
EFI_INVALID_PARAMETER | RootBusPos is zero. The zero position identifies the main root bus, whose bus number is always zero, and is therefore never maintained in ExtraRootBusMap. |
EFI_NOT_FOUND | RootBusPos is not found in ExtraRootBusMap. |
EFI_SUCCESS | Mapping successful. |
Definition at line 309 of file ExtraRootBusMap.c.