diff options
author | Sooyoung Ha <yoosah.ha@samsung.com> | 2015-10-14 12:59:46 +0900 |
---|---|---|
committer | SeokYeon Hwang <syeon.hwang@samsung.com> | 2015-10-14 14:58:21 +0900 |
commit | f83e3cad2d8df980d3c4dc58475e1bafef0c49cc (patch) | |
tree | 18966ea681de43b0dac7f536f8152d3788b42f66 /pc-bios | |
parent | a12e18a34b0cbecdf2fb41642090dc429523840a (diff) | |
download | qemu-f83e3cad2d8df980d3c4dc58475e1bafef0c49cc.tar.gz qemu-f83e3cad2d8df980d3c4dc58475e1bafef0c49cc.tar.bz2 qemu-f83e3cad2d8df980d3c4dc58475e1bafef0c49cc.zip |
Revert "linuxboot: fix loading old kernels"
This reverts commit 269e2358492b674c50160553d037702e916b9f1b.
This commit occured a kernel loading failure on windows with haxm. I am
not sure which code causes this but tizen emulator would work well if I
revert this commit, so I do for now.
Change-Id: Ib622a106fdf5075956cf5cbd3199db27828e1887
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
Diffstat (limited to 'pc-bios')
-rw-r--r-- | pc-bios/linuxboot.bin | bin | 1024 -> 1024 bytes | |||
-rw-r--r-- | pc-bios/optionrom/linuxboot.S | 37 |
2 files changed, 10 insertions, 27 deletions
diff --git a/pc-bios/linuxboot.bin b/pc-bios/linuxboot.bin Binary files differindex 923d1796fb..130103fb73 100644 --- a/pc-bios/linuxboot.bin +++ b/pc-bios/linuxboot.bin diff --git a/pc-bios/optionrom/linuxboot.S b/pc-bios/optionrom/linuxboot.S index ba821ab922..5bc0af08e0 100644 --- a/pc-bios/optionrom/linuxboot.S +++ b/pc-bios/optionrom/linuxboot.S @@ -76,31 +76,7 @@ boot_kernel: copy_kernel: - /* Read info block in low memory (0x10000 or 0x90000) */ - read_fw FW_CFG_SETUP_ADDR - shr $4, %eax - mov %eax, %es - xor %edi, %edi - read_fw_blob_addr32_edi(FW_CFG_SETUP) - - cmpw $0x203, %es:0x206 // if protocol >= 0x203 - jae 1f // have initrd_max - movl $0x37ffffff, %es:0x22c // else assume 0x37ffffff -1: - - /* Check if using kernel-specified initrd address */ - read_fw FW_CFG_INITRD_ADDR - mov %eax, %edi // (load_kernel wants it in %edi) - read_fw FW_CFG_INITRD_SIZE // find end of initrd - add %edi, %eax - xor %es:0x22c, %eax // if it matches es:0x22c - and $-4096, %eax // (apart from padding for page) - jz load_kernel // then initrd is not at top - // of memory - - /* pc.c placed the initrd at end of memory. Compute a better - * initrd address based on e801 data. - */ + /* Compute initrd address */ mov $0xe801, %ax xor %cx, %cx xor %dx, %dx @@ -131,9 +107,7 @@ copy_kernel: read_fw FW_CFG_INITRD_SIZE subl %eax, %edi andl $-4096, %edi /* EDI = start of initrd */ - movl %edi, %es:0x218 /* put it in the header */ -load_kernel: /* We need to load the kernel into memory we can't access in 16 bit mode, so let's get into 32 bit mode, write the kernel and jump back again. */ @@ -165,10 +139,19 @@ load_kernel: /* We're now running in 16-bit CS, but 32-bit ES! */ /* Load kernel and initrd */ + pushl %edi read_fw_blob_addr32_edi(FW_CFG_INITRD) read_fw_blob_addr32(FW_CFG_KERNEL) read_fw_blob_addr32(FW_CFG_CMDLINE) + read_fw FW_CFG_SETUP_ADDR + mov %eax, %edi + mov %eax, %ebx + read_fw_blob_addr32_edi(FW_CFG_SETUP) + + /* Update the header with the initrd address we chose above */ + popl %es:0x218(%ebx) + /* And now jump into Linux! */ mov $0, %eax mov %eax, %cr0 |