* OVMF not booting when built with GCC5 toolset? @ 2016-08-18 16:15 Bruce Cran 2016-08-18 16:57 ` Michael Zimmermann 0 siblings, 1 reply; 11+ messages in thread From: Bruce Cran @ 2016-08-18 16:15 UTC (permalink / raw) To: edk2-devel I just tried building OVMF from git tip with the GCC5 toolset and the emulated vga display never got initialized. Rebuilding with GCC49 worked. Bruce ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: OVMF not booting when built with GCC5 toolset? 2016-08-18 16:15 OVMF not booting when built with GCC5 toolset? Bruce Cran @ 2016-08-18 16:57 ` Michael Zimmermann 2016-08-18 16:59 ` Bruce Cran 0 siblings, 1 reply; 11+ messages in thread From: Michael Zimmermann @ 2016-08-18 16:57 UTC (permalink / raw) To: Bruce Cran; +Cc: edk2-devel-01 IA32 or X64? I noticed that EmulatorPkg-X64 just produces a segfault when booting. IA32 works just fine. I didn't try to use GCC49 yet. Thanks MIchael On Thu, Aug 18, 2016 at 6:15 PM, Bruce Cran <bruce@cran.org.uk> wrote: > I just tried building OVMF from git tip with the GCC5 toolset and the > emulated vga display never got initialized. Rebuilding with GCC49 worked. > > Bruce > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: OVMF not booting when built with GCC5 toolset? 2016-08-18 16:57 ` Michael Zimmermann @ 2016-08-18 16:59 ` Bruce Cran 2016-08-19 2:08 ` Shi, Steven 0 siblings, 1 reply; 11+ messages in thread From: Bruce Cran @ 2016-08-18 16:59 UTC (permalink / raw) To: Michael Zimmermann; +Cc: edk2-devel-01 On 8/18/2016 10:57 AM, Michael Zimmermann wrote: > IA32 or X64? I noticed that EmulatorPkg-X64 just produces a segfault > when booting. IA32 works just fine. I didn't try to use GCC49 yet. X64 - both DEBUG and RELEASE. Bruce ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: OVMF not booting when built with GCC5 toolset? 2016-08-18 16:59 ` Bruce Cran @ 2016-08-19 2:08 ` Shi, Steven 2016-08-19 14:35 ` Bruce Cran 0 siblings, 1 reply; 11+ messages in thread From: Shi, Steven @ 2016-08-19 2:08 UTC (permalink / raw) To: Bruce Cran, Michael Zimmermann; +Cc: edk2-devel-01 Hi Cran, I build OVMF GCC X64 image, can boot Qemu into shell with below commands. I can enter shell, reconnect -r, exit to setup, and the vga display looks good to me. What build command did you use? build -t GCC5 -a X64 -p OvmfPkg/OvmfPkgX64.dsc -n 5 -b DEBUG -DDEBUG_ON_SERIAL_PORT qemu-system-x86_64 -bios OVMF.fd -serial file:serial.log -m 4096 -hda fat:. -monitor stdio -s Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522 > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Bruce Cran > Sent: Friday, August 19, 2016 12:59 AM > To: Michael Zimmermann <sigmaepsilon92@gmail.com> > Cc: edk2-devel-01 <edk2-devel@lists.01.org> > Subject: Re: [edk2] OVMF not booting when built with GCC5 toolset? > > On 8/18/2016 10:57 AM, Michael Zimmermann wrote: > > IA32 or X64? I noticed that EmulatorPkg-X64 just produces a segfault > > when booting. IA32 works just fine. I didn't try to use GCC49 yet. > > X64 - both DEBUG and RELEASE. > > Bruce > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: OVMF not booting when built with GCC5 toolset? 2016-08-19 2:08 ` Shi, Steven @ 2016-08-19 14:35 ` Bruce Cran 2016-08-19 14:46 ` Bruce Cran 0 siblings, 1 reply; 11+ messages in thread From: Bruce Cran @ 2016-08-19 14:35 UTC (permalink / raw) To: Shi, Steven, Michael Zimmermann; +Cc: edk2-devel-01 On 8/18/2016 8:08 PM, Shi, Steven wrote: > I build OVMF GCC X64 image, can boot Qemu into shell with below commands. I can enter shell, reconnect -r, exit to setup, and the vga display looks good to me. What build command did you use? > > build -t GCC5 -a X64 -p OvmfPkg/OvmfPkgX64.dsc -n 5 -b DEBUG -DDEBUG_ON_SERIAL_PORT > qemu-system-x86_64 -bios OVMF.fd -serial file:serial.log -m 4096 -hda fat:. -monitor stdio -s When I built and ran it using the same commands (with the exception of adding "-vnc :0" to the qemu cmdline) I got the same problem as before, and serial.log contained just: SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78 The version of gcc I'm using is: gcc version 6.1.1 20160707 [gcc-6-branch revision 238088] (SUSE Linux) -- Bruce ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: OVMF not booting when built with GCC5 toolset? 2016-08-19 14:35 ` Bruce Cran @ 2016-08-19 14:46 ` Bruce Cran 2016-08-22 6:50 ` Shi, Steven 0 siblings, 1 reply; 11+ messages in thread From: Bruce Cran @ 2016-08-19 14:46 UTC (permalink / raw) To: Shi, Steven, Michael Zimmermann; +Cc: edk2-devel-01 On 8/19/2016 8:35 AM, Bruce Cran wrote: > When I built and ran it using the same commands (with the exception of > adding "-vnc :0" to the qemu cmdline) I got the same problem as > before, and serial.log contained just: > > SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C78 > Sorry, I'd added -O0 to the debug build flags to let me better debug code. With that removed, I now get the following in serial.log: SecCoreStartupWithStack(0x0, 0x0) Register PPI Notify: <null guid> Install PPI: <null guid> Install PPI: <null guid> The 8519680th FV start address is 0x00000810248, size is 0xFFFD13C4, handle is 0x827F01 Register PPI Notify: <null guid> Register PPI Notify: <null guid> Install PPI: <null guid> Install PPI: <null guid> Loading PEIM at 0x00000000000 EntryPoint=0x00000000000 <null string> SecCoreStartupWithStack(0xFFFFFFFF, 0xAE569B3A) Register PPI Notify: <null guid> SecCoreStartupWithStack(0xFFFFFFFF, 0xAE569B3A) Register PPI Notify: <null guid> SecCoreStartupWithStack(0xFFFFFFFF, 0xAE569B3A) Register PPI Notify: <null guid> SecCoreStartupWithStack(0xFFFFFFFF, 0xAE569B3A) Register PPI Notify: <null guid> SecCoreStartupWithStack(0xFFFFFFFF, 0xAE569B3A) Register PPI Notify: <null guid> Those last 2 lines repeat about 100 times. -- Bruce ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: OVMF not booting when built with GCC5 toolset? 2016-08-19 14:46 ` Bruce Cran @ 2016-08-22 6:50 ` Shi, Steven 2016-08-23 8:10 ` Shi, Steven 2016-08-23 10:49 ` Shi, Steven 0 siblings, 2 replies; 11+ messages in thread From: Shi, Steven @ 2016-08-22 6:50 UTC (permalink / raw) To: Bruce Cran, Michael Zimmermann; +Cc: edk2-devel-01 Hi Cran, OK. I can reproduce your build failure with GCC 6.1.0. We will take a look at it. Thank you report it. Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522 > -----Original Message----- > From: Bruce Cran [mailto:bruce@cran.org.uk] > Sent: Friday, August 19, 2016 10:47 PM > To: Shi, Steven <steven.shi@intel.com>; Michael Zimmermann > <sigmaepsilon92@gmail.com> > Cc: edk2-devel-01 <edk2-devel@lists.01.org> > Subject: Re: [edk2] OVMF not booting when built with GCC5 toolset? > > On 8/19/2016 8:35 AM, Bruce Cran wrote: > > When I built and ran it using the same commands (with the exception of > > adding "-vnc :0" to the qemu cmdline) I got the same problem as > > before, and serial.log contained just: > > > > > SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C7 > 8SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202C > 78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30202 > C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x3020 > 2C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x302 > 02C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x30 > 202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x3 > 0202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0x > 30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack(0 > x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack( > 0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStack > (0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithStac > k(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithSta > ck(0x30202C78SecCoreStartupWithStack(0x30202C78SecCoreStartupWithSt > ack(0x30202C78SecCoreStartupWithStack(0x30202C78 > > > > Sorry, I'd added -O0 to the debug build flags to let me better debug > code. With that removed, I now get the following in serial.log: > > SecCoreStartupWithStack(0x0, 0x0) > Register PPI Notify: <null guid> > Install PPI: <null guid> > Install PPI: <null guid> > The 8519680th FV start address is 0x00000810248, size is 0xFFFD13C4, > handle is 0x827F01 > Register PPI Notify: <null guid> > Register PPI Notify: <null guid> > Install PPI: <null guid> > Install PPI: <null guid> > Loading PEIM at 0x00000000000 EntryPoint=0x00000000000 <null string> > SecCoreStartupWithStack(0xFFFFFFFF, 0xAE569B3A) > Register PPI Notify: <null guid> > SecCoreStartupWithStack(0xFFFFFFFF, 0xAE569B3A) > Register PPI Notify: <null guid> > SecCoreStartupWithStack(0xFFFFFFFF, 0xAE569B3A) > Register PPI Notify: <null guid> > SecCoreStartupWithStack(0xFFFFFFFF, 0xAE569B3A) > Register PPI Notify: <null guid> > SecCoreStartupWithStack(0xFFFFFFFF, 0xAE569B3A) > Register PPI Notify: <null guid> > > Those last 2 lines repeat about 100 times. > > -- > Bruce ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: OVMF not booting when built with GCC5 toolset? 2016-08-22 6:50 ` Shi, Steven @ 2016-08-23 8:10 ` Shi, Steven 2016-08-23 10:49 ` Shi, Steven 1 sibling, 0 replies; 11+ messages in thread From: Shi, Steven @ 2016-08-23 8:10 UTC (permalink / raw) To: 'Bruce Cran', 'Michael Zimmermann' Cc: 'edk2-devel-01' Hi Cran, This issue might be a GCC6 LTO regression bug, and I've filed a bug to GCC community as below. Please don't use the GCC6 with edk2 GCC5 toolchain for now, the GCC5 (gcc-5) should works. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77341 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50818 GCC6.10 lto fails to support below MS ABI buildin of va list, but GCC5 works. This is a regression bug for GCC6. I suspect current GCC trunk also has this regression bug. __builtin_ms_va_list ap; __builtin_ms_va_start (ap, n); __builtin_ms_va_end (ap); Below is my testcase: $cat test2.c #include <stdio.h> int __attribute__((ms_abi)) foo (int n, ...) { __builtin_ms_va_list ap; int sum = 0; __builtin_ms_va_start (ap, n); while (n--) { sum += __builtin_va_arg (ap, int); printf("sum = %d\n", sum); } __builtin_ms_va_end (ap); return sum; } int main () { int res = foo (10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); if (res != 55) __builtin_abort (); return 0; } $ gcc --version gcc (GCC) 6.1.0 $ gcc -flto -Os test2.c $ ./a.out Segmentation fault (core dumped) $ gcc-5 -flto -Os test2.c $ ./a.out sum = 1 sum = 3 sum = 6 sum = 10 sum = 15 sum = 21 sum = 28 sum = 36 sum = 45 sum = 55 Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: OVMF not booting when built with GCC5 toolset? 2016-08-22 6:50 ` Shi, Steven 2016-08-23 8:10 ` Shi, Steven @ 2016-08-23 10:49 ` Shi, Steven 2016-08-29 6:45 ` Shi, Steven 1 sibling, 1 reply; 11+ messages in thread From: Shi, Steven @ 2016-08-23 10:49 UTC (permalink / raw) To: 'Bruce Cran', 'Michael Zimmermann' Cc: 'edk2-devel-01', Lu, Hongjiu It's confirmed it is a GCC6 regression bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70955 Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522 From: Shi, Steven Sent: Tuesday, August 23, 2016 4:10 PM To: 'Bruce Cran' <bruce@cran.org.uk>; 'Michael Zimmermann' <sigmaepsilon92@gmail.com> Cc: 'edk2-devel-01' <edk2-devel@lists.01.org> Subject: RE: [edk2] OVMF not booting when built with GCC5 toolset? Hi Cran, This issue might be a GCC6 LTO regression bug, and I've filed a bug to GCC community as below. Please don't use the GCC6 with edk2 GCC5 toolchain for now, the GCC5 (gcc-5) should works. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77341 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50818 GCC6.10 lto fails to support below MS ABI buildin of va list, but GCC5 works. This is a regression bug for GCC6. I suspect current GCC trunk also has this regression bug. __builtin_ms_va_list ap; __builtin_ms_va_start (ap, n); __builtin_ms_va_end (ap); Below is my testcase: $cat test2.c #include <stdio.h> int __attribute__((ms_abi)) foo (int n, ...) { __builtin_ms_va_list ap; int sum = 0; __builtin_ms_va_start (ap, n); while (n--) { sum += __builtin_va_arg (ap, int); printf("sum = %d\n", sum); } __builtin_ms_va_end (ap); return sum; } int main () { int res = foo (10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); if (res != 55) __builtin_abort (); return 0; } $ gcc --version gcc (GCC) 6.1.0 $ gcc -flto -Os test2.c $ ./a.out Segmentation fault (core dumped) $ gcc-5 -flto -Os test2.c $ ./a.out sum = 1 sum = 3 sum = 6 sum = 10 sum = 15 sum = 21 sum = 28 sum = 36 sum = 45 sum = 55 Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: OVMF not booting when built with GCC5 toolset? 2016-08-23 10:49 ` Shi, Steven @ 2016-08-29 6:45 ` Shi, Steven 2016-08-29 16:53 ` Bruce Cran 0 siblings, 1 reply; 11+ messages in thread From: Shi, Steven @ 2016-08-29 6:45 UTC (permalink / raw) To: 'Bruce Cran', 'Michael Zimmermann' Cc: 'edk2-devel-01', Lu, Hongjiu Hi Cran, This issue is just fixed in GCC main trunk. I tried below latest GCC trunk version and it can pass build the edk2 with GCC5 toolset. FYI. $ gcc --version gcc (GCC) 7.0.0 20160828 (experimental) Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522 From: Shi, Steven Sent: Tuesday, August 23, 2016 6:49 PM To: 'Bruce Cran' <bruce@cran.org.uk>; 'Michael Zimmermann' <sigmaepsilon92@gmail.com> Cc: 'edk2-devel-01' <edk2-devel@lists.01.org>; Lu, Hongjiu <hongjiu.lu@intel.com> Subject: RE: [edk2] OVMF not booting when built with GCC5 toolset? It's confirmed it is a GCC6 regression bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70955 Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522 From: Shi, Steven Sent: Tuesday, August 23, 2016 4:10 PM To: 'Bruce Cran' <bruce@cran.org.uk<mailto:bruce@cran.org.uk>>; 'Michael Zimmermann' <sigmaepsilon92@gmail.com<mailto:sigmaepsilon92@gmail.com>> Cc: 'edk2-devel-01' <edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>> Subject: RE: [edk2] OVMF not booting when built with GCC5 toolset? Hi Cran, This issue might be a GCC6 LTO regression bug, and I've filed a bug to GCC community as below. Please don't use the GCC6 with edk2 GCC5 toolchain for now, the GCC5 (gcc-5) should works. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77341 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50818 GCC6.10 lto fails to support below MS ABI buildin of va list, but GCC5 works. This is a regression bug for GCC6. I suspect current GCC trunk also has this regression bug. __builtin_ms_va_list ap; __builtin_ms_va_start (ap, n); __builtin_ms_va_end (ap); Below is my testcase: $cat test2.c #include <stdio.h> int __attribute__((ms_abi)) foo (int n, ...) { __builtin_ms_va_list ap; int sum = 0; __builtin_ms_va_start (ap, n); while (n--) { sum += __builtin_va_arg (ap, int); printf("sum = %d\n", sum); } __builtin_ms_va_end (ap); return sum; } int main () { int res = foo (10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); if (res != 55) __builtin_abort (); return 0; } $ gcc --version gcc (GCC) 6.1.0 $ gcc -flto -Os test2.c $ ./a.out Segmentation fault (core dumped) $ gcc-5 -flto -Os test2.c $ ./a.out sum = 1 sum = 3 sum = 6 sum = 10 sum = 15 sum = 21 sum = 28 sum = 36 sum = 45 sum = 55 Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: OVMF not booting when built with GCC5 toolset? 2016-08-29 6:45 ` Shi, Steven @ 2016-08-29 16:53 ` Bruce Cran 0 siblings, 0 replies; 11+ messages in thread From: Bruce Cran @ 2016-08-29 16:53 UTC (permalink / raw) To: Shi, Steven, 'Michael Zimmermann' Cc: 'edk2-devel-01', Lu, Hongjiu On 8/29/2016 12:45 AM, Shi, Steven wrote: > This issue is just fixed in GCC main trunk. I tried below latest GCC trunk version and it can pass build the edk2 with GCC5 toolset. FYI. Thanks! -- Bruce ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-08-29 16:53 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-08-18 16:15 OVMF not booting when built with GCC5 toolset? Bruce Cran 2016-08-18 16:57 ` Michael Zimmermann 2016-08-18 16:59 ` Bruce Cran 2016-08-19 2:08 ` Shi, Steven 2016-08-19 14:35 ` Bruce Cran 2016-08-19 14:46 ` Bruce Cran 2016-08-22 6:50 ` Shi, Steven 2016-08-23 8:10 ` Shi, Steven 2016-08-23 10:49 ` Shi, Steven 2016-08-29 6:45 ` Shi, Steven 2016-08-29 16:53 ` Bruce Cran
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox