Preliminary fix: Unikraft expects memory regions in the boot info
to not overlap and be page aligned. This is, however, not
compatible with having the .tdata section being assigned its
dedicated segment. This commit removes the sanity checks for
now as Unikraft can handle this specific case.
Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Signed-off-by: Marc Rittinghaus <marc.rittinghaus@unikraft.io>
Reviewed-by: Michalis Pappas <michalis.pappas@opensynergy.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Approved-by: Simon Kuenzer <simon@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #746
# struct ukplat_memregion_desc (see include/uk/plat/memory.h).
with open(opt.output, 'wb') as secobj:
nsecs = 0
- last_pbase = 0
cap = bootsec_size
cap = cap - UKPLAT_BOOTINFO_SIZE
if pbase < opt.min_address:
continue
- if pbase != (pbase & ~(PAGE_SIZE - 1)):
- raise Exception("Segment base address 0x{:x} is not page-aligned".format(pbase))
-
flags = 0
if phdr[2][0] == 'r':
flags |= UKPLAT_MEMRF_READ
size = (int(phdr[1], base=16) + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1)
assert nsecs < cap
- assert pbase >= last_pbase
- last_pbase = pbase
nsecs += 1
secobj.write(pbase.to_bytes(8, endianness)) # pbase