diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-06 10:37:49 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-06 10:37:49 +0000 |
commit | 28c73f6ef7fc6cb1803d80761002ec2a7330d833 (patch) | |
tree | 66ab216f4494736fa66fee52642177ad968a705a /MdePkg/Library/BasePciCf8Lib | |
parent | df569f61e3806ec8dbeef9c89123f5b223720c07 (diff) | |
download | edk2-28c73f6ef7fc6cb1803d80761002ec2a7330d833.tar.gz edk2-28c73f6ef7fc6cb1803d80761002ec2a7330d833.tar.bz2 edk2-28c73f6ef7fc6cb1803d80761002ec2a7330d833.zip |
PciLib:
For PciRead/WriteBuffer(): A fix to handle boundary cases when Size is 0;
DevicePathLib:
For FileDevicePath(): Change to use AppendDevicePath () in place of AppendDevicePathNode().
PrintLib:
For type %p, according to current MWG, it should ignore flag 0, +, space, l, & L
Misc:
Fix a bug in EBC interpreter for Ia32.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@796 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BasePciCf8Lib')
-rw-r--r-- | MdePkg/Library/BasePciCf8Lib/PciLib.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/MdePkg/Library/BasePciCf8Lib/PciLib.c b/MdePkg/Library/BasePciCf8Lib/PciLib.c index a3897bfaa4..9421d8b99d 100644 --- a/MdePkg/Library/BasePciCf8Lib/PciLib.c +++ b/MdePkg/Library/BasePciCf8Lib/PciLib.c @@ -1299,11 +1299,16 @@ PciCf8ReadBuffer ( ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);
ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);
- ASSERT ((Buffer != NULL) || (Size == 0));
+
+ if (Size == 0) {
+ return 0;
+ }
+
+ ASSERT (Buffer != NULL);
EndAddress = StartAddress + Size;
- if ((StartAddress < EndAddress) && ((StartAddress & 1) != 0)) {
+ if ((StartAddress & 1) != 0) {
//
// Read a byte if StartAddress is byte aligned
//
@@ -1386,11 +1391,16 @@ PciCf8WriteBuffer ( ASSERT_INVALID_PCI_ADDRESS (StartAddress, 0);
ASSERT (((StartAddress & 0xFFF) + Size) <= 0x100);
- ASSERT ((Buffer != NULL) || (Size == 0));
+
+ if (Size == 0) {
+ return 0;
+ }
+
+ ASSERT (Buffer != 0);
EndAddress = StartAddress + Size;
- if ((StartAddress < EndAddress) && ((StartAddress & 1)!= 0)) {
+ if ((StartAddress & 1)!= 0) {
//
// Write a byte if StartAddress is byte aligned
//
|