Skip to content

Commit

Permalink
Move Submodules to release/202405 (#1011)
Browse files Browse the repository at this point in the history
## Description

The Project Mu submodules have moved to release/202405 and as the final
step in qualifying that, we move mu_tiano_platforms to the new
submodules. Below is the list of major changes for this repo to
accommodate the new submodules:

SBSA Dropping ArmVirtPkg Dependency
--
QemuSbsaPkg was dependent on ArmVirtPkg for two libraries and a set of
device tree PCDs. These device tree PCDs were moved to OvmfPkg in edk2,
which we do not carry in Project Mu. In general, ArmVirtPkg allows
dependencies on OvmfPkg, which makes it not a good candidate for Project
Mu to depend on. The PCDs were moved to QemuSbsaPkg, QemuVirtMemInfoLib
was copied there, and the HobLib was pointed to the mu_basecore version,
as the ArmVirtPkg version was not needed, thus breaking the dependency
on ArmVirtPkg. Some other ArmVirtPkg unused PCDs were dropped entirely.

MM_SUPV Updates
--
There were a lot of MM_SUPV updates in release/202405, which led to
needing to copy an instance of SmmRelocationLib from OvmfPkg to
QemuQ35Pkg. There was debt from previous integrations where changes from
MmFeatureLib were not picked up, which were required to work with the
new supervisor.

SourceLevelDebugPkg Dropped
--
Project Mu no longer carries SourceLevelDebugPkg, so all references and
hooks were dropped from the repo.

Non-NX Compat Images Allowed to be Loaded
--
Previously, on Windows built FW's, we would block loading non-NX compat
binaries. This prevents booting most modern Linuxes as shim/grub do not
have the NX_COMPAT flag set for released versions. This was changed to
not block loading non-NX Compat images so that Linux can boot on
Q35/SBSA on Windows.

SBSA Qemu run without SME and SVE
--
Similar to requiring SSE support on Q35, Windows and Linux have started
using SVE instructions on ARM64. However, TF-A in the SP_MM
configuration does not support SME or SVE instructions, so TF-A would
crash when one of those instructions occurred. Qemu is now configured to
run without support for SME and SVE so that the OSes do not attempt to
use them. It was also discovered that Qemu 9.0.2 or newer is required
for booting an OS on SBSA now, it is not clear what changed.

Cleanups and Old References Dropped
--
- As part of debugging some of the changes needed for release/202405,
some DSC cleanups were made.
- MemoryOverrideBinLib was not carried forward to release/202405, so it
was dropped from DSCs.
- AdvLoggerAccessLibNull is used for VariableStandaloneMmLib.inf in
QemuSbsaPkg now instead of the actual instance, as we are not using
AdvLogger there.

For each item, place an "x" in between `[` and `]` if true. Example:
`[x]`.
_(you can also check items in the GitHub UI)_

- [x] Impacts functionality?
- **Functionality** - Does the change ultimately impact how firmware
functions?
- Examples: Add a new library, publish a new PPI, update an algorithm,
...
- [x] Impacts security?
- **Security** - Does the change have a direct security impact on an
application,
    flow, or firmware?
  - Examples: Crypto algorithm change, buffer overflow fix, parameter
    validation improvement, ...
- [x] Breaking change?
- **Breaking change** - Will anyone consuming this change experience a
break
    in build or boot behavior?
- Examples: Add a new library class, move a module to a different repo,
call
    a function in a new library class in a pre-existing module, ...
- [ ] Includes tests?
  - **Tests** - Does the change include any explicit test code?
  - Examples: Unit tests, integration tests, robot tests, ...
- [ ] Includes documentation?
- **Documentation** - Does the change contain explicit documentation
additions
    outside direct code modifications (and comments)?
- Examples: Update readme file, add feature readme file, link to
documentation
    on an a separate Web page, ...

## How This Was Tested

Booted Q35 and SBSA to Windows and Linux

## Integration Instructions

Qemu 9.0.2 is required for Linux builds to boot into an OS now, it is
unclear exactly what is broken with older versions.

---------

Co-authored-by: Kun Qin <kuqin@microsoft.com>
  • Loading branch information
os-d and kuqin12 authored Aug 9, 2024
1 parent 98cfed4 commit 66a8f3d
Show file tree
Hide file tree
Showing 50 changed files with 1,962 additions and 1,141 deletions.
13 changes: 7 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
[submodule "MU_BASECORE"]
path = MU_BASECORE
url = https://github.com/microsoft/mu_basecore.git
branch = release/202302
branch = release/202405
[submodule "Common/MU_TIANO"]
path = Common/MU_TIANO
url = https://github.com/microsoft/mu_tiano_plus.git
branch = release/202302
branch = release/202405
[submodule "Common/MU"]
path = Common/MU
url = https://github.com/microsoft/mu_plus.git
branch = release/202302
branch = release/202405
[submodule "Common/MU_OEM_SAMPLE"]
path = Common/MU_OEM_SAMPLE
url = https://github.com/microsoft/mu_oem_sample.git
branch = release/202302
branch = release/202405
[submodule "Silicon/Arm/MU_TIANO"]
path = Silicon/Arm/MU_TIANO
url = https://github.com/microsoft/mu_silicon_arm_tiano.git
branch = release/202302
branch = release/202405
[submodule "Silicon/Arm/TFA"]
path = Silicon/Arm/TFA
url = https://github.com/ARM-software/arm-trusted-firmware.git
branch = v2.9.0
branch = v2.10.0
[submodule "Features/DFCI"]
path = Features/DFCI
url = https://github.com/microsoft/mu_feature_dfci
Expand All @@ -31,6 +31,7 @@
[submodule "Features/MM_SUPV"]
path = Features/MM_SUPV
url = https://github.com/microsoft/mu_feature_mm_supv.git
branch = v13.0.0
[submodule "Features/DEBUGGER"]
path = Features/DEBUGGER
url = https://github.com/microsoft/mu_feature_debugger.git
2 changes: 1 addition & 1 deletion Common/MU_TIANO
Submodule MU_TIANO updated 238 files
2 changes: 1 addition & 1 deletion Features/MM_SUPV
Submodule MM_SUPV updated 45 files
+3 −3 .pytool/CISettings.py
+0 −183 MmSupervisorPkg/Core/Dispatcher/Dispatcher.c
+137 −24 MmSupervisorPkg/Core/Handler/Mmi.c
+4 −3 MmSupervisorPkg/Core/Mem/Cet.nasm
+4 −17 MmSupervisorPkg/Core/Mem/Mem.h
+0 −82 MmSupervisorPkg/Core/Mem/MemWrapper.c
+17 −3 MmSupervisorPkg/Core/Mem/PageTbl.c
+193 −57 MmSupervisorPkg/Core/Mem/SmmCpuMemoryManagement.c
+0 −75 MmSupervisorPkg/Core/Misc/Semaphore.c
+1 −1 MmSupervisorPkg/Core/Misc/SmmMpPerf.h
+2 −14 MmSupervisorPkg/Core/MmSupervisorCore.c
+1 −1 MmSupervisorPkg/Core/MmSupervisorCore.h
+3 −5 MmSupervisorPkg/Core/MmSupervisorCore.inf
+26 −0 MmSupervisorPkg/Core/Relocate/Cet.inc
+61 −248 MmSupervisorPkg/Core/Relocate/Relocate.c
+12 −84 MmSupervisorPkg/Core/Relocate/Relocate.h
+24 −18 MmSupervisorPkg/Core/Relocate/SmiEntry.nasm
+0 −146 MmSupervisorPkg/Core/Relocate/SmmInit.nasm
+0 −69 MmSupervisorPkg/Core/Relocate/SmramSaveState.c
+9 −6 MmSupervisorPkg/Core/Services/MpService/MpService.c
+0 −8 MmSupervisorPkg/Docs/PlatformIntegration/PlatformIntegrationSteps.md
+0 −1 MmSupervisorPkg/Docs/PlatformIntegration/SoftwareComponentOverview.md
+1 −1 MmSupervisorPkg/Drivers/MmPeiLaunchers/MmDxeSupport.inf
+27 −229 MmSupervisorPkg/Drivers/MmPeiLaunchers/MmIplPei.c
+5 −2 MmSupervisorPkg/Drivers/MmPeiLaunchers/MmIplPei.inf
+1 −1 MmSupervisorPkg/Drivers/MmPeiLaunchers/MmIplX64Relay.inf
+0 −6 MmSupervisorPkg/Drivers/MmSupervisorRing3Broker/Mem/Pool.c
+2 −2 MmSupervisorPkg/Drivers/MmSupervisorRing3Broker/MmSupervisorRing3Broker.inf
+0 −2,224 MmSupervisorPkg/Drivers/StandaloneMmIpl/PiSmmIpl.c
+0 −111 MmSupervisorPkg/Drivers/StandaloneMmIpl/PiSmmIpl.inf
+1 −1 MmSupervisorPkg/Library/BaseCpuLibSysCall/BaseCpuLib.inf
+2 −4 MmSupervisorPkg/Library/BaseIoLibIntrinsicSysCall/BaseIoLibIntrinsic.inf
+220 −0 MmSupervisorPkg/Library/BaseIoLibIntrinsicSysCall/IoLibFifo.c
+0 −120 MmSupervisorPkg/Library/BaseIoLibIntrinsicSysCall/X64/IoFifo.nasm
+2 −1 MmSupervisorPkg/Library/BaseLibSysCall/BaseLib.inf
+2 −2 MmSupervisorPkg/Library/BaseLibSysCall/CheckSum.c
+1 −1 MmSupervisorPkg/Library/BaseLibSysCall/X64/TdVmcall.nasm
+94 −0 MmSupervisorPkg/Library/BaseLibSysCall/X64/VmgExitSvsm.nasm
+1 −2 MmSupervisorPkg/Library/MmSupervisorMemLib/MmSupervisorCoreMemLib.inf
+1 −1 MmSupervisorPkg/Library/MmSupervisorMemLib/MmSupervisorMemLibSyscall.inf
+49 −159 MmSupervisorPkg/Library/StandaloneMmHobLibSyscall/StandaloneMmHobLibSyscall.c
+1 −1 MmSupervisorPkg/Library/StandaloneMmHobLibSyscall/StandaloneMmHobLibSyscall.inf
+2 −1 MmSupervisorPkg/MmSupervisorPkg.dsc
+1 −1 MmSupervisorPkg/Test/MmiHandlerProfileInfo/MmiHandlerProfileInfo.inf
+3 −3 pip-requirements.txt
2 changes: 1 addition & 1 deletion MU_BASECORE
Submodule MU_BASECORE updated 1059 files
178 changes: 0 additions & 178 deletions Platforms/QemuQ35Pkg/Include/Register/QemuSmramSaveStateMap.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <Library/DebugLib.h>
#include <Library/MemEncryptSevLib.h>
#include <Library/PcdLib.h>
#include <Register/QemuSmramSaveStateMap.h>
#include <Register/Amd/SmramSaveStateMap.h>
#include <Register/SmramSaveStateMap.h>
#include <Uefi/UefiBaseType.h>

Expand Down Expand Up @@ -49,7 +49,7 @@ MemEncryptSevLocateInitialSmramSaveStateMapPages (
}

MapStart = SMM_DEFAULT_SMBASE + SMRAM_SAVE_STATE_MAP_OFFSET;
MapEnd = MapStart + sizeof (QEMU_SMRAM_SAVE_STATE_MAP);
MapEnd = MapStart + sizeof (AMD_SMRAM_SAVE_STATE_MAP);
MapPagesStart = MapStart & ~(UINTN)EFI_PAGE_MASK;
MapPagesEnd = ALIGN_VALUE (MapEnd, EFI_PAGE_SIZE);
MapPagesSize = MapPagesEnd - MapPagesStart;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @file
*MsPlatformDevicesLib - Device specific library.
MsPlatformDevicesLib - Device specific library.
Copyright (C) Microsoft Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Copyright (C) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/

Expand All @@ -11,7 +11,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <IndustryStandard/Pci.h>
#include <IndustryStandard/Virtio095.h>

#include <Guid/DebugAgentGuid.h>
#include <Guid/QemuRamfb.h>
#include <Guid/SerialPortLibVendor.h>

Expand Down Expand Up @@ -177,40 +176,6 @@ ACPI_HID_DEVICE_PATH gPnp16550ComPortDeviceNode = gPnp16550ComPort;
UART_DEVICE_PATH gUartDeviceNode = gUart;
VENDOR_DEVICE_PATH gTerminalTypeDeviceNode = gPcAnsiTerminal;

//
// Debug Agent UART Device Path
//
VENDOR_UART_DEVICE_PATH gDebugAgentUartDevicePath = {
{
{
HARDWARE_DEVICE_PATH,
HW_VENDOR_DP,
{
(UINT8)(sizeof (VENDOR_DEVICE_PATH)),
(UINT8)((sizeof (VENDOR_DEVICE_PATH)) >> 8)
}
},
EFI_DEBUG_AGENT_GUID,
},
{
{
MESSAGING_DEVICE_PATH,
MSG_UART_DP,
{
(UINT8)(sizeof (UART_DEVICE_PATH)),
(UINT8)((sizeof (UART_DEVICE_PATH)) >> 8)
}
},
0, // Reserved
0, // BaudRate - Default
0, // DataBits - Default
0, // Parity - Default
0, // StopBits - Default
},
gPcAnsiTerminal,
gEndEntire
};

STATIC USB_KEYBOARD_DEVICE_PATH gUsbKeyboardDevicePath = {
{
{
Expand Down Expand Up @@ -313,10 +278,6 @@ STATIC PREFERRED_VIDEO_DEVICE gPreferredVideo = {
// Predefined platform default console device path
//
BDS_CONSOLE_CONNECT_ENTRY gPlatformConsoles[] = {
{
(EFI_DEVICE_PATH_PROTOCOL *)&gDebugAgentUartDevicePath,
(CONSOLE_OUT | CONSOLE_IN | STD_ERROR)
},
{
(EFI_DEVICE_PATH_PROTOCOL *)&gUsbKeyboardDevicePath,
CONSOLE_IN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
MdeModulePkg/MdeModulePkg.dec
QemuPkg/QemuPkg.dec
QemuQ35Pkg/QemuQ35Pkg.dec
SourceLevelDebugPkg/SourceLevelDebugPkg.dec

[LibraryClasses]
BaseMemoryLib
Expand Down
Loading

0 comments on commit 66a8f3d

Please sign in to comment.