Skip to content
  1. Apr 09, 2019
  2. Apr 08, 2019
  3. Apr 04, 2019
    • Ray Ni's avatar
      UefiCpuPkg/Cpuid: Dump leaf 1FH information correctly · 079141eb
      Ray Ni authored
      
      
      Leaf 1FH is very similar to leaf 0BH. Both return the CPU topology
      information.
      Leaf 0BH returns 3-level (Package/Core/Thread) CPU topology info.
      Leaf 1FH returns 6-level (Package/Die/Tile/Module/Core/Thread) CPU
      topology info.
      The logic to enumerate the topology info is the same.
      
      But today's logic to handle 1FH is completely wrong.
      The patch combines them together to fix the 1FH issue.
      
      Contributed-under: TianoCore Contribution Agreement 1.1
      Signed-off-by: default avatarRay Ni <ray.ni@intel.com>
      Reviewed-by: default avatarEric Dong <eric.dong@intel.com>
      Cc: Star Zeng <star.zeng@intel.com>
      Cc: Zhiqiang Qin <zhiqiang.qin@intel.com>
      079141eb
    • Ray Ni's avatar
      UefiCpuPkg/Cpuid.h: Remove duplicated struct definition for leaf 1FH · 516e3397
      Ray Ni authored
      
      
      Per SDM CPUID.0BH and CPUID.1FH outputs the same format of data in
      EAX/EBX/ECX/EDX except CPUID.1FH reports more level types such as
      module, tile, die.
      
      The patch removes the unnecessary duplicated structure definitions
      for CPUID.1FH because when the structure definitions for CPUID.0BH
      can be used for CPUID.1FH.
      
      Contributed-under: TianoCore Contribution Agreement 1.1
      Signed-off-by: default avatarRay Ni <ray.ni@intel.com>
      Reviewed-by: default avatarEric Dong <eric.dong@intel.com>
      Cc: Star Zeng <star.zeng@intel.com>
      Cc: Zhiqiang Qin <zhiqiang.qin@intel.com>
      516e3397
    • Eric Dong's avatar
      UefiCpuPkg/RegisterCpuFeaturesLib: Correct comments. · f664032e
      Eric Dong authored
      
      
      Cc: Ray Ni <Ray.ni@intel.com>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Contributed-under: TianoCore Contribution Agreement 1.1
      Signed-off-by: default avatarEric Dong <eric.dong@intel.com>
      Reviewed-by: default avatarRay Ni <ray.ni@intel.com>
      f664032e
    • Eric Dong's avatar
      UefiCpuPkg/RegisterCpuFeaturesLib: Simplify PcdCpuFeaturesSupport. · 001c2c80
      Eric Dong authored
      PcdCpuFeaturesSupport used to specify the platform policy about
      what CPU features this platform supports. This PCD will be used
      in IsCpuFeatureSupported only.
      
      Now RegisterCpuFeaturesLib use this PCD as an template to Get the
      pcd size. Update the code logic to replace it with
      PcdCpuFeaturesSetting.
      
      BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1375
      
      
      
      Contributed-under: TianoCore Contribution Agreement 1.1
      Signed-off-by: default avatarEric Dong <eric.dong@intel.com>
      Reviewed-by: default avatarRay Ni <ray.ni@intel.com>
      001c2c80
    • Eric Dong's avatar
      UefiCpuPkg/RegisterCpuFeaturesLib: Optimize PCD · 6214ffb4
      Eric Dong authored
      PcdCpuFeaturesUserConfiguration.
      
      Merge PcdCpuFeaturesUserConfiguration into PcdCpuFeaturesSetting.
      Use PcdCpuFeaturesSetting as input for the user input feature setting
      Use PcdCpuFeaturesSetting as output for the final CPU feature setting
      
      BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1375
      
      
      
      Contributed-under: TianoCore Contribution Agreement 1.1
      Signed-off-by: default avatarEric Dong <eric.dong@intel.com>
      Reviewed-by: default avatarRay Ni <ray.ni@intel.com>
      6214ffb4
    • Eric Dong's avatar
      UefiCpuPkg/RegisterCpuFeaturesLib: Remove useless functions. · 79be3d27
      Eric Dong authored
      Remove useless APIs, simplify the code logic.
      
      BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1375
      
      
      
      Contributed-under: TianoCore Contribution Agreement 1.1
      Signed-off-by: default avatarEric Dong <eric.dong@intel.com>
      Reviewed-by: default avatarRay Ni <ray.ni@intel.com>
      79be3d27
    • Vanguput, Narendra K's avatar
      UefiCpuPkg\CpuSmm: Save & restore CR2 on-demand paging in SMM · 37f9fea5
      Vanguput, Narendra K authored
      BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1593
      
      
      
      For every SMI occurrence, save and restore CR2 register only when SMM
      on-demand paging support is enabled in 64 bit operation mode.
      This is not a bug but to have better improvement of code.
      
      Patch5 is updated with separate functions for Save and Restore of CR2
      based on review feedback.
      
      Patch6 - Removed Global Cr2 instead used function parameter.
      
      Patch7 - Removed checking Cr2 with 0 as per feedback.
      
      Patch8 and 9 - Aligned with EDK2 Coding style.
      
      Contributed-under: TianoCore Contribution Agreement 1.1
      Signed-off-by: default avatarVanguput Narendra K <narendra.k.vanguput@intel.com>
      Cc: Eric Dong <eric.dong@intel.com>
      Cc: Ray Ni <ray.ni@intel.com>
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Yao Jiewen <jiewen.yao@intel.com>
      Reviewed-by: default avatarEric Dong <eric.dong@intel.com>
      Reviewed-by: default avatarStar Zeng <star.zeng@intel.com>
      Reviewed-by: default avatarNate DeSimone <nathaniel.l.desimone@intel.com>
      Reviewed-by: default avatarRay Ni <ray.ni@intel.com>
      Regression-tested-by: default avatarLaszlo Ersek <lersek@redhat.com>
      37f9fea5
    • Eric Dong's avatar
      UefiCpuPkg/MpInitLib: Fix MemTest86 failure. · e4ff6349
      Eric Dong authored
      
      
      V2 changes:
        Update the commit message and comments in the code.
      
      When waking vector buffer allocated by CpuDxe is tested by MemTest86
      in MP mode, an error is reported because the same range of memory is
      modified by both CpuDxe driver and MemTest86.
      
      The waking vector buffer is not expected to be tested by MemTest86 if
      it is allocated out because MemTest86 only tests free memory. But
      current CpuDxe driver "borrows" buffer instead of allocate buffer for
      waking vector buffer (through allocate & free to get the buffer
      pointer, backup the buffer data before using it and restore it after
      using). With this implementation, if the buffer borrowed is not used
      by any other drivers, MemTest86 tool will treat it as free memory
      and test it.
      
      In order to fix the above issue, CpuDxe changes to allocate the
      buffer below 1M instead of borrowing it. But directly allocating
      memory below 1MB causes LegacyBios driver fails to start. LegacyBios
      driver allocates memory range from
      "0xA0000 - PcdEbdaReservedMemorySize" to 0xA0000 as Ebda Reserved
      Memory. The minimum value for "0xA0000 - PcdEbdaReservedMemorySize"
      is 0x88000. If LegacyBios driver allocate this range failed, it
      asserts.
      
      LegacyBios also reserves range from 0x60000 to
      "0x60000 + PcdOpromReservedMemorySize", it will be used as Oprom
      Reserve Memory. The maximum value for "0x60000 +
      PcdOpromReservedMemorySize" is 0x88000. LegacyBios driver tries to
      allocate these range page(4K size) by page. It just reports warning
      message if some pages are already allocated by others.
      Base on above investigation, one page in range 0x60000 ~ 0x88000 can
      be used as the waking vector buffer.
      
      LegacyBios driver only reports warning when page allocation in range
      [0x60000, 0x88000) fails. This library is consumed by CpuDxe driver
      to produce CPU Arch protocol. LagacyBios driver depends on CPU Arch
      protocol which guarantees below allocation runs earlier than
      LegacyBios driver.
      
      Cc: Ray Ni <ray.ni@intel.com>
      Contributed-under: TianoCore Contribution Agreement 1.1
      Signed-off-by: default avatarEric Dong <eric.dong@intel.com>
      Reviewed-by: default avatarRay Ni <ray.ni@intel.com>
      e4ff6349
  4. Apr 03, 2019
  5. Apr 02, 2019
Loading