diff options
author | Laszlo Ersek <lersek@redhat.com> | 2016-01-25 23:17:22 +0100 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2016-03-03 18:18:39 +0100 |
commit | dc4d64670a19d4f813e8f3dc7231998615404511 (patch) | |
tree | 8c2aeac1da7c07ee0733dd8e974249378313f4e2 /OvmfPkg | |
parent | 46e46eaf6215a66e196082a9307b88a78355b073 (diff) | |
download | edk2-platforms-dc4d64670a19d4f813e8f3dc7231998615404511.tar.xz |
OvmfPkg: PciHostBridgeLib: implement PciHostBridgeFreeRootBridges()
This function has no counterpart in OvmfPkg/PciHostBridgeDxe/, but the
PciHostBridgeLib class requires it.
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c index 2f22d637ae..25746dd1cf 100644 --- a/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ b/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c @@ -215,7 +215,17 @@ PciHostBridgeFreeRootBridges ( UINTN Count
)
{
- return;
+ if (Bridges == NULL && Count == 0) {
+ return;
+ }
+ ASSERT (Bridges != NULL && Count > 0);
+
+ do {
+ --Count;
+ UninitRootBridge (&Bridges[Count]);
+ } while (Count > 0);
+
+ FreePool (Bridges);
}
|