Commit
f0ae44de725f ("plat/kvm/x86: Workaround re-mapping low-mem areas")
introduced this check to ignore `EEXIST` errors while mapping the
memory regions marked as `UKPLAT_MEMRF_MAP` due to the fact that,
before the previous commit ("plat: Generalize memory initialization"),
Unikraft was ignoring all memory regions in the first 1 MiB and was
manually hardcoding the mappings in the static boot page tables.
This was done because the `multiboot` boot protocol would not report
the legacy mapped `BIOS ROM` area or the `VGA Framebuffer` in its
e820 map's reserved regions.
We no longer need this anymore and, if anything, it helps
us ensure that the setup of the boot environment's mappings is done
as we expect it to be.
Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #848
rc = ukplat_page_map(&kernel_pt, vaddr, paddr,
len >> PAGE_SHIFT, prot, 0);
- if (unlikely(rc && rc != -EEXIST))
+ if (unlikely(rc))
return rc;
}