Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-06-01 Thread Timo Lindfors
On Mon, 1 Jun 2020, Timo Lindfors wrote: tboot prints "TBOOT: this routine only prints out multiboot 2" and never enters the else block where the printk()s are... This gave me a hint: Using multiboot2/module2 seems to work with cold boot. This might not mean anything of course if the issue

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-06-01 Thread Lukasz Hawrylko
On Mon, 2020-06-01 at 01:27 +0300, Timo Lindfors wrote: > On Mon, 1 Jun 2020, Timo Lindfors wrote: > > printk(TBOOT_INFO"start=%p tag_type=%d start->type=%d start->size=%d\n", > > start, > > tag_type, > > start->type, > > start->size); > > On warm boot this prints just >

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-05-31 Thread Timo Lindfors
On Mon, 1 Jun 2020, Timo Lindfors wrote: printk(TBOOT_INFO"start=%p tag_type=%d start->type=%d start->size=%d\n", start, tag_type, start->type, start->size); On warm boot this prints just TBOOT: start=0x0x10008 tag_type=17 start->type=3031684 start->size=-2147418113

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-05-31 Thread Timo Lindfors
On Fri, 29 May 2020, Lukasz Hawrylko wrote: On Fri, 2020-05-29 at 12:36 +0300, Timo Lindfors wrote: I see "Failed to get EFI memory map" message, did you configure BIOS to use legacy boot? "set debug=mmap" should enable EFI memory map print in grub_efi_mmap_iterate(), but this does not work when

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-05-29 Thread Lukasz Hawrylko
On Fri, 2020-05-29 at 12:36 +0300, Timo Lindfors wrote: > On Thu, 28 May 2020, Timo Lindfors wrote: > > > If you don't see this dump in failing scenario please add > > > "set debug=mmap" to grub.cfg, now GRUB should print that. > > > > I added this after the serial console setup but this does not

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-05-29 Thread Timo Lindfors
On Thu, 28 May 2020, Timo Lindfors wrote: If you don't see this dump in failing scenario please add "set debug=mmap" to grub.cfg, now GRUB should print that. I added this after the serial console setup but this does not seem to print anything? I also cannot find it in the grub2 source code.

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-05-28 Thread Timo Lindfors
On Thu, 28 May 2020, Lukasz Hawrylko wrote: I understand that still you have the same behaviour - cold boot failing, reboot after Linux working, correct? Please add "dump_memmap=true" to TBOOT's command line it should enable dumping of EFI memory map. Correct. Unfortunately dump_memmap=true

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-05-28 Thread Lukasz Hawrylko
Hi Tomo On Thu, 2020-05-28 at 02:22 +0300, Timo Lindfors wrote: > Hi, > > On Mon, 25 May 2020, Timo Lindfors wrote: > > I only see the "original e820 map:" listing. I'm trying to get serial > > console > > to make this easier to debug and to compare how warm-boot and cold-boot > > differs

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-05-27 Thread Timo Lindfors
Hi, On Mon, 25 May 2020, Timo Lindfors wrote: I only see the "original e820 map:" listing. I'm trying to get serial console to make this easier to debug and to compare how warm-boot and cold-boot differs without having to compare photos from the screen. I bought a second-hand Thinkpad R400

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-05-25 Thread Timo Lindfors
On Mon, 25 May 2020, Lukasz Hawrylko wrote: That is a really strange behaviour. I have just build tip from mercurial and run it on TPM1.2 and TPM2.0 PCs - it works (cold-booted too). Can you please share me more informations about your test case? Do you see anything on the screen? I only see

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-05-25 Thread Lukasz Hawrylko
Hi Timo On Sun, 2020-05-24 at 19:15 +0300, Timo Lindfors wrote: > Hi, > > On Sat, 23 May 2020, Timo Lindfors wrote: > > boot on Lenovo T430s when I boot the latest code from mercurial. 1.9.12 > > seems > > to boot ok. Commenting out "export CFLAGS" seems to help. How should > > I debug this? >

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-05-24 Thread Timo Lindfors
Hi, On Sat, 23 May 2020, Timo Lindfors wrote: boot on Lenovo T430s when I boot the latest code from mercurial. 1.9.12 seems to boot ok. Commenting out "export CFLAGS" seems to help. How should I debug this? Currently it seems that tboot actually only boots properly if I first boot Linux and

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-05-23 Thread Timo Lindfors
Hi, On Tue, 12 May 2020, Timo Lindfors wrote: On Tue, 12 May 2020, Lukasz Hawrylko wrote: Thanks for investigating that issue. Fixed in a6180f9e9e86 Thanks, seems to build now. I said this perhaps bit too soon. I am experiencing tboot getting stuck at boot on Lenovo T430s when I boot the

Re: [tboot-devel] tboot 1.9.12 build failure if CFLAGS is set in environment

2020-05-12 Thread Lukasz Hawrylko
On Sat, 2020-05-09 at 00:55 +0300, Timo Lindfors wrote: > Hi, > > I get the following build failure on debian unstable with GCC 9.3.0: > > tar xf tboot-1.9.12.tar.gz > cd tboot-1.9.12/ > env CFLAGS="-g" make > ... > cc -z noexecstack -z relo -z now -c -o obj/mem_primitives_lib.o >