Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Mar 2019 16:29:54 -0600
From:      Rebecca Cran <rebecca@bluestop.org>
To:        D Scott Phillips <d.scott.phillips@intel.com>, Larry Rosenman <ler@lerctr.org>
Cc:        freebsd-virtualization@freebsd.org, owner-freebsd-virtualization@freebsd.org
Subject:   Re: Updating uefi-edk2-bhyve
Message-ID:  <b2f90a4c-d73f-6797-aa1e-62161ad011f5@bluestop.org>
In-Reply-To: <86ftremzar.fsf@intel.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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 (




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b2f90a4c-d73f-6797-aa1e-62161ad011f5>