Hello List,
I am following Leif's blog entry on this link
http://blog.eciton.net/drafts/foundation-atf-uefi.html to build UEFI for
ARM AArch64. However it failed when calling iASL for some asl files. What I
want to understand is how iASL determine it is "Flag value is too large"
and get to know "(Maximum 1 bit)" for that case. I mean, the iASL must have
checked some definitions for that "Secure EL1 Interrupt : 0000001d" entry
and determined that the specifying of 0000001d is wrong. So where should I
find the definitions? My build environment is a Ubuntu 14.04 with iASL of
20140325-64.
{
"iasl"
-p/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables/OUTPUT/./gtdt.aml
/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables/OUTPUT/./gtdt.iiii
/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables/OUTPUT/./gtdt.iiii
12: [0004] Secure EL1 Interrupt : 0000001d
Error 6153 -
Flag value is too large ^ (Maximum 1
bit)
/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables/OUTPUT/./gtdt.iiii
27: [0004] Non-Secure EL2 Interrupt : 0000001a
Error 6153 -
Flag value is too large ^
(Maximum 1 bit)
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20140325-64 [Dec 4 2014]
Copyright (c) 2000 - 2014 Intel Corporation
Table Input:
/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables/OUTPUT/./gtdt.iiii
- 55 lines, 2144 bytes, 28 fields
Compilation complete. 2 Errors, 0 Warnings, 0 Remarks
make: ***
[/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables/OUTPUT/gtdt.aml]
Error 255
build.py...
: error 7000: Failed to execute command
make tbuild
[/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables]
}
Thanks in advance,
Cory
Hello List,
I am following Leif's blog entry on this link
http://blog.eciton.net/drafts/foundation-atf-uefi.html to build UEFI for
ARM AArch64. However it failed when calling iASL for some asl files. What I
want to understand is how iASL determine it is "Flag value is too large"
and get to know "(Maximum 1 bit)" for that case. I mean, the iASL must have
checked some definitions for that "Secure EL1 Interrupt : 0000001d" entry
and determined that the specifying of 0000001d is wrong. So where should I
find the definitions? My build environment is a Ubuntu 14.04 with iASL of
20140325-64.
{
"iasl"
-p/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables/OUTPUT/./gtdt.aml
/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables/OUTPUT/./gtdt.iiii
/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables/OUTPUT/./gtdt.iiii
12: [0004] Secure EL1 Interrupt : 0000001d
Error 6153 -
Flag value is too large ^ (Maximum 1
bit)
/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables/OUTPUT/./gtdt.iiii
27: [0004] Non-Secure EL2 Interrupt : 0000001a
Error 6153 -
Flag value is too large ^
(Maximum 1 bit)
Intel ACPI Component Architecture
ASL Optimizing Compiler version 20140325-64 [Dec 4 2014]
Copyright (c) 2000 - 2014 Intel Corporation
Table Input:
/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables/OUTPUT/./gtdt.iiii
- 55 lines, 2144 bytes, 28 fields
Compilation complete. 2 Errors, 0 Warnings, 0 Remarks
make: ***
[/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables/OUTPUT/gtdt.aml]
Error 255
build.py...
: error 7000: Failed to execute command
make tbuild
[/home/coryxie/tools/linaro-edk2/Build/ArmVExpress-FVP-AArch64-Minimal/DEBUG_GCC49/AARCH64/ArmPlatformPkg/ArmVExpressPkg/AcpiTables/rtsm_ve-aemv8a/AcpiTables]
}
Thanks in advance,
Cory
Hello all,
This series is part of the Xen stuff I am working on, and due to some
circumstances particular to my situation (i.e., no easy access to hardware)
I have decided to prototype as much as I can on QEMU, which like Xen, uses
the kernel boot protocol, as documented in linux/Documentation/arm64/booting.txt
This is a RFC series to probe whether the approach taken here is acceptable.
If not, there should be an update to Xen/arm to implement a specific bootloader
boot protocol in addition to the kernel boot protocol it supports currently.
But if it is, there may be other interesting uses, e.g., as a chainloader
so that any platform can easily support UEFI booting if it already supports
arm64. This would require a NOR flash in the device tree, and some standard
bus type (SATA, PCI) to hold the block device containing the OS, but other
than that, it seems that most of what is required is already in place.
Note the hacky use of fixed PCDs: these are supposed to be read-only, obviously,
but I am updating them in code regardless. It would probably be more consistent
to use PatchableInModule PCDs instead, and I will make the required changes if
the overall direction is deemed appropriate.
I have included the QemuKernel.dsc: this is just a proof of concept, it works
under 'qemu-system-aarch64 -kernel' whose RAM is at 0x4000_0000 whereas the
.DSC puts the RAM at 0x0. The relocatable PrePi and the new lib flavours work
together to relocate the PrePi and set the environment according to the device
tree before launching the DXE core. From that point, everything operates as
before.
Ard Biesheuvel (8):
ArmVirtualizationPkg: move early UART discovery to PlatformPeim
ArmVirtualizationPkg: use a HOB to store device tree blob
ArmPlatformPkg: replace some instances of FixedPcdGetXX() with
PcdGetXX()
ArmPlatformPkg/PrePi: allow unicore build to execute on mpcore system
ArmPlatformPkg/PrePi: add a relocatable version of PrePi
ArmVirtualizationPkg: implement a relocatable platformlib instance
ArmVirtualizationPkg: implement custom MemoryInitPeiLib
ArmVirtualizationPkg: add Qemu -kernel platform description
.../ArmVirtualizationPkg/ArmVirtualizationPkg.dec | 3 +-
.../ArmVirtualizationPkg/ArmVirtualizationQemu.dsc | 3 -
.../ArmVirtualizationQemuKernel.dsc | 263 ++++++++++++++++
.../ArmVirtualizationQemuKernel.fdf | 334 +++++++++++++++++++++
.../ArmVirtualizationPkg/Include/Guid/FdtHob.h | 26 ++
.../ArmVirtualizationMemoryInitPeiLib.c | 91 ++++++
.../ArmVirtualizationMemoryInitPeiLib.inf | 64 ++++
.../AARCH64/MemnodeParser.S | 224 ++++++++++++++
.../AARCH64/RelocatableVirtHelper.S | 177 +++++++++++
.../ArmVirtRelocatablePlatformLib.inf | 66 ++++
.../ArmVirtualizationPlatformLib.inf | 1 +
.../ArmVirtualizationPlatformLib/RelocatableVirt.c | 78 +++++
.../Library/ArmVirtualizationPlatformLib/Virt.c | 46 +--
.../EarlyFdtPL011SerialPortLib.c | 2 +-
.../Library/PlatformPeiLib/PlatformPeiLib.c | 60 +++-
.../Library/PlatformPeiLib/PlatformPeiLib.inf | 3 -
.../ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c | 10 +-
.../ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf | 2 +-
ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S | 49 ++-
ArmPlatformPkg/PrePi/MainMPCore.c | 2 +-
ArmPlatformPkg/PrePi/MainUniCore.c | 2 +-
ArmPlatformPkg/PrePi/MainUniCoreRelocatable.c | 38 +++
ArmPlatformPkg/PrePi/PeiUniCoreRelocatable.inf | 108 +++++++
ArmPlatformPkg/PrePi/PrePi.c | 25 +-
ArmPlatformPkg/PrePi/PrePi.h | 3 +-
ArmPlatformPkg/PrePi/Scripts/PrePi-PIE.lds | 28 ++
26 files changed, 1619 insertions(+), 89 deletions(-)
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemuKernel.dsc
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemuKernel.fdf
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Include/Guid/FdtHob.h
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationMemoryInitPeiLib/ArmVirtualizationMemoryInitPeiLib.c
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationMemoryInitPeiLib/ArmVirtualizationMemoryInitPeiLib.inf
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/AARCH64/MemnodeParser.S
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/AARCH64/RelocatableVirtHelper.S
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/ArmVirtRelocatablePlatformLib.inf
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/RelocatableVirt.c
create mode 100644 ArmPlatformPkg/PrePi/MainUniCoreRelocatable.c
create mode 100755 ArmPlatformPkg/PrePi/PeiUniCoreRelocatable.inf
create mode 100644 ArmPlatformPkg/PrePi/Scripts/PrePi-PIE.lds
--
1.8.3.2
Hello all,
This series is part of the Xen stuff I am working on, and due to some
circumstances particular to my situation (i.e., no easy access to hardware)
I have decided to prototype as much as I can on QEMU, which like Xen, uses
the kernel boot protocol, as documented in linux/Documentation/arm64/booting.txt
This is a RFC series to probe whether the approach taken here is acceptable.
If not, there should be an update to Xen/arm to implement a specific bootloader
boot protocol in addition to the kernel boot protocol it supports currently.
But if it is, there may be other interesting uses, e.g., as a chainloader
so that any platform can easily support UEFI booting if it already supports
arm64. This would require a NOR flash in the device tree, and some standard
bus type (SATA, PCI) to hold the block device containing the OS, but other
than that, it seems that most of what is required is already in place.
Note the hacky use of fixed PCDs: these are supposed to be read-only, obviously,
but I am updating them in code regardless. It would probably be more consistent
to use PatchableInModule PCDs instead, and I will make the required changes if
the overall direction is deemed appropriate.
I have included the QemuKernel.dsc: this is just a proof of concept, it works
under 'qemu-system-aarch64 -kernel' whose RAM is at 0x4000_0000 whereas the
.DSC puts the RAM at 0x0. The relocatable PrePi and the new lib flavours work
together to relocate the PrePi and set the environment according to the device
tree before launching the DXE core. From that point, everything operates as
before.
Ard Biesheuvel (8):
ArmVirtualizationPkg: move early UART discovery to PlatformPeim
ArmVirtualizationPkg: use a HOB to store device tree blob
ArmPlatformPkg: replace some instances of FixedPcdGetXX() with
PcdGetXX()
ArmPlatformPkg/PrePi: allow unicore build to execute on mpcore system
ArmPlatformPkg/PrePi: add a relocatable version of PrePi
ArmVirtualizationPkg: implement a relocatable platformlib instance
ArmVirtualizationPkg: implement custom MemoryInitPeiLib
ArmVirtualizationPkg: add Qemu -kernel platform description
.../ArmVirtualizationPkg/ArmVirtualizationPkg.dec | 3 +-
.../ArmVirtualizationPkg/ArmVirtualizationQemu.dsc | 3 -
.../ArmVirtualizationQemuKernel.dsc | 263 ++++++++++++++++
.../ArmVirtualizationQemuKernel.fdf | 334 +++++++++++++++++++++
.../ArmVirtualizationPkg/Include/Guid/FdtHob.h | 26 ++
.../ArmVirtualizationMemoryInitPeiLib.c | 91 ++++++
.../ArmVirtualizationMemoryInitPeiLib.inf | 64 ++++
.../AARCH64/MemnodeParser.S | 224 ++++++++++++++
.../AARCH64/RelocatableVirtHelper.S | 177 +++++++++++
.../ArmVirtRelocatablePlatformLib.inf | 66 ++++
.../ArmVirtualizationPlatformLib.inf | 1 +
.../ArmVirtualizationPlatformLib/RelocatableVirt.c | 78 +++++
.../Library/ArmVirtualizationPlatformLib/Virt.c | 46 +--
.../EarlyFdtPL011SerialPortLib.c | 2 +-
.../Library/PlatformPeiLib/PlatformPeiLib.c | 60 +++-
.../Library/PlatformPeiLib/PlatformPeiLib.inf | 3 -
.../ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.c | 10 +-
.../ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf | 2 +-
ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S | 49 ++-
ArmPlatformPkg/PrePi/MainMPCore.c | 2 +-
ArmPlatformPkg/PrePi/MainUniCore.c | 2 +-
ArmPlatformPkg/PrePi/MainUniCoreRelocatable.c | 38 +++
ArmPlatformPkg/PrePi/PeiUniCoreRelocatable.inf | 108 +++++++
ArmPlatformPkg/PrePi/PrePi.c | 25 +-
ArmPlatformPkg/PrePi/PrePi.h | 3 +-
ArmPlatformPkg/PrePi/Scripts/PrePi-PIE.lds | 28 ++
26 files changed, 1619 insertions(+), 89 deletions(-)
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemuKernel.dsc
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationQemuKernel.fdf
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Include/Guid/FdtHob.h
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationMemoryInitPeiLib/ArmVirtualizationMemoryInitPeiLib.c
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationMemoryInitPeiLib/ArmVirtualizationMemoryInitPeiLib.inf
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/AARCH64/MemnodeParser.S
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/AARCH64/RelocatableVirtHelper.S
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/ArmVirtRelocatablePlatformLib.inf
create mode 100644 ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/RelocatableVirt.c
create mode 100644 ArmPlatformPkg/PrePi/MainUniCoreRelocatable.c
create mode 100755 ArmPlatformPkg/PrePi/PeiUniCoreRelocatable.inf
create mode 100644 ArmPlatformPkg/PrePi/Scripts/PrePi-PIE.lds
--
1.8.3.2
arm64: Add the introduction of multiboot/module command in docs/grub.texi
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
---
docs/grub.texi | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/docs/grub.texi b/docs/grub.texi
index 46b9e7f..084b40e 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -4512,6 +4512,29 @@ Alias for @code{hashsum --hash md5 arg @dots{}}. See command @command{hashsum}
@deffn Command module [--nounzip] file [arguments]
Load a module for multiboot kernel image. The rest of the
line is passed verbatim as the module command line.
+
+Note that on ARM64 machine, there is not [--nounzip] support.
+Each module will be given a default compatibility property based on the order
+ in which the modules are added:
+
+The first module will be: compatible = "multiboot,kernel", "multiboot,module"
+
+The second module will be: compatible = "multiboot,ramdisk", "multiboot,module"
+
+All subsequent modules will be: compatible = "multiboot,module"
+
+There is a [--type <compatible stream in FDT>] option to
+override default compatible string for the current module. May be given multiple
+times, the strings will be listed in the compatible property in the order given.
+Note that this means that the generic "multiboot,module" would need to be specified
+separately if desired. Modules which are given an explicit compatibility do not
+"consume" a default. In addition even if --type is used to specify something
+which is also a default it will not be consumed. For now, the available strings
+could be :
+"multiboot,kernel", "multiboot,ramdisk", "multiboot,module", "xen,xsm-policy"
+or the custom compatible stream.
+See @uref{http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot},
+ to obtain more information.
@end deffn
@node multiboot
@@ -4523,6 +4546,8 @@ line is passed verbatim as the @dfn{kernel command-line}. Any module must
be reloaded after using this command (@pxref{module}).
Some kernels have known problems. You need to specify --quirk-* for those.
+There is not --quirk-* support on ARM64 machine.
+
--quirk-bad-kludge is a problem seen in several products that they include
loading kludge information with invalid data in ELF file. GRUB prior to 0.97
and some custom builds prefered ELF information while 0.97 and GRUB 2
--
1.8.3.1
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>
- Add the introduction of multiboot/module command in docs/grub.texi
This multiboot support will be built in linux module for aarch64,
and can not be used alone.
docs/grub.texi | 25 ++
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 +
7 files changed, 793 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>