\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
\r
return CpuIo->IoRead8 (PeiServices, CpuIo, (UINT64) Port);\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
\r
CpuIo->IoWrite8 (PeiServices, CpuIo, (UINT64) Port, Value);\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
-\r
+ //\r
+ // Make sure Port is aligned on a 16-bit boundary.\r
+ //\r
+ ASSERT ((Port & 1) == 0);\r
return CpuIo->IoRead16 (PeiServices, CpuIo, (UINT64) Port);\r
}\r
\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
-\r
+ //\r
+ // Make sure Port is aligned on a 16-bit boundary.\r
+ //\r
+ ASSERT ((Port & 1) == 0);\r
CpuIo->IoWrite16 (PeiServices, CpuIo, (UINT64) Port, Value);\r
return Value;\r
}\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
-\r
+ //\r
+ // Make sure Port is aligned on a 32-bit boundary.\r
+ //\r
+ ASSERT ((Port & 3) == 0);\r
return CpuIo->IoRead32 (PeiServices, CpuIo, (UINT64) Port);\r
}\r
\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
-\r
+ //\r
+ // Make sure Port is aligned on a 32-bit boundary.\r
+ //\r
+ ASSERT ((Port & 3) == 0);\r
CpuIo->IoWrite32 (PeiServices, CpuIo, (UINT64) Port, Value);\r
return Value;\r
}\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
-\r
+ //\r
+ // Make sure Port is aligned on a 64-bit boundary.\r
+ //\r
+ ASSERT ((Port & 7) == 0);\r
return CpuIo->IoRead64 (PeiServices, CpuIo, (UINT64) Port);\r
}\r
\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
-\r
+ //\r
+ // Make sure Port is aligned on a 64-bit boundary.\r
+ //\r
+ ASSERT ((Port & 7) == 0);\r
CpuIo->IoWrite64 (PeiServices, CpuIo, (UINT64) Port, Value);\r
return Value;;\r
}\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
\r
return CpuIo->MemRead8 (PeiServices, CpuIo, (UINT64) Address);\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
\r
CpuIo->MemWrite8 (PeiServices, CpuIo, (UINT64) Address, Value);\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
-\r
+ //\r
+ // Make sure Address is aligned on a 16-bit boundary.\r
+ //\r
+ ASSERT ((Address & 1) == 0);\r
return CpuIo->MemRead16 (PeiServices, CpuIo, (UINT64) Address);\r
\r
}\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
-\r
+ //\r
+ // Make sure Address is aligned on a 16-bit boundary.\r
+ //\r
+ ASSERT ((Address & 1) == 0);\r
CpuIo->MemWrite16 (PeiServices, CpuIo, (UINT64) Address, Value);\r
return Value;\r
}\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
-\r
+ //\r
+ // Make sure Address is aligned on a 32-bit boundary.\r
+ //\r
+ ASSERT ((Address & 3) == 0);\r
return CpuIo->MemRead32 (PeiServices, CpuIo, (UINT64) Address);\r
\r
}\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
-\r
+ //\r
+ // Make sure Address is aligned on a 32-bit boundary.\r
+ //\r
+ ASSERT ((Address & 3) == 0);\r
CpuIo->MemWrite32 (PeiServices, CpuIo, (UINT64) Address, Value);\r
return Value;\r
}\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
-\r
+ //\r
+ // Make sure Address is aligned on a 64-bit boundary.\r
+ //\r
+ ASSERT ((Address & 7) == 0);\r
return CpuIo->MemRead64 (PeiServices, CpuIo, (UINT64) Address);\r
\r
}\r
\r
PeiServices = GetPeiServicesTablePointer ();\r
CpuIo = (*PeiServices)->CpuIo;\r
-\r
ASSERT (CpuIo != NULL);\r
-\r
+ //\r
+ // Make sure Address is aligned on a 64-bit boundary.\r
+ //\r
+ ASSERT ((Address & 7) == 0);\r
CpuIo->MemWrite64 (PeiServices, CpuIo, (UINT64) Address, Value);\r
return Value;\r
}\r