On 10 Mar 2018, at 23:46, Martin Lucina wrote: > On Friday, 09.03.2018 at 18:45, Fabian Freyer wrote: >> On 6 Mar 2018, at 7:45, Fabian Freyer wrote: >>> I’m not sure where to go from here. Is this a bug in bhyve(4), should these >>> values be initialised somehow, or should I patch rumpkernel(7) to skip this >>> check >>> when running on bhyve(4)? > > You probably want to use a serial console rather than VGA on bhyve in any > case, so you'll want to add the appropriate checks to hypervisor.c and > cons.c.
I’ve started on a patch, but the check should fail if bios_crtc_base is unset anyways. >> A build on Linux (which boots fine) shows [bios_com1_base, bios_crtc_base] >> not to >> be uninitialised: >> 00000000003e3480 g O .bss 0000000000000002 bios_com1_base >> 00000000003e44a0 g O .bss 0000000000000002 bios_crtc_base > > When you write "which boots fine", I presume you're referring to booting on > bhyve? Yes. The rumprun kernel built on Linux boots fine (including serial output by default on Linux. The one built on FreeBSD triple faults, due to accessing 0x2. >> Further down the rabbit hole, this goes on in rumprun.o: >> >> On Linux, bios_crtc_base is not a local symbol: >> 0000000000000002 O *COM* 0000000000000002 bios_crtc_base >> 0000000000000002 O *COM* 0000000000000002 bios_com1_base >> >> While on FreeBSD, they are marked as local: >> 0000000000000002 l O *COM* 0000000000000002 bios_crtc_base >> 0000000000000002 l O *COM* 0000000000000002 bios_com1_base > > That seems wrong. Can you try and force the toolchain to use the more > recent GNU ld from devel/binutils and see if that fixes the problem? I’m using GNU Binutils from devel/binutils: pkg list binutils | grep /usr/local/bin/ld /usr/local/bin/ld /usr/local/bin/ld.bfd /usr/local/bin/ld.gold $(x86_64-rumprun-netbsd-gcc -print-prog-name=ld) -v GNU ld (GNU Binutils) 2.30 Fabian
Description: OpenPGP digital signature