Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-05 Thread Dave Young
On 12/05/13 at 09:52pm, Borislav Petkov wrote: > On Thu, Dec 05, 2013 at 08:56:02AM -0700, Toshi Kani wrote: > > The smbios in efi_setup_data is necessary for kexec to pass the physical > > address of the SMBIOS table from the 1st kernel to the 2nd kernel. > > > > The kernel boot sequence

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-05 Thread Borislav Petkov
On Thu, Dec 05, 2013 at 08:56:02AM -0700, Toshi Kani wrote: > The smbios in efi_setup_data is necessary for kexec to pass the physical > address of the SMBIOS table from the 1st kernel to the 2nd kernel. > > The kernel boot sequence proceeds in the following order. Step 2 > requires efi.smbios

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-05 Thread Toshi Kani
On Thu, 2013-12-05 at 12:51 +0100, Borislav Petkov wrote: > On Thu, Dec 05, 2013 at 09:56:15AM +0800, Dave Young wrote: > > > The z420 firmware is based on some UEFI core that may be used by other > > > vendors as well. Since this handling is totally harmless (just > > > redundant), I'd suggest

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-05 Thread Borislav Petkov
On Thu, Dec 05, 2013 at 09:56:15AM +0800, Dave Young wrote: > > The z420 firmware is based on some UEFI core that may be used by other > > vendors as well. Since this handling is totally harmless (just > > redundant), I'd suggest not to have a platform check on this handling. > > I have same

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-05 Thread Borislav Petkov
On Thu, Dec 05, 2013 at 09:56:15AM +0800, Dave Young wrote: The z420 firmware is based on some UEFI core that may be used by other vendors as well. Since this handling is totally harmless (just redundant), I'd suggest not to have a platform check on this handling. I have same worry as

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-05 Thread Toshi Kani
On Thu, 2013-12-05 at 12:51 +0100, Borislav Petkov wrote: On Thu, Dec 05, 2013 at 09:56:15AM +0800, Dave Young wrote: The z420 firmware is based on some UEFI core that may be used by other vendors as well. Since this handling is totally harmless (just redundant), I'd suggest not to have

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-05 Thread Borislav Petkov
On Thu, Dec 05, 2013 at 08:56:02AM -0700, Toshi Kani wrote: The smbios in efi_setup_data is necessary for kexec to pass the physical address of the SMBIOS table from the 1st kernel to the 2nd kernel. The kernel boot sequence proceeds in the following order. Step 2 requires efi.smbios to be

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-05 Thread Dave Young
On 12/05/13 at 09:52pm, Borislav Petkov wrote: On Thu, Dec 05, 2013 at 08:56:02AM -0700, Toshi Kani wrote: The smbios in efi_setup_data is necessary for kexec to pass the physical address of the SMBIOS table from the 1st kernel to the 2nd kernel. The kernel boot sequence proceeds in the

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-04 Thread Dave Young
On 12/04/13 at 09:43am, Toshi Kani wrote: > On Wed, 2013-12-04 at 10:46 +0800, Dave Young wrote: > > Hi, Toshi > > > > > Oh, I think I now understand what the issue was. The z420 firmware > > > updates the SMBIOS table address in the EFI system table to a virtual > > > address after calling EFI

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-04 Thread Toshi Kani
On Wed, 2013-12-04 at 10:46 +0800, Dave Young wrote: > Hi, Toshi > > > Oh, I think I now understand what the issue was. The z420 firmware > > updates the SMBIOS table address in the EFI system table to a virtual > > address after calling EFI SetVirtualAddressMap. So, you are passing the > >

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-04 Thread Toshi Kani
On Wed, 2013-12-04 at 10:46 +0800, Dave Young wrote: Hi, Toshi Oh, I think I now understand what the issue was. The z420 firmware updates the SMBIOS table address in the EFI system table to a virtual address after calling EFI SetVirtualAddressMap. So, you are passing the original

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-04 Thread Dave Young
On 12/04/13 at 09:43am, Toshi Kani wrote: On Wed, 2013-12-04 at 10:46 +0800, Dave Young wrote: Hi, Toshi Oh, I think I now understand what the issue was. The z420 firmware updates the SMBIOS table address in the EFI system table to a virtual address after calling EFI

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-03 Thread Dave Young
Hi, Toshi > Oh, I think I now understand what the issue was. The z420 firmware > updates the SMBIOS table address in the EFI system table to a virtual > address after calling EFI SetVirtualAddressMap. So, you are passing the > original physical address of the SMBIOS table from the 1st kernel to

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-03 Thread Toshi Kani
On Tue, 2013-12-03 at 09:56 +0800, Dave Young wrote: > On 12/02/13 at 06:31pm, Toshi Kani wrote: > > On Mon, 2013-12-02 at 15:33 -0700, Toshi Kani wrote: > > > On Fri, 2013-11-29 at 17:14 +0800, Dave Young wrote: > > > > On 11/27/13 at 03:07pm, Borislav Petkov wrote: > > > > > On Tue, Nov 26, 2013

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-03 Thread Toshi Kani
On Tue, 2013-12-03 at 09:56 +0800, Dave Young wrote: On 12/02/13 at 06:31pm, Toshi Kani wrote: On Mon, 2013-12-02 at 15:33 -0700, Toshi Kani wrote: On Fri, 2013-11-29 at 17:14 +0800, Dave Young wrote: On 11/27/13 at 03:07pm, Borislav Petkov wrote: On Tue, Nov 26, 2013 at 01:57:52PM

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-03 Thread Dave Young
Hi, Toshi Oh, I think I now understand what the issue was. The z420 firmware updates the SMBIOS table address in the EFI system table to a virtual address after calling EFI SetVirtualAddressMap. So, you are passing the original physical address of the SMBIOS table from the 1st kernel to the

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-02 Thread Dave Young
On 12/02/13 at 06:31pm, Toshi Kani wrote: > On Mon, 2013-12-02 at 15:33 -0700, Toshi Kani wrote: > > On Fri, 2013-11-29 at 17:14 +0800, Dave Young wrote: > > > On 11/27/13 at 03:07pm, Borislav Petkov wrote: > > > > On Tue, Nov 26, 2013 at 01:57:52PM +0800, Dave Young wrote: > > > > > Add a new

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-02 Thread Toshi Kani
On Mon, 2013-12-02 at 15:33 -0700, Toshi Kani wrote: > On Fri, 2013-11-29 at 17:14 +0800, Dave Young wrote: > > On 11/27/13 at 03:07pm, Borislav Petkov wrote: > > > On Tue, Nov 26, 2013 at 01:57:52PM +0800, Dave Young wrote: > > > > Add a new setup_data type SETUP_EFI for kexec use. > > > >

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-02 Thread Toshi Kani
On Fri, 2013-11-29 at 17:14 +0800, Dave Young wrote: > On 11/27/13 at 03:07pm, Borislav Petkov wrote: > > On Tue, Nov 26, 2013 at 01:57:52PM +0800, Dave Young wrote: > > > Add a new setup_data type SETUP_EFI for kexec use. > > > Passing the saved fw_vendor, runtime, config tables and > > > efi

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-02 Thread Borislav Petkov
On Mon, Dec 02, 2013 at 10:49:15AM +0800, Dave Young wrote: > All these setup_data passing, remapping etc. is mostly for kexec, > add a lot of contiditional #if #endif makes the code a mess. I would > prefer to not do this if you are not strongly object. Right, having efi_kexec.c could solve all

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-02 Thread Borislav Petkov
On Mon, Dec 02, 2013 at 10:49:15AM +0800, Dave Young wrote: All these setup_data passing, remapping etc. is mostly for kexec, add a lot of contiditional #if #endif makes the code a mess. I would prefer to not do this if you are not strongly object. Right, having efi_kexec.c could solve all

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-02 Thread Toshi Kani
On Fri, 2013-11-29 at 17:14 +0800, Dave Young wrote: On 11/27/13 at 03:07pm, Borislav Petkov wrote: On Tue, Nov 26, 2013 at 01:57:52PM +0800, Dave Young wrote: Add a new setup_data type SETUP_EFI for kexec use. Passing the saved fw_vendor, runtime, config tables and efi runtime

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-02 Thread Toshi Kani
On Mon, 2013-12-02 at 15:33 -0700, Toshi Kani wrote: On Fri, 2013-11-29 at 17:14 +0800, Dave Young wrote: On 11/27/13 at 03:07pm, Borislav Petkov wrote: On Tue, Nov 26, 2013 at 01:57:52PM +0800, Dave Young wrote: Add a new setup_data type SETUP_EFI for kexec use. Passing the saved

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-02 Thread Dave Young
On 12/02/13 at 06:31pm, Toshi Kani wrote: On Mon, 2013-12-02 at 15:33 -0700, Toshi Kani wrote: On Fri, 2013-11-29 at 17:14 +0800, Dave Young wrote: On 11/27/13 at 03:07pm, Borislav Petkov wrote: On Tue, Nov 26, 2013 at 01:57:52PM +0800, Dave Young wrote: Add a new setup_data type

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-01 Thread Dave Young
On 11/29/13 at 05:46pm, Borislav Petkov wrote: > On Fri, Nov 29, 2013 at 05:14:16PM +0800, Dave Young wrote: > > That's reserved for future extension use, who knows if we will need to > > pass other fields in the future. > > Hrrmmm, 8*64 = 64 Bytes?? And you can't change it later because of the >

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-12-01 Thread Dave Young
On 11/29/13 at 05:46pm, Borislav Petkov wrote: On Fri, Nov 29, 2013 at 05:14:16PM +0800, Dave Young wrote: That's reserved for future extension use, who knows if we will need to pass other fields in the future. Hrrmmm, 8*64 = 64 Bytes?? And you can't change it later because of the

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-29 Thread Borislav Petkov
On Fri, Nov 29, 2013 at 05:14:16PM +0800, Dave Young wrote: > That's reserved for future extension use, who knows if we will need to > pass other fields in the future. Hrrmmm, 8*64 = 64 Bytes?? And you can't change it later because of the situation where machines might be using older kexec-tools?

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-29 Thread Dave Young
On 11/27/13 at 10:17am, Matt Fleming wrote: > On Wed, 27 Nov, at 12:52:37PM, Dave Young wrote: > > To make it more readable, I will change them like below: > > > > p = efi_runtime_map; > > md = efi_setup->map; > > for (i = 0; i < nr_efi_runtime_map; i++) { > > [...] > > md += 1; > > } >

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-29 Thread Dave Young
On 11/27/13 at 03:07pm, Borislav Petkov wrote: > On Tue, Nov 26, 2013 at 01:57:52PM +0800, Dave Young wrote: > > Add a new setup_data type SETUP_EFI for kexec use. > > Passing the saved fw_vendor, runtime, config tables and > > efi runtime mappings. > > > > When entering virtual mode, directly

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-29 Thread Dave Young
On 11/27/13 at 03:07pm, Borislav Petkov wrote: On Tue, Nov 26, 2013 at 01:57:52PM +0800, Dave Young wrote: Add a new setup_data type SETUP_EFI for kexec use. Passing the saved fw_vendor, runtime, config tables and efi runtime mappings. When entering virtual mode, directly mapping the

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-29 Thread Dave Young
On 11/27/13 at 10:17am, Matt Fleming wrote: On Wed, 27 Nov, at 12:52:37PM, Dave Young wrote: To make it more readable, I will change them like below: p = efi_runtime_map; md = efi_setup-map; for (i = 0; i nr_efi_runtime_map; i++) { [...] md += 1; } Actually, md++ is

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-29 Thread Borislav Petkov
On Fri, Nov 29, 2013 at 05:14:16PM +0800, Dave Young wrote: That's reserved for future extension use, who knows if we will need to pass other fields in the future. Hrrmmm, 8*64 = 64 Bytes?? And you can't change it later because of the situation where machines might be using older kexec-tools?

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-27 Thread Borislav Petkov
On Tue, Nov 26, 2013 at 01:57:52PM +0800, Dave Young wrote: > Add a new setup_data type SETUP_EFI for kexec use. > Passing the saved fw_vendor, runtime, config tables and > efi runtime mappings. > > When entering virtual mode, directly mapping the efi > runtime ragions which we passed in

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-27 Thread Matt Fleming
On Wed, 27 Nov, at 12:52:37PM, Dave Young wrote: > To make it more readable, I will change them like below: > > p = efi_runtime_map; > md = efi_setup->map; > for (i = 0; i < nr_efi_runtime_map; i++) { > [...] > md += 1; > } Actually, md++ is the canonical way to write this. > > >

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-27 Thread Matt Fleming
On Wed, 27 Nov, at 12:52:37PM, Dave Young wrote: To make it more readable, I will change them like below: p = efi_runtime_map; md = efi_setup-map; for (i = 0; i nr_efi_runtime_map; i++) { [...] md += 1; } Actually, md++ is the canonical way to write this. +

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-27 Thread Borislav Petkov
On Tue, Nov 26, 2013 at 01:57:52PM +0800, Dave Young wrote: Add a new setup_data type SETUP_EFI for kexec use. Passing the saved fw_vendor, runtime, config tables and efi runtime mappings. When entering virtual mode, directly mapping the efi runtime ragions which we passed in previously.

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-26 Thread Dave Young
On 11/26/13 at 10:04pm, Matt Fleming wrote: > On Tue, 26 Nov, at 01:57:52PM, Dave Young wrote: > > Add a new setup_data type SETUP_EFI for kexec use. > > Passing the saved fw_vendor, runtime, config tables and > > efi runtime mappings. > > > > When entering virtual mode, directly mapping the efi

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-26 Thread Matt Fleming
On Tue, 26 Nov, at 01:57:52PM, Dave Young wrote: > Add a new setup_data type SETUP_EFI for kexec use. > Passing the saved fw_vendor, runtime, config tables and > efi runtime mappings. > > When entering virtual mode, directly mapping the efi > runtime ragions which we passed in previously. And

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-26 Thread Matt Fleming
On Tue, 26 Nov, at 01:57:52PM, Dave Young wrote: Add a new setup_data type SETUP_EFI for kexec use. Passing the saved fw_vendor, runtime, config tables and efi runtime mappings. When entering virtual mode, directly mapping the efi runtime ragions which we passed in previously. And skip the

Re: [PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-26 Thread Dave Young
On 11/26/13 at 10:04pm, Matt Fleming wrote: On Tue, 26 Nov, at 01:57:52PM, Dave Young wrote: Add a new setup_data type SETUP_EFI for kexec use. Passing the saved fw_vendor, runtime, config tables and efi runtime mappings. When entering virtual mode, directly mapping the efi runtime

[PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-25 Thread Dave Young
Add a new setup_data type SETUP_EFI for kexec use. Passing the saved fw_vendor, runtime, config tables and efi runtime mappings. When entering virtual mode, directly mapping the efi runtime ragions which we passed in previously. And skip the step to call SetVirtualAddressMap. Specially for HP

[PATCH v4 07/12] efi: passing kexec necessary efi data via setup_data

2013-11-25 Thread Dave Young
Add a new setup_data type SETUP_EFI for kexec use. Passing the saved fw_vendor, runtime, config tables and efi runtime mappings. When entering virtual mode, directly mapping the efi runtime ragions which we passed in previously. And skip the step to call SetVirtualAddressMap. Specially for HP