Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHERRY-PICK] [REBASE & FF] Revert Mu Commits in Favor of edk2 Commits #1128

Merged
merged 16 commits into from
Oct 1, 2024

Commits on Oct 1, 2024

  1. Revert "MdeModulePkg: Add NVMe Timeout Status Code Event"

    This reverts commit b75dfbc
    as it has been upstreamed to edk2 as commit
    9df400f.
    os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    83480c4 View commit details
    Browse the repository at this point in the history
  2. [CHERRY-PICK] MdeModulePkg: NvmExpressDxe: Add Timeout Status Codes

    Add Report status code events to Nvme to trigger when timeouts occur.
    This improves traceability when critical errors happen.
    
    Signed-off-by: Oliver Smith-Denny <[email protected]>
    spbrogan authored and os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    c8bf399 View commit details
    Browse the repository at this point in the history
  3. Revert "BaseTools: Move MEMORY_TYPE_* Defines to EFI_MEMORY_TYPE Enum"

    This reverts commit dde58de as it has
    been upstreamed to edk2 as 4142604.
    os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    b302a94 View commit details
    Browse the repository at this point in the history
  4. Revert "MdePkg: Move MEMORY_TYPE_* Defines to EFI_MEMORY_TYPE Enum"

    This reverts commit ac4d0c9, as it
    has been upstreamed to edk2 as c82ca2b.
    os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    e5b015c View commit details
    Browse the repository at this point in the history
  5. Revert "MdeModulePkg: Remove EFI_MEMORY_* Defines"

    This reverts commit 3aadd23 as it has
    been upstreamed to edk2 as ffc09b5.
    os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    a04f472 View commit details
    Browse the repository at this point in the history
  6. [CHERRY-PICK] BaseTools: Move MEMORY_TYPE_* Defines to EFI_MEMORY_TYP…

    …E Enum
    
    Per TCBZ2372, clang on Linux emits a warning if an enum-typed variable
    is compared with a constant outside of the range of the enum. Such
    comparisons are performed in multiple locations in DXE core on
    variables of type EFI_MEMORY_TYPE. This patch moves the OEM and OS
    reserved types into the EFI_MEMORY_TYPE enum itself to resolve this
    issue and improve readability. This commit does this for the BaseTools
    copy of this enum.
    
    Signed-off-by: Oliver Smith-Denny <[email protected]>
    dmitryantipov authored and os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    f76b342 View commit details
    Browse the repository at this point in the history
  7. [CHERRY-PICK] MdePkg: Move MEMORY_TYPE_* Defines to EFI_MEMORY_TYPE Enum

    Per TCBZ2372, clang on Linux emits a warning if an enum-typed variable
    is compared with a constant outside of the range of the enum. Such
    comparisons are performed in multiple locations in DXE core on
    variables of type EFI_MEMORY_TYPE. This patch moves the OEM and OS
    reserved types into the EFI_MEMORY_TYPE enum itself to resolve this
    issue and improve readability. This commit does this for the MdePkg
    copy of this enum.
    
    Signed-off-by: Oliver Smith-Denny <[email protected]>
    dmitryantipov authored and os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    817fa16 View commit details
    Browse the repository at this point in the history
  8. [CHERRY-PICK] MdeModulePkg: Remove EFI_MEMORY_* Defines

    Now that all of the EFI_MEMORY_* defines live in the
    EFI_MEMORY_TYPE enum, remove the old defines.
    
    Signed-off-by: Oliver Smith-Denny <[email protected]>
    dmitryantipov authored and os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    4d9ae24 View commit details
    Browse the repository at this point in the history
  9. Revert "MdeModulePkg: Add NVMe Long Delay Time Events"

    This reverts commit 856992a as it has
    been upstreamed to edk2 as d7e36cc.
    os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    8ee5ae0 View commit details
    Browse the repository at this point in the history
  10. [CHERRY-PICK] MdeModulePkg: Add NVMe Long Delay Time Events

    Fire an event if a long delay occurs when starting an NVMe device.
    This can be used by platforms to draw pictures on the screen or
    take other actions to notify a user or move boot forward.
    
    Signed-off-by: Oliver Smith-Denny <[email protected]>
    spbrogan authored and os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    d17b40b View commit details
    Browse the repository at this point in the history
  11. [CHERRY-PICK] MdeModulePkg: Gcd: Only Update gMemoryMap Attributes if…

    … Correct GCD Type
    
    Currently whenever gDS->SetMemorySpaceCapabilities() is called, it
    attempts to set the corresponding attributes in the gMemoryMap
    descriptor. However, gMemoryMap only contains entries from GCD types
    EfiGcdMemoryTypeSystemMemory and EfiGcdMemoryTypeMoreReliable, so
    for all other types a failure is reported in the code. This is a
    failure that is expected, so it does not provide value and can
    lead to real failures being ignored.
    
    This patch updates the gDS->SetMemorySpaceCapabilities() code to
    only call into updating gMemoryMap if the GCD type is SystemMemory
    or MoreReliable, to avoid spurious errors being reported. This
    also avoids the expensive operation of searching through gMemoryMap
    for entries we know we will fail to find.
    
    Signed-off-by: Oliver Smith-Denny <[email protected]>
    Oliver Smith-Denny authored and os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    d31ec8b View commit details
    Browse the repository at this point in the history
  12. Revert "MdeModulePkg: Set RO/XP On EfiRuntimeServicesCode Regions Out…

    …side of Loaded Image Memory (microsoft#822)"
    
    This reverts commit a860f71 as it
    has been upstreamed to edk2 as two commits:
    254641f and
    bb248a9.
    os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    054a1e3 View commit details
    Browse the repository at this point in the history
  13. [CHERRY-PICK] MdeModulePkg: MAT: Do Not Set EfiMemoryMappedIo[PortSpa…

    …ce] Attrs
    
    Per UEFI spec 2.10 section 4.6.3 EFI_MEMORY_ATTRIBUTES_TABLE,
    
    "The Memory Attributes Table is currently used to describe memory
    protections that may be applied to the EFI Runtime code and data
    by an operating system or hypervisor. Consumers of this table must
    currently ignore entries containing any values for Type except for
    EfiRuntimeServicesData and EfiRuntimeServicesCode to ensure
    compatibility with future uses of this table."
    
    However, the current MAT code also enforces attributes for
    EfiMemoryMappedIo and EfiMemoryMappedIoPortSpace, which it should
    not be. Per
    https://edk2.groups.io/g/devel/topic/patch_v1_mdemodulepkg/105570114?p=,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,105570114,
    it was suggested to remove these types from the MAT logic.
    
    This patch removes EfiMemoryMappedIo and EfiMemoryMappedIoPortSpace
    from the MAT logic in accordance with the UEFI spec.
    
    Signed-off-by: Oliver Smith-Denny <[email protected]>
    Oliver Smith-Denny authored and os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    4ea769e View commit details
    Browse the repository at this point in the history
  14. [CHERRY-PICK] MdeModulePkg: MAT Set RO/XP on Code/Data Sections Outsi…

    …de Image Memory
    
    The Memory Attributes Table is generated by fetching the EFI memory map
    and splitting entries which contain loaded images so DATA and CODE
    sections have separate descriptors. The splitting is done via a call to
    SplitTable() which
    marks image DATA sections with the EFI_MEMORY_XP attribute and CODE
    sections with the EFI_MEMORY_RO attribute when
    splitting. After this process, there may still be EfiRuntimeServicesCode
    regions which did not have their attributes set because they are not
    part of loaded images.
    
    This patch updates the MAT EnforceMemoryMapAttribute logic to set the
    access attributes of runtime memory regions which are not part of loaded
    images (have not had their access attributes set). The attributes of the
    code regions will be read-only and no-execute because the UEFI spec
    dictates that runtime code regions should only contain loaded EFI
    modules.
    
    BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4832
    
    Refs:
    1.
    https://edk2.groups.io/g/devel/topic/patch_v1_mdemodulepkg/105570114?p=,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,105570114
    2.
    https://edk2.groups.io/g/devel/topic/mdemodulepkg_fix_mat/105477564?p=,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,105477564
    
    Signed-off-by: Oliver Smith-Denny <[email protected]>
    Oliver Smith-Denny authored and os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    9c030e2 View commit details
    Browse the repository at this point in the history
  15. Revert "UefiCpuPkg: CpuPageTableLib: Remove Empty Test Suite"

    This reverts commit f481172 as it has
    been upstreamed to edk2 as b2a4318.
    os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    80b1b2f View commit details
    Browse the repository at this point in the history
  16. [CHERRY-PICK] UefiCpuPkg: CpuPageTableLibTestHost: Disable Random Tes…

    …t Suite
    
    Commit 2f499c3 commented out the
    RandomTestCase tests in CpuPageTableLibTestHost, but it left the
    test suite being registered without any tests. This causes a failure
    for tools that check to ensure tests are being registered with test
    suites.
    
    This patch comments out the test suite in addition to the tests
    being added to it.
    
    Signed-off-by: Oliver Smith-Denny <[email protected]>
    os-d committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    ed2c6d4 View commit details
    Browse the repository at this point in the history