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

Implement bulk of UEFI protocol needed by linux kernel #423

Merged
merged 11 commits into from
Nov 7, 2024

Conversation

zhangxp1998
Copy link
Contributor

No description provided.

@zhangxp1998
Copy link
Contributor Author

  • Added boot service support, implemented common memory functions(allocate/free/get_memory_map), added stub for other functions so that kernel does not crash on call
  • Added Runtime service support, only implemented GetVariable/SetVariable, which are called by kernel to get secure boot status.
  • Some kernel images might requires relocation, so added relocation support: Load kernel into memory and patch relevant sections according to the relo data.
  • Linux Kernel assumes everything is identity mapped, hence anything reachable from the kernel must be identity mapped. This includes the kernel image, kernel stack, memories returned from boot service allocation, etc.

kernel/include/kernel/vm.h Outdated Show resolved Hide resolved
lib/uefi/boot_service_provider.cpp Outdated Show resolved Hide resolved
lib/uefi/boot_service_provider.cpp Outdated Show resolved Hide resolved
lib/uefi/boot_service_provider.cpp Outdated Show resolved Hide resolved
external/lib/heap/dlmalloc/rules.mk Show resolved Hide resolved
lib/uefi/boot_service_provider.cpp Outdated Show resolved Hide resolved
lib/uefi/boot_service_provider.cpp Outdated Show resolved Hide resolved
lib/uefi/switch_stack.S Outdated Show resolved Hide resolved
lib/uefi/switch_stack.S Outdated Show resolved Hide resolved
lib/uefi/switch_stack.S Show resolved Hide resolved
@travisg
Copy link
Member

travisg commented Nov 4, 2024

Looks generally pretty good, just a few changes (such as licenses, etc) and it's at least good enough to not bother other code upstream.

Copy link
Member

@travisg travisg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@travisg travisg merged commit afa5679 into littlekernel:master Nov 7, 2024
189 checks passed
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.

2 participants