Add two small functions:
efi_merge_regions and efi_map_regions, efi_enter_virtual_mode
calls them instead of embedding two long for loop.
Signed-off-by: Dave Young dyo...@redhat.com
---
arch/x86/platform/efi/efi.c | 83 +++-
1 file changed, 52
Hi,
Here is the 1st version for supporting kexec kernel efi runtime.
Per pervious discussion I pass the 1st kernel efi runtime mapping
via setup_data to 2nd kernel. Besides of the runtime mapping
info I also pass the fw_vendor, runtime, config table, smbios
physical address in setup_data. EFI
Export fw_vendor, runtime and config tables physical
addresses to /sys/firmware/efi/systab becaue kexec
kernel will need them.
From EFI spec these 3 variables will be updated to
virtual address after entering virtual mode. But
kernel startup code will need the physical address.
Signed-off-by:
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 directly /sys/firmware/efi/efi-runtime-map
Just like /sys/firmware/memmap.
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
Kexec kernel will use saved runtime virtual mapping, so add a
new function efi_remap_region to remapping it directly without
calculate the virt addr from efi_va.
The md is passed in from 1st kernel, the virtual addr is
saved in md-virt_addr.
Signed-off-by: Dave Young dyo...@redhat.com
---
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
Kexec kernel will use saved runtime virtual mapping, so add a
new function efi_remap_region to remapping it directly without
calculate the virt addr from efi_va.
The md is passed in from 1st kernel, the virtual addr is
saved in md-virt_addr.
Signed-off-by: Dave Young dyo...@redhat.com
---
For supporting efi runtime on kexec kernel we need to
fill the efi_info struct in setup_header. I just get
the info in kernel exported boot_params data in debugfs.
v1-v2:
update comment for offset of reserved4_1[] in x87_linux_param_header
Address comment from mjg59: do not break old kernel when
Not only setup_subarch will get data from debugfs file
boot_params/data, later code for adding efi_info will
also need do same thing. Thus add a common function here
for later use.
v1-v2: make get_bootparam() static
Signed-off-by: Dave Young dyo...@redhat.com
---
Export fw_vendor, runtime and config tables physical
addresses to /sys/firmware/efi/systab becaue kexec
kernel will need them.
From EFI spec these 3 variables will be updated to
virtual address after entering virtual mode. But
kernel startup code will need the physical address.
Signed-off-by:
Old kexec-tools can not load new kernel. The reason is previously kexec-tools
do not fill efi_info in x86 setup header thus efi init fail and switch
to noefi boot. In new kexec-tools it will by default fill efi_info and
pass other efi required infomation to 2nd kernel so kexec kernel efi
Hi,
Here is the V2 for supporting kexec kernel efi runtime.
Per pervious discussion I pass the 1st kernel efi runtime mapping
via setup_data to 2nd kernel. Besides of the runtime mapping
info I also pass the fw_vendor, runtime, config table, smbios
physical address in setup_data. EFI spec
For supporting efi runtime, several efi physical addresses
fw_vendor, runtime, config tables, smbios and the whole runtime
mapping info need to be used in kexec kernel. Thus introduce
setup_data struct for passing these data.
collect the varialbes from /sys/firmware/efi/systab and
Add two small functions:
efi_merge_regions and efi_map_regions, efi_enter_virtual_mode
calls them instead of embedding two long for loop.
v1-v2:
refresh; coding style fixes.
Signed-off-by: Dave Young dyo...@redhat.com
---
arch/x86/platform/efi/efi.c | 107
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
Old kexec-tools can not load new kernel. The reason is previously kexec-tools
do not fill efi_info in x86 setup header thus efi init fail and switch
to noefi boot. In new kexec-tools it will by default fill efi_info and
pass other efi required infomation to 2nd kernel so kexec kernel efi
Current code check boot service region with kernel text region by:
start+size = __pa_symbol(_text)
The end of the above region should be start + size - 1 instead.
I see this problem in ovmf + Fedora 19 grub boot:
text start: 100 md start: 80 md size: 80
Signed-off-by: Dave Young
variables size and end is useless in this function, thus remove them.
Reported-by: Toshi Kani toshi.k...@hp.com
Signed-off-by: Dave Young dyo...@redhat.com
---
arch/x86/platform/efi/efi_64.c |6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
---
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 directly /sys/firmware/efi/runtime-map
Just like /sys/firmware/memmap.
Hi,
Here is the V3 for supporting kexec kernel efi runtime.
Per pervious discussion I pass the 1st kernel efi runtime mapping
via setup_data to 2nd kernel. Besides of the runtime mapping
info I also pass the fw_vendor, runtime, config table, smbios
physical address in setup_data. EFI spec
Export fw_vendor, runtime and config tables physical
addresses to /sys/firmware/efi/systab becaue kexec
kernel will need them.
From EFI spec these 3 variables will be updated to
virtual address after entering virtual mode. But
kernel startup code will need the physical address.
changelog:
Greg:
There's build warnings about using struct x86_linux_param_header *
in x86-linux-setup.h, it is declared in x86-linux.h
Fix it by include x86-linux.h in x86-linux-setup.h
Signed-off-by: Dave Young dyo...@redhat.com
---
kexec/arch/i386/x86-linux-setup.h |1 +
1 file changed, 1 insertion(+)
Hi,
This is the v3 patchset for adding efi runtime support on kexec kernel
kernel patches was sent a while ago, not yet updated in archive.
in kexec-tools, this patchset will do below:
1. retrieve efi_info from sysfs boot_params, and fill the
x86 setup header. If kernel does not export sysfs
For supporting efi runtime, several efi physical addresses
fw_vendor, runtime, config tables, smbios and the whole runtime
mapping info need to be used in kexec kernel. Thus introduce
setup_data struct for passing these data.
collect the varialbes from /sys/firmware/efi/systab and
For supporting efi runtime on kexec kernel we need to
fill the efi_info struct in setup_header. I just get
the info in kernel exported boot_params data in debugfs.
v1-v2:
update comment for offset of reserved4_1[] in x87_linux_param_header
Address comment from mjg59: do not break old kernel when
Not only setup_subarch will get data from debugfs file
boot_params/data, later code for adding efi_info will
also need do same thing. Thus add a common function here
for later use.
v1-v2: make get_bootparam() static
v2-v3: return error code when get_bootparam fails because
later patch to
variables size and end is useless in this function, thus remove them.
Reported-by: Toshi Kani toshi.k...@hp.com
Signed-off-by: Dave Young dyo...@redhat.com
Acked-by: Borislav Petkov b...@suse.de
---
arch/x86/platform/efi/efi_64.c |6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
---
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 directly /sys/firmware/efi/runtime-map
Just like /sys/firmware/memmap.
Old kexec-tools can not load new kernel. The reason is previously kexec-tools
do not fill efi_info in x86 setup header thus efi init fail and switch
to noefi boot. In new kexec-tools it will by default fill efi_info and
pass other efi required infomation to 2nd kernel so kexec kernel efi
For kexec/kdump kernel efi runtime mappings are saved, printing original whole
memmap ranges does not make sense anymore. So introduce a new function to only
print runtime maps in case kexec/kdump kernel is used.
Signed-off-by: Dave Young dyo...@redhat.com
---
arch/x86/platform/efi/efi.c | 23
kexec-tools use boot_params for getting the 1st kernel hardware_subarch,
the kexec kernel efi runtime support also need read the old efi_info from
boot_params. Currently it exists in debugfs which is not a good place for
such infomation. Per HPA, we should avoid of sploit debugfs.
In this patch
Kexec kernel will use saved runtime virtual mapping, so add a
new function efi_map_region_fixed for directly mapping a md
to md-virt.
The md is passed in from 1st kernel, the virtual addr is
saved in md-virt_addr.
Matt: coding style
reuse __map_region
Boris: Strenthen comment lines to 80
Hi,
Here is the V4 for supporting kexec kernel efi runtime.
Per pervious discussion I pass the 1st kernel efi runtime mapping
via setup_data to 2nd kernel. Besides of the runtime mapping
info I also pass the fw_vendor, runtime, config table, smbios
physical address in setup_data. EFI spec
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
Hi,
References: 20131125085630.417850...@dhcp-16-126.nay.redhat.com
Content-Disposition: inline; filename=07-use-efi-setup-data.patch
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,
Hi,
References: 20131125085630.417850...@dhcp-16-126.nay.redhat.com
Content-Disposition: inline; filename=01-remove-unused-var-in-map-region.patch
variables size and end is useless in this function, thus remove them.
Reported-by: Toshi Kani toshi.k...@hp.com
Signed-off-by: Dave Young
Hi,
References: 20131125085630.417850...@dhcp-16-126.nay.redhat.com
Content-Disposition: inline; filename=11-reserve-setup-data-late.patch
Kdump kernel using memmap=exactmap, move e820_reserve_setup_data after
parsing early params so they can be set reserved finally. Or kdump kernel
will warn
Hi,
References: 20131125085630.417850...@dhcp-16-126.nay.redhat.com
Content-Disposition: inline; filename=10-print-efi-runtime-memmap.patch
For kexec/kdump kernel efi runtime mappings are saved, printing original whole
memmap ranges does not make sense anymore. So introduce a new function to only
Hi,
References: 20131125085630.417850...@dhcp-16-126.nay.redhat.com
Content-Disposition: inline;
filename=08-add-xloadflags-for-kexec-efi-runtime-feature.patch
Old kexec-tools can not load new kernel. The reason is previously kexec-tools
do not fill efi_info in x86 setup header thus efi init
Hi,
References: 20131125085630.417850...@dhcp-16-126.nay.redhat.com
Content-Disposition: inline; filename=12-x86-kdebugfs-use-ioremap.patch
__va does not work in case memmap=exactmap, so let's always use ioremap_cache.
Signed-off-by: Dave Young dyo...@redhat.com
---
arch/x86/kernel/kdebugfs.c |
Hi,
References: 20131125085630.417850...@dhcp-16-126.nay.redhat.com
Content-Disposition: inline; filename=04-efi-enter-virtual-mode-cleanup.patch
Add two small functions:
efi_merge_regions and efi_map_regions, efi_enter_virtual_mode
calls them instead of embedding two long for loop.
v1-v2:
Hi,
References: 20131125085630.417850...@dhcp-16-126.nay.redhat.com
Content-Disposition: inline; filename=02-efi-map-fixed-addr.patch
Kexec kernel will use saved runtime virtual mapping, so add a
new function efi_map_region_fixed for directly mapping a md
to md-virt.
The md is passed in from 1st
Hi,
References: 20131125085630.417850...@dhcp-16-126.nay.redhat.com
Content-Disposition: inline; filename=05-export-more-efi-sysfs-vars.patch
Export fw_vendor, runtime and config tables physical
addresses to /sys/firmware/efi/systab becaue kexec
kernel will need them.
From EFI spec these 3
Add two small functions:
efi_merge_regions and efi_map_regions, efi_enter_virtual_mode
calls them instead of embedding two long for loop.
v1-v2:
refresh; coding style fixes.
v2-v3:
Toshi Kani:
remove unused variable
Matt: check return value of krealloc.
v3-v4:
Boris: Stretch comment to 80 cols
Hi,
References: 20131125085630.417850...@dhcp-16-126.nay.redhat.com
Content-Disposition: inline; filename=06-export-efi-runtime-mapping.patch
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
Hi,
References: 20131125085630.417850...@dhcp-16-126.nay.redhat.com
Content-Disposition: inline; filename=03-boot-service-fix.patch
Current code check boot service region with kernel text region by:
start+size = __pa_symbol(_text)
The end of the above region should be start + size - 1 instead.
47 matches
Mail list logo