https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
		
			
				
	
	
		
			55 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
/** @file
 | 
						|
  Work with PCI capabilities in PCI config space -- internal type definitions.
 | 
						|
 | 
						|
  Copyright (C) 2018, Red Hat, Inc.
 | 
						|
 | 
						|
  SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
						|
**/
 | 
						|
 | 
						|
#ifndef __BASE_PCI_CAP_LIB_H__
 | 
						|
#define __BASE_PCI_CAP_LIB_H__
 | 
						|
 | 
						|
#include <Library/OrderedCollectionLib.h>
 | 
						|
 | 
						|
#include <Library/PciCapLib.h>
 | 
						|
 | 
						|
//
 | 
						|
// Structure that uniquely identifies a capability instance and serves as key
 | 
						|
// for insertion and lookup.
 | 
						|
//
 | 
						|
typedef struct {
 | 
						|
  PCI_CAP_DOMAIN Domain;
 | 
						|
  UINT16         CapId;
 | 
						|
  UINT16         Instance;
 | 
						|
} PCI_CAP_KEY;
 | 
						|
 | 
						|
//
 | 
						|
// In Instance==0 PCI_CAP objects, store NumInstances directly. In Instance>0
 | 
						|
// PCI_CAP objects, link Instance#0 of the same (Domain, CapId). This way
 | 
						|
// NumInstances needs maintenance in one object only, per (Domain, CapId) pair.
 | 
						|
//
 | 
						|
typedef union {
 | 
						|
  UINT16  NumInstances;
 | 
						|
  PCI_CAP *InstanceZero;
 | 
						|
} PCI_CAP_NUM_INSTANCES;
 | 
						|
 | 
						|
//
 | 
						|
// Complete the incomplete PCI_CAP structure here.
 | 
						|
//
 | 
						|
struct PCI_CAP {
 | 
						|
  PCI_CAP_KEY           Key;
 | 
						|
  PCI_CAP_NUM_INSTANCES NumInstancesUnion;
 | 
						|
  UINT16                Offset;
 | 
						|
  UINT16                MaxSizeHint;
 | 
						|
  UINT8                 Version;
 | 
						|
};
 | 
						|
 | 
						|
//
 | 
						|
// Complete the incomplete PCI_CAP_LIST structure here.
 | 
						|
//
 | 
						|
struct PCI_CAP_LIST {
 | 
						|
  ORDERED_COLLECTION *Capabilities;
 | 
						|
};
 | 
						|
 | 
						|
#endif // __BASE_PCI_CAP_LIB_H__
 |