[ipxe-devel] iPXE run time size

Michael Brown mbrown at fensystems.co.uk
Thu May 30 19:58:28 UTC 2013


On 30/05/13 18:56, Yossef Efraim wrote:
> My iPXE mrom is ~95k,
>
> How can I estimate the run time size ?

It's a non-trivial calculation, and there are several possible 
definitions of "run time" that might apply.

The first place to look is the linker map, which you can generate by 
adding ".map" to your build target (e.g. bin/rtl8139.rom.map).

There are several symbols that provide relevant information:

_text16_memsz and _data16_memsz provide the uncompressed sizes of the 
real-mode text and data segments.

_textdata_memsz provides the uncompressed size of the protected-mode 
combined text and data segment.

The actual sizes used will be rounded up to the nearest 16 bytes, and 
the actual sizes hidden from the system memory map will be rounded up to 
the nearest 4096 bytes.

Mellanox cards also require a substantial amount of memory for use by 
the card's onboard firmware.  This allocation is performed using 
umalloc() and is not included within _textdata_memsz.  The amount of 
memory required is calculated at runtime using input from the card's 
firmware, and is not known in advance.  It is likely to be a few 
megabytes per card.

Hope that helps.

Michael



More information about the ipxe-devel mailing list