TianoCore EDK2 master
|
#include <Library/AcpiPlatformLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
Go to the source code of this file.
Functions | |
VOID | EnablePciDecoding (OUT ORIGINAL_ATTRIBUTES **OriginalAttributes, OUT UINTN *Count) |
VOID | RestorePciDecoding (IN ORIGINAL_ATTRIBUTES *OriginalAttributes, IN UINTN Count) |
Temporarily enable IO and MMIO decoding for all PCI devices while QEMU regenerates the ACPI tables.
Copyright (C) 2016, Red Hat, Inc.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PciDecoding.c.
VOID EnablePciDecoding | ( | OUT ORIGINAL_ATTRIBUTES ** | OriginalAttributes, |
OUT UINTN * | Count | ||
) |
Collect all PciIo protocol instances in the system. Save their original attributes, and enable IO and MMIO decoding for each.
This is a best effort function; it doesn't return status codes. Its caller is supposed to proceed even if this function fails.
[out] | OriginalAttributes | On output, a dynamically allocated array of ORIGINAL_ATTRIBUTES elements. The array lists the PciIo protocol instances found in the system at the time of the call, plus the original PCI attributes for each. |
Before returning, the function enables IO and MMIO decoding for each PciIo instance it finds.
On error, or when no such instances are found, OriginalAttributes is set to NULL.
[out] | Count | On output, the number of elements in OriginalAttributes. On error it is set to zero. |
Definition at line 40 of file PciDecoding.c.
VOID RestorePciDecoding | ( | IN ORIGINAL_ATTRIBUTES * | OriginalAttributes, |
IN UINTN | Count | ||
) |
Restore the original PCI attributes saved with EnablePciDecoding().
[in] | OriginalAttributes | The array allocated and populated by EnablePciDecoding(). This parameter may be NULL. If OriginalAttributes is NULL, then the function is a no-op; otherwise the PciIo attributes will be restored, and the OriginalAttributes array will be freed. |
[in] | Count | The Count value stored by EnablePciDecoding(), the number of elements in OriginalAttributes. Count may be zero if and only if OriginalAttributes is NULL. |
Definition at line 211 of file PciDecoding.c.