Re: arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression
Hi, On 20/11/2018 11:22, Lee Jones wrote: On Tue, 20 Nov 2018, Julien Grall wrote: On 20/11/2018 10:46, Lee Jones wrote: From: Lee Jones arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression This patch seems to drop support for --nounzip. Can you explain why? It only seemed to serve the invocation of grub_file_filter_disable_compression() which was removed in this patch. But --nounzip will not work as expected after this patch. Looking at GRUB, it seems the call to that function was replaced by passing GRUB_FILE_TYPE_NO_DECOMPRESSION to grub_file_open. Is there any reason to not use it for Arm? Cheers, On closer inspection, I do see that argv/argc still needs to be shifted though. I will fix that. Note that the option added on Arm64 to keep the compatibility with x86 multiboot loading. -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: arm64/xen: Fix too few arguments to function ‘grub_create_loader_cmdline’
On 20/11/2018 10:45, Lee Jones wrote: From: Lee Jones arm64/xen: Fix too few arguments to function ‘grub_create_loader_cmdline’ Without this fix, building xen_boot.c omits: loader/arm64/xen_boot.c: In function ‘xen_boot_binary_load’: loader/arm64/xen_boot.c:370:7: error: too few arguments to function ‘grub_create_loader_cmdline’ grub_create_loader_cmdline (argc - 1, argv + 1, binary->cmdline, ^~ In file included from loader/arm64/xen_boot.c:36:0: ../include/grub/lib/cmdline.h:29:12: note: declared here grub_err_t grub_create_loader_cmdline (int argc, char *argv[], char *buf, Signed-off-by: Lee Jones Reviewed-by: Julien Grall Cheers, diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index 1003a0b99..33a855df4 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -368,7 +368,8 @@ xen_boot_binary_load (struct xen_boot_binary *binary, grub_file_t file, return; } grub_create_loader_cmdline (argc - 1, argv + 1, binary->cmdline, - binary->cmdline_size); + binary->cmdline_size, + GRUB_VERIFY_KERNEL_CMDLINE); grub_dprintf ("xen_loader", "Xen_boot cmdline @ %p %s, size: %d\n", binary->cmdline, binary->cmdline, binary->cmdline_size); -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: arm64/xen: Fix too few arguments to function ‘grub_file_open’
Hi Lee, On 20/11/2018 10:48, Lee Jones wrote: From: Lee Jones arm64/xen: Fix too few arguments to function ‘grub_file_open’ Without this fix xen_boot.c omits: loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_module’: loader/arm64/xen_boot.c:424:10: error: too few arguments to function ‘grub_file_open’ file = grub_file_open (argv[0]); ^~ In file included from ../include/grub/cache.h:23:0, from loader/arm64/xen_boot.c:19: ../include/grub/file.h:204:25: note: declared here grub_file_t EXPORT_FUNC(grub_file_open) (const char *name, enum grub_file_type type); ^ ../include/grub/symbol.h:68:25: note: in definition of macro ‘EXPORT_FUNC’ # define EXPORT_FUNC(x) x ^ loader/arm64/xen_boot.c: In function ‘grub_cmd_xen_hypervisor’: loader/arm64/xen_boot.c:456:10: error: too few arguments to function ‘grub_file_open’ file = grub_file_open (argv[0]); ^~ Signed-off-by: Lee Jones diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index 5820412e8..1f49e3278 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -421,7 +421,7 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)), grub_dprintf ("xen_loader", "Init module and node info\n"); - file = grub_file_open (argv[0]); + file = grub_file_open (argv[0], GRUB_FILE_TYPE_NONE); if (!file) goto fail; @@ -453,7 +453,7 @@ grub_cmd_xen_hypervisor (grub_command_t cmd __attribute__ ((unused)), goto fail; } - file = grub_file_open (argv[0]); + file = grub_file_open (argv[0], GRUB_FILE_TYPE_NONE); I would prefer if we try to keep the type similar to x86 Xen. In that case it would be GRUB_FILE_TYPE_LINUX_KERNEL. Cheers, -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression
Hi, On 20/11/2018 10:46, Lee Jones wrote: From: Lee Jones arm64/xen: Fix implicit declaration of function ‘grub_file_filter_disable_compression This patch seems to drop support for --nounzip. Can you explain why? Note that the option added on Arm64 to keep the compatibility with x86 multiboot loading. Cheers, Without this fix, building xen_boot.c omits: loader/arm64/xen_boot.c:433:5: error: implicit declaration of function ‘grub_file_filter_disable_compression’; did you mean ‘grub_file_filter_unregister’? [-Werror=implicit-function-declaration] grub_file_filter_disable_compression (); ^~~~ grub_file_filter_unregister loader/arm64/xen_boot.c:433:5: error: nested extern declaration of ‘grub_file_filter_disable_compression’ [-Werror=nested-externs] Signed-off-by: Lee Jones diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index 33a855df4..5820412e8 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -391,7 +391,6 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)), struct xen_boot_binary *module = NULL; grub_file_t file = 0; - int nounzip = 0; if (!argc) { @@ -399,13 +398,6 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)), goto fail; } - if (grub_strcmp (argv[0], "--nounzip") == 0) -{ - argv++; - argc--; - nounzip = 1; -} - if (!argc) { grub_error (GRUB_ERR_BAD_ARGUMENT, N_("filename expected")); @@ -429,8 +421,6 @@ grub_cmd_xen_module (grub_command_t cmd __attribute__((unused)), grub_dprintf ("xen_loader", "Init module and node info\n"); - if (nounzip) -grub_file_filter_disable_compression (); file = grub_file_open (argv[0]); if (!file) goto fail; diff --git a/grub-core/osdep/generic/blocklist.c b/grub-core/osdep/generic/blocklist.c index 74024fd06..63e0aed35 100644 --- a/grub-core/osdep/generic/blocklist.c +++ b/grub-core/osdep/generic/blocklist.c @@ -59,7 +59,6 @@ grub_install_get_blocklist (grub_device_t root_dev, grub_disk_cache_invalidate_all (); - grub_file_filter_disable_compression (); file = grub_file_open (core_path_dev); if (file) { @@ -117,7 +116,6 @@ grub_install_get_blocklist (grub_device_t root_dev, grub_file_t file; /* Now read the core image to determine where the sectors are. */ - grub_file_filter_disable_compression (); file = grub_file_open (core_path_dev); if (! file) grub_util_error ("%s", grub_errmsg); -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] arm64/xen: Add missing #address-cells and #size-cells properties
On 30 November 2017 at 21:22, Daniel Kiper <daniel.ki...@oracle.com> wrote: > On Thu, Nov 30, 2017 at 01:22:37PM +0000, Julien Grall wrote: >> Hi Daniel, >> >> On 30/11/17 13:06, Daniel Kiper wrote: >> >On Wed, Nov 29, 2017 at 05:08:12PM +, Julien Grall wrote: >> >>The properties #address-cells and #size-cells are used to know the >> >>number of cells for ranges provided by "regs". If they don't exist, the >> >>value are resp. 2 and 1. >> >> >> >>Currently, when multiboot nodes are created it is assumed that >> >>#address-cells >> > >> >IIRC ARM boot protocol is not related to Multiboot protocol in any way. >> >So, calling it in that way is very confusing. Could you invent a better >> >not confusion name. Or at least provide a spec. I am happy to see it >> >in GRUB2 tree. >> >> That's the name of the node see the MODULE_CUSTOM_COMPATIBLE in the >> code... But this it not the Linux Arm boot protocol, it is an >> extension currently only used by Xen. See [1]. > > Oh, boy! It is unfortunate. Sadly it looks that we have to live with > this right now... Too late for change... I would just add the comment > to this file that this is not related to the Multiboot protocol family > in any way. I will send a patch for that. > >> >>and #size-cells are exactly 2. However, they are never set by GRUB and >> >>will result to later failure when the device-tree is generated by GRUB >> >>or contain different values. >> >> >> >>To prevent this failure, create the both properties in the chosen nodes. >> >> >> >>Signed-off-by: Julien Grall <julien.gr...@linaro.org> >> >>--- >> >> grub-core/loader/arm64/xen_boot.c | 11 +++ >> >> 1 file changed, 11 insertions(+) >> >> >> >>diff --git a/grub-core/loader/arm64/xen_boot.c >> >>b/grub-core/loader/arm64/xen_boot.c >> >>index c95d6c5a8..6780b1f0c 100644 >> >>--- a/grub-core/loader/arm64/xen_boot.c >> >>+++ b/grub-core/loader/arm64/xen_boot.c >> >>@@ -115,6 +115,17 @@ prepare_xen_hypervisor_params (void *xen_boot_fdt) >> >>if (chosen_node < 1) >> >> return grub_error (GRUB_ERR_IO, "failed to get chosen node in FDT"); >> >> >> >>+ /* >> >>+ * The address and size are always written using 64-bits value. Set >> > >> >Here you say "64-bits value"... >> > >> >>+ * #address-cells and #size-cells accordingly. >> >>+ */ >> >>+ retval = grub_fdt_set_prop32 (xen_boot_fdt, chosen_node, >> >>"#address-cells", 2); >> > >> >...and then call grub_fdt_set_prop32(). I am confused... >> >> #address-cells and #size-cells are property to know the number of >> cells per address/size. >> >> The address and size are 64-bit (i.e 2 cells) as you can see the >> call to grub_fdt_set_reg64 in the prepare_xen_module_params. > > Understood! I will apply this patch next week. Thank you! Cheers, -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] arm64/xen: Add missing #address-cells and #size-cells properties
Hi Daniel, On 30/11/17 13:06, Daniel Kiper wrote: On Wed, Nov 29, 2017 at 05:08:12PM +, Julien Grall wrote: The properties #address-cells and #size-cells are used to know the number of cells for ranges provided by "regs". If they don't exist, the value are resp. 2 and 1. Currently, when multiboot nodes are created it is assumed that #address-cells IIRC ARM boot protocol is not related to Multiboot protocol in any way. So, calling it in that way is very confusing. Could you invent a better not confusion name. Or at least provide a spec. I am happy to see it in GRUB2 tree. That's the name of the node see the MODULE_CUSTOM_COMPATIBLE in the code... But this it not the Linux Arm boot protocol, it is an extension currently only used by Xen. See [1]. and #size-cells are exactly 2. However, they are never set by GRUB and will result to later failure when the device-tree is generated by GRUB or contain different values. To prevent this failure, create the both properties in the chosen nodes. Signed-off-by: Julien Grall <julien.gr...@linaro.org> --- grub-core/loader/arm64/xen_boot.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index c95d6c5a8..6780b1f0c 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -115,6 +115,17 @@ prepare_xen_hypervisor_params (void *xen_boot_fdt) if (chosen_node < 1) return grub_error (GRUB_ERR_IO, "failed to get chosen node in FDT"); + /* + * The address and size are always written using 64-bits value. Set Here you say "64-bits value"... + * #address-cells and #size-cells accordingly. + */ + retval = grub_fdt_set_prop32 (xen_boot_fdt, chosen_node, "#address-cells", 2); ...and then call grub_fdt_set_prop32(). I am confused... #address-cells and #size-cells are property to know the number of cells per address/size. The address and size are 64-bit (i.e 2 cells) as you can see the call to grub_fdt_set_reg64 in the prepare_xen_module_params. + if (retval) +return grub_error (GRUB_ERR_IO, "failed to set #address-cells"); + retval = grub_fdt_set_prop32 (xen_boot_fdt, chosen_node, "#size-cells", 2); Ditto. Cheers, [1] https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=docs/misc/arm/device-tree/booting.txt -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH] arm64/xen: Add missing #address-cells and #size-cells properties
The properties #address-cells and #size-cells are used to know the number of cells for ranges provided by "regs". If they don't exist, the value are resp. 2 and 1. Currently, when multiboot nodes are created it is assumed that #address-cells and #size-cells are exactly 2. However, they are never set by GRUB and will result to later failure when the device-tree is generated by GRUB or contain different values. To prevent this failure, create the both properties in the chosen nodes. Signed-off-by: Julien Grall <julien.gr...@linaro.org> --- grub-core/loader/arm64/xen_boot.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index c95d6c5a8..6780b1f0c 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -115,6 +115,17 @@ prepare_xen_hypervisor_params (void *xen_boot_fdt) if (chosen_node < 1) return grub_error (GRUB_ERR_IO, "failed to get chosen node in FDT"); + /* + * The address and size are always written using 64-bits value. Set + * #address-cells and #size-cells accordingly. + */ + retval = grub_fdt_set_prop32 (xen_boot_fdt, chosen_node, "#address-cells", 2); + if (retval) +return grub_error (GRUB_ERR_IO, "failed to set #address-cells"); + retval = grub_fdt_set_prop32 (xen_boot_fdt, chosen_node, "#size-cells", 2); + if (retval) +return grub_error (GRUB_ERR_IO, "failed to set #size-cells"); + grub_dprintf ("xen_loader", "Xen Hypervisor cmdline : %s @ %p size:%d\n", xen_hypervisor->cmdline, xen_hypervisor->cmdline, -- 2.11.0 ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH v8 0/3] arm64, xen: add xen_boot support into grub-mkconfig
Hi Daniel, On 15/05/17 14:38, Daniel Kiper wrote: On Sun, May 14, 2017 at 03:43:44PM +0800, fu@linaro.org wrote: From: Fu Wei <fu@linaro.org> This patchset add xen_boot support into grub-mkconfig for generating xen boot entrances automatically Also update the docs/grub.texi for new xen_boot commands. LGTM, if there are no objections I will commit it at the end of this week or the beginning of next one. Thank you! Can you also please commit patch [1] which has been sitting on the grub ML for more than a year? This is preventing to boot Xen ARM with GRUB. Cheers, [1] https://lists.gnu.org/archive/html/grub-devel/2016-02/msg00205.html -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [Xen-devel] GRUB ARM Xen patches
On 02/11/16 12:33, Daniel Kiper wrote: Hi, Hi Daniel, Julien asked me to apply some GRUB ARM Xen patches. On the basis of his requested I identified following patch(es): - [PATCH] arm64: xen_boot: Fix xen boot using Grub on AARCH64 https://lists.gnu.org/archive/html/grub-devel/2016-02/msg00205.html - [PATCH v6 0/4] arm64,xen: add xen_boot support into grup-mkconfig http://lists.gnu.org/archive/html/grub-devel/2016-07/msg00034.html Is this list complete or am I missing something? The list is complete. I have some concerns and I wish to be sure that I comment relevant patch(es) and do not miss other required GRUB ARM Xen pieces. Cheers, -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [Xen-devel] [PATCH v6 0/4] arm64, xen: add xen_boot support into grup-mkconfig
On 01/09/16 22:51, Daniel Kiper wrote: Hey Julien, Hi Daniel, On Thu, Sep 01, 2016 at 01:47:05PM +0100, Julien Grall wrote: We have a couple series (this series and [1]) to allow grub booting Xen on ARM that have been waiting on the GRUB ML for a while to be pushed. Those patches have been tested and already integrated in some distributions. It would be nice to get them in GRUB upstream. As I can see at least some of them listed here: https://docs.google.com/document/d/1O6wveo1_WsAyEHMD041xMYvhDTDp3jQYzmqkgBx57HM/ So, this is good sign. Currently, we are agreeing what should be taken into 2.02 train. We are considering just most important things and fixes. Hence, I am not able to promise that we include in 2.02 all ARM patches mentioned by you if they are not on the above list right now. However, if it does not happen I will put them on the list for release after 2.02 (assuming that they are OK). So it looks like that this series is in the list. However, the patch [1] is missing. It is a requirement for this series, without it Xen will crash when booting with GRUB. Would it be possible for you to take a look? Sure thing. However, I am working on some stuff for Xen 4.8 and as you may know deadline is quite close. So, I will take care of GRUB2 things in the second half of September. Stay tuned... It is fine by me. Thank you, [1] https://lists.gnu.org/archive/html/grub-devel/2016-02/msg00205.html -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH v6 0/4] arm64, xen: add xen_boot support into grup-mkconfig
Hi Daniel, I have heard you became co-maintainer of GRUB. Congratulations for that :). We have a couple series (this series and [1]) to allow grub booting Xen on ARM that have been waiting on the GRUB ML for a while to be pushed. Those patches have been tested and already integrated in some distributions. It would be nice to get them in GRUB upstream. Would it be possible for you to take a look? Regards, [1] https://lists.gnu.org/archive/html/grub-devel/2016-02/msg00205.html On 26/07/16 10:13, fu@linaro.org wrote: From: Fu Wei <fu@linaro.org> This patchset add xen_boot support into grup-mkconfig for generating xen boot entrances automatically Also update the docs/grub.texi for new xen_boot commands. This patchset has been tested on Foudation model with a bug fix: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00205.html ChangeLog: v6: http://lists.gnu.org/archive/html/grub-devel/2016-07/ Fix Coding style of util/grub.d/20_linux_xen.in, use soft tab. v5: http://lists.gnu.org/archive/html/grub-devel/2016-07/msg8.html Update the introduction of xen_module commands in docs/grub.texi, according to the suggestion from Julien Grall v4: http://lists.gnu.org/archive/html/grub-devel/2016-05/ according to the XSM loading mechanism of Xen(upstreamed), update the introduction of xen_module commands in docs/grub.texi v3: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00314.html reorder the patches update the introduction of xen_module commands in docs/grub.texi v2: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00282.html add "--nounzip" option support in xen_module use "feature_xen_boot" instead of "grub_xen_boot" update the introduction of xen boot commands in docs/grub.texi v1 :first upstream patchset: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00264.html Fu Wei (4): i386,xen: Add xen_hypervisor and xen_module aliases for i386 arm64: add "--nounzip" option support in xen_module command * util/grub.d/20_linux_xen.in: Add xen_boot command support arm64: update the introduction of xen boot commands in docs/grub.texi docs/grub.texi| 32 +--- grub-core/loader/arm64/xen_boot.c | 17 + grub-core/loader/i386/xen.c | 7 +++ grub-core/normal/main.c | 2 +- util/grub.d/20_linux_xen.in | 13 ++--- 5 files changed, 44 insertions(+), 27 deletions(-) -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH v5 3/4] * util/grub.d/20_linux_xen.in: Add xen_boot command support
Hi Fu Wei, On 06/07/16 18:53, fu@linaro.org wrote: From: Fu Wei <fu@linaro.org> This patch adds the support of xen_boot command: xen_hypervisor xen_module Also add a new "feature_xen_boot" to indicate this grub support xen_boot command. Signed-off-by: Fu Wei <fu@linaro.org> --- grub-core/normal/main.c | 2 +- util/grub.d/20_linux_xen.in | 13 ++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c index 78a70a8..3402a05 100644 --- a/grub-core/normal/main.c +++ b/grub-core/normal/main.c @@ -488,7 +488,7 @@ static const char *features[] = { "feature_chainloader_bpb", "feature_ntldr", "feature_platform_search_hint", "feature_default_font_path", "feature_all_video_module", "feature_menuentry_id", "feature_menuentry_options", "feature_200_final", - "feature_nativedisk_cmd", "feature_timeout_style" + "feature_nativedisk_cmd", "feature_timeout_style", "feature_xen_boot" }; GRUB_MOD_INIT(normal) diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index c48af94..6a88a39 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -122,16 +122,23 @@ linux_entry () else xen_rm_opts="no-real-mode edd=off" fi - multiboot ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts} +if [ "x\$feature_xen_boot" != xy ]; then +xen_loader="multiboot" +module_loader="module" +else +xen_loader="xen_hypervisor" +module_loader="xen_module" +fi + \${xen_loader} ${rel_xen_dirname}/${xen_basename} placeholder ${xen_args} \${xen_rm_opts} What is the coding style for grub? This line is using hard tabs, but the previous one are using soft tab. echo'$(echo "$lmessage" | grub_quote)' - module ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args} + \${module_loader} ${rel_dirname}/${basename} placeholder root=${linux_root_device_thisversion} ro ${args} EOF if test -n "${initrd}" ; then # TRANSLATORS: ramdisk isn't identifier. Should be translated. message="$(gettext_printf "Loading initial ramdisk ...")" sed "s/^/$submenu_indentation/" << EOF echo'$(echo "$message" | grub_quote)' - module --nounzip ${rel_dirname}/${initrd} + \${module_loader} --nounzip ${rel_dirname}/${initrd} EOF fi sed "s/^/$submenu_indentation/" << EOF Regards, -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH v5 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
Hi Fu Wei, On 06/07/16 18:53, fu@linaro.org wrote: From: Fu Wei <fu@linaro.org> delete: xen_linux, xen_initrd, xen_xsm add: xen_module This update bases on commit 0edd750e50698854068358ea53528100a9192902 Author: Vladimir Serbinenko <phco...@gmail.com> Date: Fri Jan 22 10:18:47 2016 +0100 xen_boot: Remove obsolete module type distinctions. Also bases on the module loading mechanism of Xen code: 488c2a8 docs/arm64: clarify the documention for loading XSM support 67831c4 docs/arm64: update the documentation for loading XSM support ca32012 xen/arm64: check XSM Magic from the second unknown module. Signed-off-by: Fu Wei <fu@linaro.org> Reviewed-by: Julien Grall <julien.gr...@arm.com> Regards, -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [Xen-devel] [PATCH v4 0/4] arm64, xen: add xen_boot support into grup-mkconfig
Hi Fu Wei, On 06/07/16 18:58, Fu Wei wrote: On 5 July 2016 at 18:48, Julien Grall <julien.gr...@arm.com> wrote: Hi Fu Wei, What is the status of this series? IIRC the comments on this version were minor. Sorry, I missed the suggestion of docs, I have rebased them to latest upstream grub and posted v5 just now. Thank you for the new series :). I will give a look tomorrow. Cheers, -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [Xen-devel] [PATCH v4 0/4] arm64, xen: add xen_boot support into grup-mkconfig
Hi Fu Wei, What is the status of this series? IIRC the comments on this version were minor. Regards, On 10/05/16 15:03, fu@linaro.org wrote: From: Fu Wei <fu@linaro.org> This patchset add xen_boot support into grup-mkconfig for generating xen boot entrances automatically Also update the docs/grub.texi for new xen_boot commands. This patchset has been tested on Foudation model with a bug fix: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00205.html ChangeLog: v4: http://lists.gnu.org/archive/html/grub-devel/2016-05/ according to the XSM loading mechanism of Xen(upstreamed), update the introduction of xen_module commands in docs/grub.texi v3: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00314.html reorder the patches update the introduction of xen_module commands in docs/grub.texi v2: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00282.html add "--nounzip" option support in xen_module use "feature_xen_boot" instead of "grub_xen_boot" update the introduction of xen boot commands in docs/grub.texi v1 :first upstream patchset: http://lists.gnu.org/archive/html/grub-devel/2016-02/msg00264.html Fu Wei (4): i386,xen: Add xen_hypervisor and xen_module aliases for i386 arm64: add "--nounzip" option support in xen_module command * util/grub.d/20_linux_xen.in: Add xen_boot command support arm64: update the introduction of xen boot commands in docs/grub.texi docs/grub.texi| 33 ++--- grub-core/loader/arm64/xen_boot.c | 17 + grub-core/loader/i386/xen.c | 7 +++ grub-core/normal/main.c | 2 +- util/grub.d/20_linux_xen.in | 13 ++--- 5 files changed, 45 insertions(+), 27 deletions(-) -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [Xen-devel] [PATCH v4 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
Hi Fu Wei, (CC Stefano) On 10/05/16 15:03, fu@linaro.org wrote: From: Fu Wei <fu@linaro.org> delete: xen_linux, xen_initrd, xen_xsm add: xen_module This update bases on commit 0edd750e50698854068358ea53528100a9192902 Author: Vladimir Serbinenko <phco...@gmail.com> Date: Fri Jan 22 10:18:47 2016 +0100 xen_boot: Remove obsolete module type distinctions. Also bases on the module loading mechanism of Xen code: 488c2a8 docs/arm64: clarify the documention for loading XSM support 67831c4 docs/arm64: update the documentation for loading XSM support ca32012 xen/arm64: check XSM Magic from the second unknown module. Signed-off-by: Fu Wei <fu@linaro.org> --- docs/grub.texi | 33 ++--- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/docs/grub.texi b/docs/grub.texi index 82f6fa4..df6018a 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -3861,9 +3861,7 @@ you forget a command, you can run the command @command{help} * 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 +* xen_module:: Load xen modules for xen hypervisor @end menu @@ -5141,30 +5139,19 @@ 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 +@node xen_module +@subsection xen_module -@deffn Command xen_linux file [arguments] -Load a dom0 kernel image for xen hypervisor at the booting process of xen. +@deffn Command xen_module [--nounzip] file [arguments] +Load a module for xen hypervisor at the booting process of xen. The rest of the line is passed verbatim as the module command line. +Modules should be loaded in the following order: +The 1st module: dom0 kernel image +The 2nd module: dom0 ramdisk (optional, if the ramdisk is present, it must +always be the second module) +If the XSM is present, it can be loaded at any time after the 1st module. I find the instruction confusing. You wrote that XSM can be loaded any time after the 1st module, but just before you wrote that ramdisk should always be the first one. What about: "Modules should be loaded in the following order: - dom0 kernel image - dom0 ramdisk if present - XSM policy if present" Regards, -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [PATCH] arm64: xen_boot: Fix xen boot using Grub on AARCH64
Hello, Ping? Regards, On 19/02/16 16:28, Julien Grall wrote: Xen is currently crashing because of malformed compatible property for the boot module. This is because the property string is not null-terminated as requested by the ePAR spec. --- grub-core/loader/arm64/xen_boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index a914eb8..8ae43d7 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -156,7 +156,7 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt) grub_fdt_add_subnode (xen_boot_fdt, chosen_node, module_name); retval = grub_fdt_set_prop (xen_boot_fdt, module_node, "compatible", - MODULE_CUSTOM_COMPATIBLE, sizeof(MODULE_CUSTOM_COMPATIBLE) - 1); + MODULE_CUSTOM_COMPATIBLE, sizeof(MODULE_CUSTOM_COMPATIBLE)); if (retval) return grub_error (GRUB_ERR_IO, "failed to update FDT"); -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: [Xen-devel] [PATCH v3 4/4] arm64: update the introduction of xen boot commands in docs/grub.texi
Hi, On 08/03/2016 23:37, Fu Wei wrote: On 8 March 2016 at 14:54, Andrei Borzenkov <arvidj...@gmail.com> wrote: So speaking of loading additional modules/lack of initrd on ARM, I thinks that will (only) affect loading XSM. For this, I have discussed of that with Julien, I think : (1) the first module must be kernel (2) the second module must be initrd, if we have initrd (3) Start from the 2nd module, XEN will detect that if the module is a XSM by the XSM binary signature. if we get XSM as the second module, that means we have not initrd. We need to update Xen for point (3). Fu Wei, could you send a patch for this? please correct me if I misunderstand it I'm fine with this plan, it matches the x86 behavior. Cheers, -- Julien Grall ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
[PATCH] arm64: xen_boot: Fix xen boot using Grub on AARCH64
Xen is currently crashing because of malformed compatible property for the boot module. This is because the property string is not null-terminated as requested by the ePAR spec. --- grub-core/loader/arm64/xen_boot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/arm64/xen_boot.c b/grub-core/loader/arm64/xen_boot.c index a914eb8..8ae43d7 100644 --- a/grub-core/loader/arm64/xen_boot.c +++ b/grub-core/loader/arm64/xen_boot.c @@ -156,7 +156,7 @@ prepare_xen_module_params (struct xen_boot_binary *module, void *xen_boot_fdt) grub_fdt_add_subnode (xen_boot_fdt, chosen_node, module_name); retval = grub_fdt_set_prop (xen_boot_fdt, module_node, "compatible", - MODULE_CUSTOM_COMPATIBLE, sizeof(MODULE_CUSTOM_COMPATIBLE) - 1); + MODULE_CUSTOM_COMPATIBLE, sizeof(MODULE_CUSTOM_COMPATIBLE)); if (retval) return grub_error (GRUB_ERR_IO, "failed to update FDT"); -- 1.9.1 ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel