git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6831
6f19259b-4bc3-4df7-8a09-
765794883524
-#ifndef _PEI_SMBUS_PPI_H\r
-#define _PEI_SMBUS_PPI_H\r
+#ifndef _PEI_SMBUS_PPI_H_\r
+#define _PEI_SMBUS_PPI_H_\r
\r
#include <PiPei.h>\r
#include <Ppi/Smbus2.h>\r
\r
#include <PiPei.h>\r
#include <Ppi/Smbus2.h>\r
-#ifndef _ACPI_S3_SAVE_PROTOCOL_H\r
-#define _ACPI_S3_SAVE_PROTOCOL_H\r
+#ifndef _ACPI_S3_SAVE_PROTOCOL_H_\r
+#define _ACPI_S3_SAVE_PROTOCOL_H_\r
\r
#include <PiDxe.h>\r
\r
\r
#include <PiDxe.h>\r
\r
-#ifndef _BOOT_SCRIPT_SAVE_PROTOCOL_H\r
-#define _BOOT_SCRIPT_SAVE_PROTOCOL_H\r
+#ifndef _BOOT_SCRIPT_SAVE_PROTOCOL_H_\r
+#define _BOOT_SCRIPT_SAVE_PROTOCOL_H_\r
\r
#include <PiDxe.h>\r
//\r
\r
#include <PiDxe.h>\r
//\r
typedef struct _EFI_LEGACY_BIOS_PROTOCOL EFI_LEGACY_BIOS_PROTOCOL;\r
\r
//\r
typedef struct _EFI_LEGACY_BIOS_PROTOCOL EFI_LEGACY_BIOS_PROTOCOL;\r
\r
//\r
-/// @bug: These macros appear in no specifications and are kept for backward\r
+/// @bug These macros appear in no specifications and are kept for backward\r
// compatibility only.\r
// Convert from 32-bit address (_Adr) to Segment:Offset 16-bit form\r
//\r
// compatibility only.\r
// Convert from 32-bit address (_Adr) to Segment:Offset 16-bit form\r
//\r
- BaseLib\r
- DebugLib\r
- UefiBootServicesTableLib\r
-\r
\r
[Protocols]\r
gEfiCpuIoProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
\r
[Protocols]\r
gEfiCpuIoProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
\r
ReturnBuffer = Buffer;\r
\r
\r
ReturnBuffer = Buffer;\r
\r
+ while (Length-- > 0) {\r
*(Buffer++) = MmioRead8 (StartAddress++);\r
}\r
\r
*(Buffer++) = MmioRead8 (StartAddress++);\r
}\r
\r
\r
ReturnBuffer = Buffer;\r
\r
\r
ReturnBuffer = Buffer;\r
\r
*(Buffer++) = MmioRead16 (StartAddress);\r
StartAddress += sizeof (UINT16);\r
Length -= sizeof (UINT16);\r
*(Buffer++) = MmioRead16 (StartAddress);\r
StartAddress += sizeof (UINT16);\r
Length -= sizeof (UINT16);\r
\r
ReturnBuffer = Buffer;\r
\r
\r
ReturnBuffer = Buffer;\r
\r
*(Buffer++) = MmioRead32 (StartAddress);\r
StartAddress += sizeof (UINT32);\r
Length -= sizeof (UINT32);\r
*(Buffer++) = MmioRead32 (StartAddress);\r
StartAddress += sizeof (UINT32);\r
Length -= sizeof (UINT32);\r
\r
ReturnBuffer = Buffer;\r
\r
\r
ReturnBuffer = Buffer;\r
\r
*(Buffer++) = MmioRead64 (StartAddress);\r
StartAddress += sizeof (UINT64);\r
Length -= sizeof (UINT64);\r
*(Buffer++) = MmioRead64 (StartAddress);\r
StartAddress += sizeof (UINT64);\r
Length -= sizeof (UINT64);\r
\r
ReturnBuffer = (UINT8 *) Buffer;\r
\r
\r
ReturnBuffer = (UINT8 *) Buffer;\r
\r
+ while (Length-- > 0) {\r
MmioWrite8 (StartAddress++, *(Buffer++));\r
}\r
\r
MmioWrite8 (StartAddress++, *(Buffer++));\r
}\r
\r
\r
ReturnBuffer = (UINT16 *) Buffer;\r
\r
\r
ReturnBuffer = (UINT16 *) Buffer;\r
\r
MmioWrite16 (StartAddress, *(Buffer++));\r
\r
StartAddress += sizeof (UINT16);\r
MmioWrite16 (StartAddress, *(Buffer++));\r
\r
StartAddress += sizeof (UINT16);\r
\r
ReturnBuffer = (UINT32 *) Buffer;\r
\r
\r
ReturnBuffer = (UINT32 *) Buffer;\r
\r
MmioWrite32 (StartAddress, *(Buffer++));\r
\r
StartAddress += sizeof (UINT32);\r
MmioWrite32 (StartAddress, *(Buffer++));\r
\r
StartAddress += sizeof (UINT32);\r
\r
ReturnBuffer = (UINT64 *) Buffer;\r
\r
\r
ReturnBuffer = (UINT64 *) Buffer;\r
\r
MmioWrite64 (StartAddress, *(Buffer++));\r
\r
StartAddress += sizeof (UINT64);\r
MmioWrite64 (StartAddress, *(Buffer++));\r
\r
StartAddress += sizeof (UINT64);\r
- DebugLib\r
- UefiBootServicesTableLib\r
- DevicePathLib\r
\r
[Protocols]\r
gEfiLoadedImageProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
\r
[Protocols]\r
gEfiLoadedImageProtocolGuid # PROTOCOL ALWAYS_CONSUMED\r
-#ifndef __INTERNAL_SMBUS_LIB_H\r
-#define __INTERNAL_SMBUS_LIB_H\r
+#ifndef _INTERNAL_SMBUS_LIB_H_\r
+#define _INTERNAL_SMBUS_LIB_H_\r
\r
\r
#include <PiPei.h>\r
\r
\r
#include <PiPei.h>\r
- BaseMemoryLib\r
- PeiServicesLib\r
- DebugLib\r
- PeiServicesTablePointerLib\r
\r
[Ppis]\r
gEfiPeiSmbusPpiGuid # PPI ALWAYS_CONSUMED\r
\r
[Ppis]\r
gEfiPeiSmbusPpiGuid # PPI ALWAYS_CONSUMED\r