mirror of https://github.com/acidanthera/audk.git
OvmfPkg/IndustryStandard: define PCI Capabilities for QEMU's PCI Bridges
QEMU has recently gained the ability to provide various hints about its PCI bridges. The hints take the form of vendor-specific PCI capabilities. Define macros and types under "OvmfPkg/Include/IndustryStandard" to describe these capabilities. The definitions correspond to "docs/pcie_pci_bridge.txt" in the QEMU tree. Said documentation was added in the last commit of the following series: a35fe226558a hw/pci: introduce pcie-pci-bridge device 70e1ee59bb94 hw/pci: introduce bridge-only vendor-specific capability to provide some hints to firmware 226263fb5cda hw/pci: add QEMU-specific PCI capability to the Generic PCI Express Root Port c1800a162765 docs: update documentation considering PCIE-PCI bridge We are going to parse the Resource Reservation Capability in OvmfPkg/PciHotPlugInitDxe, and return the reservation requests to PciBusDxe. Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Marcel Apfelbaum <marcel@redhat.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
parent
8844f15d33
commit
bdf73b57f2
|
@ -0,0 +1,60 @@
|
|||
/** @file
|
||||
Macro and type definitions for QEMU's Red Hat vendor-specific PCI
|
||||
capabilities that provide various hints about PCI Bridges.
|
||||
|
||||
Refer to "docs/pcie_pci_bridge.txt" in the QEMU source directory.
|
||||
|
||||
Copyright (C) 2017, Red Hat, Inc.
|
||||
|
||||
This program and the accompanying materials are licensed and made available
|
||||
under the terms and conditions of the BSD License which accompanies this
|
||||
distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
|
||||
WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
**/
|
||||
|
||||
#ifndef __QEMU_PCI_BRIDGE_CAPABILITIES_H__
|
||||
#define __QEMU_PCI_BRIDGE_CAPABILITIES_H__
|
||||
|
||||
#include <IndustryStandard/Pci23.h>
|
||||
|
||||
//
|
||||
// The hints apply to PCI Bridges whose PCI_DEVICE_INDEPENDENT_REGION.VendorId
|
||||
// equals the following value.
|
||||
//
|
||||
#define QEMU_PCI_BRIDGE_VENDOR_ID_REDHAT 0x1B36
|
||||
|
||||
//
|
||||
// Common capability header for all hints.
|
||||
//
|
||||
#pragma pack (1)
|
||||
typedef struct {
|
||||
EFI_PCI_CAPABILITY_VENDOR_HDR VendorHdr;
|
||||
UINT8 Type;
|
||||
} QEMU_PCI_BRIDGE_CAPABILITY_HDR;
|
||||
#pragma pack ()
|
||||
|
||||
//
|
||||
// Values defined for QEMU_PCI_BRIDGE_CAPABILITY_HDR.Type.
|
||||
//
|
||||
#define QEMU_PCI_BRIDGE_CAPABILITY_TYPE_RESOURCE_RESERVATION 0x01
|
||||
|
||||
//
|
||||
// PCI Resource Reservation structure for when
|
||||
// QEMU_PCI_BRIDGE_CAPABILITY_HDR.Type equals
|
||||
// QEMU_PCI_BRIDGE_CAPABILITY_TYPE_RESOURCE_RESERVATION.
|
||||
//
|
||||
#pragma pack (1)
|
||||
typedef struct {
|
||||
QEMU_PCI_BRIDGE_CAPABILITY_HDR BridgeHdr;
|
||||
UINT32 BusNumbers;
|
||||
UINT64 Io;
|
||||
UINT32 NonPrefetchable32BitMmio;
|
||||
UINT32 Prefetchable32BitMmio;
|
||||
UINT64 Prefetchable64BitMmio;
|
||||
} QEMU_PCI_BRIDGE_CAPABILITY_RESOURCE_RESERVATION;
|
||||
#pragma pack ()
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue