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

[FREELDR] Enable UEFI boot for i386 and amd64. CORE-11954 #5267

Merged
merged 1 commit into from Oct 11, 2023

Conversation

DarkFire01
Copy link
Contributor

@DarkFire01 DarkFire01 commented May 4, 2023

Purpose

Finally allow UEFI FreeLoader to boot ReactOS kernel on our 2 primary architectures.

JIRA issue: CORE-11954

Proposed changes

  • Implement remaining code needed to start kernel for i386 and amd64

TODO

  • Figure out if it's possible to just use the stack given by UEFI so we don't have to repeat the last few lines of freeldr before exit inside another file

@github-actions github-actions bot added the freeldr Freeloader changes label May 4, 2023
boot/freeldr/freeldr/arch/uefi/uefihw.c Outdated Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/uefihw.c Outdated Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/uefihw.c Outdated Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/arch/i386/uefiasm.S Outdated Show resolved Hide resolved
boot/freeldr/freeldr/ntldr/arch/i386/winldr.c Outdated Show resolved Hide resolved
@HBelusca HBelusca added this to the UEFI bringup milestone May 7, 2023
@DarkFire01 DarkFire01 force-pushed the PR-FreeldrUefiStartReactOS branch 2 times, most recently from 45d7763 to b01e7fe Compare May 13, 2023 02:25
@binarymaster binarymaster added the enhancement For PRs with an enhancement/new feature. label Jun 10, 2023
@binarymaster binarymaster added this to New PRs in ReactOS PRs via automation Jun 10, 2023
@binarymaster binarymaster changed the title [BOOT] CORE-11954: Enable UEFI boot for i386 and amd64 [FREELDR] Enable UEFI boot for i386 and amd64. CORE-11954 Jun 10, 2023
@binarymaster
Copy link
Member

image

@binarymaster binarymaster added the needs rebase This PR needs to be rebased before merge label Jul 11, 2023
@DarkFire01 DarkFire01 removed the needs rebase This PR needs to be rebased before merge label Jul 12, 2023
@binarymaster
Copy link
Member

gcc and clang on amd64 are not happy:

boot/freeldr/freeldr/CMakeFiles/uefifreeldr_common.dir/arch/uefi/arch/amd64/uefiasm.S.obj:/home/runner/work/reactos/reactos/build/../src/boot/freeldr/freeldr/arch/uefi/arch/amd64/uefiasm.S:41:(.text+0x47): relocation truncated to fit: R_X86_64_32S against `.text'
boot/freeldr/freeldr/CMakeFiles/uefifreeldr_common.dir/arch/uefi/arch/amd64/uefiasm.S.obj:/home/runner/work/reactos/reactos/build/../src/boot/freeldr/freeldr/arch/uefi/arch/amd64/uefiasm.S:43:(.text+0x4f): relocation truncated to fit: R_X86_64_32S against symbol `EndofExitStack' defined in .bss section in boot/freeldr/freeldr/CMakeFiles/uefifreeldr_common.dir/arch/uefi/uefimem.c.obj
collect2: error: ld returned 1 exit status

@DarkFire01 DarkFire01 force-pushed the PR-FreeldrUefiStartReactOS branch 2 times, most recently from 051597b to 0a24ffe Compare July 18, 2023 15:52
@DarkFire01 DarkFire01 force-pushed the PR-FreeldrUefiStartReactOS branch 7 times, most recently from 4f01cc0 to f4b171a Compare August 6, 2023 20:10
ReactOS PRs automation moved this from New PRs to Approved by reviewers Oct 10, 2023
@DarkFire01 DarkFire01 force-pushed the PR-FreeldrUefiStartReactOS branch 4 times, most recently from 21ac447 to af21fa6 Compare October 11, 2023 06:43
boot/freeldr/freeldr/uefi.cmake Outdated Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/uefildr.c Outdated Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/uefildr.c Outdated Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/i386/uefiasm.S Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/amd64/uefiasm.S Outdated Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/i386/uefiasm.S Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/uefildr.c Outdated Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/uefimem.c Outdated Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/uefimem.c Show resolved Hide resolved
@DarkFire01 DarkFire01 force-pushed the PR-FreeldrUefiStartReactOS branch 2 times, most recently from d7a68ee to dbd3356 Compare October 11, 2023 15:18
@HBelusca
Copy link
Contributor

Cc @disean in case you are interested in reviewing this PR :)

boot/freeldr/freeldr/arch/uefi/uefildr.c Outdated Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/uefildr.c Outdated Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/uefildr.c Outdated Show resolved Hide resolved
boot/freeldr/freeldr/arch/uefi/uefimem.c Outdated Show resolved Hide resolved
@DarkFire01 DarkFire01 force-pushed the PR-FreeldrUefiStartReactOS branch 3 times, most recently from db97f7a to 8662cec Compare October 11, 2023 16:45
Copy link
Member

@binarymaster binarymaster left a comment

Choose a reason for hiding this comment

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

I think this is fine.

Copy link
Contributor

@HBelusca HBelusca left a comment

Choose a reason for hiding this comment

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

Minor thing here, but otherwise LGTM so I approve!

boot/freeldr/freeldr/arch/uefi/i386/uefiasm.S Outdated Show resolved Hide resolved
@DarkFire01 DarkFire01 force-pushed the PR-FreeldrUefiStartReactOS branch 2 times, most recently from 19cc411 to 7694c5a Compare October 11, 2023 19:14
@HBelusca
Copy link
Contributor

In commit log title: [UEFI] --> [FREELDR] , since this is a compilable module name.

Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
@DarkFire01 DarkFire01 merged commit ff3dadf into reactos:master Oct 11, 2023
37 checks passed
ReactOS PRs automation moved this from Approved by reviewers to Done Oct 11, 2023
@binarymaster binarymaster removed this from Done in ReactOS PRs Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement For PRs with an enhancement/new feature. freeldr Freeloader changes
Projects
None yet
4 participants