Reuse 32 bit C code more safely
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest5 patches 5 repliesIn review
- v65 patches 15 repliesSuperseded
- v55 patches 5 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 6 patches | 15 replies | Superseded | |
| v3 | 5 patches | 17 replies | Superseded | |
| v2 | 6 patches | 5 replies | Superseded | |
| v1 | 3 patches | 13 replies | Superseded |
Changes in v7 from the cover letter
- lot of style and comments, see details on 1/5.
Patches in v7 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | x86/boot: Rework how 32bit C is linked/included for early bootxen/ xen/ xen/ +4 more | +314 | 1 reply | |
| 2/5 | x86/boot: Reuse code to relocate trampolinexen/ xen/ xen/ +2 more | +51 | 0 replies | |
| 3/5 | x86/boot: Use boot_vid_info variable directly from C codexen/ xen/ xen/ | +7 | 0 replies | |
| 4/5 | x86/boot: Use trampoline_phys variable directly from C codexen/ xen/ | +7 | 0 replies | |
| 5/5 | x86/boot: Clarify commentxen/ | +1 | 4 replies |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Andrew Cooper | Marek Marczykowski-Górecki | Anthony PERARD | Alejandro Vallejo |
|---|---|---|---|---|
| 1/5 | A-b | R-b | ||
| 2/5 | R-b | A-b | ||
| 3/5 | R-b | |||
| 4/5 | R-b | |||
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v7 0/5] Reuse 32 bit C code more safely
This series attempt to:
- use more C code, that is replace some assembly code with C;
- avoid some code duplication between C and assembly;
- prevent some issues having relocations in C code.
The idea is extending the current C to binary code conversion done for 32 bit C code called from head.S making sure relocations are safe and allowing external symbols usage from C code.
More details of the implementation are in commit message 1/5, which is the largest patch.
Patch 2/5 reuses code to relocate the trampoline between 32 and 64 bit. Patches 3/5 and 4/5 move some code from assembly to C.
Other RFC commits were excluded, I didn't manage to entangle the issues sharing headers between 32 and 64 bits.
Since RFC code was more tested, also with CI and some incompatibility were fixed. On that it's weird that we need Python 3.8 for Qemu but we still use Python 2 for Xen. Shouldn't we bump requirement to Python 3 even for Xen?
Code boots successfully using:
- BIOS boot;
- EFI boot with Grub2 and ELF file;
- direct EFI boot without Grub.
Code is currently based on "master" branch, currently commit fa1463cecf59d7419e4c83ed30360c4eb83bde41.
Changes since v1:
- 2 preliminary commits for adjust .gitignore;
- last commit split (one variable at a time);
- lot of style and names changes;
- first commit, now 3/6 had some build changes, more details on commit message.
Changes since v2:
- removed merged commits;
- reverted order of 2 commits;
- remove some useless casts;
- added change to comment.
Changes since v3:
- added a preparation commit for Makefiles (mainly written by Andrew Cooper);
- added a comment improvement commit;
- allows also data;
- other minor style changes;
- added some Reviewed-by.
Changes since v4:
- add build32.final.lds build32.other.lds to targets macro;
- place some comments over a rule, not inside;
- simplified linking and producing binary rule;
- renamed built_in_32 to built-in-32, coding style;
- fix minor indentation;
- put magic numbers in Makefile and propagate them;
- minor variable clanups in Python script;
- add dependency to Python script.
Changes since v5:
- all Makefile changes;
- renamed "other" and "final" phases to "base" and "offset";
- use if_changed macro to generate built-in-32.S;
- do not add obj64 to targets, already done adding it to obj-bin-y.
Changes since v6:
- lot of style and comments, see details on 1/5.
Frediano Ziglio (5):
x86/boot: Rework how 32bit C is linked/included for early boot x86/boot: Reuse code to relocate trampoline x86/boot: Use boot_vid_info variable directly from C code x86/boot: Use trampoline_phys variable directly from C code x86/boot: Clarify comment
xen/arch/x86/boot/.gitignore | 6 +-
xen/arch/x86/boot/Makefile | 74 +++++-
.../x86/boot/{build32.lds => build32.lds.S} | 41 +++-
xen/arch/x86/boot/cmdline.c | 12 -
xen/arch/x86/boot/head.S | 49 +---
xen/arch/x86/boot/reloc-trampoline.c | 36 +++
xen/arch/x86/boot/reloc.c | 35 +--
xen/arch/x86/efi/efi-boot.h | 15 +-
xen/tools/combine_two_binaries.py | 220 ++++++++++++++++++
9 files changed, 377 insertions(+), 111 deletions(-)
rename xen/arch/x86/boot/{build32.lds => build32.lds.S} (60%)
create mode 100644 xen/arch/x86/boot/reloc-trampoline.c
create mode 100755 xen/tools/combine_two_binaries.pySignature · 1 line
2.34.1