All,
Please find the attached patch with EFI stub changes to make it work for FVP.
This patch contains two fixes
1. FVP model not booting to Linux Shell with -C css.cache_state_modelled=1 flag. (arch/arm64/kernel/efi-entry.S b/arch/arm64/kernel/efi-entry.S)
2. Pre-load RAM Location support for dtb and initrd. (Format: dtb=RAM Address,Size, initrd= RAM Address,Size). (drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c)
This patch was based off of
git clone http://git.linaro.org/landing-teams/working/arm/kernel.git .
git checkout v4.3
If this is already taken care in EFI Stub in later kernel versions, please ignore it.
If not, I thought I would at-least start a discussion here about this topic, before actually getting it in.
Thanks,
Supreeth
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Hello everyone
I am trying to invoke the EDK2 shell on Aarch64 SOC.
Here is my shell prompt
[1] Shell
[2] Boot Manager
Start: 1
add-symbol-file /home/yehuday/projects/uefi/edk2/Build/SOC/DEBUG_GCC48/AARCH64/ShellPkg/Application/Shell/Shell/DEBUG/Shell.dll 0x1A831000
Loading driver at 0x0001A830000 EntryPoint=0x0001A831000 Shell.efi
UEFI Interactive Shell v2.1
EDK II
UEFI v2.50 (Marvell EFI Nov 19 2015 09:40:40, 0x00000000)
Mapping table
FS0: Alias(s):F3:
VenHw(C5B9C74A-6D72-4719-99AB-C59F199091EB)
No SimpleTextInputEx was found. CTRL-based features are not usable.
No SimpleTextInputEx was found. CTRL-based features are not usable.
Press ESC in 5 seconds to skip startup.nsh or any other key to continue
>From here on any key I press causes call to "GccSemihostCall" which invokes a HW breakpoint on AArch64.
I noticed GccSemihostCall doesn't trigger a breakpoint in ARM arch.
I am using " SemihostLib|ArmPkg/Library/SemihostLib/SemihostLib.inf"
Do you have any idea why I get to "GccSemihostCall". ?
Am I missing something in my system setup. ?
I copied the shell related packages from ArmVirtPkg since I know it works there
Thanks
-------------------
Yehuda Yitschak
Marvell Semiconductor Ltd.
Hello everyone
As part of my porting I need to use a 16550 UART port.
To avoid adding a driver which already exist I am looking for an existing compatible driver.
Is there a generic _MMIO_ based 16550 UART driver in EDK2 ?
I only found a PCI based 16550 driver which I cant use since it don't have support for PCI
Thanks
-------------------
Yehuda Yitschak
Marvell Semiconductor Ltd.
All,
I am bringing up a Software model which simulates 48 ARM A72 Cores.
I noticed the following assertion with UEFI in GICv3 mode.
add-symbol-file /home/supven01/ashbrook_test/uefi/edk2/Build/Ashbrook_DevPlatform/DEBUG_GCC49/AARCH64/ArmPkg/Drivers/TimerDxe/TimerDxe/DEBUG/ArmTimerDxe.dll 0xFF438240
Loading driver at 0x000FF438000 EntryPoint=0x000FF438280 ArmTimerDxe.efi
ASSERT /home/supven01/ashbrook_test/uefi/edk2/MdePkg/Library/BaseLib/LinkedList.c(61): List->ForwardLink != ((void *) 0)
gEmbeddedTokenSpaceGuid.PcdTimerPeriod was set to "100000".
However, after increasing gEmbeddedTokenSpaceGuid.PcdTimerPeriod, the assertion goes away and UEFI proceeds to load the Shell and OS.
Any pointers/analysis is appreciated.
Thanks,
Supreeth
________________________________
-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
From: Fu Wei <fu.wei(a)linaro.org>
This patch delete "file_name_index" variable and related comment.
They are for xen_module command which has been deleted.
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
---
grub-core/loader/arm64/xen_boot.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c
index fc5bb0c..d1a2189 100644
--- a/grub-core/loader/arm64/xen_boot.c
+++ b/grub-core/loader/arm64/xen_boot.c
@@ -136,16 +136,10 @@ xen_boot_address_align (grub_addr_t start, grub_size_t align)
return (align ? (ALIGN_UP (start, align)) : start);
}
-/* Parse the option of xen_module command. For now, we support
- (1) --type <the compatible stream>
- We also set up the type of module in this function.
- If there are some "--type" options in the command line,
- we make a custom compatible stream in this function. */
+/* set module type according to command name. */
static grub_err_t
-set_module_type (grub_command_t cmd, struct xen_boot_binary *module, int *file_name_index)
+set_module_type (grub_command_t cmd, struct xen_boot_binary *module)
{
- *file_name_index = 0;
-
if (!grub_strcmp (cmd->name, "xen_linux"))
module->node_info.type = MODULE_IMAGE;
else if (!grub_strcmp (cmd->name, "xen_initrd"))
@@ -440,7 +434,6 @@ grub_cmd_xen_module (grub_command_t cmd, int argc, char *argv[])
{
struct xen_boot_binary *module = NULL;
- int file_name_index = 0;
grub_file_t file = 0;
if (!argc)
@@ -462,8 +455,7 @@ grub_cmd_xen_module (grub_command_t cmd, int argc, char *argv[])
return grub_errno;
/* process all the options and get module type */
- if (set_module_type (cmd, module, &file_name_index) !=
- GRUB_ERR_NONE)
+ if (set_module_type (cmd, module) != GRUB_ERR_NONE)
goto fail;
switch (module->node_info.type)
{
@@ -491,12 +483,11 @@ grub_cmd_xen_module (grub_command_t cmd, int argc, char *argv[])
module->name, module->node_info.compat_string,
module->node_info.compat_string_size);
- file = grub_file_open (argv[file_name_index]);
+ file = grub_file_open (argv[0]);
if (!file)
goto fail;
- xen_boot_binary_load (module, file, argc - file_name_index,
- argv + file_name_index);
+ xen_boot_binary_load (module, file, argc, argv);
if (grub_errno == GRUB_ERR_NONE)
grub_list_push (GRUB_AS_LIST_P (&module_head), GRUB_AS_LIST (module));
--
2.5.0
From: Fu Wei <fu.wei(a)linaro.org>
xen_hypervisor
xen_linux
xen_initrd
xen_xsm
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
---
docs/grub.texi | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/docs/grub.texi b/docs/grub.texi
index db765a3..1df3db2 100644
--- a/docs/grub.texi
+++ b/docs/grub.texi
@@ -3857,6 +3857,11 @@ you forget a command, you can run the command @command{help}
@comment * vbeinfo:: List available video modes
* verify_detached:: Verify detached digital signature
* videoinfo:: List available video modes
+@comment * xen_*:: Xen boot commands
+* xen_hypervisor:: Load xen hypervisor binary
+* xen_linux:: Load dom0 kernel for xen hypervisor
+* xen_initrd:: Load dom0 initrd for dom0 kernel
+* xen_xsm:: Load xen security module for xen hypervisor
@end menu
@@ -5120,6 +5125,39 @@ successfully. If validation fails, it is set to a non-zero value.
List available video modes. If resolution is given, show only matching modes.
@end deffn
+@node xen_hypervisor
+@subsection xen_hypervisor
+
+@deffn Command xen_hypervisor file [arguments] @dots{}
+Load a Xen hypervisor binary from @var{file}. The rest of the line is passed
+verbatim as the @dfn{kernel command-line}. Any other binaries must be
+reloaded after using this command.
+@end deffn
+
+@node xen_linux
+@subsection xen_linux
+
+@deffn Command xen_linux file [arguments]
+Load a dom0 kernel image for xen hypervisor at the booting process of xen.
+The rest of the line is passed verbatim as the module command line.
+@end deffn
+
+@node xen_initrd
+@subsection xen_initrd
+
+@deffn Command xen_initrd file
+Load a initrd image for dom0 kernel at the booting process of xen.
+@end deffn
+
+@node xen_xsm
+@subsection xen_xsm
+
+@deffn Command xen_xsm file
+Load a xen security module for xen hypervisor at the booting process of xen.
+See @uref{http://wiki.xen.org/wiki/XSM} for more detail.
+@end deffn
+
+
@node Networking commands
@section The list of networking commands
--
2.5.0
From: Fu Wei <fu.wei(a)linaro.org>
- This adds support for the Xen boot on ARM specification for arm64.
- Add and export some accessor functions of "loaded" flag and
grub_linux_get_fdt function in include/grub/arm64/linux.h for xen boot.
- Introduce xen_hypervisor, xen_linux, xen_initrd and xen_xsm
to load different binaries for xen boot.
Introduce xen_module to load common or custom module for xen boot.
- This Xen boot support is a separated module for aarch64,
but reuse the existing code of devicetree in linux module.
- Add the support of xen_hypervisor, xen_linux and xen_initrd
in util/grub.d/20_linux_xen.in
- Add the introduction of all xen boot commands in docs/grub.texi
- 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…
Changelog:
v3: create separate module for xen boot: xen_boot
create separate commands for different types of module
delete order-dependent for commands of xen module
simplify the code
v2: remove the patches which have been accepted.
according to Vladimir's suggestion, change the command manes
and relevant code:
multiboot-->xen_hypervisor
module-->xen_module
improve the option parsing support for xen_hypervisor/xen_module commands.
add a patch for adding xen_hypervisor/xen_module support
in util/grub.d/20_linux_xen.in.
update docs/grub.texi patch for the new command names.
v1: The first version upstream patchset to grub-devel mailing list
Fu Wei (4):
arm64: Add and export some accessor functions for xen boot
arm64: Add xen_boot module file
* util/grub.d/20_linux_xen.in: Add support of the XEN boot on aarch64
arm64: Add the introduction of xen boot commands in docs/grub.texi
docs/grub.texi | 56 ++++
grub-core/Makefile.core.def | 7 +
grub-core/loader/arm64/linux.c | 13 +
grub-core/loader/arm64/xen_boot.c | 685 ++++++++++++++++++++++++++++++++++++++
include/grub/arm64/linux.h | 6 +-
util/grub.d/20_linux_xen.in | 16 +-
6 files changed, 779 insertions(+), 4 deletions(-)
create mode 100644 grub-core/loader/arm64/xen_boot.c
--
1.8.3.1
Hello everyone
I am in the process of porting EDK2 to a Quad core Aarch64 based SOC.
The SOC has a built-in BootROM running in EL3. When the BootROM completes loading
The image it transfers control to the loaded image in EL3 to allow installing a secure monitor
Since we have an on chip primary loader (i.e. BootROM) I used the 2nd stage template as a basis for my port
So in my flow BootROM loads FD image to main memory and jumps to the entry point in EL3
I quickly found out however that EDK2 expects to be executed in EL2 or EL1.
It was a bit surprising actually. I expected EDK2 to also act is a secure monitor and handle the PSCI calls as well.
I guess I am missing something in the functional partition.
To get to the point I would like to ask;
- Who handles PSCI in Juno. I noticed the existence of ATF binaries such as bl0 and bl3 under Juno. Does it mean Juno works with combination of ATF and EDK2 ?
- Is there a simple way to switch to EL2 using EDK2 packages. I guess the Sec part is supposed to do that, right ?
Thanks
-------------------
Yehuda Yitschak
Marvell Semiconductor Ltd.