mirror of https://github.com/acidanthera/audk.git
BaseTools/CommonLib: drop the use of MAX_ADDRESS
The macro MAX_ADDRESS represents the largest virtual address that is valid for a certain architecture. For the BaseTools, this quantity is irrelevant, since the same tools can be used to build for different targets. Since we only refer to it in a single place, which is an ASSERT() that doesn't seem particularly useful (it ensures that memcpy() will not be called with arguments that will make it read beyond the end of the address space and wrap around), let's drop the ASSERT and all references to MAX_ADDRESS. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
6e8cad49a0
commit
67938bcc9d
|
@ -1236,7 +1236,6 @@ InternalAllocateCopyPool (
|
|||
VOID *Memory;
|
||||
|
||||
ASSERT (Buffer != NULL);
|
||||
ASSERT (AllocationSize <= (MAX_ADDRESS - (UINTN) Buffer + 1));
|
||||
|
||||
Memory = malloc (AllocationSize);
|
||||
if (Memory != NULL) {
|
||||
|
|
|
@ -90,11 +90,6 @@ typedef INT64 INTN;
|
|||
///
|
||||
#define MAX_2_BITS 0xC000000000000000
|
||||
|
||||
///
|
||||
/// Maximum legal AARCH64 address
|
||||
///
|
||||
#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFF
|
||||
|
||||
///
|
||||
/// The stack alignment required for AARCH64
|
||||
///
|
||||
|
|
|
@ -88,11 +88,6 @@ typedef INT32 INTN;
|
|||
///
|
||||
#define MAX_2_BITS 0xC0000000
|
||||
|
||||
///
|
||||
/// Maximum legal ARM address
|
||||
///
|
||||
#define MAX_ADDRESS 0xFFFFFFFF
|
||||
|
||||
///
|
||||
/// The stack alignment required for ARM
|
||||
///
|
||||
|
|
|
@ -170,6 +170,5 @@ typedef union {
|
|||
|
||||
|
||||
#define EFI_MAX_BIT MAX_BIT
|
||||
#define EFI_MAX_ADDRESS MAX_ADDRESS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -131,11 +131,6 @@ typedef INT32 INTN;
|
|||
#define MAX_BIT 0x80000000
|
||||
#define MAX_2_BITS 0xC0000000
|
||||
|
||||
//
|
||||
// Maximum legal IA-32 address
|
||||
//
|
||||
#define MAX_ADDRESS 0xFFFFFFFF
|
||||
|
||||
//
|
||||
// Modifier to ensure that all protocol member functions and EFI intrinsics
|
||||
// use the correct C calling convention. All protocol member functions and
|
||||
|
|
|
@ -150,11 +150,6 @@ typedef INT64 INTN;
|
|||
#define MAX_BIT 0x8000000000000000ULL
|
||||
#define MAX_2_BITS 0xC000000000000000ULL
|
||||
|
||||
//
|
||||
// Maximum legal Itanium-based address
|
||||
//
|
||||
#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL
|
||||
|
||||
//
|
||||
// Modifier to ensure that all protocol member functions and EFI intrinsics
|
||||
// use the correct C calling convention. All protocol member functions and
|
||||
|
|
Loading…
Reference in New Issue