mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 23:54:02 +02:00
Correct ASSERT to more cases.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7847 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
07d97279a3
commit
351d6e7fcc
@ -68,7 +68,11 @@ InvalidateInstructionCacheRange (
|
|||||||
IN UINTN Length
|
IN UINTN Length
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1);
|
if (Length == 0) {
|
||||||
|
return Address;
|
||||||
|
}
|
||||||
|
|
||||||
|
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Address));
|
||||||
return Address;
|
return Address;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -127,12 +131,12 @@ WriteBackInvalidateDataCacheRange (
|
|||||||
UINTN Start;
|
UINTN Start;
|
||||||
UINTN End;
|
UINTN End;
|
||||||
|
|
||||||
ASSERT (Length <= MAX_ADDRESS - (UINTN)Address + 1);
|
|
||||||
|
|
||||||
if (Length == 0) {
|
if (Length == 0) {
|
||||||
return Address;
|
return Address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)Address));
|
||||||
|
|
||||||
Start = (UINTN)Address;
|
Start = (UINTN)Address;
|
||||||
//
|
//
|
||||||
// Calculate the cache line alignment
|
// Calculate the cache line alignment
|
||||||
|
Loading…
x
Reference in New Issue
Block a user