Re: [PATCH v2 08/20] x86, ACPI: Find acpi tables in initrd early from head_32.S/head64.c

2013-04-04 Thread H. Peter Anvin
On 03/10/2013 03:25 AM, Pekka Enberg wrote: > > What is preventing us from making the 64-bit variant also work in flat > mode to make the code consistent and not hiding the differences under > the rug? What am I missing here? > There is no such thing as "flat mode" in 64-bit mode. We use a #PF

Re: [PATCH v2 08/20] x86, ACPI: Find acpi tables in initrd early from head_32.S/head64.c

2013-04-04 Thread H. Peter Anvin
On 03/10/2013 03:25 AM, Pekka Enberg wrote: What is preventing us from making the 64-bit variant also work in flat mode to make the code consistent and not hiding the differences under the rug? What am I missing here? There is no such thing as flat mode in 64-bit mode. We use a #PF

Re: [PATCH v2 08/20] x86, ACPI: Find acpi tables in initrd early from head_32.S/head64.c

2013-03-10 Thread H. Peter Anvin
There is no 64-bit flat mode. We use a #PF handler to emulate one by creating page tables on the fly. Yinghai Lu wrote: >On Sun, Mar 10, 2013 at 3:25 AM, Pekka Enberg >wrote: >> >> What is preventing us from making the 64-bit variant also work in >flat >> mode to make the code consistent and

Re: [PATCH v2 08/20] x86, ACPI: Find acpi tables in initrd early from head_32.S/head64.c

2013-03-10 Thread Yinghai Lu
On Sun, Mar 10, 2013 at 3:25 AM, Pekka Enberg wrote: > > What is preventing us from making the 64-bit variant also work in flat > mode to make the code consistent and not hiding the differences under > the rug? What am I missing here? Boot loader could start kernel from 64bit directly from from

Re: [PATCH v2 08/20] x86, ACPI: Find acpi tables in initrd early from head_32.S/head64.c

2013-03-10 Thread Pekka Enberg
On Sun, Mar 10, 2013 at 8:44 AM, Yinghai Lu wrote: > +void __init x86_acpi_override_find(void) > +{ > + unsigned long ramdisk_image, ramdisk_size; > + unsigned char *p = NULL; > + > +#ifdef CONFIG_X86_32 > + struct boot_params *boot_params_p; > + > + /* > +* 32bit

Re: [PATCH v2 08/20] x86, ACPI: Find acpi tables in initrd early from head_32.S/head64.c

2013-03-10 Thread Pekka Enberg
On Sun, Mar 10, 2013 at 8:44 AM, Yinghai Lu ying...@kernel.org wrote: +void __init x86_acpi_override_find(void) +{ + unsigned long ramdisk_image, ramdisk_size; + unsigned char *p = NULL; + +#ifdef CONFIG_X86_32 + struct boot_params *boot_params_p; + + /* +

Re: [PATCH v2 08/20] x86, ACPI: Find acpi tables in initrd early from head_32.S/head64.c

2013-03-10 Thread Yinghai Lu
On Sun, Mar 10, 2013 at 3:25 AM, Pekka Enberg penb...@kernel.org wrote: What is preventing us from making the 64-bit variant also work in flat mode to make the code consistent and not hiding the differences under the rug? What am I missing here? Boot loader could start kernel from 64bit

Re: [PATCH v2 08/20] x86, ACPI: Find acpi tables in initrd early from head_32.S/head64.c

2013-03-10 Thread H. Peter Anvin
There is no 64-bit flat mode. We use a #PF handler to emulate one by creating page tables on the fly. Yinghai Lu ying...@kernel.org wrote: On Sun, Mar 10, 2013 at 3:25 AM, Pekka Enberg penb...@kernel.org wrote: What is preventing us from making the 64-bit variant also work in flat mode to

[PATCH v2 08/20] x86, ACPI: Find acpi tables in initrd early from head_32.S/head64.c

2013-03-09 Thread Yinghai Lu
head64.c could use #PF handler set page table to access initrd before init mem mapping and initrd relocating. head_32.S could use 32bit flat mode to access initrd before init mem mapping initrd relocating. That make 32bit and 64 bit more consistent. -v2: use inline function in header file

[PATCH v2 08/20] x86, ACPI: Find acpi tables in initrd early from head_32.S/head64.c

2013-03-09 Thread Yinghai Lu
head64.c could use #PF handler set page table to access initrd before init mem mapping and initrd relocating. head_32.S could use 32bit flat mode to access initrd before init mem mapping initrd relocating. That make 32bit and 64 bit more consistent. -v2: use inline function in header file