當前位置: 首頁>>代碼示例>>C++>>正文


C++ ASSERT_INVALID_PCI_ADDRESS函數代碼示例

本文整理匯總了C++中ASSERT_INVALID_PCI_ADDRESS函數的典型用法代碼示例。如果您正苦於以下問題:C++ ASSERT_INVALID_PCI_ADDRESS函數的具體用法?C++ ASSERT_INVALID_PCI_ADDRESS怎麽用?C++ ASSERT_INVALID_PCI_ADDRESS使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了ASSERT_INVALID_PCI_ADDRESS函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: SetVirtualAddressMap

/**
  Registers a PCI device so PCI configuration registers may be accessed after 
  SetVirtualAddressMap().
  
  Registers the PCI device specified by Address so all the PCI configuration registers 
  associated with that PCI device may be accessed after SetVirtualAddressMap() is called.
  
  If Address > 0x0FFFFFFF, then ASSERT().

  @param  Address The address that encodes the PCI Bus, Device, Function and
                  Register.
  
  @retval RETURN_SUCCESS           The PCI device was registered for runtime access.
  @retval RETURN_UNSUPPORTED       An attempt was made to call this function 
                                   after ExitBootServices().
  @retval RETURN_UNSUPPORTED       The resources required to access the PCI device
                                   at runtime could not be mapped.
  @retval RETURN_OUT_OF_RESOURCES  There are not enough resources available to
                                   complete the registration.

**/
RETURN_STATUS
EFIAPI
PciRegisterForRuntimeAccess (
  IN UINTN  Address
  )
{
  ASSERT_INVALID_PCI_ADDRESS (Address, 0);
  return RETURN_UNSUPPORTED;
}
開發者ID:hsienchieh,項目名稱:uefilab,代碼行數:30,代碼來源:PciLib.c

示例2: ASSERT

/**
  Reads a 32-bit PCI configuration register.

  Reads and returns the 32-bit PCI configuration register specified by Address.
  This function must guarantee that all PCI read and write operations are
  serialized.

  If Address > 0x0FFFFFFF, then ASSERT().
  If Address is not aligned on a 32-bit boundary, then ASSERT().

  @param  Address The address that encodes the PCI Bus, Device, Function and
                  Register.

  @return The read value from the PCI configuration register.

**/
UINT32
EFIAPI
PciRead32 (
  IN      UINTN                     Address
  )
{
  ASSERT_INVALID_PCI_ADDRESS (Address, 3);

  return PeiPciLibPciCfg2ReadWorker (Address, EfiPeiPciCfgWidthUint32);
}
開發者ID:hsienchieh,項目名稱:uefilab,代碼行數:26,代碼來源:PciLib.c


注:本文中的ASSERT_INVALID_PCI_ADDRESS函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。