[U-Boot] [PATCH 0/4] Add support for the 32 bit boot protocol to the x86 zboot command.

Graeme Russ graeme.russ at gmail.com
Wed Nov 30 13:13:31 CET 2011


Hi Gabe,

On 30/11/11 20:17, Gabe Black wrote:
> These four patches add support for the 32 bit Linux boot protocol to the
> zboot command. They also add support for an initrd.
> 
> 
> Gabe Black (4):
>   x86: Clean up the x86 zimage code in preparation to extend it
>   x86: Add support for booting Linux using the 32 bit boot protocol
>   x86: Refactor the zboot innards so they can be reused with a vboot
>     image
>   x86: Add support for specifying an initrd with the zboot command
> 
>  arch/x86/include/asm/zimage.h |   31 +----
>  arch/x86/lib/bootm.c          |   21 +++-
>  arch/x86/lib/zimage.c         |  257 ++++++++++++++++++++++++++---------------
>  3 files changed, 183 insertions(+), 126 deletions(-)

Well I managed to bolt it all together (you have other changes to
arch/x86/include/asm/zimage.h so one of the patches had to be applied manually)

But I cannot get the e820 map setup right for Linux - I tried to create a
single 2GB entry (I have no reserved memory, it's all free for Linux to do
what it wishes) with:

unsigned install_e820_map(unsigned max_entries, struct e820entry *entries)
{
	entries[0].addr = 0x00000000;
	entries[0].size = 0x80000000;
	entries[0].type = E820_RAM;

	return 1;
}

But Linux throws back:
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.1.0 (graeme at helios) (gcc version 4.5.2
(Ubuntu/Linaro 4.5.2-8ubuntu4) ) #4 Sun Nov 20 20:38:20 EST 2011
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000] Disabled fast string operations
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e801: 0000000000000000 - 000000000009f000 (usable)
[    0.000000]  BIOS-e801: 0000000000100000 - 0000000000100000 (usable)
[    0.000000] bootconsole [earlyser0] enabled
[    0.000000] Notice: NX (Execute Disable) protection cannot be enabled:
non-PAE kernel!
[    0.000000] DMI not present or invalid.
[    0.000000] e820 update range: 0000000000000000 - 0000000000010000
(usable) ==> (reserved)
[    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
[    0.000000] last_pfn = 0x9f max_arch_pfn = 0x100000
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-FFFFF uncachable
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 000000000 mask 0C0000000 write-back
[    0.000000]   1 base 0FFFB0000 mask 0FFFF0000 write-protect
[    0.000000]   2 disabled
[    0.000000]   3 disabled
[    0.000000]   4 disabled
[    0.000000]   5 disabled
[    0.000000]   6 disabled
[    0.000000]   7 disabled
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] initial memory mapped : 0 - 01800000
[    0.000000] Base memory trampoline at [c009e000] 9e000 size 4096
[    0.000000] init_memory_mapping: 0000000000000000-000000000009f000
[    0.000000]  0000000000 - 000009f000 page 4k
[    0.000000] kernel direct mapping tables up to 9f000 @ 99000-9e000
[    0.000000] 0MB HIGHMEM available.
[    0.000000] 0MB LOWMEM available.
[    0.000000]   mapped low ram: 0 - 0009f000
[    0.000000]   low ram: 0 - 0009f000

Any ideas?

Regards,

Graeme




More information about the U-Boot mailing list