arm64:Add multiboot support (via fdt) for Xen boot
- This multiboot support is built into linux module for aarch64.
- The implementation for Xen is following <Multiboot on ARM Specification>:
http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot
and xen/docs/misc/arm/device-tree/booting.txt in Xen source code.
- The example of this support is <How to boot Xen with GRUB on AArch64 the Foundation FVP model>
https://wiki.linaro.org/LEG/Engineering/Grub2/Xen_booting_on_Foundation_FVP…
- This adds support for the Xen Multiboot on ARM specification for arm64,
enabling config file portability across the architectures.
- The multiboot command is currently x86-only, so reusing these command names
should not conflict with any future additions of ARM support to multiboot2.
- The reason of adding this functionality to the existing "linux" module
rather than "multiboot(2)"
(1)multiboot is x86 only
(2)Multiboot is added to "linux" module because it reuses existing code.
- Some changes in original linux module code
Move some #define from grub-core/loader/arm64/linux.c to include/grub/arm64/linux.h
Make some shared functions for multiboot.c
Remove "loaded" checking in the grub_cmd_devicetree of linux.c
- Add grub_fdt_set_reg64 macro into fdt.h header file for inserting "reg" properiy,
while #address-cells = <0x2> and #size-cells = <0x2>
This multiboot support will be built in linux module for aarch64,
and can not be used alone.
grub-core/Makefile.core.def | 1 +
grub-core/loader/arm64/linux.c | 72 ++---
grub-core/loader/arm64/multiboot.c | 593 +++++++++++++++++++++++++++++++++++++
include/grub/arm64/linux.h | 11 +
include/grub/arm64/multiboot.h | 115 +++++++
include/grub/fdt.h | 12 +
6 files changed, 768 insertions(+), 36 deletions(-)
create mode 100644 grub-core/loader/arm64/multiboot.c
create mode 100644 include/grub/arm64/multiboot.h
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
Hi,
I am trying to build edk by following the steps in readme file. For some reason, I am unable to patch the files. Getting following error:
edk2> patch -p1 < ArmPlatformPkg/Documentation/patches/BaseTools-Pending-Patches.patch
patching file BaseTools/Source/C/GenFw/Elf32Convert.c
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 18.
Hunk #3 FAILED at 264.
Hunk #4 FAILED at 291.
Hunk #5 FAILED at 315.
5 out of 5 hunks FAILED -- saving rejects to file BaseTools/Source/C/GenFw/Elf32Convert.c.rej
patching file BaseTools/Source/C/GenFw/Elf64Convert.c
Hunk #1 FAILED at 19.
Hunk #2 FAILED at 258.
Hunk #3 FAILED at 286.
Hunk #4 FAILED at 310.
4 out of 4 hunks FAILED -- saving rejects to file BaseTools/Source/C/GenFw/Elf64Convert.c.rej
Please help.
Thanks,
Ravi C
arm64:Add multiboot support (via fdt) for Xen boot
- This multiboot support is built into linux module for aarch64.
- The implementation for Xen is following <Multiboot on ARM Specification>:
http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot
and xen/docs/misc/arm/device-tree/booting.txt in Xen source code.
- The example of this support is <How to boot Xen with GRUB on AArch64 the Foundation FVP model>
https://wiki.linaro.org/LEG/Engineering/Grub2/Xen_booting_on_Foundation_FVP…
- This adds support for the Xen Multiboot on ARM specification for arm64,
enabling config file portability across the architectures.
- The multiboot command is currently x86-only, so reusing these command names
should not conflict with any future additions of ARM support to multiboot2.
- The reason of adding this functionality to the existing "linux" module
rather than "multiboot(2)"
(1)multiboot is x86 only
(2)Multiboot is added to "linux" module because it reuses existing code.
- Some changes in original linux module code
Move some #define from grub-core/loader/arm64/linux.c to include/grub/arm64/linux.h
Reason: (1)make code more orderly
(2)these #define can be used by other files which includs include/grub/arm64/linux.h
Make some shared functions for multiboot.c
- Add grub_fdt_set_reg64 macro into fdt.h header file for inserting "reg" properiy,
while #address-cells = <0x2> and #size-cells = <0x2>
This multiboot support will be built in linux module for aarch64,
and can not be used alone.
grub-core/Makefile.core.def | 1 +
grub-core/loader/arm64/linux.c | 166 +++++-----
grub-core/loader/arm64/multiboot.c | 623 +++++++++++++++++++++++++++++++++++++
include/grub/arm64/linux.h | 15 +-
include/grub/arm64/multiboot.h | 114 +++++++
include/grub/fdt.h | 12 +
6 files changed, 846 insertions(+), 85 deletions(-)
create mode 100644 grub-core/loader/arm64/multiboot.c
create mode 100644 include/grub/arm64/multiboot.h
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>