VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/PciSegmentLibSegmentInfo/BasePciSegmentLib.c@ 89977

最後變更 在這個檔案從89977是 80721,由 vboxsync 提交於 5 年 前

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.8 KB
 
1/** @file
2 Instance of Base PCI Segment Library that support multi-segment PCI configuration access.
3
4 PCI Segment Library that consumes segment information provided by PciSegmentInfoLib to
5 support multi-segment PCI configuration access through enhanced configuration access mechanism.
6
7 Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10**/
11
12#include "PciSegmentLibCommon.h"
13
14/**
15 Return the virtual address for the physical address.
16
17 @param Address The physical address.
18
19 @retval The virtual address.
20**/
21UINTN
22PciSegmentLibVirtualAddress (
23 IN UINTN Address
24 )
25{
26 return Address;
27}
28
29/**
30 Register a PCI device so PCI configuration registers may be accessed after
31 SetVirtualAddressMap().
32
33 If any reserved bits in Address are set, then ASSERT().
34
35 @param Address The address that encodes the PCI Bus, Device, Function and
36 Register.
37
38 @retval RETURN_SUCCESS The PCI device was registered for runtime access.
39 @retval RETURN_UNSUPPORTED An attempt was made to call this function
40 after ExitBootServices().
41 @retval RETURN_UNSUPPORTED The resources required to access the PCI device
42 at runtime could not be mapped.
43 @retval RETURN_OUT_OF_RESOURCES There are not enough resources available to
44 complete the registration.
45
46**/
47RETURN_STATUS
48EFIAPI
49PciSegmentRegisterForRuntimeAccess (
50 IN UINTN Address
51 )
52{
53 //
54 // Use PciSegmentLibGetEcamAddress() to validate the Address.
55 //
56 DEBUG_CODE (
57 UINTN Count;
58 PCI_SEGMENT_INFO *SegmentInfo;
59
60 SegmentInfo = GetPciSegmentInfo (&Count);
61 PciSegmentLibGetEcamAddress (Address, SegmentInfo, Count);
62 );
63 return RETURN_SUCCESS;
64}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette