Skip to content

Conversation

@pietrushnic
Copy link

No description provided.

cardoe and others added 12 commits October 25, 2022 17:44
NOTE: I need some feedback here on how to implement this within the
style of iPXE. I've noticed that there's interfaces but those didn't
seem to line up with moving prep_segment into there nor did any of the
arch directories.

The prep_segment function is called by the elf_load() function and its
job is to ensure that the segment that is about to be loaded can be at
the address it wants to be without trampling existing memory and then
clears BSS. It uses the get_memmap() function which has been disabled on
EFI so this provides an alternative that uses EFI's allocation functions
to ensure that chunk of memory that the segment wants to be loaded at is
available and clears BSS.

Signed-off-by: Doug Goldstein <cardoe at cardoe.com>
This allows elf_load() to return back the load address where this ELF is
being loaded which is necessary for multiboot2 support.

Signed-off-by: Doug Goldstein <cardoe at cardoe.com>
Import the multiboot2 header from GRUB where the official spec for
multiboot2 lives.

Signed-off-by: Jonathan Creekmore <jonathan at thecreekmores.org>
Signed-off-by: Jonathan Creekmore <jonathan at thecreekmores.org>
Add the ability to load multiboot2 images on EFI only at this time. This
has been tested with Xen 4.9 using their multiboot2 support.

Signed-off-by: Jonathan Creekmore <jonathan at thecreekmores.org>
This adds support for probing for multiboot2 images when booting from
EFI.

Signed-off-by: Jonathan Creekmore <jonathan at thecreekmores.org>
For now, only bzImage is supported as a kernel.

Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
This fills just RAM ranges, not any of the other types (RESERVED, ACPI
or NVS). Only available RAM is exposed by iPXE API, obtaining full memory
map would require breaking that API.

Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
…d size

Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Memory information is missing, only kernels which are able to obtain a
memory map from another source are supported. ELF format is assumed.

Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
…call

LZ has to know the location and size of kernel so it can be measured. Assume
that only the first loadable section of ELF file is to be measured. mb2_bib
structure is not yet filled at the point of calling lz_set(), so it was used
to pass that information to keep the API simple.

Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Piotr Król <piotr.krol@3mdeb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants