Re: [Xen-devel] [GRUB2 PATCH v3 4/4] multiboot2: Add support for relocatable images

2016-03-14 Thread Daniel Kiper
On Fri, Mar 11, 2016 at 05:13:19PM +0100, Vladimir 'phcoder' Serbinenko wrote: > > > > + if (relocatable) > > > > +{ > > > > + if (base_addr > min_addr) > > > > + grub_multiboot_payload_eip += base_addr - min_addr; > > > > + else > > > > + grub_multiboot_payload_eip -= mi

Re: [Xen-devel] [GRUB2 PATCH v3 4/4] multiboot2: Add support for relocatable images

2016-03-11 Thread Daniel Kiper
On Thu, Mar 10, 2016 at 09:44:31PM +0100, Vladimir 'phcoder' Serbinenko wrote: > On Wednesday, March 2, 2016, Daniel Kiper wrote: > > > Currently multiboot2 protocol loads image exactly at address specified in > > ELF or multiboot2 header. This solution works quite well on legacy BIOS > > platform

Re: [Xen-devel] [GRUB2 PATCH v3 4/4] multiboot2: Add support for relocatable images

2016-03-11 Thread Vladimir 'phcoder' Serbinenko
> > > > > + if (relocatable) > > > +{ > > > + if (base_addr > min_addr) > > > + grub_multiboot_payload_eip += base_addr - min_addr; > > > + else > > > + grub_multiboot_payload_eip -= min_addr - base_addr; > > > +} > > > + > > > > > Why is it relative to min_addr? Soun

Re: [Xen-devel] [GRUB2 PATCH v3 4/4] multiboot2: Add support for relocatable images

2016-03-11 Thread Daniel Kiper
On Thu, Mar 10, 2016 at 09:41:26PM +0100, Vladimir 'phcoder' Serbinenko wrote: > On Wednesday, March 2, 2016, Daniel Kiper wrote: > > > Currently multiboot2 protocol loads image exactly at address specified in > > ELF or multiboot2 header. This solution works quite well on legacy BIOS > > platform

Re: [Xen-devel] [GRUB2 PATCH v3 4/4] multiboot2: Add support for relocatable images

2016-03-10 Thread Vladimir 'phcoder' Serbinenko
On Wednesday, March 2, 2016, Daniel Kiper wrote: > Currently multiboot2 protocol loads image exactly at address specified in > ELF or multiboot2 header. This solution works quite well on legacy BIOS > platforms. It is possible because memory regions are placed at predictable > addresses (though I

Re: [Xen-devel] [GRUB2 PATCH v3 4/4] multiboot2: Add support for relocatable images

2016-03-10 Thread Vladimir 'phcoder' Serbinenko
On Friday, March 4, 2016, Juergen Gross wrote: > On 02/03/16 17:51, Daniel Kiper wrote: > > Currently multiboot2 protocol loads image exactly at address specified in > > ELF or multiboot2 header. This solution works quite well on legacy BIOS > > platforms. It is possible because memory regions ar

Re: [Xen-devel] [GRUB2 PATCH v3 4/4] multiboot2: Add support for relocatable images

2016-03-10 Thread Vladimir 'phcoder' Serbinenko
On Wednesday, March 2, 2016, Daniel Kiper wrote: > Currently multiboot2 protocol loads image exactly at address specified in > ELF or multiboot2 header. This solution works quite well on legacy BIOS > platforms. It is possible because memory regions are placed at predictable > addresses (though I

Re: [Xen-devel] [GRUB2 PATCH v3 4/4] multiboot2: Add support for relocatable images

2016-03-03 Thread Juergen Gross
On 02/03/16 17:51, Daniel Kiper wrote: > Currently multiboot2 protocol loads image exactly at address specified in > ELF or multiboot2 header. This solution works quite well on legacy BIOS > platforms. It is possible because memory regions are placed at predictable > addresses (though I was not abl

[Xen-devel] [GRUB2 PATCH v3 4/4] multiboot2: Add support for relocatable images

2016-03-02 Thread Daniel Kiper
Currently multiboot2 protocol loads image exactly at address specified in ELF or multiboot2 header. This solution works quite well on legacy BIOS platforms. It is possible because memory regions are placed at predictable addresses (though I was not able to find any spec which says that it is strong