diff options
author | Laszlo Ersek <lersek@redhat.com> | 2015-07-14 12:02:20 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2015-07-14 12:02:20 +0000 |
commit | 20f7840e3ff87e365d96fb7affe48f316ab8c225 (patch) | |
tree | 1ffb25032d5bf3d618b3e8e0a640b48c8522c446 /PcAtChipsetPkg | |
parent | 7ee9dc232114206bdfe9c9e5f4d8eb5ed1c917c9 (diff) | |
download | edk2-platforms-20f7840e3ff87e365d96fb7affe48f316ab8c225.tar.xz |
OvmfPkg: PciHostBridgeDxe: use private buffer in RootBridgeIoConfiguration()
On output, the EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Configuration() function
produces a pointer to a buffer of ACPI 2.0 resource descriptors:
Resources A pointer to the ACPI 2.0 resource descriptors that describe
the current configuration of this PCI root bridge. The
storage for the ACPI 2.0 resource descriptors is allocated by
this function. The caller must treat the return buffer as
read-only data, and the buffer must not be freed by the
caller.
PciHostBridgeDxe currently provides this buffer in a structure with static
storage duration. If multiple root bridges existed in parallel, the
pointers returned by their Configuration() methods would point to the same
static storage. A later Configuration() call would overwrite the storage
pointed out by an earlier Configuration() call (which was possibly made
for a different, but still alive, root bridge.)
Fix this problem by embedding the configuration buffer in
PCI_ROOT_BRIDGE_INSTANCE.
While we're at it, correct some typos (Desp -> Desc), spell out a missing
pack(1) pragma, and improve formatting.
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17960 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'PcAtChipsetPkg')
0 files changed, 0 insertions, 0 deletions