mirror of
https://github.com/ipxe/ipxe
synced 2026-01-25 16:21:53 +03:00
[memmap] Rename addr/last fields to min/max for clarity
Use the terminology "min" and "max" for addresses covered by a memory region descriptor, since this is sufficiently intuitive to generally not require further explanation. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -81,11 +81,11 @@ __asmcall void relocate ( struct i386_all_regs *ix86 ) {
|
||||
* stage.
|
||||
*/
|
||||
memmap_dump ( ®ion );
|
||||
if ( region.addr > max ) {
|
||||
if ( region.min > max ) {
|
||||
DBGC ( ®ion, "...starts after max=%#08lx\n", max );
|
||||
break;
|
||||
}
|
||||
r_start = region.addr;
|
||||
r_start = region.min;
|
||||
if ( ! memmap_is_usable ( ®ion ) ) {
|
||||
DBGC ( ®ion, "...not usable\n" );
|
||||
continue;
|
||||
|
||||
@@ -347,11 +347,11 @@ static int bzimage_check_initrds ( struct image *image,
|
||||
|
||||
/* Limit region to avoiding kernel itself */
|
||||
min = virt_to_phys ( bzimg->pm_kernel + bzimg->pm_sz );
|
||||
if ( min < region.addr )
|
||||
min = region.addr;
|
||||
if ( min < region.min )
|
||||
min = region.min;
|
||||
|
||||
/* Limit region to kernel's memory limit */
|
||||
max = region.last;
|
||||
max = region.max;
|
||||
if ( max > bzimg->mem_limit )
|
||||
max = bzimg->mem_limit;
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ static void multiboot_build_memmap ( struct image *image,
|
||||
/* Populate Multiboot memory map entry */
|
||||
mbmemmap->size = ( sizeof ( *mbmemmap ) -
|
||||
sizeof ( mbmemmap->size ) );
|
||||
mbmemmap->base_addr = region.addr;
|
||||
mbmemmap->base_addr = region.min;
|
||||
mbmemmap->length = memmap_size ( ®ion );
|
||||
mbmemmap->type = MBMEM_RAM;
|
||||
|
||||
|
||||
@@ -305,11 +305,11 @@ static int meme820 ( struct memmap_region *region ) {
|
||||
/**
|
||||
* Describe memory region from system memory map
|
||||
*
|
||||
* @v addr Address within region
|
||||
* @v min Minimum address
|
||||
* @v hide Hide in-use regions from the memory map
|
||||
* @v region Region descriptor to fill in
|
||||
*/
|
||||
static void int15_describe ( uint64_t addr, int hide,
|
||||
static void int15_describe ( uint64_t min, int hide,
|
||||
struct memmap_region *region ) {
|
||||
unsigned int basemem;
|
||||
unsigned int extmem;
|
||||
@@ -317,7 +317,7 @@ static void int15_describe ( uint64_t addr, int hide,
|
||||
int rc;
|
||||
|
||||
/* Initialise region */
|
||||
memmap_init ( addr, region );
|
||||
memmap_init ( min, region );
|
||||
|
||||
/* Mark addresses above 4GB as inaccessible: we have no way to
|
||||
* access them either in a 32-bit build or in a 64-bit build
|
||||
|
||||
Reference in New Issue
Block a user