Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enbale ACRN ELF loader for multi type VM images #8642

Open
zhangckid opened this issue Jul 2, 2024 · 2 comments
Open

Enbale ACRN ELF loader for multi type VM images #8642

zhangckid opened this issue Jul 2, 2024 · 2 comments

Comments

@zhangckid
Copy link
Contributor

No description provided.

zhangckid pushed a commit to zhangckid/acrn-hypervisor that referenced this issue Jul 3, 2024
Except Linux guest, elf guest also need support bootargs.
Currently VM bootargs support all type of guest.

Tracked-On: projectacrn#8642

Signed-off-by: Zhang Chen <[email protected]>
Signed-off-by: Victor Sun <[email protected]>
Reviewed-by: Junjie Mao <[email protected]>
zhangckid added a commit to zhangckid/acrn-hypervisor that referenced this issue Jul 3, 2024
For the TEE and android kernelflinger boot requirements,
elf_loader need to support the multiboot protocol.
This patch define a memory block to store ELF format VM load
params in guest address space. At the same time, prepare the elf
cmdline field and memory map for the guest kernel.

Tracked-On: projectacrn#8642

Signed-off-by: Victor Sun <[email protected]>
Signed-off-by: Zhang Chen <[email protected]>
Reviewed-by: Junjie Mao <[email protected]>
zhangckid added a commit to zhangckid/acrn-hypervisor that referenced this issue Jul 3, 2024
Define the multiboot_header data structure and
MULTIBOOT_MEMORY related definitions.

Tracked-On: projectacrn#8642

Signed-off-by: Zhang Chen <[email protected]>
Signed-off-by: Victor Sun <[email protected]>
Reviewed-by: Junjie Mao <[email protected]>
zhangckid added a commit to zhangckid/acrn-hypervisor that referenced this issue Jul 3, 2024
This patch enable guest multiboot support. Try to find
the multiboot header in normal elf guest image.
Introduce the multiboot related basic functions to
initialize multiboot structure. Including
prepare_multiboot_mmap, prepare_loader_name and
find_img_multiboot_header.

Tracked-On: projectacrn#8642

Signed-off-by: Victor Sun <[email protected]>
Signed-off-by: Zhang Chen <[email protected]>
Reviewed-by: Junjie Mao <[email protected]>
zhangckid added a commit to zhangckid/acrn-hypervisor that referenced this issue Jul 3, 2024
The elf images can't be loaded correctly because
the elf_loader copy_to_gpa with wrong size.
The p_filesz and p_memsz both belong to elf32_prog_entry,
this data structure describes segments loaded in ram.
p_filesz means size of segment in file and p_memsz
means size of segment in memory.
ELF loader should copy elf_img to gpa with the
size of p_prg_tbl_head32->p_filesz.

Tracked-On: projectacrn#8642

Signed-off-by: Zhang Chen <[email protected]>
Signed-off-by: Victor Sun <[email protected]>
Reviewed-by: Junjie Mao <[email protected]>
zhangckid added a commit to zhangckid/acrn-hypervisor that referenced this issue Jul 3, 2024
The definition of elf32_prog_entry with wrong comments,
p_filesz should means size of segment in file and p_memsz
should means size of segment in memory.

Tracked-On: projectacrn#8642

Signed-off-by: Zhang Chen <[email protected]>
Reviewed-by: Junjie Mao <[email protected]>
@zhangckid
Copy link
Contributor Author

zhangckid commented Jul 4, 2024

[External_System_ID]:ACRN-10055

1 similar comment
@yuhuanX
Copy link

yuhuanX commented Jul 4, 2024

[External_System_ID]:ACRN-10055

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

No branches or pull requests

2 participants