/** @file\r
data types that are used by editor\r
\r
- Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>\r
+ Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved. <BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
} HEFI_EDITOR_DISK_IMAGE;\r
\r
typedef struct {\r
- EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *IoFncs;\r
-\r
- UINTN Offset;\r
- UINTN Size;\r
+ EFI_CPU_IO2_PROTOCOL *IoFncs;\r
+ UINTN Offset;\r
+ UINTN Size;\r
} HEFI_EDITOR_MEM_IMAGE;\r
\r
typedef struct {\r
/** @file\r
Functions to deal with Mem buffer\r
\r
- Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>\r
+ Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved. <BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
HEFI_EDITOR_MEM_IMAGE HMemImage;\r
HEFI_EDITOR_MEM_IMAGE HMemImageBackupVar;\r
\r
-EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL DummyPciRootBridgeIo;\r
-\r
//\r
// for basic initialization of HDiskImage\r
//\r
0\r
};\r
\r
-/**\r
- Empty function. always returns the same.\r
-\r
- @param[in] This Ignored.\r
- @param[in] Width Ignored.\r
- @param[in] Address Ignored.\r
- @param[in] Count Ignored.\r
- @param[in, out] Buffer Ignored.\r
-\r
- @retval EFI_UNSUPPORTED.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-DummyMemRead (\r
- IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This,\r
- IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
- IN UINT64 Address,\r
- IN UINTN Count,\r
- IN OUT VOID *Buffer\r
- )\r
-{\r
- return EFI_UNSUPPORTED;\r
-}\r
-\r
-/**\r
- Empty function. always returns the same.\r
-\r
- @param[in] This Ignored.\r
- @param[in] Width Ignored.\r
- @param[in] Address Ignored.\r
- @param[in] Count Ignored.\r
- @param[in, out] Buffer Ignored.\r
-\r
- @retval EFI_UNSUPPORTED.\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-DummyMemWrite (\r
- IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL * This,\r
- IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH Width,\r
- IN UINT64 Address,\r
- IN UINTN Count,\r
- IN OUT VOID *Buffer\r
- )\r
-{\r
- return EFI_UNSUPPORTED;\r
-}\r
-\r
/**\r
Initialization function for HDiskImage.\r
\r
CopyMem (&HMemImage, &HMemImageConst, sizeof (HMemImage));\r
\r
Status = gBS->LocateProtocol (\r
- &gEfiPciRootBridgeIoProtocolGuid,\r
+ &gEfiCpuIo2ProtocolGuid,\r
NULL,\r
(VOID**)&HMemImage.IoFncs\r
);\r
- if (Status == EFI_NOT_FOUND) {\r
- //\r
- // For NT32, no EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL is available\r
- // Use Dummy PciRootBridgeIo for memory access\r
- //\r
- ZeroMem (&DummyPciRootBridgeIo, sizeof (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL));\r
- DummyPciRootBridgeIo.Mem.Read = DummyMemRead;\r
- DummyPciRootBridgeIo.Mem.Write = DummyMemWrite;\r
- HMemImage.IoFncs = &DummyPciRootBridgeIo;\r
- Status = EFI_SUCCESS;\r
- }\r
if (!EFI_ERROR (Status)) {\r
return EFI_SUCCESS;\r
} else {\r