From owner-freebsd-virtualization@freebsd.org Fri Mar 22 22:29: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 A18A61553B8F; Fri, 22 Mar 2019 22:29:58 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: from muon.bluestop.org (muon.bluestop.org [65.103.231.193]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45C8A96A61; Fri, 22 Mar 2019 22:29:57 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: from muon.bluestop.org (localhost [127.0.0.1]) by muon.bluestop.org (Postfix) with ESMTP id 7ACB37FD8C; Fri, 22 Mar 2019 16:31:03 -0600 (MDT) Received: from muon.bluestop.org ([127.0.0.1]) by muon.bluestop.org (muon.bluestop.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NOtdbY29lRiI; Fri, 22 Mar 2019 16:31:02 -0600 (MDT) Received: from photon.int.bluestop.org (unknown [65.103.231.197]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTPSA; Fri, 22 Mar 2019 16:31:02 -0600 (MDT) Subject: Re: Updating uefi-edk2-bhyve To: D Scott Phillips , Larry Rosenman Cc: freebsd-virtualization@freebsd.org, owner-freebsd-virtualization@freebsd.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> <86ftremzar.fsf@intel.com> From: Rebecca Cran Message-ID: Date: Fri, 22 Mar 2019 16:29:54 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: <86ftremzar.fsf@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 45C8A96A61 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.96 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bluestop.org:s=mail]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-0.99)[ipnet: 65.100.0.0/14(-4.88), asn: 209(-0.01), country: US(-0.07)]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: mail.bluestop.org]; DKIM_TRACE(0.00)[bluestop.org:+]; DMARC_POLICY_ALLOW(-0.50)[bluestop.org,quarantine]; NEURAL_HAM_SHORT(-0.96)[-0.959,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:209, ipnet:65.100.0.0/14, country:US]; MID_RHS_MATCH_FROM(0.00)[] 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 22:29:58 -0000 On 3/22/19 2:25 PM, D Scott Phillips wrote: > Hmm, I guess it might be some diference in the code generation between > gcc 4.8 and gcc 5. I've just tested switching from gcc 4.8 to 8.3.0 and everything seems to work fine - both build and runtime - so I think it may be more productive to upgrade and use that instead, since it's a supported version (gcc 4.8 is pretty old now). Would you agree? The DEBUG build did complain about unused definitions and functions in FeatureControl.c though, so I ended up with the following patch: diff --git a/OvmfPkg/PlatformPei/FeatureControl.c b/OvmfPkg/PlatformPei/FeatureControl.c index 09f33fe5b1..051dbbdac0 100644 --- a/OvmfPkg/PlatformPei/FeatureControl.c +++ b/OvmfPkg/PlatformPei/FeatureControl.c @@ -24,7 +24,7 @@  //  // The value to be written to the Feature Control MSR, retrieved from fw_cfg.  // -STATIC UINT64 mFeatureControlValue; +//STATIC UINT64 mFeatureControlValue;^M  /**    Write the Feature Control MSR on an Application Processor or the Boot @@ -36,6 +36,7 @@ STATIC UINT64 mFeatureControlValue;    @param[in,out] WorkSpace  Pointer to the input/output argument workspace                              shared by all processors.  **/ +#if 0^M  STATIC  VOID  EFIAPI @@ -45,7 +46,7 @@ WriteFeatureControl (  {    AsmWriteMsr64 (MSR_CORE2_FEATURE_CONTROL, mFeatureControlValue);  } - +#endif^M  /**    Notification function called when EFI_PEI_MP_SERVICES_PPI becomes available. @@ -57,6 +58,7 @@ WriteFeatureControl (    @return  Status of the notification. The status code returned from this             function is ignored.  **/ +#if 0^M  STATIC  EFI_STATUS  EFIAPI @@ -94,17 +96,17 @@ OnMpServicesAvailable (    WriteFeatureControl (NULL);    return EFI_SUCCESS;  } - +#endif^M  //  // Notification object for registering the callback, for when  // EFI_PEI_MP_SERVICES_PPI becomes available.  // -STATIC CONST EFI_PEI_NOTIFY_DESCRIPTOR mMpServicesNotify = { -  EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | // Flags -  EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST, -  &gEfiPeiMpServicesPpiGuid,               // Guid -  OnMpServicesAvailable                    // Notify -}; +//STATIC CONST EFI_PEI_NOTIFY_DESCRIPTOR mMpServicesNotify = {^M +//  EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | // Flags^M +//  EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,^M +//  &gEfiPeiMpServicesPpiGuid,               // Guid^M +//  OnMpServicesAvailable                    // Notify^M +//};^M  VOID  InstallFeatureControlCallback (