summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BasePciCf8Lib/PciLib.c
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-19 07:40:23 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-19 07:40:23 +0000
commitcd14fe3dcf9445a2b3c9e8e3eef78c23c4d2b7cd (patch)
tree0589e6abd2e8169447050529e3d77e9a47999b17 /MdePkg/Library/BasePciCf8Lib/PciLib.c
parentf0147869353782c3413148bbccc1925ed2ade622 (diff)
downloadedk2-platforms-cd14fe3dcf9445a2b3c9e8e3eef78c23c4d2b7cd.tar.xz
1. PostCodeLib.
Rename BasePostCodeLib80 to BasePostCodeLibPort80. Fix typos in macro POST_CODE() and POST_CODE_WITH_DESCRIPTION() 2. DebugLib Change the parameter type of LineNumber of DebugAssert() from “INTN” to “UINTN” to follow MWG. Add type cast “(EFI_GUID *)” in macro ASSERT_PROTCOL_ALREADY_INSTALLED () to follow MWG. 3. BasePeCoffLib/ Add library function header for all the interfaces in MWG. Add missing ASSERT()s. 4. PciLib Add ASSERT()s in PciRead/WriteBuffer() to check cross PCI function access. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@557 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BasePciCf8Lib/PciLib.c')
-rw-r--r--MdePkg/Library/BasePciCf8Lib/PciLib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/MdePkg/Library/BasePciCf8Lib/PciLib.c b/MdePkg/Library/BasePciCf8Lib/PciLib.c
index 2f82fbe2c8..7b52a7c925 100644
--- a/MdePkg/Library/BasePciCf8Lib/PciLib.c
+++ b/MdePkg/Library/BasePciCf8Lib/PciLib.c
@@ -1299,6 +1299,7 @@ PciCf8ReadBuffer (
UINTN EndAddress;
ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);
+ ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);
ASSERT (Buffer != NULL);
EndAddress = StartAddress + Size;
@@ -1386,6 +1387,7 @@ PciCf8WriteBuffer (
UINTN EndAddress;
ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);
+ ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);
ASSERT (Buffer != NULL);
EndAddress = StartAddress + Size;