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

Integrate 202311 release branches #809

Merged
merged 80 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
f269592
BRANCH DEPRECATION NOTICE: Use GitHub main branch!
makubacki Oct 14, 2022
944450c
Mute logs
kuqin12 Dec 13, 2023
fbb56cd
Fixing the build
kuqin12 Dec 13, 2023
56e02bd
Random check in for all the submodules
kuqin12 Dec 13, 2023
3745843
Merge remote-tracking branch 'origin/main' into inte_202308
kuqin12 Dec 14, 2023
ed2765e
Merge remote-tracking branch 'github/main' into inte_202308
kuqin12 Dec 14, 2023
cabf582
Use smaller openssl
kuqin12 Dec 15, 2023
740f47e
Update submodule commits to use staging 202308
kuqin12 Dec 15, 2023
9be4acf
Fixed builds
kuqin12 Dec 19, 2023
8f22f33
Updated basecore, supv, tiano_plus
kuqin12 Dec 19, 2023
84406a6
revert local changes
kuqin12 Dec 19, 2023
834e634
Properly integrate https://github.com/tianocore/edk2/commit/24e6daa2b…
kuqin12 Dec 19, 2023
fed01ef
Properly integrate https://github.com/tianocore/edk2/commit/12d3d60f5…
kuqin12 Dec 19, 2023
0556603
Adding crypto modules and moved them over to use protocols
kuqin12 Dec 20, 2023
5d19aef
Update to top of staging and test
kuqin12 Dec 20, 2023
4792404
Remove the unused function
kuqin12 Dec 20, 2023
ba3e75f
fix boot loop
kuqin12 Dec 20, 2023
569de69
Removed some junk and added support for ISO
kuqin12 Dec 20, 2023
c3b9b1a
move tfa tp v2.10
kuqin12 Dec 20, 2023
62762f4
Removed extra junk
kuqin12 Dec 21, 2023
4bd0b5f
Revert to v2.9 as the newly added CPUs makes the firmware not bootabl…
kuqin12 Dec 21, 2023
87dc07f
Merge remote-tracking branch 'github/main' into inte_202311
kuqin12 Dec 21, 2023
b82792a
Updated testing branch of basecore
kuqin12 Dec 21, 2023
c838e94
another update of basecore
kuqin12 Dec 21, 2023
fa65567
fixing up basecore
kuqin12 Dec 22, 2023
8fb8716
Updated submodules
kuqin12 Dec 22, 2023
4613015
See if this will do any better?
kuqin12 Dec 22, 2023
f6c387d
Fixing up the MU
kuqin12 Dec 22, 2023
6731cd1
Merge branch 'inte_202311' of https://github.com/kuqin12/mu_tiano_pla…
kuqin12 Dec 22, 2023
3928c61
Update to use full
kuqin12 Dec 22, 2023
35f3eeb
Update to latest basecore _test
kuqin12 Dec 22, 2023
96e35bf
Merge branch 'inte_202311' of https://github.com/kuqin12/mu_tiano_pla…
kuqin12 Dec 22, 2023
d0f5c33
Reverted unused change
kuqin12 Dec 22, 2023
4af0e6d
Another basecore?
kuqin12 Dec 22, 2023
f697d94
Merge remote-tracking branch 'github/main' into inte_202311
kuqin12 Dec 22, 2023
1a613d0
Updated supv override hash
kuqin12 Dec 22, 2023
bc7f60d
what about now?
kuqin12 Dec 22, 2023
53d3795
ISO parity
kuqin12 Jan 9, 2024
bd66b22
MU submodule update to the mainline
kuqin12 Jan 19, 2024
743d997
Merge remote-tracking branch 'github/main' into inte_202311
kuqin12 Jan 19, 2024
9006685
Update submodules
kuqin12 Jan 19, 2024
28693cc
Update the supv
kuqin12 Jan 19, 2024
b8dd433
Fixing mubasecore
kuqin12 Jan 23, 2024
933b4ff
Features/MM_SUPV
kuqin12 Jan 30, 2024
6786e72
Update to top of arm tiano
kuqin12 Jan 30, 2024
ea5ad8b
Update to top of mu
kuqin12 Jan 30, 2024
7a46611
Update tiano to top
kuqin12 Jan 30, 2024
6a1ca28
how about now...?
kuqin12 Jan 30, 2024
960e810
Merge from top of main
kuqin12 Jan 30, 2024
70e11fe
MU_oem update
kuqin12 Jan 30, 2024
8ac65ac
Use bin
kuqin12 Jan 30, 2024
f2dea98
we got more of this?
kuqin12 Jan 30, 2024
1e2bb92
See if this would do?
kuqin12 Jan 30, 2024
e843590
pei instance
kuqin12 Jan 30, 2024
9e7a32b
Updated MU basecore
kuqin12 Feb 1, 2024
3742167
Merge remote-tracking branch 'github/main' into inte_202311
kuqin12 Feb 1, 2024
ac75f55
basecore updated
kuqin12 Feb 1, 2024
ff5c52c
Merge branch 'inte_202311' of https://github.com/kuqin12/mu_tiano_pla…
kuqin12 Feb 1, 2024
e8fc352
Updated mu basecore
kuqin12 Feb 2, 2024
80a858c
Revert the tseg size
kuqin12 Feb 2, 2024
eb9a975
basecore update
kuqin12 Feb 5, 2024
9d56872
Merge remote-tracking branch 'github/main' into inte_202311
kuqin12 Feb 6, 2024
44fab29
use v2023110000.0.0
kuqin12 Feb 6, 2024
a030678
MU update to v2023110000.0.0
kuqin12 Feb 6, 2024
cd414ea
v2023110000.0.0 for oem sample
kuqin12 Feb 6, 2024
97e1a3c
Update Mu tiano to v2023110000.0.0
kuqin12 Feb 6, 2024
356020e
fixing the mm supv
kuqin12 Feb 6, 2024
12d07e5
Fixing up the feature modules
kuqin12 Feb 6, 2024
397f17c
Merge branch 'main' into inte_202311
kuqin12 Feb 6, 2024
9ab95c9
Merge remote-tracking branch 'github/main' into inte_202311
kuqin12 Feb 6, 2024
d91f05d
memory type update for the non smm type
kuqin12 Feb 6, 2024
d3e2800
Merge branch 'inte_202311' of https://github.com/kuqin12/mu_tiano_pla…
kuqin12 Feb 6, 2024
0be7586
fixing the inverted logic
kuqin12 Feb 7, 2024
4c4653f
Merge branch 'main' into inte_202311
kuqin12 Feb 7, 2024
51a50a1
supv updated to mainline
kuqin12 Feb 7, 2024
24c07bc
Revert to the mainline
kuqin12 Feb 7, 2024
b6a27cd
Merge branch 'inte_202311' of https://github.com/kuqin12/mu_tiano_pla…
kuqin12 Feb 7, 2024
c771683
touch up sbsa to remove duplicate changes
kuqin12 Feb 7, 2024
157dd6a
Adding a temp change to test the codeql, this is to be reverted.
kuqin12 Feb 7, 2024
89c2606
Merge branch 'main' into inte_202311
kuqin12 Feb 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Common/MU
2 changes: 1 addition & 1 deletion Common/MU_TIANO
Submodule MU_TIANO updated 77 files
+2 −2 .azurepipelines/templates/defaults.yml
+31 −0 .editorconfig
+52 −0 .git-blame-ignore-revs
+2 −2 .github/workflows/codeql.yml
+8 −4 .pytool/CISettings.py
+9 −9 EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.c
+5 −5 EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c
+11 −11 EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.c
+0 −2 EmbeddedPkg/EmbeddedPkg.ci.yaml
+0 −15 EmbeddedPkg/Include/Library/RealTimeClockLib.h
+1 −1 EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.c
+10 −1 EmbeddedPkg/Library/NorFlashInfoLib/NorFlashInfoLib.c
+0 −24 EmbeddedPkg/Library/TemplateRealTimeClockLib/RealTimeClockLib.c
+0 −18 EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c
+1 −1 EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
+10 −10 EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
+0 −2 FmpDevicePkg/FmpDevicePkg.ci.yaml
+1 −1 FmpDevicePkg/FmpDxe/VariableSupport.c
+3 −3 PrmPkg/Application/PrmInfo/PrmInfo.c
+5 −5 PrmPkg/Library/DxePrmContextBufferLib/DxePrmContextBufferLib.c
+1 −1 PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmContextBufferLibUnitTest.c
+1 −1 PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmContextBufferLibUnitTestHost.inf
+7 −7 PrmPkg/Library/DxePrmModuleDiscoveryLib/DxePrmModuleDiscoveryLib.c
+1 −1 PrmPkg/Library/DxePrmModuleDiscoveryLib/UnitTest/DxePrmModuleDiscoveryLibUnitTestHost.inf
+20 −20 PrmPkg/Library/DxePrmPeCoffLib/DxePrmPeCoffLib.c
+22 −22 PrmPkg/PrmConfigDxe/PrmConfigDxe.c
+11 −11 PrmPkg/PrmLoaderDxe/PrmLoaderDxe.c
+0 −2 PrmPkg/PrmPkg.ci.yaml
+2 −2 PrmPkg/PrmSsdtInstallDxe/PrmSsdtInstallDxe.c
+18 −20 ReadMe.rst
+29 −8 SecurityPkg/FvReportPei/FvReportPei.c
+1 −0 SecurityPkg/FvReportPei/FvReportPei.h
+1 −0 SecurityPkg/FvReportPei/FvReportPei.inf
+39 −33 SecurityPkg/HddPassword/HddPasswordDxe.c
+0 −1 SecurityPkg/HddPassword/HddPasswordDxe.h
+2 −1 SecurityPkg/HddPassword/HddPasswordDxe.inf
+5 −5 SecurityPkg/HddPassword/HddPasswordPei.c
+193 −36 SecurityPkg/Library/AuthVariableLib/AuthService.c
+3 −1 SecurityPkg/Library/AuthVariableLib/AuthServiceInternal.h
+27 −15 SecurityPkg/Library/AuthVariableLib/AuthVariableLib.c
+57 −37 SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c
+3 −3 SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarchyLib.c
+1 −1 SecurityPkg/Library/PlatformPKProtectionLibVarPolicy/PlatformPKProtectionLibVarPolicy.c
+124 −89 SecurityPkg/Library/SecureBootVariableLib/GoogleTest/SecureBootVariableLibGoogleTest.cpp
+19 −19 SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.c
+1 −1 SecurityPkg/Library/SecureBootVariableLib/UnitTest/MockPlatformPKProtectionLib.inf
+1 −1 SecurityPkg/Library/SecureBootVariableLib/UnitTest/MockUefiLib.inf
+1 −1 SecurityPkg/Library/SecureBootVariableLib/UnitTest/MockUefiRuntimeServicesTableLib.inf
+85 −89 SecurityPkg/Library/SecureBootVariableLib/UnitTest/SecureBootVariableLibUnitTest.c
+1 −1 SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvisionLib.c
+5 −1 SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c
+1 −0 SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
+5 −1 SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c
+38 −18 SecurityPkg/RandomNumberGenerator/RngDxe/AArch64/AArch64Algo.c
+9 −14 SecurityPkg/RandomNumberGenerator/RngDxe/ArmRngDxe.c
+1 −3 SecurityPkg/RandomNumberGenerator/RngDxe/RngDxe.inf
+1 −1 SecurityPkg/SecurityPkg.ci.yaml
+0 −3 SecurityPkg/SecurityPkg.dec
+3 −2 SecurityPkg/SecurityPkg.dsc
+0 −1 SecurityPkg/SecurityPkg.uni
+17 −13 SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c
+4 −4 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
+5 −5 SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.c
+6 −6 SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.c
+5 −5 SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c
+11 −11 SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c
+3 −3 SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c
+2 −2 SecurityPkg/Test/Mock/Include/GoogleTest/Library/MockPlatformPKProtectionLib.h
+2 −2 SecurityPkg/Test/Mock/Library/GoogleTest/MockPlatformPKProtectionLib/MockPlatformPKProtectionLib.cpp
+8 −0 SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
+48 −6 SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.c
+7 −0 SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
+2 −0 SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigStrings.uni
+7 −7 SecurityPkg/VariableAuthenticated/SecureBootDefaultKeysDxe/SecureBootDefaultKeysDxe.c
+2 −2 SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c
+1 −1 SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Pei.c
+3 −2 pip-requirements.txt
2 changes: 1 addition & 1 deletion Features/CONFIG
2 changes: 1 addition & 1 deletion Features/DFCI
2 changes: 1 addition & 1 deletion Features/MM_SUPV
Submodule MM_SUPV updated 44 files
+2 −2 .github/workflows/codeql.yml
+5 −0 MmSupervisorPkg/Core/Dispatcher/Dispatcher.c
+9 −3 MmSupervisorPkg/Core/Handler/Mmi.c
+13 −7 MmSupervisorPkg/Core/Mem/HeapGuard.c
+58 −51 MmSupervisorPkg/Core/Mem/Mem.h
+0 −32 MmSupervisorPkg/Core/Mem/MemWrapper.c
+31 −282 MmSupervisorPkg/Core/Mem/PageTbl.c
+407 −447 MmSupervisorPkg/Core/Mem/SmmCpuMemoryManagement.c
+68 −228 MmSupervisorPkg/Core/Mem/SmmProfile.c
+0 −1 MmSupervisorPkg/Core/Misc/SmmFuncsArch.c
+107 −0 MmSupervisorPkg/Core/Misc/SmmMpPerf.c
+83 −0 MmSupervisorPkg/Core/Misc/SmmMpPerf.h
+9 −1 MmSupervisorPkg/Core/MmSupervisorCore.c
+1 −0 MmSupervisorPkg/Core/MmSupervisorCore.h
+10 −3 MmSupervisorPkg/Core/MmSupervisorCore.inf
+219 −53 MmSupervisorPkg/Core/Relocate/Relocate.c
+12 −73 MmSupervisorPkg/Core/Relocate/Relocate.h
+2 −481 MmSupervisorPkg/Core/Relocate/SmramSaveState.c
+2 −2 MmSupervisorPkg/Core/Request/UnblockMemory.c
+1 −45 MmSupervisorPkg/Core/Services/CpuService/CpuService.c
+65 −137 MmSupervisorPkg/Core/Services/MpService/MpService.c
+0 −18 MmSupervisorPkg/Docs/PlatformIntegration/PlatformIntegrationSteps.md
+5 −5 MmSupervisorPkg/Drivers/MmPeiLaunchers/Common/MmIplCommon.c
+7 −7 MmSupervisorPkg/Drivers/MmPeiLaunchers/IA32/X64Loader.c
+9 −9 MmSupervisorPkg/Drivers/MmPeiLaunchers/MmIplPei.c
+1 −1 MmSupervisorPkg/Drivers/MmPeiLaunchers/MmIplPei.inf
+1 −1 MmSupervisorPkg/Drivers/MmPeiLaunchers/MmIplX64Relay.inf
+2 −2 MmSupervisorPkg/Drivers/MmPeiLaunchers/X64/X64Entry.c
+13 −0 MmSupervisorPkg/Drivers/MmSupervisorRing3Broker/MmSupervisorRing3Broker.c
+2 −1 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
+1 −1 MmSupervisorPkg/Library/BaseLibSysCall/BaseLib.inf
+1 −1 MmSupervisorPkg/Library/BaseLibSysCall/SafeString.c
+40 −32 MmSupervisorPkg/Library/BaseLibSysCall/String.c
+1 −3 MmSupervisorPkg/Library/BaseLibSysCall/X64/TdVmcall.nasm
+1 −1 MmSupervisorPkg/Library/MmSupervisorMemLib/MmSupervisorCoreMemLib.inf
+1 −1 MmSupervisorPkg/Library/MmSupervisorMemLib/MmSupervisorMemLibSyscall.inf
+1 −1 MmSupervisorPkg/Library/MmSupervisorMemLib/X86StandaloneMmMemLibInternal.c
+16 −0 MmSupervisorPkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLibCore.c
+32 −0 MmSupervisorPkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLibCore.inf
+3 −1 MmSupervisorPkg/MmSupervisorPkg.dsc
+2 −2 pip-requirements.txt
2 changes: 1 addition & 1 deletion MU_BASECORE
Submodule MU_BASECORE updated 980 files
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include "SnpPageStateChange.h"

#define IS_ALIGNED(x, y) ((((x) & (y - 1)) == 0))
#define PAGES_PER_LARGE_ENTRY 512

STATIC
Expand Down
159 changes: 1 addition & 158 deletions Platforms/QemuQ35Pkg/Plugins/QemuRunner/QemuRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,13 @@

import logging
import os
import threading
import datetime
import subprocess
import re
import io
import shutil
from pathlib import Path
from edk2toolext.environment import plugin_manager
from edk2toolext.environment.plugintypes import uefi_helper_plugin
from edk2toollib import utility_functions
from edk2toollib.uefi.edk2.parsers.dsc_parser import DscParser
from edk2toollib.uefi.edk2.parsers.inf_parser import InfParser
from edk2toolext.environment.multiple_workspace import MultipleWorkspace

class QemuRunner(uefi_helper_plugin.IUefiHelperPlugin):

Expand Down Expand Up @@ -220,8 +214,7 @@ def Runner(env):
args += " -monitor tcp:127.0.0.1:" + monitor_port + ",server,nowait"

# Run QEMU
#ret = QemuRunner.RunCmd(executable, args, thread_target=QemuRunner.QemuCmdReader)
ret = utility_functions.RunCmd(executable, args)
ret = utility_functions.RunCmd(executable, args, logging_level=logging.CRITICAL)
kuqin12 marked this conversation as resolved.
Show resolved Hide resolved
if ret != 0 and os.name != 'nt':
# Linux version of QEMU will mess with the print if its run failed, this is to restore it
utility_functions.RunCmd ('stty', 'echo')
Expand All @@ -237,153 +230,3 @@ def Runner(env):
ret = 0

return ret

####
# Helper functions for running commands from the shell in python environment
# Don't use directly
#
# process output stream and write to log.
# part of the threading pattern.
#
# http://stackoverflow.com/questions/19423008/logged-subprocess-communicate
####
@staticmethod
def QemuCmdReader(filepath, outstream, stream, logging_level=logging.INFO):
f = None
# open file if caller provided path
error_found = False
if(filepath):
f = open(filepath, "w")
while True:
try:
s = stream.readline().decode()
ss = s.rstrip() # string stripped
except UnicodeDecodeError as e:
logging.error(str(e))
if not s:
break
if(f is not None):
# write to file if caller provided file
f.write(ss)
f.write("\n")
if(outstream is not None):
# write to stream object if caller provided object
outstream.write(ss)
f.write("\n")
logging.log(logging_level, ss)
if s.startswith("ASSERT "):
message = "ASSERT DETECTED, killing QEMU process: " + ss
logging.error(message)
if (outstream is not None):
outstream.write(message)
if (f is not None):
f.write(message)
error_found = True
break
stream.close()
if(f is not None):
f.close()
return None if not error_found else 1

####
# Run a shell command and print the output to the log file
# This is the public function that should be used to run commands from the shell in python environment
# @param cmd - command being run, either quoted or not quoted
# @param parameters - parameters string taken as is
# @param capture - boolean to determine if caller wants the output captured in any format.
# @param workingdir - path to set to the working directory before running the command.
# @param outfile - capture output to file of given path.
# @param outstream - capture output to a stream.
# @param environ - shell environment variables dictionary that replaces the one inherited from the
# current process.
# @param target - a function to call. It must accept four parameters: filepath, outstream, stream, logging_level
# @param logging_level - log level to log output at. Default is INFO
# @param raise_exception_on_nonzero - Setting to true causes exception to be raised if the cmd
# return code is not zero.
#
# @return returncode of called cmd
####
@staticmethod
def RunCmd(cmd, parameters, capture=True, workingdir=None, outfile=None, outstream=None, environ=None, thread_target=None, logging_level=logging.INFO, raise_exception_on_nonzero=False):
cmd = cmd.strip('"\'')
if " " in cmd:
cmd = '"' + cmd + '"'
if parameters is not None:
parameters = parameters.strip()
cmd += " " + parameters
if thread_target is None:
thread_target = utility_functions.reader
starttime = datetime.datetime.now()
logging.log(logging_level, "Cmd to run is: " + cmd)
logging.log(logging_level, "------------------------------------------------")
logging.log(logging_level, "--------------Cmd Output Starting---------------")
logging.log(logging_level, "------------------------------------------------")
wait_delay = 0.5 # we check about every second
c = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=workingdir, shell=True, env=environ)
if(capture):
thread = PropagatingThread(target=thread_target, args=(outfile, outstream, c.stdout, logging_level))
thread.start()
while True:
try:
c.wait(wait_delay)
except subprocess.TimeoutExpired:
# we expect this to throw and this is safe behavior
pass
ret = thread.join(wait_delay)
if c.poll() is not None or not thread.is_alive() or ret is not None:
break
# if the propagating thread exited but the cmd is still going
if c.poll() is None and not thread.is_alive():
logging.log(logging_level,"WARNING: Terminating the process early due to target")
c.kill()
if thread.ret != None:
c.returncode = thread.ret # force the return code to be non zero
if c.poll() is None and not thread.is_alive():
logging.log(logging_level,"WARNING: Killing the process early due to target")
c.terminate()
if thread.ret != None:
c.returncode = thread.ret # force the return code to be non zero
else:
c.wait()
endtime = datetime.datetime.now()
delta = endtime - starttime
endtime_str = "{0[0]:02}:{0[1]:02}".format(divmod(delta.seconds, 60))
returncode_str = "{0:#010x}".format(c.returncode)
logging.log(logging_level, "------------------------------------------------")
logging.log(logging_level, "--------------Cmd Output Finished---------------")
logging.log(logging_level, "--------- Running Time (mm:ss): " + endtime_str + " ----------")
logging.log(logging_level, "----------- Return Code: " + returncode_str + " ------------")
logging.log(logging_level, "------------------------------------------------")

if raise_exception_on_nonzero and c.returncode != 0:
raise Exception("{0} failed with Return Code: {1}".format(cmd, returncode_str))
return c.returncode

####
# Class to support running commands from the shell in a python environment.
# Don't use directly.
#
# PropagatingThread copied from sample here:
# https://stackoverflow.com/questions/2829329/catch-a-threads-exception-in-the-caller-thread-in-python
####
class PropagatingThread(threading.Thread):
def run(self):
self.exc = None
self.ret = None
try:
if hasattr(self, '_Thread__target'):
# Thread uses name mangling prior to Python 3.
self.ret = self._Thread__target(*self._Thread__args, **self._Thread__kwargs)
else:
self.ret = self._target(*self._args, **self._kwargs)
except SystemExit as e:
self.ret = e.code
except BaseException as e:
self.exc = e

def join(self, timeout=0.5):
''' timeout is the number of seconds to timeout '''
super(PropagatingThread, self).join(timeout)
if self.exc:
raise self.exc
return self.ret
23 changes: 13 additions & 10 deletions Platforms/QemuQ35Pkg/QemuQ35Pkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@
DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE

# Configure Shared Crypto
!ifndef ENABLE_SHARED_CRYPTO # by default true
ENABLE_SHARED_CRYPTO = TRUE
!endif
# !ifndef ENABLE_SHARED_CRYPTO # by default true
# ENABLE_SHARED_CRYPTO = TRUE
# !endif
ENABLE_SHARED_CRYPTO = FALSE
kuqin12 marked this conversation as resolved.
Show resolved Hide resolved
!if $(ENABLE_SHARED_CRYPTO) == TRUE
PEI_CRYPTO_SERVICES = TINY_SHA
DXE_CRYPTO_SERVICES = STANDARD
Expand Down Expand Up @@ -332,7 +333,7 @@
NULL|MdePkg/Library/VsIntrinsicLib/VsIntrinsicLib.inf
!endif
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf # Contains openSSL library used by BaseCryptoLib
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFull.inf # Contains openSSL library used by BaseCryptoLib
<PcdsFixedAtBuild>
!include CryptoPkg/Driver/Bin/Crypto.pcd.TINY_SHA.inc.dsc
}
Expand All @@ -343,7 +344,7 @@
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf # Contains openSSL library used by BaseCryptoLib
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf # Contains openSSL library used by BaseCryptoLib
<PcdsFixedAtBuild>
!include CryptoPkg/Driver/Bin/Crypto.pcd.STANDARD.inc.dsc
}
Expand All @@ -352,7 +353,7 @@
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
TlsLib|CryptoPkg/Library/TlsLibNull/TlsLibNull.inf
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf # Contains openSSL library used by BaseCryptoLib
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf # Contains openSSL library used by BaseCryptoLib
<PcdsFixedAtBuild>
!include CryptoPkg/Driver/Bin/Crypto.pcd.STANDARD.inc.dsc
}
Expand Down Expand Up @@ -564,6 +565,8 @@
SmmPolicyGateLib|MmSupervisorPkg/Library/SmmPolicyGateLib/SmmPolicyGateLib.inf
HwResetSystemLib|QemuQ35Pkg/Library/ResetSystemLib/StandaloneMmResetSystemLib.inf
IhvSmmSaveStateSupervisionLib|MmSupervisorPkg/Library/IhvMmSaveStateSupervisionLib/IhvMmSaveStateSupervisionLib.inf
MmServicesTableLib|MmSupervisorPkg/Library/StandaloneMmServicesTableLib/StandaloneMmServicesTableLibCore.inf
MmSaveStateLib|UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveStateLib.inf
kuqin12 marked this conversation as resolved.
Show resolved Hide resolved

[LibraryClasses.common.MM_STANDALONE]
TimerLib|QemuQ35Pkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
Expand All @@ -578,7 +581,7 @@
StandaloneMmDriverEntryPoint|MmSupervisorPkg/Library/StandaloneMmDriverEntryPoint/StandaloneMmDriverEntryPoint.inf
# TODO: ShareCrypto support
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
AdvLoggerAccessLib|AdvLoggerPkg/Library/AdvLoggerMmAccessLib/AdvLoggerMmAccessLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLibStandaloneMm.inf
Expand Down Expand Up @@ -870,7 +873,7 @@
# UefiCpuPkg PCDs related to initial AP bringup and general AP management.
gUefiCpuPkgTokenSpaceGuid.PcdCpuBootLogicalProcessorNumber|0

gUefiQemuQ35PkgTokenSpaceGuid.PcdQ35TsegMbytes|8
gUefiQemuQ35PkgTokenSpaceGuid.PcdQ35TsegMbytes|32
kuqin12 marked this conversation as resolved.
Show resolved Hide resolved
gUefiQemuQ35PkgTokenSpaceGuid.PcdQ35SmramAtDefaultSmbase|FALSE


Expand Down Expand Up @@ -1378,7 +1381,7 @@ QemuQ35Pkg/Library/ResetSystemLib/StandaloneMmResetSystemLib.inf
CryptoPkg/Test/UnitTest/Library/BaseCryptLib/BaseCryptLibUnitTestApp.inf {
<LibraryClasses>
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf # Contains openSSL library used by BaseCryptoLib
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf # Contains openSSL library used by BaseCryptoLib
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
<PcdsPatchableInModule>
#Turn off Halt on Assert and Print Assert so that libraries can
Expand Down Expand Up @@ -1495,7 +1498,7 @@ QemuQ35Pkg/Library/ResetSystemLib/StandaloneMmResetSystemLib.inf
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf # Contains openSSL library used by BaseCryptoLib
OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf # Contains openSSL library used by BaseCryptoLib
}

#
Expand Down
16 changes: 3 additions & 13 deletions Platforms/QemuQ35Pkg/ResetVector/Ia16/ResetVectorVtf0.asm
Original file line number Diff line number Diff line change
Expand Up @@ -159,23 +159,13 @@ sevEsResetBlockEnd:
guidedStructureEnd:

ALIGN 16

applicationProcessorEntryPoint:
;
; Application Processors entry point
;
; GenFv generates code aligned on a 4k boundary which will jump to this
; location. (0xffffffe0) This allows the Local APIC Startup IPI to be
; used to wake up the application processors.
; 0xffffffe0
;
jmp EarlyApInitReal16

ALIGN 8

DD 0
DD 0, 0, 0

;
; The VTF signature
; The VTF signature (0xffffffec)
;
; VTF-0 means that the VTF (Volume Top File) code does not require
; any fixups.
Expand Down
Loading
Loading