Re: 3.12 to 3.13 boot regression bisected - still applies to 3.16

From: Bruno PrÃmont
Date: Tue Aug 05 2014 - 08:19:35 EST


On Tue, 5 Aug 2014 13:51:30 +0200 Bruno PrÃmont wrote:

> On Tue, 5 Aug 2014 10:18:48 +0100 Matt Fleming wrote:
> > On Tue, 05 Aug, at 11:13:30AM, Bruno PrÃmont wrote:
> > >
> > > I get at least to just before
> > > status = efi_call_early(exit_boot_services, handle, key);
> > > in eboot.c on line 1310. A efi_printk inserted there is displayed.
> >
> > This is worth pointing out in case you're unaware, but do you know that
> > it's not valid to call efi_printk() after ExitBootServices()? Doing so
> > will almost certainly cause your machine to fault.
>
> I am aware that efi_printk() uses boot services!
>
>
> Now I tried out loops at many places and have gotten up to line 340 in
>
> arch/x86/kernel/head_64.S

oops, bad copy&paste, should have been
arch/x86/boot/compressed/head_64.S

> System reboots within the following assembler instructions (does not
> reach line 359).
>
> So efi_main() returns successfully but the assembler code following it
> gets something wrong.
>
> I'm going to try further to determine which line between 340 and 359 is
> the "bad" one.

arch/x86/boot/compressed/head_64.S
341 /*
342 * Copy the compressed kernel to the end of our buffer
343 * where decompression in place becomes safe.
344 */
345 pushq %rsi
346 leaq (_bss-8)(%rip), %rsi
347 leaq (_bss-8)(%rbx), %rdi
348 movq $_bss /* - $startup_32 */, %rcx
349 shrq $3, %rcx
350 std

code gets up to here

351 rep movsq

this location is never reached but instead system reboots

352 cld
353 popq %rsi
354
355 /*
356 * Jump to the relocated address.
357 */



Bruno
--
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/