Git Product home page Git Product logo

mu's Introduction

Project Mu

Build status

This repository contains documentation of the Project Mu.

You can find the documentation at https://microsoft.github.io/mu/.

How to build the docs

We are using MkDocs to build the documentation.

The following gives you a rough overview how to serve it locally:

  • Run pip install --upgrade -r requirements.txt
  • Run DocBuild.py --Build --Clean --yml mkdocs_base.yml
  • Run mkdocs serve

Now you should be able to open http://127.0.0.1:8000 on your machine.

A more detailed information how to build this project can be found here.

mu's People

Contributors

abhiraj963 avatar corthon avatar dependabot[bot] avatar dmitryantipov avatar garybeihl avatar grvsachdeva avatar javagedes avatar keuhdall avatar longjunyu2 avatar makomi avatar makubacki avatar man-jain avatar microsoftopensource avatar misdre avatar mknutsen avatar msftgits avatar out0xb2 avatar sethgr avatar spbrogan avatar stefma avatar taylorbeebe avatar uefibot avatar uzerjamal avatar yangrongwei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mu's Issues

MU_PLUS: Document for "Allow local user to change UEFI settings" in DFCI

There is "Allow local user to change UEFI settings" setting in DFCI config profile, but these is no document to describe which UEFI variable save this setting value.

For example: I can see "CPU and IO virtualization" description in here or DfciSettings.h, so I know "Dfci.CpuAndIoVirtualization.Enable" UEFI variable save this setting value.

MU_PLUS: Enhance ProviderValueAsAscii() to return "Inconsistent" string for Group settings results.

Group settings provider may return ENABLE_INCONSISTENT, but ProviderValueAsAscii() in SettingsManagerProvider.c only process Enabled and Disabled values.
Enhance ProviderValueAsAscii() to return "Inconsistent" string for ENABLE_INCONSISTENT value.

Example:
if (v == ENABLE_TRUE) {
AsciiStrCpyS(Value, ENABLED_STRING_SIZE , "Enabled");
}
else if (v == ENABLE_INCONSISTENT) {
AsciiStrCpyS(Value, ENABLED_STRING_SIZE , "Inconsistent");
}
else {
AsciiStrCpyS(Value, ENABLED_STRING_SIZE, "Disabled");
}

Improve the readability and reduce brittleness of Variable Services "bucket" logic

You can see perhaps the worst offender here:
https://github.com/microsoft/mu_basecore/blob/c4d0d1130454b3e5051bb601c707234e3a91713a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c#L2185

But the idea is to wrap each of these tests in a descriptive macro or function so that it's more readable AND we don't have to change multiple places if we ever change the logic (like adding a new PCD).

Example: WillVarExceedHwErrQuota( VarSize );, or something like that.

Address comments related to SharedCrypto

On this PR, microsoft/mu_plus#22 some comments were made that weren't addressed but it was agreed they would be addressed in a future PR.

Mike K:
The use of the term 'Shared' 'SHARED' should be removed from all types, variables, functions, library, and module names. The private protocol/ppi/smm protocol are an abstraction for the CryptoPkg/Include/BaseCryptLib.h, so the name of the protocol and the modules should make this relationship obvious. Perhaps using the names listed below for includes. The use of 'Base' in the name of the library class is unfortunate. The term 'Base' in the name of a lib instance implies module compatibility with all module types. Private/Protocol/BaseCrypt.h EDKII_BASE_CRYPT_PROTOCOL_GUID EDKII_BASE_CRYPT_PROTOCOL gEdkiiBaseCryptProtocolGuid Private/Protocol/SmmBaseCrypt.h EDKII_SMM_BASE_CRYPT_PROTOCOL_GUID EDKII_SMM_BASE_CRYPT_PROTOCOL gEdkiiSmmBaseCryptProtocolGuid Private/Ppi/BaseCrypt.h EDKII_PEI_BASE_CRYPT_PROTOCOL_GUID EDKII_PEI_BASE_CRYPT_PROTOCOL gEdkiiPeiBaseCryptProtocolGuid Library Instances (not using keyword 'Base') DxeCryptLibOnProtocol SmmCryptLibOnProtocol PeiCryptLibOnPpi Drivers CryptDxe CryptSmm CryptPei We could define a few feature flag PCDs that select between a NULL value and function pointer value when filling in the structure of crypto services. This can reduce the number of INFs and C files. Can we also consider making this a pull request against CryptoPkg in mu_tiano_plus?

There was also the issue of moving the publishing tools outside the code itself

Incremental build error

Hello,
it was reported by one of our customers, that incremental build does not work. We tracked it down to the GNUmakefile
RELEASE_GCC5/AARCH64/ArmPlatformPkg/PrePi/PeiUniCore/GNUmakefile
where a dependency is missing: instead of:

$(FFS_OUTPUT_DIR)/$(MODULE_GUID).efi :
test -f $(OUTPUT_DIR)/ArmPlatformPrePiUniCore.efi && $(CP) $(OUTPUT_DIR)/ArmPlatformPrePiUniCore.efi $(FFS_OUTPUT_DIR)/$(MODULE_GUID).efi

the incremental build works fine with:

$(FFS_OUTPUT_DIR)/$(MODULE_GUID).efi : $(OUTPUT_DIR)/ArmPlatformPrePiUniCore.efi
test -f $(OUTPUT_DIR)/ArmPlatformPrePiUniCore.efi && $(CP) $(OUTPUT_DIR)/ArmPlatformPrePiUniCore.efi $(FFS_OUTPUT_DIR)/$(MODULE_GUID).efi

It means that copy will happen not only if the destination file is missing, but also if the source file (=makefile rule dependency) has changed. (Possibly similar issue for *.map file above in the same GNUmakefile).
I can provide more details if needed, and can debug the whole GNUmakefile generation process in mu_basecore/BaseTools/Source/Python. But it is too big to debug for external person so hopefully somebody can look into it.
Can this be fixed?

DocBuild: add support for *Pkg/Docs folder for Package-wide documentation

Sometimes a Package needs more overview documentation than reasonably should be in 1 markdown file in the root folder. Add support for a Docs subdirectory to contain this Package-wide documentation that is promoted in the twiddle tree, then demote the individual component docs to a subfolder in the twiddle tree.

error 1005: More than one targets are not supported

I'm not sure if it's my fault or there's a bug in build system but I have problem in building mu for qemu. I followed guides and even I did more investigations by checking Azure Pipeline yaml files but I can't find solution to this error:
Pasted_image

Building using this command on debian:
stuart_build -c Platforms/QemuQ35Pkg/PlatformBuild.py TOOL_CHAIN_TAG=GCC5 QEMU_HEADLESS=TRUE TARGET=RELEASE -a IA32,X64

Also I think it's nice to have prebuilt binaries for qemu in Releases section of github.

MU_TIANO_PLUS: add AARCH64 & ARM to SUPPORTED_ARCHITECTURES in CI .DSC's

Many of the CI DSC's lack ARM and AARCH64 in their SUPPORTED_ARCHITECTURES. Lets add these architectures where possible to get build and host unit test coverage.

Examples:

FmpDevicePkg\Test\FmpDeviceHostPkgTest.dsc:15:  SUPPORTED_ARCHITECTURES = IA32|X64
SourceLevelDebugPkg\SourceLevelDebugPkg.dsc:22:  SUPPORTED_ARCHITECTURES        = IA32|X64

MU_PLUS: add AARCH64 & ARM to SUPPORTED_ARCHITECTURES in CI .DSC's

Many of the CI DSC's lack ARM and AARCH64 in their SUPPORTED_ARCHITECTURES. Lets add these architectures where possible to get build and host unit test coverage.

Examples:
AdvLoggerPkg\AdvLoggerPkg.dsc:14: SUPPORTED_ARCHITECTURES = IA32|X64
DfciPkg\DfciPkg.dsc:16: SUPPORTED_ARCHITECTURES = IA32|X64
MfciPkg\MfciPkg.dsc:15: SUPPORTED_ARCHITECTURES = IA32|X64
MsCorePkg\MsCorePkg.dsc:14: SUPPORTED_ARCHITECTURES = IA32|X64
MsGraphicsPkg\MsGraphicsPkg.dsc:14: SUPPORTED_ARCHITECTURES = IA32|X64
MsWheaPkg\MsWheaPkg.dsc:16: SUPPORTED_ARCHITECTURES = IA32|X64
MsWheaPkg\Test\MsWheaPkgHostTest.dsc:15: SUPPORTED_ARCHITECTURES = IA32|X64
PcBdsPkg\PcBdsPkg.dsc:14: SUPPORTED_ARCHITECTURES = IA32|X64
XmlSupportPkg\Test\XmlSupportPkgHostTest.dsc:14: SUPPORTED_ARCHITECTURES = IA32|X64
XmlSupportPkg\XmlSupportPkg.dsc:14: SUPPORTED_ARCHITECTURES = IA32|X64
ZeroTouchPkg\ZeroTouchPkg.dsc:15: SUPPORTED_ARCHITECTURES = IA32|X64

coreboot open source BIOS is already there. Why keep reinventing the wheel?

coreboot open source BIOS is already there and supports a lot of real motherboards. https://coreboot.org/status/board-status.html Instead of reinventing the wheel as "mu" it would have been more efficient to join our forces. I am addressing those 25 people who thought this repository is worthy of forking and would like to know their opinions : @Abhimanyu121 , @Shreya-khandelwal , @abhiraj963 , @adi23arora , @akshay196 , @c-stauffer , @DalavanCloud , @FY1043031060 , @gauravano , @gus33000 , @Justinha , @Man-Jain , @mknutsen , @moulikcipherX , @netroby , @panwalas, @pristineVedansh , @ramyhhh , @ritwik787 , @sanchittanwar7 , @sk9331657 , @skshetry , @StefMa , @uzerjamal , @vbhaip

UEFI on Surface Go blocks non-Windows USB

I am led to understand from your documentation that this is basically the upstream development of the MS Surface UEFI, so I'll repeat here the question and issue that I raised on MS Answers forums here: https://answers.microsoft.com/en-us/surface/forum/all/surface-go-boot-from-usb/4668ec45-af97-4766-9130-53ff75e2e0e2

Can anyone explain to me what are the technical reasons that Surface Go (eMMC version) UEFI refuses to directly boot any UEFI bootable USB other than that with a Windows OS on it?

The issue is as follows: assume you want to install a GNU/Linux OS on your Surface Go. You create a bootable USB with Rufus, you insert it in the USB-C slot and you turn on your system while holding down the volume-down button to toggle the alternate-boot sequence (that's of course enabled in your firmware). But this doesn't seem to boot anything other than whatever OS is already installed on your system, not the LiveUSB.

You then boot into your UEFI settings and change the boot order manually, setting the USB on top. You boot up, but - alas! - USB still won't boot. Finally you boot up your Windows and go to advanced restart. From there you try to boot from USB, and yet again if you try selecting the option to boot from EFI USB the system will simply reboot into the OS already on your Surface.

You do the advanced restart again but this time instead of EFI USB you select the weird named option Linpus Lite - and finally you are able to boot from your GNU/Linux USB (Which is any distro - I tried with Ubuntu, Fedora and PopOS!).

The above jumping though hoops demonstrates that Surface Go doesn't boot non-Windows bootable USBs directly for some reason. I wanna know the technical reason why. By the way, this has got nothing to do with Secure Boot as it can be turned on or off, it doesn't matter.

Upon further tinkering, with efibootmgr I was able to ascertain that whenever a non-Windows bootable USB gets inserted, there appears a new efi boot entry named 'Linpus Lite', but when a Windows bootable USB gets inserted, no new boot entry appears; instead the always-present 'EFI USB drive' boot entry is the Win bootable USB entry. Why is that?

Enhance debug output for exception handlers

This is a request for enhancements to the debug output included in x86 CPU exception handler debug prints.

Two enhancements are requested:

  1. For MachineCheck exceptions, add prints for the architectural Machine Check MSRs (MCi_STATUS, MCi_ADDR, etc.)
  2. Add a dump of the pre-exception stack for exceptions where the stack pointer is valid.

PlatformBuild submodule update doesn't return an error code

The Platform Build --UPDATE --SETUP commands try to checkout and update the submodules in the repository. If it encounters an error (eg. you haven't pushed a commit to the submodule, the server is down, etc.) the script continues and returns a successful exit code.

This causes issues with automated build systems as the build will continue and try to build the project, and fail much later because the submodule was never actually checked out.

repo:mu_pip_environment

MU_PLUS: UEFI variable "_SPP" is modified every POST if IS_OWNER_IDENTITY_ENROLLED(IdMask) return FALSE.

If IS_OWNER_IDENTITY_ENROLLED(IdMask) returns FALSE in CheckForAuthenticationProtocol(), UEFI variable "_SPP" will be updated every POST because Var->SavedOn is different.

Side effect: Every POST, it makes available size in Flash Part variable region less. It will trigger variable reclaim process at someone POST and makes POST time increase. Basically, if system state/configuration is not changed, available size in Flash Part variable region should be the same.

Suggestion: In CheckForAuthenticationProtocol(), it should not modify "_SPP" if OWNER_IDENTITY_ENROLLED state is not changed.

MdeModulePkg: MdeModulePkg/Logo/LogoDxe.inf fails to compile

Fails to build with error:

MdeModulePkg\Logo\Logo.c(34): error C2065: 'IMG_LOGO': undeclared identifier
INFO - MdeModulePkg\Logo\Logo.c(33): error C2099: initializer is not a constant
INFO - NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\bin\HostX86\x86\cl.exe"' : return code '0x2'

Conf folder not included in .gitignore

While building the Mu_plus, I noticed that the Conf folder gets generated for all the tools settings (like VS2019 or GCC5). I think since this is a folder which gets generated on build, we should include this in the .gitignore file.

Please feel free to add any other opinions over this.

Add a telemetry path to ASSERTs

Standardize a telemetry path on ASSERTs that will enable a telemetry event (with some sort of useful identifier) for any ASSERT that happens on a production system (where ASSERTs don't halt the machine).

How is PcdCurrentPointerState value handled in MsGraphicsPkg? It looks like should not be zero.

Hi, I am trying to build mu_plus/MsGraphicsPkg into OvmfPkg and see how it goes in QEMU. But I run into an issue that in UiDisplayMenu, the PCD CurrentPointerState is always zero and it looks like the pointer should be pointing to something in the memory and should not be zero. Is there any missing library/Dxe driver missing in MsGraphicsPkg?

EFI_STATUS
UiDisplayMenu (IN FORM_DISPLAY_ENGINE_FORM *FormData) {
EFI_STATUS Status = EFI_SUCCESS;
DISPLAY_ENGINE_SHARED_STATE *MasterFrameSharedState = (DISPLAY_ENGINE_SHARED_STATE *)(UINTN)PcdGet64(PcdCurrentPointerState);

Peter

OverrideValidation.py cli doesn't work well on linux

This logic doesn't work on linux
https://github.com/microsoft/mu_basecore/blob/release/202008/BaseTools/Plugin/OverrideValidation/OverrideValidation.py#L525

    # Needs to strip os.sep is to take care of the root path case
    # For a folder, this will do nothing on a formatted abspath
    # For a drive root, this will rip off the os.sep
    if not os.path.normcase(Paths.ModulePath).startswith(os.path.normcase(Paths.WorkSpace.strip(os.sep)) + os.sep):
        raise RuntimeError("Module is not within specified Workspace.")

A better solution would be to use python os.path.commonpath.

if len(os.path.commonpath([Paths.ModulePath, Paths.WorkSpace])) != len(Paths.WorkSpace):

probably needs more testing before making the change.

How to compile UEFIPayload?

in twitter a Microsoft Engineer have build the UEFIPayload with secure boot for coreboot with TPM Work
Sorry for this dummie issue but how to compile?

Tutorial for developing UEFI firmware with mu

I've developed some UEFI firmware with Tianocore/EDK2. I found that mu is another platform for developing UEFI firmware. Is there any tutorial on how I should start developing UEFI firmware with mu?

Add FAQ entry for common questions or misunderstandings

Over the past couple days I have seen a lot of questions and misunderstandings that Project Mu should try to clarify.

  • Why UEFI?
  • Can I replace the firmware on my product with this? (Surface device, etc)
  • What can i build with this?
  • Who is this project useful for (target audience)?

PcAtChipset package needs IntelFrameworkPkg & IntelFrameworkModulePkg

PcAtChipsetPkg\IsaAcpiDxe\IsaAcpi.inf and PcAtChipsetPkg/8254TimerDxe/8254Timer.inf both require the IntelFramework*Pkg. In an effort to reduce code deprecated code these have been removed from Project Mu. Need to resolve.

For now theses two modules have been removed from DSC and added to the ignore for dsccheck

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.