Re: [PATCH v3 11/12] x86, boot: add fields to support load bzImageand ramdisk high

From: Yinghai Lu
Date: Thu Nov 22 2012 - 13:28:19 EST


On Thu, Nov 22, 2012 at 7:59 AM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
> Looks good to me.
>

has problem with old kexec, it only copy header from bzImage include
setup_header as boot_param.

00000000 ea 05 00 c0 07 8c c8 8e d8 8e c0 8e d0 31 e4 fb |.............1..|
00000010 fc be 2d 00 ac 20 c0 74 09 b4 0e bb 07 00 cd 10 |..-.. .t........|
00000020 eb f2 31 c0 cd 16 cd 19 ea f0 ff 00 f0 44 69 72 |..1..........Dir|
00000030 65 63 74 20 66 6c 6f 70 70 79 20 62 6f 6f 74 20 |ect floppy boot |
00000040 69 73 20 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 |is not supported|
00000050 2e 20 55 73 65 20 61 20 62 6f 6f 74 20 6c 6f 61 |. Use a boot loa|
00000060 64 65 72 20 70 72 6f 67 72 61 6d 20 69 6e 73 74 |der program inst|
00000070 65 61 64 2e 0d 0a 0a 52 65 6d 6f 76 65 20 64 69 |ead....Remove di|
00000080 73 6b 20 61 6e 64 20 70 72 65 73 73 20 61 6e 79 |sk and press any|
00000090 20 6b 65 79 20 74 6f 20 72 65 62 6f 6f 74 20 2e | key to reboot .|
000000a0 2e 2e 0d 0a 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 21 01 00 33 15 09 00 00 00 ff ff 00 00 55 aa |.!..3.........U.|


so will have stuff in 0x70

then i change to 0xC0, when CONFIG_EFI_STUB is enabled, there is value
there too.


00000000 4d 5a ea 07 00 c0 07 8c c8 8e d8 8e c0 8e d0 31 |MZ.............1|
00000010 e4 fb fc be 40 00 ac 20 c0 74 09 b4 0e bb 07 00 |....@.. .t......|
00000020 cd 10 eb f2 31 c0 cd 16 cd 19 ea f0 ff 00 f0 00 |....1...........|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 b8 00 00 00 |................|
00000040 44 69 72 65 63 74 20 66 6c 6f 70 70 79 20 62 6f |Direct floppy bo|
00000050 6f 74 20 69 73 20 6e 6f 74 20 73 75 70 70 6f 72 |ot is not suppor|
00000060 74 65 64 2e 20 55 73 65 20 61 20 62 6f 6f 74 20 |ted. Use a boot |
00000070 6c 6f 61 64 65 72 20 70 72 6f 67 72 61 6d 20 69 |loader program i|
00000080 6e 73 74 65 61 64 2e 0d 0a 0a 52 65 6d 6f 76 65 |nstead....Remove|
00000090 20 64 69 73 6b 20 61 6e 64 20 70 72 65 73 73 20 | disk and press |
000000a0 61 6e 79 20 6b 65 79 20 74 6f 20 72 65 62 6f 6f |any key to reboo|
000000b0 74 20 2e 2e 2e 0d 0a 00 50 45 00 00 64 86 03 00 |t ......PE..d...|
000000c0 00 00 00 00 00 00 00 00 01 00 00 00 a0 00 06 02 |................|
000000d0 0b 02 02 14 20 be 91 00 00 00 00 00 00 00 00 00 |.... ...........|
000000e0 10 46 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |.F..............|
000000f0 20 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 | ... ...........|
00000100 00 00 00 00 00 00 00 00 20 c0 91 00 00 02 00 00 |........ .......|
00000110 00 00 00 00 0a 00 00 00 00 00 00 00 00 00 00 00 |................|
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000130 00 00 00 00 00 00 00 00 00 00 00 00 06 00 00 00 |................|
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000170 2e 73 65 74 75 70 00 00 e0 41 00 00 00 02 00 00 |.setup...A......|
00000180 e0 41 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |.A..............|
00000190 00 00 00 00 20 00 50 60 2e 72 65 6c 6f 63 00 00 |.... .P`.reloc..|
000001a0 20 00 00 00 e0 43 00 00 20 00 00 00 e0 43 00 00 | ....C.. ....C..|
000001b0 00 00 00 00 00 00 00 00 00 00 00 00 40 00 10 42 |............@..B|
000001c0 2e 74 65 78 74 00 00 00 20 7c 91 00 00 44 00 00 |.text... |...D..|
000001d0 20 7c 91 00 00 44 00 00 00 00 00 00 00 00 00 00 | |...D..........|
000001e0 00 00 00 00 20 00 50 60 00 00 00 00 00 00 00 00 |.... .P`........|
000001f0 00 21 01 00 c2 17 09 00 00 00 ff ff 00 00 55 aa |.!............U.|


looks we only can use [0x30,0x3c), [0x1e8, 0x1f0), but in boot_params, they
are apm_bios_info, and alt_mem_k...

so looks we still have to use setup_header instead.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/