Re: EFI and multiboot2 devlopment work for Xen

2013-10-21 Thread Daniel Kiper
On Mon, Oct 21, 2013 at 02:36:38PM +0100, Jan Beulich wrote: On 21.10.13 at 14:57, Daniel Kiper daniel.ki...@oracle.com wrote: [...] Separate multiboot2efi module should be established. It should verify system kernel and all loaded modules using shim on EFI platforms with enabled secure

EFI and multiboot2 devlopment work for Xen

2013-10-21 Thread Daniel Kiper
Hi, During work on multiboot2 protocol support for Xen it was discovered that memory map passed via relevant tag could not represent wide range of memory types available on EFI platforms. Additionally, GRUB2 implementation calls ExitBootServices() on them just before jumping into loaded image. In

Re: EFI and multiboot2 devlopment work for Xen

2013-10-21 Thread Daniel Kiper
On Mon, Oct 21, 2013 at 09:54:38AM -0400, Peter Jones wrote: On Mon, Oct 21, 2013 at 02:57:56PM +0200, Daniel Kiper wrote: Hi, During work on multiboot2 protocol support for Xen it was discovered that memory map passed via relevant tag could not represent wide range of memory types

Re: EFI and multiboot2 devlopment work for Xen

2013-10-21 Thread Daniel Kiper
On Mon, Oct 21, 2013 at 03:37:21PM +0100, Jan Beulich wrote: On 21.10.13 at 16:23, Konrad Rzeszutek Wilk konrad.w...@oracle.com wrote: On Mon, Oct 21, 2013 at 02:36:38PM +0100, Jan Beulich wrote: On 21.10.13 at 14:57, Daniel Kiper daniel.ki...@oracle.com wrote: [...] What do you

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Daniel Kiper
On Tue, Oct 22, 2013 at 03:42:42PM +, Woodhouse, David wrote: On Tue, 2013-10-22 at 16:32 +0100, Matthew Garrett wrote: There are two problems with this: 1) The kernel will only boot if it's signed with a key in db, not a key in MOK. 2) grub will read the kernel, but the kernel

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Daniel Kiper
On Tue, Oct 22, 2013 at 05:08:03PM +0100, Ian Campbell wrote: On Tue, 2013-10-22 at 18:01 +0200, Daniel Kiper wrote: On Tue, Oct 22, 2013 at 03:42:42PM +, Woodhouse, David wrote: On Tue, 2013-10-22 at 16:32 +0100, Matthew Garrett wrote: There are two problems with this: 1

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Daniel Kiper
On Tue, Oct 22, 2013 at 04:36:04PM +, Maliszewski, Richard L wrote: I may be off-base, but when I was wading through the grub2 code earlier this year, it looked to me like it was going to refuse to launch anything via MB1 or MB2 if the current state was a secure boot launch. Are you

Re: EFI and multiboot2 devlopment work for Xen

2013-10-23 Thread Daniel Kiper
On Tue, Oct 22, 2013 at 09:42:52AM -0400, Konrad Rzeszutek Wilk wrote: On Tue, Oct 22, 2013 at 10:59:33AM +0100, Jan Beulich wrote: On 22.10.13 at 11:45, Ian Campbell ian.campb...@citrix.com wrote: On Tue, 2013-10-22 at 10:31 +0100, Jan Beulich wrote: On 22.10.13 at 11:26, Ian Campbell

Re: EFI and multiboot2 devlopment work for Xen

2013-10-23 Thread Daniel Kiper
On Tue, Oct 22, 2013 at 10:54:44AM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 21.10.2013 23:16, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Mail is big, I think I got your essential points but I didn't read it whole. On 21.10.2013 14:57, Daniel Kiper wrote: Hi, During work

Re: EFI and multiboot2 devlopment work for Xen

2013-10-23 Thread Daniel Kiper
On Mon, Oct 21, 2013 at 11:16:24PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Mail is big, I think I got your essential points but I didn't read it whole. On 21.10.2013 14:57, Daniel Kiper wrote: Hi, During work on multiboot2 protocol support for Xen it was discovered

Re: EFI and multiboot2 devlopment work for Xen

2013-10-23 Thread Daniel Kiper
On 10/22/13 9:51 AM, Daniel Kiper daniel.ki...@oracle.com wrote: On Tue, Oct 22, 2013 at 04:36:04PM +, Maliszewski, Richard L wrote: I may be off-base, but when I was wading through the grub2 code earlier this year, it looked to me like it was going to refuse to launch anything via MB1

Is: Wrap-up Was: Re: EFI and multiboot2 devlopment work for Xen

2013-10-30 Thread Daniel Kiper
Hi, Here is a short summary of our discussion. It looks that we have two choices right now: - chainloader, - multiboot2 protocol. chainloader solution could be implemented quite easily. Some code should be added for command line parsing. However, all arguments for Xen itself and modules must

Re: [Xen-devel] [PATCH, RFC] Allow running with non-terminated boot services in multiboot2

2013-12-09 Thread Daniel Kiper
On Mon, Dec 09, 2013 at 10:22:25AM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 09.12.2013 09:40, Daniel Kiper wrote: On Sat, Dec 07, 2013 at 12:13:05PM +0100, Vladimir '??-coder/phcoder' Serbinenko wrote: Patch to spec and GRUB attached. @ xen: don't forget to put wlan card

EFI + GRUB2 + Xen - Boot Services issues

2014-03-06 Thread Daniel Kiper
Hi, Vladimir, during my work on final multiboot2 protocol support in Xen on EFI platform I stated that GRUB2 patch 0df77d793c0436be656f982d96d4edaea4993f96 (Implement multiboot2 EFI BS specification) may not give access to Boot Services as we earlier expected. In general above mentioned patch

Re: EFI + GRUB2 + Xen - Boot Services issues

2014-03-12 Thread Daniel Kiper
Hey, On Thu, Mar 06, 2014 at 08:29:25PM +0100, Daniel Kiper wrote: Hi, Vladimir, during my work on final multiboot2 protocol support in Xen on EFI platform I stated that GRUB2 patch 0df77d793c0436be656f982d96d4edaea4993f96 (Implement multiboot2 EFI BS specification) may not give access

Re: EFI + GRUB2 + Xen - Boot Services issues

2014-03-19 Thread Daniel Kiper
Hey, On Thu, Mar 06, 2014 at 08:29:25PM +0100, Daniel Kiper wrote: Hi, Vladimir, during my work on final multiboot2 protocol support in Xen on EFI platform I stated that GRUB2 patch 0df77d793c0436be656f982d96d4edaea4993f96 (Implement multiboot2 EFI BS specification) may not give access

Re: EFI + GRUB2 + Xen - Boot Services issues

2014-03-20 Thread Daniel Kiper
Hi, On Wed, Mar 19, 2014 at 08:58:43PM +0800, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 19.03.2014 17:42, Daniel Kiper wrote: [...] Is there anybody out there? Sorry, I was travelling. I've seen your mail, just didn't respond to it No problem. yet. In nutshell, I think that even

[Xen Hackathon] EFI + GRUB2 + Xen

2014-05-22 Thread Daniel Kiper
Hey, Below you could find some ideas how to solve issues related to EFI + GRUB2 + Xen. I would like to discuss them during Xen Hackathon. Here is the excerpt from EFI + GRUB2 + Xen - Boot Services issues thread which will paint current picture

[Xen Hackathon] EFI + GRUB2 + Xen - minutes

2014-06-02 Thread Daniel Kiper
Hi, Below you could find minutes taken by Konrad (thanks!) during EFI + GRUB2 + Xen session which happened on Xen Hackathon. I made some minor fixes/cleanups. Session was led by me. Here you could find detailed description of the problem:

EFI + GRUB2 + Xen - WIP

2014-12-19 Thread Daniel Kiper
Hi all, I was going to send EFI + GRUB2 + Xen upstream patches based on my internal work for Xen 4.3.1 last week. Sadly, I was killing various bugs surfacing on various machines in unexpected places in this almost fully featured solution. This means I was not able to do that as I planned.

Re: [PATCH 00/18] x86: multiboot2 protocol support

2015-02-03 Thread Daniel Kiper
On Mon, Feb 02, 2015 at 09:28:49AM +, Jan Beulich wrote: On 30.01.15 at 18:54, daniel.ki...@oracle.com wrote: - xen.efi build will not so strongly depend on a given GCC and binutils version. While I can see the possibility of making the binutils version dependency go away (by

Re: [PATCH 03/18] x86/boot: use %ecx instead of %eax

2015-02-03 Thread Daniel Kiper
On Tue, Feb 03, 2015 at 10:02:09AM +, Jan Beulich wrote: On 30.01.15 at 18:54, daniel.ki...@oracle.com wrote: /* Save the Multiboot info struct (after relocation) for later use. */ mov $sym_phys(cpu0_stack)+1024,%esp -push%ebx -call

[PATCH 18/18] x86: add multiboot2 protocol support for EFI platforms

2015-01-30 Thread Daniel Kiper
Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/boot/head.S | 174 +++-- xen/arch/x86/efi/efi-boot.h | 29 +++ xen/arch/x86/setup.c | 23 ++--- xen/arch/x86/x86_64/asm-offsets.c |2 + xen/common/efi

[PATCH 15/18] efi: create efi_set_gop_mode()

2015-01-30 Thread Daniel Kiper
..which sets chosen GOP mode. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/common/efi/boot.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/xen/common/efi

Re: [PATCH 00/18] x86: multiboot2 protocol support

2015-01-30 Thread Daniel Kiper
On Fri, Jan 30, 2015 at 06:54:04PM +0100, Daniel Kiper wrote: Hi, I am sending, long awaited, first version of multiboot2 protocol support for legacy BIOS and EFI platforms. By mistake I forgot to thank you Andrew and Konrad for support during development of this series. Sorry guys. Daniel

[PATCH 12/18] efi: create efi_find_gop_mode()

2015-01-30 Thread Daniel Kiper
..which finds suitable GOP mode. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/common/efi/boot.c | 94 - 1 file changed, 54 insertions(+), 40 deletions(-) diff --git

[PATCH 06/18] x86: remove commented out stale references to efi_enabled

2015-01-30 Thread Daniel Kiper
Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/e820.c | 29 ++--- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c index bf84bae..47920a3 100644 --- a/xen/arch/x86/e820.c +++ b/xen/arch/x86

[PATCH 08/18] efi: build xen.gz with EFI code

2015-01-30 Thread Daniel Kiper
simple objcopy. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/Makefile | 17 +++-- xen/arch/x86/efi/Makefile | 12 ++-- xen/arch/x86/efi/stub.c | 42 -- xen/arch/x86/xen.lds.S|2 -- 4 files

[PATCH 10/18] efi: create efi_console_set_mode()

2015-01-30 Thread Daniel Kiper
..which sets console mode. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/common/efi/boot.c | 37 - 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/xen/common/efi

[PATCH 04/18] xen/x86: add multiboot2 protocol support

2015-01-30 Thread Daniel Kiper
Add multiboot2 protocol support. Alter min memory limit handling as we now may not find it from either multiboot (v1) or multiboot2. This way we are laying the foundation for EFI + GRUB2 + Xen development. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/boot/Makefile

[PATCH 07/18] efi: run EFI specific code on EFI platform only

2015-01-30 Thread Daniel Kiper
Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/shutdown.c |3 ++- xen/common/efi/boot.c|5 + xen/common/efi/runtime.c |6 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c index

[PATCH 11/18] efi: create efi_get_gop()

2015-01-30 Thread Daniel Kiper
..which gets pointer to GOP device. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/common/efi/boot.c | 59 ++--- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git

[PATCH 16/18] efi: create efi_exit_boot()

2015-01-30 Thread Daniel Kiper
..which gets memory map and calls ExitBootServices(). We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/common/efi/boot.c | 79 +++-- 1 file changed, 44 insertions(+), 35

[PATCH 09/18] efi: create efi_init()

2015-01-30 Thread Daniel Kiper
..which initializes basic EFI variables. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/common/efi/boot.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/xen/common/efi

[PATCH 14/18] efi: create efi_variables()

2015-01-30 Thread Daniel Kiper
..which collects variable store parameters. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/common/efi/boot.c | 41 - 1 file changed, 24 insertions(+), 17 deletions(-) diff --git

[PATCH 13/18] efi: create efi_tables()

2015-01-30 Thread Daniel Kiper
..which collects system tables data. We need this to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/common/efi/boot.c | 51 - 1 file changed, 29 insertions(+), 22 deletions(-) diff --git

[PATCH 17/18] x86/efi: create new early memory allocator

2015-01-30 Thread Daniel Kiper
in __start_xen(). Now solution #2 is implemented but maybe we should consider #1 too. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/efi/efi-boot.h | 37 + xen/arch/x86/setup.c|3 +-- 2 files changed, 30 insertions(+), 10 deletions

[PATCH 2/5] i386/relocator: Remove unused extern grub_relocator64_rip_addr

2015-01-30 Thread Daniel Kiper
Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- grub-core/lib/i386/relocator.c |1 - 1 file changed, 1 deletion(-) diff --git a/grub-core/lib/i386/relocator.c b/grub-core/lib/i386/relocator.c index ffaf25f..71dd4f0 100644 --- a/grub-core/lib/i386/relocator.c +++ b/grub-core/lib/i386

[PATCH 4/5] i386/relocator: Add grub_relocator64_efi relocator

2015-01-30 Thread Daniel Kiper
relocator too. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- grub-core/Makefile.core.def |1 + grub-core/lib/i386/relocator.c | 53 +++ grub-core/lib/i386/relocator64_efi.S | 77 ++ grub-core/loader/multiboot.c

[PATCH 5/5] multiboot2: Add tags used to pass ImageHandle to loaded image

2015-01-30 Thread Daniel Kiper
Add tags used to pass ImageHandle to loaded image. It is used by at least ExitBootServices() function. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- grub-core/loader/multiboot_mbi2.c | 36 +++- include/multiboot2.h | 16

[PATCH 1/5] multiboot2: Fix information request tag size calculation

2015-01-30 Thread Daniel Kiper
Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- grub-core/loader/multiboot_mbi2.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/loader/multiboot_mbi2.c b/grub-core/loader/multiboot_mbi2.c index 6f74aee..d7c19bc 100644 --- a/grub-core/loader

[PATCH 3/5] i386/relocator: Remove unused avoid_efi_bootservices argument

2015-01-30 Thread Daniel Kiper
Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- grub-core/lib/i386/relocator.c |5 ++--- grub-core/loader/i386/bsd.c |6 +++--- grub-core/loader/i386/coreboot/chainloader.c |2 +- grub-core/loader/i386/linux.c|2 +- grub-core

[PATCH 0/5] multiboot2: Enable EFI boot services usage in loaded images

2015-01-30 Thread Daniel Kiper
| 11 +++ include/grub/i386/relocator.h| 24 -- include/multiboot2.h | 25 +++ 13 files changed, 270 insertions(+), 29 deletions(-) Daniel Kiper (5): multiboot2: Fix information

[PATCH 00/18] x86: multiboot2 protocol support

2015-01-30 Thread Daniel Kiper
++- xen/drivers/acpi/osl.c|2 +- xen/include/xen/efi.h |6 +- xen/include/xen/multiboot2.h | 169 21 files changed, 1018 insertions(+), 344 deletions(-) Daniel Kiper (18): x86/boot/reloc: mask out MBI_BOOTDEV from mbi flags

[PATCH 01/18] x86/boot/reloc: mask out MBI_BOOTDEV from mbi flags

2015-01-30 Thread Daniel Kiper
..because it is ignored by Xen. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/boot/reloc.c |1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch/x86/boot/reloc.c b/xen/arch/x86/boot/reloc.c index f971920..63045c0 100644 --- a/xen/arch/x86/boot/reloc.c +++ b/xen

[PATCH 05/18] efi: split efi_enabled to efi_platform and efi_loader

2015-01-30 Thread Daniel Kiper
, split efi_enabled to efi_platform and efi_loader. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/dmi_scan.c|4 ++-- xen/arch/x86/domain_page.c |2 +- xen/arch/x86/efi/stub.c|5 +++-- xen/arch/x86/mpparse.c |4 ++-- xen/arch/x86/setup.c |8

[PATCH 02/18] x86/boot/reloc: create generic alloc and copy functions

2015-01-30 Thread Daniel Kiper
Create generic alloc and copy functions. We need separate tools for memory allocation and copy to provide multiboot2 protocol support. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/boot/reloc.c | 52 - 1 file changed, 33

[PATCH 03/18] x86/boot: use %ecx instead of %eax

2015-01-30 Thread Daniel Kiper
Use %ecx instead of %eax to store low memory upper limit from EBDA. This way we do not wipe multiboot protocol identifier. It is needed in reloc() to differentiate between multiboot (v1) and multiboot2 protocol. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com Reviewed-by: Andrew Cooper

Re: [PATCH 18/18] x86: add multiboot2 protocol support for EFI platforms

2015-01-30 Thread Daniel Kiper
On Fri, Jan 30, 2015 at 07:06:53PM +, Andrew Cooper wrote: On 30/01/15 17:54, Daniel Kiper wrote: Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/boot/head.S | 174 +++-- xen/arch/x86/efi/efi-boot.h | 29

Re: [PATCH 0/5] multiboot2: Enable EFI boot services usage in loaded images

2015-02-09 Thread Daniel Kiper
Hi all, On Fri, Jan 30, 2015 at 06:59:23PM +0100, Daniel Kiper wrote: Hi, This patch series enable EFI boot services usage in loaded images by multiboot2 protocol. Guys, do you have any comments on this patch series? Should I fix something? Could you apply them to GRUB2 tree? Daniel PS

Re: [PATCH 00/18] x86: multiboot2 protocol support

2015-02-09 Thread Daniel Kiper
Hi all, On Fri, Jan 30, 2015 at 06:54:04PM +0100, Daniel Kiper wrote: Hi, I am sending, long awaited, first version of multiboot2 protocol support for legacy BIOS and EFI platforms. The final goal is xen.efi binary file which could be loaded by EFI loader, multiboot (v1) protocol (only

Re: [PATCH 18/18] x86: add multiboot2 protocol support for EFI platforms

2015-02-10 Thread Daniel Kiper
On Fri, Jan 30, 2015 at 06:54:22PM +0100, Daniel Kiper wrote: Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/boot/head.S | 174 +++-- xen/arch/x86/efi/efi-boot.h | 29 +++ xen/arch/x86/setup.c | 23

Re: [PATCH 18/18] x86: add multiboot2 protocol support for EFI platforms

2015-02-15 Thread Daniel Kiper
On Sat, Feb 14, 2015 at 08:23:45PM +0300, Andrei Borzenkov wrote: В Wed, 11 Feb 2015 08:20:04 + Jan Beulich jbeul...@suse.com пишет: On 10.02.15 at 22:27, daniel.ki...@oracle.com wrote: After some testing we have found at least one machine on which this thing does not work. It is

Re: [PATCH 18/18] x86: add multiboot2 protocol support for EFI platforms

2015-03-17 Thread Daniel Kiper
On Tue, Mar 17, 2015 at 10:32:01AM +, Jan Beulich wrote: On 30.01.15 at 18:54, daniel.ki...@oracle.com wrote: @@ -94,6 +111,17 @@ ENTRY(start) gdt_boot_descr: .word 6*8-1 .long sym_phys(trampoline_gdt) +.long 0 /* Needed for 64-bit lgdt */ +

Re: [PATCH 00/18] x86: multiboot2 protocol support

2015-03-27 Thread Daniel Kiper
On Fri, Jan 30, 2015 at 06:54:04PM +0100, Daniel Kiper wrote: Hi, I am sending, long awaited, first version of multiboot2 protocol support for legacy BIOS and EFI platforms. New version with relocatable Xen early boot code is under tests now. I hope that I will release new version in 2-3

Re: [PATCH 08/18] efi: build xen.gz with EFI code

2015-03-27 Thread Daniel Kiper
On Mon, Mar 02, 2015 at 04:14:22PM +, Jan Beulich wrote: On 30.01.15 at 18:54, daniel.ki...@oracle.com wrote: --- a/xen/arch/x86/efi/Makefile +++ b/xen/arch/x86/efi/Makefile @@ -1,14 +1,14 @@ CFLAGS += -fshort-wchar -obj-y += stub.o +obj-y += boot.o +obj-y += compat.o

Re: [PATCH 04/18] xen/x86: add multiboot2 protocol support

2015-03-27 Thread Daniel Kiper
. * * Authors: *Keir Fraser k...@xen.org + *Daniel Kiper If you add yourself here, then please (following the existing example) with email address. -/* entered with %eax = BOOT_TRAMPOLINE */ +/* + * This entry point is entered from xen/arch/x86/boot/head.S

Re: [PATCH 17/18] x86/efi: create new early memory allocator

2015-03-27 Thread Daniel Kiper
On Mon, Mar 02, 2015 at 05:23:49PM +, Jan Beulich wrote: On 30.01.15 at 18:54, daniel.ki...@oracle.com wrote: --- a/xen/arch/x86/efi/efi-boot.h +++ b/xen/arch/x86/efi/efi-boot.h @@ -103,9 +103,35 @@ static void __init relocate_trampoline(unsigned long phys) *(u16

Re: [PATCH 16/18] efi: create efi_exit_boot()

2015-03-27 Thread Daniel Kiper
On Mon, Mar 02, 2015 at 04:45:47PM +, Jan Beulich wrote: On 30.01.15 at 18:54, daniel.ki...@oracle.com wrote: ..which gets memory map and calls ExitBootServices(). We need this to support multiboot2 protocol on EFI platforms. Patches from 9 up to here all make sense on the basis that

Re: [PATCH 04/18] xen/x86: add multiboot2 protocol support

2015-03-27 Thread Daniel Kiper
On Fri, Mar 27, 2015 at 11:20:10AM +, Jan Beulich wrote: On 27.03.15 at 11:56, daniel.ki...@oracle.com wrote: On Fri, Feb 20, 2015 at 04:06:26PM +, Jan Beulich wrote: On 30.01.15 at 18:54, daniel.ki...@oracle.com wrote: --- a/xen/arch/x86/boot/Makefile +++

Re: [PATCH 16/18] efi: create efi_exit_boot()

2015-03-27 Thread Daniel Kiper
On Fri, Mar 27, 2015 at 12:10:56PM +, Jan Beulich wrote: On 27.03.15 at 13:00, daniel.ki...@oracle.com wrote: Additionally, efi_start() is architecture independent and efi_multiboot2() is x86 only and it should live in x86 files. Is that really the case? Looking at the grub2 sources

Re: [PATCH 18/18] x86: add multiboot2 protocol support for EFI platforms

2015-03-27 Thread Daniel Kiper
On Tue, Mar 17, 2015 at 10:32:01AM +, Jan Beulich wrote: On 30.01.15 at 18:54, daniel.ki...@oracle.com wrote: @@ -94,6 +111,17 @@ ENTRY(start) gdt_boot_descr: .word 6*8-1 .long sym_phys(trampoline_gdt) +.long 0 /* Needed for 64-bit lgdt */ +

Re: [PATCH 05/18] efi: split efi_enabled to efi_platform and efi_loader

2015-03-27 Thread Daniel Kiper
On Fri, Feb 20, 2015 at 04:17:35PM +, Jan Beulich wrote: On 30.01.15 at 18:54, daniel.ki...@oracle.com wrote: We need more fine grained knowledge about EFI environment and check for EFI platform and EFI loader separately to properly support multiboot2 protocol. ... because of ...

Re: [PATCH 17/18] x86/efi: create new early memory allocator

2015-03-27 Thread Daniel Kiper
On Fri, Mar 27, 2015 at 01:35:11PM +, Jan Beulich wrote: On 27.03.15 at 13:57, daniel.ki...@oracle.com wrote: On Mon, Mar 02, 2015 at 05:23:49PM +, Jan Beulich wrote: On 30.01.15 at 18:54, daniel.ki...@oracle.com wrote: +{ +void *ptr; + +/* + * Init

Re: [PATCH 18/18] x86: add multiboot2 protocol support for EFI platforms

2015-03-27 Thread Daniel Kiper
On Fri, Mar 27, 2015 at 01:36:32PM +, Jan Beulich wrote: On 27.03.15 at 14:06, daniel.ki...@oracle.com wrote: On Tue, Mar 17, 2015 at 10:32:01AM +, Jan Beulich wrote: On 30.01.15 at 18:54, daniel.ki...@oracle.com wrote: +/* Skip Multiboot2 information fixed part */ +

Re: [PATCH 18/18] x86: add multiboot2 protocol support for EFI platforms

2015-03-27 Thread Daniel Kiper
On Fri, Mar 27, 2015 at 02:34:19PM +, Jan Beulich wrote: On 27.03.15 at 15:26, daniel.ki...@oracle.com wrote: On Fri, Mar 27, 2015 at 01:36:32PM +, Jan Beulich wrote: On 27.03.15 at 14:06, daniel.ki...@oracle.com wrote: On Tue, Mar 17, 2015 at 10:32:01AM +, Jan Beulich wrote:

Re: [PATCH 18/18] x86: add multiboot2 protocol support for EFI platforms

2015-03-27 Thread Daniel Kiper
On Fri, Mar 27, 2015 at 03:06:43PM +, Jan Beulich wrote: On 27.03.15 at 15:57, daniel.ki...@oracle.com wrote: On Fri, Mar 27, 2015 at 02:34:19PM +, Jan Beulich wrote: On 27.03.15 at 15:26, daniel.ki...@oracle.com wrote: On Fri, Mar 27, 2015 at 01:36:32PM +, Jan Beulich wrote:

Re: [PATCH 00/18] x86: multiboot2 protocol support

2015-03-03 Thread Daniel Kiper
On Tue, Mar 03, 2015 at 12:10:35PM +, Ian Campbell wrote: On Fri, 2015-01-30 at 18:54 +0100, Daniel Kiper wrote: xen/arch/x86/Makefile | 17 ++-- xen/arch/x86/boot/Makefile|3 +- xen/arch/x86/boot/head.S | 291

Re: [PATCH 00/18] x86: multiboot2 protocol support

2015-03-03 Thread Daniel Kiper
On Tue, Mar 03, 2015 at 12:39:45PM +, Ian Campbell wrote: On Tue, 2015-03-03 at 13:36 +0100, Daniel Kiper wrote: On Tue, Mar 03, 2015 at 12:10:35PM +, Ian Campbell wrote: On Fri, 2015-01-30 at 18:54 +0100, Daniel Kiper wrote: xen/arch/x86/Makefile | 17

Re: [PATCH 17/18] x86/efi: create new early memory allocator

2015-03-03 Thread Daniel Kiper
On Tue, Mar 03, 2015 at 08:04:09AM +, Jan Beulich wrote: On 02.03.15 at 21:25, roy.fr...@linaro.org wrote: On Mon, Mar 2, 2015 at 9:23 AM, Jan Beulich jbeul...@suse.com wrote: On 30.01.15 at 18:54, daniel.ki...@oracle.com wrote: @@ -192,12 +218,7 @@ static void __init

Re: [PATCH 3/5] i386/relocator: Remove unused avoid_efi_bootservices argument

2015-05-29 Thread Daniel Kiper
Hey, Sorry for late reply but I was busy with our internal EFI stuff. We did more tests and some fixes and it seems that everything is going in right direction. Well, I hope... :-))) Right now I am going to continue my work on upstream EFI + GRUB2 + Xen stuff. I think that I will be able to

Re: [PATCH v2 05/23] x86/boot/reloc: create generic alloc and copy functions

2015-08-17 Thread Daniel Kiper
On Mon, Aug 17, 2015 at 09:51:58AM -0600, Jan Beulich wrote: On 20.07.15 at 16:29, daniel.ki...@oracle.com wrote: Create generic alloc and copy functions. We need separate tools for memory allocation and copy to provide multiboot2 protocol support. Signed-off-by: Daniel Kiper daniel.ki

Re: [PATCH v2 08/23] x86: add multiboot2 protocol support

2015-08-18 Thread Daniel Kiper
On Tue, Aug 18, 2015 at 02:12:58AM -0600, Jan Beulich wrote: On 20.07.15 at 16:29, daniel.ki...@oracle.com wrote: [...] @@ -119,10 +213,11 @@ __start: /* Save the Multiboot info struct (after relocation) for later use. */ mov $sym_phys(cpu0_stack)+1024,%esp +

Re: [PATCH v2 6/6] multiboot2: Do not pass memory maps to image if EFI boot services are enabled

2015-08-18 Thread Daniel Kiper
On Tue, Aug 11, 2015 at 02:59:56PM -0400, Konrad Rzeszutek Wilk wrote: On Mon, Jul 20, 2015 at 04:35:54PM +0200, Daniel Kiper wrote: Do not pass memory maps to image if it asked for EFI boot services. Maps are usually invalid in that case and they can confuse potential user. Image should

Re: [PATCH v2 09/23] efi: create efi_enabled()

2015-08-22 Thread Daniel Kiper
On Thu, Aug 20, 2015 at 09:18:17AM -0600, Jan Beulich wrote: On 20.07.15 at 16:29, daniel.ki...@oracle.com wrote: --- a/xen/arch/x86/efi/stub.c +++ b/xen/arch/x86/efi/stub.c @@ -4,9 +4,14 @@ #include xen/lib.h #include asm/page.h -#ifndef efi_enabled -const bool_t efi_enabled =

Re: [PATCH v2 10/23] efi: build xen.gz with EFI code

2015-08-22 Thread Daniel Kiper
On Thu, Aug 20, 2015 at 09:39:39AM -0600, Jan Beulich wrote: On 20.07.15 at 16:29, daniel.ki...@oracle.com wrote: Build xen.gz with EFI code. We need this to support multiboot2 protocol on EFI platforms. If we wish to load not ELF file using multiboot (v1) or multiboot2 then DYM a

Re: [PATCH v2 0/6] multiboot2: Add two extensions and fix some issues

2015-08-24 Thread Daniel Kiper
Guys, especially GRUB2 maintainers, On Mon, Jul 20, 2015 at 04:35:48PM +0200, Daniel Kiper wrote: Hi, This patch series: - enables EFI boot services usage in loaded images by multiboot2 protocol, - add support for multiboot2 protocol compatible relocatable images, - fixes

Re: [Xen-devel] [PATCH v2 08/23] x86: add multiboot2 protocol support

2015-08-13 Thread Daniel Kiper
On Mon, Aug 10, 2015 at 03:17:48PM -0400, Konrad Rzeszutek Wilk wrote: On Mon, Jul 20, 2015 at 04:29:03PM +0200, Daniel Kiper wrote: Add multiboot2 protocol support. Alter min memory limit handling as we now may not find it from either multiboot (v1) or multiboot2. This way we are laying

Re: [Xen-devel] [PATCH v2 22/23] x86: make Xen early boot code relocatable

2015-08-14 Thread Daniel Kiper
On Tue, Aug 11, 2015 at 12:48:06PM -0400, Konrad Rzeszutek Wilk wrote: On Mon, Jul 20, 2015 at 04:29:17PM +0200, Daniel Kiper wrote: Every multiboot protocol (regardless of version) compatible image must specify its load address (in ELF or multiboot header). Multiboot protocol compatible

Re: [Xen-devel] [PATCH v2 22/23] x86: make Xen early boot code relocatable

2015-08-14 Thread Daniel Kiper
On Fri, Aug 14, 2015 at 06:49:18AM -0600, Jan Beulich wrote: On 14.08.15 at 13:52, daniel.ki...@oracle.com wrote: On Tue, Aug 11, 2015 at 12:48:06PM -0400, Konrad Rzeszutek Wilk wrote: On Mon, Jul 20, 2015 at 04:29:17PM +0200, Daniel Kiper wrote: diff --git a/xen/include/asm-x86/page.h b

Re: [Xen-devel] [PATCH v2 22/23] x86: make Xen early boot code relocatable

2015-08-14 Thread Daniel Kiper
Wilk wrote: On Mon, Jul 20, 2015 at 04:29:17PM +0200, Daniel Kiper wrote: diff --git a/xen/include/asm-x86/page.h b/xen/include/asm-x86/page.h index 87b3341..27481ac 100644 --- a/xen/include/asm-x86/page.h +++ b/xen/include/asm-x86/page.h @@ -283,7 +283,7 @@ extern

Re: [PATCH v2 23/23] x86: add multiboot2 protocol support for relocatable images

2015-08-14 Thread Daniel Kiper
On Tue, Aug 11, 2015 at 12:56:58PM -0400, Konrad Rzeszutek Wilk wrote: On Mon, Jul 20, 2015 at 04:29:18PM +0200, Daniel Kiper wrote: Add multiboot2 protocol support for relocatable images. Only GRUB2 with relevant patches understands that feature. Older multiboot You may want to enumerate

Re: [PATCH v2 01/23] x86/boot: remove unneeded instruction

2015-07-27 Thread Daniel Kiper
On Fri, Jul 24, 2015 at 12:22:57PM -0400, Konrad Rzeszutek Wilk wrote: On Mon, Jul 20, 2015 at 04:28:56PM +0200, Daniel Kiper wrote: Signed-off-by: Daniel Kiper daniel.ki...@oracle.com Don't you use it in: /* Switch to low-memory stack. */ 193 mov sym_phys(trampoline_phys

Re: [PATCH 3/5] i386/relocator: Remove unused avoid_efi_bootservices argument

2015-07-16 Thread Daniel Kiper
On Wed, Jul 15, 2015 at 07:50:51PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 30.05.2015 07:25, Andrei Borzenkov wrote: В Fri, 29 May 2015 22:58:43 +0200 Daniel Kiper daniel.ki...@oracle.com пишет: Another questions is why grub_relocator_alloc_chunk_addr() does not consult

[PATCH v2 00/23] x86: multiboot2 protocol support

2015-07-20 Thread Daniel Kiper
34 files changed, 1709 insertions(+), 763 deletions(-) Daniel Kiper (23): x86/boot: remove unneeded instruction x86/boot: copy only text section from *.lnk file to *.bin file x86: zero BSS using stosl instead of stosb x86/boot: call reloc() using cdecl

[PATCH v2 01/23] x86/boot: remove unneeded instruction

2015-07-20 Thread Daniel Kiper
Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/boot/head.S |1 - 1 file changed, 1 deletion(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index cfd59dc..f63b349 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -169,7 +169,6

[PATCH v2 04/23] x86/boot: call reloc() using cdecl calling convention

2015-07-20 Thread Daniel Kiper
Suggested-by: Jan Beulich jbeul...@suse.com Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/boot/head.S |4 +++- xen/arch/x86/boot/reloc.c | 20 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86

[PATCH v2 03/23] x86: zero BSS using stosl instead of stosb

2015-07-20 Thread Daniel Kiper
Additionally, align relevant comment to coding style. Suggested-by: Andrew Cooper andrew.coop...@citrix.com Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/boot/head.S |5 +++-- xen/arch/x86/xen.lds.S |2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff

[PATCH v2 05/23] x86/boot/reloc: create generic alloc and copy functions

2015-07-20 Thread Daniel Kiper
Create generic alloc and copy functions. We need separate tools for memory allocation and copy to provide multiboot2 protocol support. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com Reviewed-by: Andrew Cooper andrew.coop...@citrix.com --- v2 - suggestions/fixes: - generalize new functions

[PATCH v2 06/23] x86/boot: use %ecx instead of %eax

2015-07-20 Thread Daniel Kiper
Use %ecx instead of %eax to store low memory upper limit from EBDA. This way we do not wipe multiboot protocol identifier. It is needed in reloc() to differentiate between multiboot (v1) and multiboot2 protocol. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com Reviewed-by: Andrew Cooper

[PATCH v2 02/23] x86/boot: copy only text section from *.lnk file to *.bin file

2015-07-20 Thread Daniel Kiper
Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/boot/build32.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot/build32.mk index c208249..c83effe 100644 --- a/xen/arch/x86/boot/build32.mk +++ b/xen/arch

[PATCH v2 13/23] efi: split out efi_get_gop()

2015-07-20 Thread Daniel Kiper
..which gets pointer to GOP device. We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- v2 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/common/efi/boot.c | 59

[PATCH v2 18/23] efi: split out efi_exit_boot()

2015-07-20 Thread Daniel Kiper
..which gets memory map and calls ExitBootServices(). We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- v2 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/common/efi

[PATCH v2 12/23] efi: split out efi_console_set_mode()

2015-07-20 Thread Daniel Kiper
..which sets console mode. We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- v2 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/common/efi/boot.c | 37

[PATCH v2 07/23] x86/boot/reloc: Rename some variables and rearrange code a bit

2015-07-20 Thread Daniel Kiper
Rename mbi and mbi_old variables and rearrange code a bit to make it more readable. Additionally, this way multiboot (v1) protocol implementation and future multiboot2 protocol implementation will use the same variable naming convention. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- v2

[PATCH v2 10/23] efi: build xen.gz with EFI code

2015-07-20 Thread Daniel Kiper
simple objcopy. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- v2 - suggestions/fixes: - build EFI code only if it is supported in a given build environment (suggested by Jan Beulich). --- xen/arch/x86/Makefile | 13 + xen/arch/x86/efi/Makefile | 16

[PATCH v2 08/23] x86: add multiboot2 protocol support

2015-07-20 Thread Daniel Kiper
Add multiboot2 protocol support. Alter min memory limit handling as we now may not find it from either multiboot (v1) or multiboot2. This way we are laying the foundation for EFI + GRUB2 + Xen development. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com Reviewed-by: Andrew Cooper andrew.coop

[PATCH v2 19/23] x86/efi: create new early memory allocator

2015-07-20 Thread Daniel Kiper
. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- xen/arch/x86/efi/efi-boot.h | 38 ++ xen/arch/x86/setup.c|3 +-- 2 files changed, 31 insertions(+), 10 deletions(-) diff --git a/xen/arch/x86/efi/efi-boot.h b/xen/arch/x86/efi/efi-boot.h index

[PATCH v2 21/23] x86/boot: implement early command line parser in C

2015-07-20 Thread Daniel Kiper
easier to maintain. Suggested-by: Andrew Cooper andrew.coop...@citrix.com Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- .gitignore |5 +- xen/arch/x86/Makefile |2 +- xen/arch/x86/boot/Makefile |7 +- xen/arch/x86/boot/build32.mk |2

[PATCH v2 11/23] efi: split out efi_init()

2015-07-20 Thread Daniel Kiper
..which initializes basic EFI variables. We want to re-use this code to support multiboot2 protocol on EFI platforms. Signed-off-by: Daniel Kiper daniel.ki...@oracle.com --- v2 - suggestions/fixes: - improve commit message (suggested by Jan Beulich). --- xen/common/efi/boot.c | 28

  1   2   3   4   5   6   7   8   9   >