#include <Protocol/PciRootBridgeIo.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
#include "UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.h"
#include <Uefi.h>
extern EFI_BOOT_SERVICES *gBS;
VOID
MmPciWrite (
IN UINT64 Address, //Address = bbddffrr
IN UINT64 Value
)
{
EFI_STATUS Status;
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *IoDev;
EFI_HANDLE *HandleBuffer;
UINTN BufferSize;
UINTN Index;
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width;
IoDev = NULL;
HandleBuffer = NULL;
BufferSize = 0;
Width = EfiPciWidthUint8;
Status = gBS->LocateHandleBuffer (
ByProtocol,
&gEfiPciRootBridgeIoProtocolGuid,
NULL,
&BufferSize,
&HandleBuffer
);
if (EFI_ERROR (Status)) {
P
UEFI应用与编程--读写Pci配置空间
最新推荐文章于 2022-11-08 14:11:24 发布