[PATCH v4 0/5] Build cache enhancement
Steven Shi
From: "Shi, Steven" <steven.shi@...>
Enhance the edk2 build cache with below patches: Patch 01/05: Improve the cache hit rate through new cache checkpoint and hash algorithm Patch 02/05: Print more info to explain why a module build cache miss Patch 03/05: Fix the unsafe [self.Arch][self.Name] key usage in build cache Patch 04/05 Add the GenFds multi-thread support in build cache Patch 05/05 Improve the file saving and copying functions reliability in build cache You can directly try this patch set in the branch: https://github.com/shijunjing/edk2/tree/build_cache_improve_v4 V4: Change single global lock into two locks, which are cache_lock and file_lock, for better cache performance and IO reliability in windows V3: Add patch 5. To improve the autogen CopyFileOnChange() and SaveFileOnChange() functions reliability for build cache V2: Enhance the SaveHashChainFileToCache() function in ModuleAutoGen.py and not need to call f.close() in the "with open(xxx) as f:" block. The with block will close the file automatically V1: Initial patch set Shi, Steven (5): BaseTools: Improve the cache hit in the edk2 build cache BaseTools: Print first cache missing file for build cachle BaseTools: Change the [Arch][Name] module key in Build cache BaseTools: Add GenFds multi-thread support in build cache BaseTools: Improve the file saving and copying reliability .../Source/Python/AutoGen/AutoGenWorker.py | 27 +- BaseTools/Source/Python/AutoGen/CacheIR.py | 28 + BaseTools/Source/Python/AutoGen/DataPipe.py | 8 + BaseTools/Source/Python/AutoGen/GenC.py | 0 BaseTools/Source/Python/AutoGen/GenMake.py | 229 +++--- .../Source/Python/AutoGen/ModuleAutoGen.py | 738 ++++++++++++++++-- BaseTools/Source/Python/Common/GlobalData.py | 11 + BaseTools/Source/Python/Common/Misc.py | 29 +- BaseTools/Source/Python/build/build.py | 182 +++-- 9 files changed, 1011 insertions(+), 241 deletions(-) mode change 100644 => 100755 BaseTools/Source/Python/AutoGen/AutoGenWorker.py create mode 100755 BaseTools/Source/Python/AutoGen/CacheIR.py mode change 100644 => 100755 BaseTools/Source/Python/AutoGen/DataPipe.py mode change 100644 => 100755 BaseTools/Source/Python/AutoGen/GenC.py mode change 100644 => 100755 BaseTools/Source/Python/AutoGen/GenMake.py mode change 100644 => 100755 BaseTools/Source/Python/AutoGen/ModuleAutoGen.py mode change 100644 => 100755 BaseTools/Source/Python/Common/GlobalData.py mode change 100644 => 100755 BaseTools/Source/Python/Common/Misc.py mode change 100644 => 100755 BaseTools/Source/Python/build/build.py -- 2.17.1
|
|
Re: [PATCH v1 0/1] Added GOP driver for DisplayLink-based Universal USB Docks to edk2-platforms
Leif Lindholm
Hi Andy,
toggle quoted messageShow quoted text
A follow-up - a few more things need changing: UsbDisplayLink.h (well, any .h file) should only contain the headers it itself requires. Moreover, the inclusion of wchar.h must disappear completely. Instead, use CHAR16 * in the two locations in UsbDisplayLink.c. Removing wchar.h will then trip you up in Edid.h, at #define EDID_HEADER_SIZE ((size_t)8) Please change the size_t to UINTN. Finally, you need to (and now can after the above changes) get rid of #undef _DEBUG #undef NULL #undef _ASSERT in UsbDisplayLink.h. With these additional changes, the driver builds successfully across GCC 8.3 and CLANG 7.0 for AARCH64/ARM/IA32/X64. Best Regards, Leif
On Wed, Aug 14, 2019 at 06:03:51PM +0100, Leif Lindholm wrote:
Hi Andy,
|
|
Re: [PATCH 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer PageMapLevel5Entry
Laszlo Ersek
On 08/14/19 09:37, Zhang, Shenglei wrote:
Initialize PageMapLevel5Entry at the beginning of the function.If you are convinced that we need this assignment *only* for suppressing an invalid compiler warning, then please add a comment about it: // // set PageMapLevel5Entry to suppress incorrect compiler/analyzer // warnings // Related documentation BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=607 ... Just a suggestion from my side; I defer to the MdeModulePkg maintainers. Thanks Laszlo
|
|
Re: [PATCH v1 0/1] Added GOP driver for DisplayLink-based Universal USB Docks to edk2-platforms
Leif Lindholm
Hi Andy,
toggle quoted messageShow quoted text
Many thanks for this submission. I am finding a few issues when building with gcc/clang (I expect you use Visual Studio). The RELEASE target barfs with .../edk2-platforms/Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/Gop.c:363:1: error: unused function 'CalculateRefreshRate' since the function is only called from a DEBUG statement. Could be resolved by putting the function inside #ifndef MDEPKG_NDEBUG Clang triggers an error on the USB_DISPLAYLINK_DEV_FROM_GRAPHICS_OUTPUT_PROTOCOL macro which seems to go away if the USB_DISPLAYLINK_DEV_SIGNATURE macro is moved below the USB_DISPLAYLINK_DEV definition. (I haven't bothered to figure out why this helps.) The NOOPT build fails for IA32/X64 on clang with .../edk2-platforms/Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/UsbDescriptors.c:35: undefined reference to `memset' You could get rid of this by doing the assignment separate from the definition. (Indeed, I believe this is one of the reasons for the rule.) On X64/clang, the build fails with .../edk2-platforms/Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/UsbDisplayLink.c:410:3: error: '__builtin_ms_va_start' used in System V ABI function Adding EFIAPI to the definition/declaration of DlGopPrintTextToScreen makes this one go away. Best Regards, Leif
On Wed, Aug 14, 2019 at 02:43:43PM +0000, Andy Hayes wrote:
From 4a42eb997aeb3699217b40bf3bc47dec56458847 Mon Sep 17 00:00:00 2001
|
|
Re: static data in dxe_runtime modules
Laszlo, I thunk it is more likely to get rejected as it would not work. Every runtime driver I've every seen usually works like this: 1) Loads as an EFI driver and uses EFI Boot Services in its constructor (gBS, gDS, AllocatePool(), etc.) 2) You use the EFI Boot Service to register the ExitBootServices Event. 3) SetVirtualAddressMap event fires and converts all the pointers 4) After all the ExitBootServices events have been processed the DXE Runtime driver re-relocates the Runtime Driver 5) The next code that runs is a call from the kernel virtual mapping, and the system is at runtime It is important to remember that when gRT->SetVirtualAddressMap() is called by the OS Loader (or early kernel) that gBS->ExitBootServices() has already been called. So by the time you get 3) almost all of EFI is gone. The only services that remain are gRT. Note you find the location of gRT by using the gST passed into the entry point of the driver. So here is lies the problem the entry point is passed a Handle (EFI Boot Services concept) and a pointer to gST (another boot services table). So you can't really reload a module and expect it to work. In EFI the transition from Boot Service time to Runtime already requires a lot of coding discipline to not call services at runtime that will go away after ExitBootServices. Having C code that can be called in Physical mode, and then with a virtual mapping is a very unnatural and what EFI does today is the minimum required to make things work. Also remember dumping more into EFI runtime is stealing memory and usually kernel virtual address space from the OS. Thanks, Andrew Fish
|
|
Re: [PATCH v2 1/1] MdePkg: Add STATIC_ASSERT macro
Vitaly Cheptsov
Michael, Liming, Laszlo,
toggle quoted messageShow quoted text
Static assertions via _Static_assert are standard C11 functionality, thus any at least C11 (ISO/IEC 9899 2011) conforming compiler is required to support the second argument with the diagnostic description. The notation without the message currently is only present in C++, not in C, thus the two-argument notation is the only allowed notation for _Static_assert for at least C17 (ISO/IEC 9899 2018) and below. In the bottom of this message I included a quote from C17 for the relevant section (6.7.10). GCC and CLANG (including Xcode) appear to be conforming to the standard for this section, and MSVC compiler static_assert extension also supports the diagnostic message argument. This is pretty much all we care about. As for examples, I see little reason to clarify STATIC_ASSERT behaviour outside of the standard reference in its description and actual usage in the source code, but can do that just fine if you think that it may help somebody. I fully agree that VERIFY_SIZE_OF usage should be converted to STATIC_ASSERT, and in fact I also suggest VERIFY_SIZE_OF to be entirely removed from Base.h. This should be fairly costless, as apparently it is only used in Base.h and MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c, which I can replace in the same patch set. As for select ASSERT usage switching to STATIC_ASSERT, this would also be great, as let us be honest, the use of ASSERT in EDK II codebase is very questioning. In fact, this was one of the reasons we introduced our own static assertions some time ago. However, fixing up all broken assertions is unlikely a best place to fit into this patchset, but I can surely add a few examples, in case somebody points them out. This will be useful for reference purposes and may help the maintainers to get a better idea when static assertions are to be used. Looking forward to hearing your opinions. Best regards, Vitaly 6.7.10 Static assertions Syntax 1 static_assert-declaration: _Static_assert ( constant-expression , string-literal ) ; Constraints 2 The constant expression shall compare unequal to 0. Semantics 3 The constant expression shall be an integer constant expression. If the value of the constant expression compares unequal to 0, the declaration has no effect. Otherwise, the constraint is violated and the implementation shall produce a diagnostic message that includes the text of the string literal, except that characters not in the basic source character set are not required to appear in the message. Forward references: diagnostics (7.2). 7.2 Diagnostics <assert. h> 3 The macro static_assert expands to _Static_assert.
14 авг. 2019 г., в 18:47, Kinney, Michael D <michael.d.kinney@...> написал(а):
|
|
Re: [RFC] BZ 1837 Enable Windows Firmware Update Driver Tool in Edk2/BaseTools for 201908 stable tag
Eric Jin
Hi Leif,
toggle quoted messageShow quoted text
-----Original Message-----I realize it is my fault that I don't notify the release plan as early as possible even the BZ1837 is created in May and want to catch 201908 stable tag. Thanks. In the patch series V2, Sean has been set as author on patch 1/2. Thank you for this valuable suggestion. Best Regards Eric
|
|
Re: [PATCH v2] BaseTools/Scripts: Add GetUtcDateTime script.
Chiu, Chasel
Yes, as pylama currently not requirement yet we will evaluate this later.
toggle quoted messageShow quoted text
Thanks! Regards, Chasel
-----Original Message-----
|
|
Re: [Patch] MdeModulePkg DxeCore: Fix for missing MAT update
Liming Gao
Laszlo:
toggle quoted messageShow quoted text
-----Original Message-----UEFI variable is created by BDS only when HOB can be found. If Platform PEIM doesn't build HOB, DxeIpl will not build HOB, then BDS will not create UEFI variable. If so, there is no HOB in every boot. Thanks Liming Thanks
|
|
Re: [PATCH v2 1/1] MdePkg: Add STATIC_ASSERT macro
Michael D Kinney
Liming,
toggle quoted messageShow quoted text
I think a good candidate to demonstrate this feature are the checks made in MdePkg/Include/Base.h. The current implementation forces a divide by 0 in the C pre-processor to break the build. STATIC_ASSERT() would be a better way to do this. I would also remove unused externs from the builds. /** Verifies the storage size of a given data type. This macro generates a divide by zero error or a zero size array declaration in the preprocessor if the size is incorrect. These are declared as "extern" so the space for these arrays will not be in the modules. @param TYPE The date type to determine the size of. @param Size The expected size for the TYPE. **/ #define VERIFY_SIZE_OF(TYPE, Size) extern UINT8 _VerifySizeof##TYPE[(sizeof(TYPE) == (Size)) / (sizeof(TYPE) == (Size))] // // Verify that ProcessorBind.h produced UEFI Data Types that are compliant with // Section 2.3.1 of the UEFI 2.3 Specification. // VERIFY_SIZE_OF (BOOLEAN, 1); VERIFY_SIZE_OF (INT8, 1); VERIFY_SIZE_OF (UINT8, 1); VERIFY_SIZE_OF (INT16, 2); VERIFY_SIZE_OF (UINT16, 2); VERIFY_SIZE_OF (INT32, 4); VERIFY_SIZE_OF (UINT32, 4); VERIFY_SIZE_OF (INT64, 8); VERIFY_SIZE_OF (UINT64, 8); VERIFY_SIZE_OF (CHAR8, 1); VERIFY_SIZE_OF (CHAR16, 2); // // The following three enum types are used to verify that the compiler // configuration for enum types is compliant with Section 2.3.1 of the // UEFI 2.3 Specification. These enum types and enum values are not // intended to be used. A prefix of '__' is used avoid conflicts with // other types. // typedef enum { __VerifyUint8EnumValue = 0xff } __VERIFY_UINT8_ENUM_SIZE; typedef enum { __VerifyUint16EnumValue = 0xffff } __VERIFY_UINT16_ENUM_SIZE; typedef enum { __VerifyUint32EnumValue = 0xffffffff } __VERIFY_UINT32_ENUM_SIZE; VERIFY_SIZE_OF (__VERIFY_UINT8_ENUM_SIZE, 4); VERIFY_SIZE_OF (__VERIFY_UINT16_ENUM_SIZE, 4); VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4); A couple examples. Do all the compilers support the message parameter too? STATIC_ASSERT (sizeof (BOOLEAN) == 1, "sizeof (BOOLEAN) does not meet UEFI Specification Data Type requirements") STATIC_ASSERT (sizeof (UINT16) == 2, "sizeof (UINT16) does not meet UEFI Specification Data Type requirements") STATIC_ASSERT (sizeof (INT32) == 4, "sizeof (INT32) does not meet UEFI Specification Data Type requirements") STATIC_ASSERT (sizeof (CHAR16) == 2, "sizeof (CHAR16) does not meet UEFI Specification Data Type requirements") STATIC_ASSERT (sizeof (__VERIFY_UINT8_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements") STATIC_ASSERT (sizeof (__VERIFY_UINT32_ENUM_SIZE) == 4, "Size of enum does not meet UEFI Specification Data Type requirements") Thanks, Mike
-----Original Message-----
|
|
Re: [PATCH] MdePkg: Add STATIC_ASSERT macro
Laszlo Ersek
(adding back the list)
On 08/13/19 16:30, vit9696@... wrote: Laszlo,Awesome news! Once this is upstreamed, we should go through all the ASSERT()s in the code, and replace those that are compile-time checkable with STATIC_ASSERT(). I know that I've added quite a few ASSERT()s that I wished would be checked at build time. Of course, I'll probably never have time for that. :/ Thanks Laszlo
|
|
Re: [PATCH v1 0/1] Added GOP driver for DisplayLink-based Universal USB Docks to edk2-platforms
Michael D Kinney
Hi Andy,
Thanks for the contribution. Is this patch for the edk2-platform repo? The email subject can help clarify the intended repo.
Also, we prefer the patches to be provided inline instead of an attachment. You can use the ‘git send-email’ feature to do this. Here are a couple links to useful wikis.
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Development-Process
I also noticed looking at the patch file that there are some inconsistencies with the EDK II C Coding Standards. Most are around function headers and indents. Here is a link to the latest version:
https://www.gitbook.com/download/pdf/book/edk2-docs/edk-ii-c-coding-standards-specification
I see a few #if 0 and commented out lines of code and TODO comments. Can you please clean these up and if needed add Tianocore Bugzillas for future enhancements/work items for this driver.
https://bugzilla.tianocore.org/
I also noticed that you are using named fields to initialize C structures:
STATIC CONST struct VideoMode ModeData[] = { + { + // 640 x 480 @ 60Hz + .Reserved2 = 2, + .PixelClock = 2517, + .HActive = 640, + .HBlanking = 160, + .HSyncOffset = 16, + .HSyncWidth = 96,
I do like this style because it has better self documentation of the field being initialized to a value. However, I do not see this style in the rest of the EDK II sources, so I am concerned that we may have required compilers for the EDK II that may not support this syntax.
If we find all the supported compilers do support this syntax, this would be a great addition to the EDK II C Coding Standards.
I am curious how this driver interacts with the ConSplitter when displays are hot added and hot removed. I see a reference to a feature that appears to sync the GOP content between frame buffers when a display is hot added. I would be better if the common code in the ConSplitter handled these types of operations instead of putting that code in individual GOP drivers. I have added Ray to this thread who may have ideas on how to handle these hot add events.
Thanks,
Mike
From: Andy Hayes [mailto:andy.hayes@...]
Sent: Wednesday, August 14, 2019 7:44 AM To: devel@edk2.groups.io Cc: Leif Lindholm <leif.lindholm@...>; Kinney, Michael D <michael.d.kinney@...> Subject: [PATCH v1 0/1] Added GOP driver for DisplayLink-based Universal USB Docks to edk2-platforms
From 4a42eb997aeb3699217b40bf3bc47dec56458847 Mon Sep 17 00:00:00 2001 From: "Andy Hayes" < andy.hayes@... > Date: Wed, 14 Aug 2019 15:30:20 +0100 Subject: [PATCH v1 0/1] Added GOP graphics driver for DisplayLink-based Universal USB Docks to edk2-platforms
andy.hayes@... (1): Added GOP driver for USB Docks which use DisplayLink chips.
.../DisplayLinkPkg/DisplayLinkPkg.dsc | 61 + .../DisplayLinkGop/DisplayLinkGopDxe.inf | 63 + .../DisplayLinkPkg/DisplayLinkGop/Edid.h | 129 ++ .../DisplayLinkGop/UsbDescriptors.h | 109 ++ .../DisplayLinkGop/UsbDisplayLink.h | 284 +++++ .../DisplayLinkGop/CapabilityDescriptor.c | 137 ++ .../DisplayLinkGop/ComponentName.c | 235 ++++ .../DisplayLinkPkg/DisplayLinkGop/Edid.c | 598 +++++++++ .../DisplayLinkPkg/DisplayLinkGop/Gop.c | 587 +++++++++ .../DisplayLinkGop/UsbDescriptors.c | 144 +++ .../DisplayLinkGop/UsbDisplayLink.c | 1109 +++++++++++++++++ .../DisplayLinkGop/UsbTransfer.c | 180 +++ .../DisplayLinkGop/VideoModes.c | 254 ++++ Drivers/DisplayLink/DisplayLinkPkg/ReadMe.md | 77 ++ Maintainers.txt | 5 + 15 files changed, 3972 insertions(+) create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkPkg.dsc create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/DisplayLinkGopDxe.inf create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/Edid.h create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/UsbDescriptors.h create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/UsbDisplayLink.h create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/CapabilityDescriptor.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/ComponentName.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/Edid.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/Gop.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/UsbDescriptors.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/UsbDisplayLink.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/UsbTransfer.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/VideoModes.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/ReadMe.md
-- 2.17.1
|
|
Re: static data in dxe_runtime modules
Laszlo Ersek
On 08/13/19 13:23, Roman Kagan wrote:
On Tue, Aug 13, 2019 at 11:10:27AM +0200, Laszlo Ersek wrote:Not my place to say authoritatively, but:On 08/12/19 20:43, Roman Kagan wrote:Is reloading the module from scratch ruled out completely?On Fri, Aug 09, 2019 at 04:07:00PM +0000, Roman Kagan via Groups.Io wrote:So it looks like the issue can't be solved without making OpenSSL awareOn Thu, Aug 08, 2019 at 07:39:14PM +0200, Laszlo Ersek wrote:It doesn't :( It just gets slightly further and hits another staticOn 08/07/19 19:41, Andrew Fish wrote:Since, as you point out below, the problem only affects the essentiallyOn Aug 7, 2019, at 10:29 AM, Laszlo Ersek <lersek@...> wrote: - it would be a first, as much as I can say, - it would duplicate (in purpose) an existing facility. Personally I'd expect it to be rejected, but it's not up to me. If you're willing to "build one to (possibly) throw away", that could be the most direct way to get authoritative (= maintainer) feedback. Thanks Laszlo I'd try to cook up a patch for that unless there's a strong no-go.
|
|
Re: [Patch] MdeModulePkg DxeCore: Fix for missing MAT update
Laszlo Ersek
On 08/14/19 16:00, Gao, Liming wrote:
Laszlo: Yes, please. Thanks! Yes, that's what I meant by "no later than in the DXE IPL PEIM".The gEfiMemoryTypeInformationGuid HOB is supposed to be built -- if itgEfiMemoryTypeInformationGuid HOB is installed by platform PEI. If the platform PEI doesn't install this HOB, it means this feature is disabled.PlatformPei is supposed to build the HOB in the first place, yes. However, if it doesn't, then there still may be a feedback loop between the DXE IPL PEIM and BDS. The former builds the HOB from the UEFI variable, and the latter updates the variable (as I understand) for future boots. Thanks Laszlo
|
|
Re: [PATCH V2] ShellPkg/UefiShellDriver1CommandsLib: Make array big enough
Carsey, Jaben
Reviewed-by: Jaben Carsey <jaben.carsey@...>
toggle quoted messageShow quoted text
Thanks -Jaben
-----Original Message-----
|
|
Re: [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Remove the variable "Index"
Carsey, Jaben
Reviewed-by: Jaben Carsey <jaben.carsey@...>
toggle quoted messageShow quoted text
Thanks -Jaben
-----Original Message-----
|
|
Re: Cancelled Event: TianoCore Design / Bug Triage - EMEA - Wednesday, 14 August 2019
#cal-cancelled
No topics this week.
Also, I'll be at the Open Source Summit next week. Ray will likely run the design meeting on Thursday, and unless anyone has any topics for Wednesday, we'll probably cancel that one. Cheers, Stephano On Wed, Aug 14, 2019 at 7:46 AM devel@edk2.groups.io Calendar <devel@edk2.groups.io> wrote:
|
|
Cancelled Event: TianoCore Design / Bug Triage - EMEA - Wednesday, 14 August 2019
#cal-cancelled
devel@edk2.groups.io Calendar <devel@...>
Cancelled: TianoCore Design / Bug Triage - EMEA This event has been cancelled. When: Where: Organizer: Description: Join Zoom Meeting
One tap mobile +17207072699,,695893389# US +16465588656,,695893389# US (New York)
Dial by your location +1 720 707 2699 US +1 646 558 8656 US (New York) Meeting ID: 695 893 389 Find your local number: https://zoom.us/u/abOtdJckxL
|
|
[PATCH v1 0/1] Added GOP driver for DisplayLink-based Universal USB Docks to edk2-platforms
Andy Hayes
From 4a42eb997aeb3699217b40bf3bc47dec56458847 Mon Sep 17 00:00:00 2001 From: "Andy Hayes" < andy.hayes@... > Date: Wed, 14 Aug 2019 15:30:20 +0100 Subject: [PATCH v1 0/1] Added GOP graphics driver for DisplayLink-based Universal USB Docks to edk2-platforms
andy.hayes@... (1): Added GOP driver for USB Docks which use DisplayLink chips.
.../DisplayLinkPkg/DisplayLinkPkg.dsc | 61 + .../DisplayLinkGop/DisplayLinkGopDxe.inf | 63 + .../DisplayLinkPkg/DisplayLinkGop/Edid.h | 129 ++ .../DisplayLinkGop/UsbDescriptors.h | 109 ++ .../DisplayLinkGop/UsbDisplayLink.h | 284 +++++ .../DisplayLinkGop/CapabilityDescriptor.c | 137 ++ .../DisplayLinkGop/ComponentName.c | 235 ++++ .../DisplayLinkPkg/DisplayLinkGop/Edid.c | 598 +++++++++ .../DisplayLinkPkg/DisplayLinkGop/Gop.c | 587 +++++++++ .../DisplayLinkGop/UsbDescriptors.c | 144 +++ .../DisplayLinkGop/UsbDisplayLink.c | 1109 +++++++++++++++++ .../DisplayLinkGop/UsbTransfer.c | 180 +++ .../DisplayLinkGop/VideoModes.c | 254 ++++ Drivers/DisplayLink/DisplayLinkPkg/ReadMe.md | 77 ++ Maintainers.txt | 5 + 15 files changed, 3972 insertions(+) create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkPkg.dsc create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/DisplayLinkGopDxe.inf create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/Edid.h create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/UsbDescriptors.h create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/UsbDisplayLink.h create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/CapabilityDescriptor.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/ComponentName.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/Edid.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/Gop.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/UsbDescriptors.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/UsbDisplayLink.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/UsbTransfer.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/VideoModes.c create mode 100644 Drivers/DisplayLink/DisplayLinkPkg/ReadMe.md
-- 2.17.1
|
|
Re: CPU hotplug using SMM with QEMU+OVMF
Paolo Bonzini <pbonzini@...>
On 14/08/19 15:20, Yao, Jiewen wrote:
Yes, this would be a new operation mode for QEMU, that only applies to- Does this part require a new branch somewhere in the OVMF SEC code?[Jiewen] I think this is blocked from hardware perspective, since the first instruction. hot-plugged CPUs. In this mode the AP doesn't reply to INIT or SMI, in fact it doesn't reply to anything at all. You do not need a reset vector or INIT/SIPI/SIPI sequence at all in- How do we tell the hot-plugged AP where to start execution? (I.e. that[Jiewen] Same real mode reset vector at FFFF:FFF0. QEMU. The AP does not start execution at all when it is unplugged, so no cache-as-RAM etc. We only need to modify QEMU so that hot-plugged APIs do not reply to INIT/SIPI/SMI. I don’t think there is problem for real hardware, who always has CAR.Why is a CPU-specific region needed if every other processor is in SMM and thus trusted. I can answer this: the SMM handler would interact with the hotplugDoes CPU hotplug apply only at the socket level? If the CPU is controller in the same way that ACPI DSDT does normally. This supports multiple hotplugs already. Writes to the hotplug controller from outside SMM would be ignored. The QEMU DSDT could be modified (when secure boot is in effect) to OUT(03) New CPU: (Flash) send board message to tell host CPU (GPIO->SCI)Maybe we can simplify this in QEMU by broadcasting an SMI to existent to 0xB2 when hotplug happens. It could write a well-known value to 0xB2, to be read by an SMI handler in edk2. Right, this would be a write to the CPU hotplug controller[Jiewen] The new CPU does not enable SMI at reset.(NOTE: Host CPU can onlysendinstruction in SMM mode. -- The register is SMM only)Sorry, I don't follow -- what register are we talking about here, and See above.[Jiewen] OS here means the Host CPU running code in OS environment, not in SMM environment.(04) Host CPU: (OS) get message from board that a new CPU is added.I don't understand the OS involvement here. But, again, perhaps QEMU can See above.[Jiewen] Right. That is the register to let host CPU tell new CPU to enable SMI.(06) Host CPU: (SMM) Save 38000, Update 38000 -- fill simple SMMAha, so this is the SMM-only register you mention in step (03). Is the So in our case we'd need an INIT/SIPI/SIPI sequence between (06) and (07).[Jiewen] The new CPU exits SMM and return to original place - where it is(10) New CPU: (SMM) Response first SMI at 38000, and rebase SMBASE toWhat code does the new CPU execute after it completes step (10)? Does it I'd rather avoid this and stay as close as possible to real hardware.(11) Host CPU: (SMM) Restore 38000.These steps (i.e., (06) through (11)) don't appear RAS-specific. The Paolo
|
|