Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Mar 2018 18:00:41 +0100
From:      "Fabian Freyer" <fabian.freyer@physik.tu-berlin.de>
To:        "Martin Lucina" <martin@lucina.net>
Cc:        rumpkernel-users@freelists.org, freebsd-virtualization@freebsd.org
Subject:   Re: rumpkernel and bhyve: triple faults
Message-ID:  <0A39950F-698C-4A2C-80D6-B35A5B254BAA@physik.tu-berlin.de>
In-Reply-To: <20180310224607.wscuqebheq5bjxww@nodbug.lucina.net>
References:  <C49D0E56-10A4-49D8-A843-E371395831B5@physik.tu-berlin.de> <A3574A92-0514-44AE-BE20-6BFDAE803407@physik.tu-berlin.de> <20180310224607.wscuqebheq5bjxww@nodbug.lucina.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 3156 and 4880).

--=_MailMate_772233C2-4F3C-413C-9C3B-FC3F90578CA5_=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 10 Mar 2018, at 23:46, Martin Lucina wrote:
> On Friday, 09.03.2018 at=C2=A018:45, Fabian Freyer wrote:
>> On 6 Mar 2018, at 7:45, Fabian Freyer wrote:
>>> I=E2=80=99m 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 ski=
p this check
>>> when running on bhyve(4)?
>
> You probably want to use a serial console rather than VGA on bhyve in a=
ny
> case, so you'll want to add the appropriate checks to hypervisor.c and
> cons.c.

I=E2=80=99ve started on a patch, but the check should fail if bios_crtc_b=
ase is unset
anyways.

>> A build on Linux (which boots fine) shows [bios_com1_base, bios_crtc_b=
ase] 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 bootin=
g on
> bhyve?

Yes. The rumprun kernel built on Linux boots fine (including serial outpu=
t 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=E2=80=99m 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=3Dld) -v
GNU ld (GNU Binutils) 2.30

Fabian
--=_MailMate_772233C2-4F3C-413C-9C3B-FC3F90578CA5_=
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename=signature.asc
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iQJWBAEBCgBAFiEEX6JoxdmEemcFacQZmealkcs85+YFAlqlYLkiHGZhYmlhbi5m
cmV5ZXJAcGh5c2lrLnR1LWJlcmxpbi5kZQAKCRCZ5qWRyzzn5qeIEACjO1rhn9zI
dpfoA4VsBwMFxIiN5hvNG4peSaGzDQSWknhxpN5Fx7EmnWm+iy1Dgym4ie2ia4bC
25Zy+EDREHx/WjGzYaBA8LPqk5ccJuF7zIhKwM7hShakrYQdaQ0C/EthArCNzkTA
QbFc4GFd4ggKuSBSrTJapNmAx9rh+CVvcJEw4NrQbEaouf4M/ys/wiOeUDYP0XKG
pkX22JsgR6uirXU1/+k8ubyAcloGqmYyOkKfIZmx/ejQdhX5i0XI3hUIf+zrA+7H
YlR6Gk1BRQ5Az85KwkKv+D5qkS/SSpQe9vJy+Q2AD4qp0lZcTE5gm782KQ/6R8SZ
+slpoKsS+AhwS0AlHj3yfqt3BIE+VF/1Ulu5R18KrJvTtY9bqY099DCoIVVGVnI7
LqWXGrBfwSO72kOpLGhk4LGbWAvzGnnHOJ7YiAoldRlfXNp99XoXIXUkGa/T9HoN
byXNBmq3M7vDL62yzC0sGiEXwJaQk9wYM9lrujtTdB0IQCzTgDtIgET1N497LP+t
8+uY4Bb22ASCKTLSpSRpc/vhhzeNnkNO4o+h9Hp4d2qk/yhzUa+cxO2qvd1pRZeD
DhaPJQ7DRvZIZmdFYD8AfU6YyrL9+3g1uDYvxHpWiC96cCaaqfXYBNxUWEcMm0Sj
dl9mU3nP5iRSE20u1PFY2wqR2D+N8vnsUQ==
=T7nM
-----END PGP SIGNATURE-----

--=_MailMate_772233C2-4F3C-413C-9C3B-FC3F90578CA5_=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0A39950F-698C-4A2C-80D6-B35A5B254BAA>