From owner-freebsd-virtualization@freebsd.org Fri Mar 22 20:25:58 2019 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4689A1550D00; Fri, 22 Mar 2019 20:25:58 +0000 (UTC) (envelope-from d.scott.phillips@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "fmsmga101.fm.intel.com", Issuer "COMODO RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BCE5B9203D; Fri, 22 Mar 2019 20:25:56 +0000 (UTC) (envelope-from d.scott.phillips@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Mar 2019 13:25:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,256,1549958400"; d="scan'208";a="125060312" Received: from dsp-dsk1.jf.intel.com (HELO localhost) ([10.54.70.10]) by orsmga007.jf.intel.com with ESMTP; 22 Mar 2019 13:25:48 -0700 From: D Scott Phillips To: Rebecca Cran , Larry Rosenman Cc: freebsd-virtualization@freebsd.org, owner-freebsd-virtualization@freebsd.org Subject: Re: Updating uefi-edk2-bhyve In-Reply-To: <8c63eb87-e3b8-2365-2eaf-a6e36424407c@bluestop.org> References: <86muln68ld.fsf@intel.com> <1fe3ca3f-be70-99db-e7c0-35c9194c97e4@bluestop.org> <7e84fd01c3f46268c26f9bab8b9fb9bc@lerctr.org> <33fcf111-fe00-4ec7-8a2f-7c53246d756f@Spark> <86k1gqanx8.fsf@intel.com> <8c63eb87-e3b8-2365-2eaf-a6e36424407c@bluestop.org> Date: Fri, 22 Mar 2019 13:25:48 -0700 Message-ID: <86ftremzar.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: BCE5B9203D X-Spamd-Bar: --------- Authentication-Results: mx1.freebsd.org; dmarc=pass (policy=none) header.from=intel.com; spf=pass (mx1.freebsd.org: domain of d.scott.phillips@intel.com designates 192.55.52.88 as permitted sender) smtp.mailfrom=d.scott.phillips@intel.com X-Spamd-Result: default: False [-9.09 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:192.55.52.88/32]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mga04.intel.com]; DMARC_POLICY_ALLOW(-0.50)[intel.com,none]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; IP_SCORE(-1.80)[ipnet: 192.55.52.0/24(-4.96), asn: 4983(-3.96), country: US(-0.07)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:4983, ipnet:192.55.52.0/24, country:US]; RCVD_IN_DNSWL_HI(-0.50)[88.52.55.192.list.dnswl.org : 127.0.9.3]; MID_RHS_MATCH_FROM(0.00)[]; WHITELIST_SPF_DKIM(-3.00)[intel.com:s:+] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Mar 2019 20:25:58 -0000 Rebecca Cran writes: > On 3/22/19 10:12 AM, D Scott Phillips wrote: > > > > > You're seeing this firmware triple fault in the DEBUG build of this new > > firmware? It seems to be functioning properly for me. Do you get any > > serial output before the fault? > > I do get quite a bit of output before the fault. I'm running 13-CURRENT=20 > (on an Skylake PC), built today, so there may be some new issues that=20 > aren't in a release. > > I'm building OVMF with "build -p OvmfPkg/OvmfPkgX64.dsc -a X64 -b DEBUG=20 > -DDEBUG_ON_SERIAL_PORT=3DTRUE -t GCC5" > > root@cube:# bhyve -AHP -s 0:0,hostbridge -s 31:0,lpc -c 4 -m 4G -s=20 > 29,fbuf,tcp=3D0.0.0.0:5900,w=3D800,h=3D600 -l bootrom,OVMF_CODE.fd -l=20 > com1,stdio guest > > [..snip..] > > Memory Allocation 0x00000004 0x806000 - 0x806FFF > Memory Allocation 0x00000006 0xBFF7C000 - 0xBFFFFFFF > Memory Allocation 0x00000004 0x820000 - 0x8FFFFF > Memory Allocation 0x00000004 0x900000 - 0x13FFFFF > Old Stack size 32768, New stack size 131072 > Stack Hob: BaseAddress=3D0xBBFBE000 Length=3D0x20000 > Heap Offset =3D 0xBB7CE000 Stack Offset =3D 0xBB7BE000 > TemporaryRamMigration(0x810000, 0xBBFD6000, 0x10000) > vm exit[0] > reason=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 VMX > rip=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 0x0000000000827359 > inst_length=C2=A0=C2=A0=C2=A0=C2=A0 5 > status=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0 > exit_reason=C2=A0=C2=A0=C2=A0=C2=A0 2 (Triple fault) > qualification=C2=A0=C2=A0=C2=A0 0x0000000000000000 > inst_type=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 0 > inst_error=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 0 > Abort Hmm, I guess it might be some diference in the code generation between gcc 4.8 and gcc 5. > On the build problem side, if I run "build -p OvmfPkg/OvmfPkgX64.dsc -a=20 > X64 -t GCC48 -b RELEASE" then I get an error (that I don't get if I=20 > replace GCC48 with GCC5): > > /usr/local/bin/ld: warning: cannot find entry symbol _ModuleEntryPoint;=20 > not setting start address > /usr/local/bin/ld: warning: cannot find entry symbol _ModuleEntryPoint;=20 > not setting start address > "objcopy"=20 > /home/bcran/workspace/bhyveedk2/Build/OvmfX64/RELEASE_GCC48/X64/OvmfPkg/A= mdSevDxe/AmdSevDxe/DEBUG/AmdSevDxe.dll > "objcopy"=20 > /home/bcran/workspace/bhyveedk2/Build/OvmfX64/RELEASE_GCC48/X64/OvmfPkg/E= muVariableFvbRuntimeDxe/Fvb/DEBUG/EmuVariableFvbRuntimeDxe.dll > objcopy: error: the input file=20 > '/home/bcran/workspace/bhyveedk2/Build/OvmfX64/RELEASE_GCC48/X64/OvmfPkg/= EmuVariableFvbRuntimeDxe/Fvb/DEBUG/EmuVariableFvbRuntimeDxe.dll'=20 > has no sections > objcopy: error: the input file=20 > '/home/bcran/workspace/bhyveedk2/Build/OvmfX64/RELEASE_GCC48/X64/OvmfPkg/= AmdSevDxe/AmdSevDxe/DEBUG/AmdSevDxe.dll'=20 > has no sections > make: *** [GNUmakefile:383:=20 > /home/bcran/workspace/bhyveedk2/Build/OvmfX64/RELEASE_GCC48/X64/OvmfPkg/A= mdSevDxe/AmdSevDxe/DEBUG/AmdSevDxe.dll]=20 > Error 1 I'm not seeing this problem with the build steps I'm doing, which are just the ones in the ports patch. Perhaps some system version of one of the build tools is getting used at some point? I had to mess with ${PATH} to get the build to work right. I'd say look back through the build log and make sure it's using the expected executables. On my side I'll run the build through poudriere to make sure it's not working due to some specific quirk of my system.