This patch adds a simple 32bit static elf binary loader to acrn DM.
And if the elf binary follow multiboot protocol, only memory info
will be included in multiboot info.
Tracked-On: #1465
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
Some firmware (e.g. UEFI) uses RTC CMOS to fetch the system's memory
configuration. Put lowmem / highmem info in the designated area.
This is a port of Bhyve vRTC's user-space logic.
v1 -> v2:
* move KB/MB/GB to macros.h
* move nvram offset definitions to rtc.h
Tracked-On: #1390
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
For vSBL boot path, we need to mark the memory vSBL is using
as reserved in e820 table. The add_e820_entry is added to
update the e820 table dynamically.
To simplify the code logic, we assume:
- vSBL is put the middle of one entry of default e820 table
- That entry has orignal RAM type in e820 table
- The e820 table has enough space to hold two more new entries.
If there is more complicated case in the future, we could extend
add_e820_entry to handle it.
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
The region of MPtable/ACPI table/SMBios resides in
0xF0000 ~ 0x100000. They should be marked as RESERVED instead of
RAM type in e820 table.
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Some guests needs guest partition info passed to support
A/B boot. DM needs to load guest partition info from file
and pass to vsbl.
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
To align with file name, acrn_sw_load_direct() is changed
to acrn_sw_load_bzimage().
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
The common loader code is put to sw_load_common.c
The loader code for directly kernel loading is put to sw_load_bzimage.c
The further change for SBL will be put to sw_load_sbl.c
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>