Re: CURRENT: EFI boot failure

From: O. Hartmann <ohartman_at_zedat.fu-berlin.de>
Date: Mon, 3 Nov 2014 21:53:26 +0100
Am Tue, 23 Sep 2014 17:14:46 +0200
Dimitry Andric <dim_at_FreeBSD.org> schrieb:

> On 23 Sep 2014, at 17:00, Nathan Whitehorn <nwhitehorn_at_freebsd.org> wrote:
> > On 09/23/14 07:28, Harald Schmalzbauer wrote:
> >>  Bezüglich O. Hartmann's Nachricht vom 19.09.2014 15:22 (localtime):
> >>> …
> >>> The problem I reported about in the first place is triggered by a faulty loader.efi
> >>> that arises, when optimisation level is -O3. -O2 works fine.
> >> I can confirm that this problem also shows up when using
> >> 'CPUTYPE?=core-avx2'
> >> Setting CPUTYPE to core-avx-i doesnt ehibit the problem.
> >> 
> >> I could narrow down the cause to libefi.a (sys/boot/efi).
> >> But I don't understand the things going on there, so no clue how to fix
> >> besides maybe
> >> 
> >> --- sys/boot/efi/Makefile.inc.orig 2014-09-23 16:22:46.000000000 +0200
> >> +++ sys/boot/efi/Makefile.inc 2014-09-23 16:25:16.000000000 +0200
> >> _at__at_ -2,6 +2,10 _at__at_
> >> 
> >> BINDIR?= /boot
> >> 
> >> +.ifdef CPUTYPE
> >> +.undef CPUTYPE
> >> +.endif
> >> +
> >> .if ${MACHINE_CPUARCH} == "i386"
> >> CFLAGS+= -march=i386
> >> .endif
> > Could you try adding -mno-avx2 to /sys/boot/amd64/Makefile.inc line 9?
> > -Nathan
> 
> IMHO CPUTYPE should be ignored for any boot loader program, and the
> lowest common denominator should be used instead (i486 for 32-bit, plain
> x86_64 for 64-bit).  It makes no sense to optimize boot loaders for e.g.
> core-avx2. :-)
> 
> But indeed, it appears that we need to add more -mno-foo magic flags...
> 
> -Dimitry
> 

I repoted a bug at
Bug 194641 - [EFI] boot/loader.efi: miscompilation on Intel Haswell with AVX2 


Please feel free to comment and replenish my superficial observation.

Hopefullz, this doesn't get lost. This nasty bug on Haswell CPU bothers me all the days I
update world.

Received on Mon Nov 03 2014 - 19:53:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:53 UTC