Re: [PATCH v5 08/14] efi: export efi runtime memory mapping to sysfs

2013-12-15 Thread Dave Young
On 12/13/13 at 12:30pm, Matt Fleming wrote: > I agree with Borislav that this should be invoked from efisubsys_init(). > Also Dave, there's nothing inherently x86-specific about runtime-map.c - > we've been trying not to dump arch-specific code in > drivers/firmware/efi/. > > How about something l

Re: [PATCH v5 08/14] efi: export efi runtime memory mapping to sysfs

2013-12-15 Thread Dave Young
On 12/16/13 at 09:33am, Dave Young wrote: > On 12/13/13 at 12:30pm, Matt Fleming wrote: > > On Fri, 13 Dec, at 03:26:00PM, Dave Young wrote: > > > On 12/12/13 at 09:53pm, Borislav Petkov wrote: > > > > On Thu, Dec 12, 2013 at 10:36:17AM +0800, Dave Young wrote: > > > > > Sorry that I forgot to expl

Re: [PATCH v5 08/14] efi: export efi runtime memory mapping to sysfs

2013-12-15 Thread Dave Young
On 12/13/13 at 12:30pm, Matt Fleming wrote: > On Fri, 13 Dec, at 03:26:00PM, Dave Young wrote: > > On 12/12/13 at 09:53pm, Borislav Petkov wrote: > > > On Thu, Dec 12, 2013 at 10:36:17AM +0800, Dave Young wrote: > > > > Sorry that I forgot to explain this in changelog, should ask you before. > > >

Re: [PATCH v5 08/14] efi: export efi runtime memory mapping to sysfs

2013-12-13 Thread Matt Fleming
On Fri, 13 Dec, at 03:26:00PM, Dave Young wrote: > On 12/12/13 at 09:53pm, Borislav Petkov wrote: > > On Thu, Dec 12, 2013 at 10:36:17AM +0800, Dave Young wrote: > > > Sorry that I forgot to explain this in changelog, should ask you before. > > > > > > I did try moving it to efisubsys_init but it

Re: [PATCH v5 08/14] efi: export efi runtime memory mapping to sysfs

2013-12-13 Thread Dave Young
On 12/12/13 at 09:36pm, Borislav Petkov wrote: > On Thu, Dec 12, 2013 at 03:13:37PM +0800, Dave Young wrote: > > BTW, I will restructure the whole code when I move them to > > efi_kexec.c, so no worry about it? If you have strong opinion I can > > move them though. > > Well, if it were me, I'd do

Re: [PATCH v5 08/14] efi: export efi runtime memory mapping to sysfs

2013-12-12 Thread Dave Young
On 12/12/13 at 09:53pm, Borislav Petkov wrote: > On Thu, Dec 12, 2013 at 10:36:17AM +0800, Dave Young wrote: > > Sorry that I forgot to explain this in changelog, should ask you before. > > > > I did try moving it to efisubsys_init but it need add extern declaration > > So what? Add it. > > > fo

Re: [PATCH v5 08/14] efi: export efi runtime memory mapping to sysfs

2013-12-12 Thread Borislav Petkov
On Thu, Dec 12, 2013 at 10:36:17AM +0800, Dave Young wrote: > Sorry that I forgot to explain this in changelog, should ask you before. > > I did try moving it to efisubsys_init but it need add extern declaration So what? Add it. > for efi_runtime_map_init. Since link order will ensure it being c

Re: [PATCH v5 08/14] efi: export efi runtime memory mapping to sysfs

2013-12-12 Thread Borislav Petkov
On Thu, Dec 12, 2013 at 03:13:37PM +0800, Dave Young wrote: > BTW, I will restructure the whole code when I move them to > efi_kexec.c, so no worry about it? If you have strong opinion I can > move them though. Well, if it were me, I'd do it now so that it'll see more testing. Later, it will be on

Re: [PATCH v5 08/14] efi: export efi runtime memory mapping to sysfs

2013-12-11 Thread Dave Young
> > > > > and the EFI_BOOT* tests can be done in save_runtime_map and also the > > error handling can happen there. This way efi_map_regions() won't > > need to know about anything. This way, you can later move the whole > > save_runtime_map() function to efi-kexec.c just by taking it without any

Re: [PATCH v5 08/14] efi: export efi runtime memory mapping to sysfs

2013-12-11 Thread Dave Young
> > +++ b/Documentation/ABI/testing/sysfs-firmware-efi-runtime-map > > @@ -0,0 +1,36 @@ > > +What: /sys/firmware/efi/runtime-map/ > > +Date: December 2013 > > +Contact: Dave Young > > +Description: > > This could start at the same line as Description Ok. [snip] > > +

Re: [PATCH v5 08/14] efi: export efi runtime memory mapping to sysfs

2013-12-11 Thread Borislav Petkov
On Mon, Dec 09, 2013 at 05:42:21PM +0800, Dave Young wrote: > kexec kernel will need exactly same mapping for > efi runtime memory ranges. Thus here export the > runtime ranges mapping to sysfs, kexec-tools > will assemble them and pass to 2nd kernel via > setup_data. > > Introducing a new directo

[PATCH v5 08/14] efi: export efi runtime memory mapping to sysfs

2013-12-09 Thread Dave Young
kexec kernel will need exactly same mapping for efi runtime memory ranges. Thus here export the runtime ranges mapping to sysfs, kexec-tools will assemble them and pass to 2nd kernel via setup_data. Introducing a new directory /sys/firmware/efi/runtime-map Just like /sys/firmware/memmap. Containin