Re: [SeaBIOS] [PATCH v5 0/4] support booting more than 255 CPUs with QEMU
On Tue, Oct 25, 2016 at 12:44:35PM +0200, Igor Mammedov wrote: > On Tue, 18 Oct 2016 19:13:29 -0400 > "Kevin O'Connor"wrote: > > > On Thu, Oct 13, 2016 at 02:38:24PM +0200, Igor Mammedov wrote: > > [...] > > > According to SDM, if CPUs have APIC ID more than 254 > > > firmware should pass control to OS in x2APIC mode. > > > This series adds x2APIC bootstrap initialization. > > > > Thanks. Looks good to me - just waiting on QEMU side. > QEMU side has been merged > > commit 080ac219cc7d9c55adf925c3545b7450055ad625 > pc: Add 'etc/boot-cpus' fw_cfg file for machine with more than 255 CPUs Thanks. I committed this series. I plan on releasing SeaBIOS v1.10 tomorrow. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://www.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] build: Be sure to also include out/*.d in Makefile
On Fri, Oct 21, 2016 at 12:06:28PM -0400, Kevin O'Connor wrote: > Signed-off-by: Kevin O'Connor> --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 41bfcf4..1916ecf 100644 > --- a/Makefile > +++ b/Makefile > @@ -281,4 +281,4 @@ clean: > distclean: clean > $(Q)rm -f .config .config.old > > --include $(patsubst %,$(OUT)%/*.d,$(DIRS)) > +-include $(OUT)*.d $(patsubst %,$(OUT)%/*.d,$(DIRS)) FYI, I committed this patch. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://www.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH v5 0/4] support booting more than 255 CPUs with QEMU
On Tue, 18 Oct 2016 19:13:29 -0400 "Kevin O'Connor"wrote: > On Thu, Oct 13, 2016 at 02:38:24PM +0200, Igor Mammedov wrote: > [...] > > According to SDM, if CPUs have APIC ID more than 254 > > firmware should pass control to OS in x2APIC mode. > > This series adds x2APIC bootstrap initialization. > > Thanks. Looks good to me - just waiting on QEMU side. QEMU side has been merged commit 080ac219cc7d9c55adf925c3545b7450055ad625 pc: Add 'etc/boot-cpus' fw_cfg file for machine with more than 255 CPUs > > -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://www.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Makefile: Explicitly pass `no-pic` to compiler
Dear Kevin, On 10/25/16 17:27, Paul Menzel wrote: On 10/25/16 17:21, Kevin O'Connor wrote: On Sun, Oct 23, 2016 at 08:57:28PM +0200, Paul Menzel wrote: Date: Sun, 23 Oct 2016 18:56:28 +0200 Debian enables PIE hardening flags by default since package gcc-6 6.2.0-7 [1]. With that change, SeaBIOS fails to build with the error below [2][3]. ``` $ make Build Kconfig config file Compile checking out/src/misc.o Compile checking out/src/stacks.o src/stacks.c: Assembler messages: src/stacks.c:567: Error: found '(', expected: ')' src/stacks.c:567: Error: junk `(%ebp))' after expression src/stacks.c:568: Warning: indirect call without `*' Makefile:133: die Regel für Ziel „out/src/stacks.o“ scheiterte make: *** [out/src/stacks.o] Fehler 1 ``` I just built and compiled gcc v6.2.0 and it compiles seabios fine. So, this looks like a debian bug, and I think it should be filed there. Yes, that’s exactly what I wrote. Debian decided to enable PIE hardening flags by default in the GCC package. Passing `no-pic` to the compiler fixes this issue. I don't see where pic (position independent code) is related. My guess is that it just causes random code changes which then doesn't tickle the underlying issue. Does adding '-fno-pie' help? Isn’t that already used due to `COMMONCFLAGS += $(call cc-option,$(CC),-nopie,)` in the `Makefile`? I’ll try it anyway. That also worked. Should I sent an updated patch? Kind regards, Paul ___ SeaBIOS mailing list SeaBIOS@seabios.org https://www.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Makefile: Explicitly pass `no-pic` to compiler
Dear Kevin, On 10/25/16 18:14, Kevin O'Connor wrote: On Tue, Oct 25, 2016 at 06:08:08PM +0200, Paul Menzel wrote: On 10/25/16 17:27, Paul Menzel wrote: On 10/25/16 17:21, Kevin O'Connor wrote: Does adding '-fno-pie' help? Isn’t that already used due to `COMMONCFLAGS += $(call cc-option,$(CC),-nopie,)` in the `Makefile`? I’ll try it anyway. That also worked. Should I sent an updated patch? Does the patch below work? -Kevin commit 589fe2803b110014a84dee2056f1e2fec744d2e6 Author: Kevin O'ConnorDate: Tue Oct 25 12:09:41 2016 -0400 build: Add -fno-pie to the gcc flags when available Signed-off-by: Kevin O'Connor diff --git a/Makefile b/Makefile index 1916ecf..3b94ee0 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,7 @@ COMMONCFLAGS := -I$(OUT) -Isrc -Os -MD -g \ -freg-struct-return -ffreestanding -fno-delete-null-pointer-checks \ -ffunction-sections -fdata-sections -fno-common -fno-merge-constants COMMONCFLAGS += $(call cc-option,$(CC),-nopie,) +COMMONCFLAGS += $(call cc-option,$(CC),-fno-pie,) COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,) COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,) COMMONCFLAGS += $(call cc-option,$(CC),-fstack-check=no,) Yes, I was just about to send that. Do you know, why SeaBIOS won’t build without it? Kind regards, Paul ___ SeaBIOS mailing list SeaBIOS@seabios.org https://www.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Makefile: Explicitly pass `no-pic` to compiler
On Tue, Oct 25, 2016 at 06:08:08PM +0200, Paul Menzel wrote: > On 10/25/16 17:27, Paul Menzel wrote: > > On 10/25/16 17:21, Kevin O'Connor wrote: > > > Does adding '-fno-pie' help? > > > > Isn’t that already used due to `COMMONCFLAGS += $(call > > cc-option,$(CC),-nopie,)` in the `Makefile`? > > > > I’ll try it anyway. > > That also worked. Should I sent an updated patch? Does the patch below work? -Kevin commit 589fe2803b110014a84dee2056f1e2fec744d2e6 Author: Kevin O'ConnorDate: Tue Oct 25 12:09:41 2016 -0400 build: Add -fno-pie to the gcc flags when available Signed-off-by: Kevin O'Connor diff --git a/Makefile b/Makefile index 1916ecf..3b94ee0 100644 --- a/Makefile +++ b/Makefile @@ -63,6 +63,7 @@ COMMONCFLAGS := -I$(OUT) -Isrc -Os -MD -g \ -freg-struct-return -ffreestanding -fno-delete-null-pointer-checks \ -ffunction-sections -fdata-sections -fno-common -fno-merge-constants COMMONCFLAGS += $(call cc-option,$(CC),-nopie,) +COMMONCFLAGS += $(call cc-option,$(CC),-fno-pie,) COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,) COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,) COMMONCFLAGS += $(call cc-option,$(CC),-fstack-check=no,) ___ SeaBIOS mailing list SeaBIOS@seabios.org https://www.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Makefile: Explicitly pass `no-pic` to compiler
Dear Kevin, On 10/25/16 17:21, Kevin O'Connor wrote: On Sun, Oct 23, 2016 at 08:57:28PM +0200, Paul Menzel wrote: Date: Sun, 23 Oct 2016 18:56:28 +0200 Debian enables PIE hardening flags by default since package gcc-6 6.2.0-7 [1]. With that change, SeaBIOS fails to build with the error below [2][3]. ``` $ make Build Kconfig config file Compile checking out/src/misc.o Compile checking out/src/stacks.o src/stacks.c: Assembler messages: src/stacks.c:567: Error: found '(', expected: ')' src/stacks.c:567: Error: junk `(%ebp))' after expression src/stacks.c:568: Warning: indirect call without `*' Makefile:133: die Regel für Ziel „out/src/stacks.o“ scheiterte make: *** [out/src/stacks.o] Fehler 1 ``` I just built and compiled gcc v6.2.0 and it compiles seabios fine. So, this looks like a debian bug, and I think it should be filed there. Yes, that’s exactly what I wrote. Debian decided to enable PIE hardening flags by default in the GCC package. Passing `no-pic` to the compiler fixes this issue. I don't see where pic (position independent code) is related. My guess is that it just causes random code changes which then doesn't tickle the underlying issue. Does adding '-fno-pie' help? Isn’t that already used due to `COMMONCFLAGS += $(call cc-option,$(CC),-nopie,)` in the `Makefile`? I’ll try it anyway. Thanks, Paul ___ SeaBIOS mailing list SeaBIOS@seabios.org https://www.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Makefile: Explicitly pass `no-pic` to compiler
On Sun, Oct 23, 2016 at 08:57:28PM +0200, Paul Menzel wrote: > Date: Sun, 23 Oct 2016 18:56:28 +0200 > > Debian enables PIE hardening flags by default since package gcc-6 > 6.2.0-7 [1]. > > With that change, SeaBIOS fails to build with the error below [2][3]. > > ``` > $ make > Build Kconfig config file > Compile checking out/src/misc.o > Compile checking out/src/stacks.o > src/stacks.c: Assembler messages: > src/stacks.c:567: Error: found '(', expected: ')' > src/stacks.c:567: Error: junk `(%ebp))' after expression > src/stacks.c:568: Warning: indirect call without `*' > Makefile:133: die Regel für Ziel „out/src/stacks.o“ scheiterte > make: *** [out/src/stacks.o] Fehler 1 > ``` I just built and compiled gcc v6.2.0 and it compiles seabios fine. So, this looks like a debian bug, and I think it should be filed there. > Passing `no-pic` to the compiler fixes this issue. I don't see where pic (position independent code) is related. My guess is that it just causes random code changes which then doesn't tickle the underlying issue. Does adding '-fno-pie' help? -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://www.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Makefile: Explicitly pass `no-pic` to compiler
25.10.2016 19:14, Kevin O'Connor wrote: > On Tue, Oct 25, 2016 at 06:08:08PM +0200, Paul Menzel wrote: > > Does the patch below work? > index 1916ecf..3b94ee0 100644 > --- a/Makefile > +++ b/Makefile > @@ -63,6 +63,7 @@ COMMONCFLAGS := -I$(OUT) -Isrc -Os -MD -g \ > -freg-struct-return -ffreestanding -fno-delete-null-pointer-checks \ > -ffunction-sections -fdata-sections -fno-common -fno-merge-constants > COMMONCFLAGS += $(call cc-option,$(CC),-nopie,) > +COMMONCFLAGS += $(call cc-option,$(CC),-fno-pie,) Hm. Are there really two different options? Maybe the first is just a spelling mistake? Thanks, /mjt ___ SeaBIOS mailing list SeaBIOS@seabios.org https://www.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Makefile: Explicitly pass `no-pic` to compiler
On Tue, Oct 25, 2016 at 08:04:34PM +0300, Michael Tokarev wrote: > 25.10.2016 19:14, Kevin O'Connor wrote: > > On Tue, Oct 25, 2016 at 06:08:08PM +0200, Paul Menzel wrote: > > > > Does the patch below work? > > > index 1916ecf..3b94ee0 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -63,6 +63,7 @@ COMMONCFLAGS := -I$(OUT) -Isrc -Os -MD -g \ > > -freg-struct-return -ffreestanding -fno-delete-null-pointer-checks \ > > -ffunction-sections -fdata-sections -fno-common -fno-merge-constants > > COMMONCFLAGS += $(call cc-option,$(CC),-nopie,) > > +COMMONCFLAGS += $(call cc-option,$(CC),-fno-pie,) > > Hm. Are there really two different options? > Maybe the first is just a spelling mistake? The first was some ancient distribution that introduced its own custom flag. It should probably be removed in some future release. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://www.coreboot.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Makefile: Explicitly pass `no-pic` to compiler
On Tue, Oct 25, 2016 at 06:20:46PM +0200, Paul Menzel wrote: > On 10/25/16 18:14, Kevin O'Connor wrote: > > On Tue, Oct 25, 2016 at 06:08:08PM +0200, Paul Menzel wrote: > > > On 10/25/16 17:27, Paul Menzel wrote: > > > > On 10/25/16 17:21, Kevin O'Connor wrote: > > > > > Does adding '-fno-pie' help? > > > > > > > > Isn’t that already used due to `COMMONCFLAGS += $(call > > > > cc-option,$(CC),-nopie,)` in the `Makefile`? > > > > > > > > I’ll try it anyway. > > > > > > That also worked. Should I sent an updated patch? > > > > Does the patch below work? > > Yes, I was just about to send that. > > Do you know, why SeaBIOS won’t build without it? > I don't know the specifics, but in general the ASLR (address space layout randomization) stuff assumes specific OS properties that aren't valid when running on bare metal. They certainly aren't going to work when the processor is in 16bit mode. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org https://www.coreboot.org/mailman/listinfo/seabios