Git Product home page Git Product logo

mu_silicon_arm_tiano's Introduction

Project Mu Silicon Arm Tiano Repository

Host Type & Toolchain Build Status Test Status Code Coverage
Windows_VS2022 WindowsCiBuild WindowsCiTest WindowsCiCoverage
Ubuntu_GCC5 UbuntuCiBuild UbuntuCiTest UbuntuCiCoverage

This repository is part of Project Mu. Please see Project Mu for details https://microsoft.github.io/mu

Branch Status - release/202311

Status

In Development

Entered Development

Dec 2023

Anticipated Stabilization

Feb 2024

Branch Changes - release/202311

Breaking Changes-dev

  • Incomplete

Main Changes-dev

  • Added EL2 virtual timer interrupt PCD
  • Hid LibRtcVirtualNotifyEvent
  • Added Graphics and Input in ArmVirtQemu

Bug Fixes-dev

  • Dropped buggy secure memory check
  • Fixed and improved text handling

2311_RefBoot Changes

  • Incomplete

2311_CIBuild Changes

  • Incomplete

2311_Rebase Changes

Source Commit from release/202308: 518d45ebd5e4aaea09bf71a1685a702cbf53a247 Destination Commit from upstream edk2: 8736b8fdca85e02933cdb0a13309de14c9799ece (tag: 2311_Upstream)

  • Incomplete

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct https://opensource.microsoft.com/codeofconduct/

For more information see the Code of Conduct FAQ https://opensource.microsoft.com/codeofconduct/faq/ or contact [email protected]. with any additional questions or comments.

Contributions

Contributions are always welcome and encouraged! Please open any issues in the Project Mu GitHub tracker and read https://microsoft.github.io/mu/How/contributing/

Copyright (C) Microsoft Corporation
SPDX-License-Identifier: BSD-2-Clause-Patent

Upstream License (TianoCore)

Copyright (c) 2019, TianoCore and contributors. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Subject to the terms and conditions of this license, each copyright holder and contributor hereby grants to those receiving rights under this license a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except for failure to satisfy the conditions of this license) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer this software, where such license applies only to those patent claims, already acquired or hereafter acquired, licensable by such copyright holder or contributor that are necessarily infringed by:

  1. their Contribution(s) (the licensed copyrights of copyright holders and non-copyrightable additions of contributors, in source or binary form) alone; or
  2. combination of their Contribution(s) with the work of authorship to which such Contribution(s) was added by such copyright holder or contributor, if, at the time the Contribution is added, such addition causes such combination to be necessarily infringed. The patent license shall not apply to any other combinations which include the Contribution.

Except as expressly stated above, no rights or licenses from any copyright holder or contributor is granted under this license, whether expressly, by implication, estoppel or otherwise.

DISCLAIMER

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

mu_silicon_arm_tiano's People

Contributors

ardbiesheuvel avatar bobcf avatar dandanbi avatar ftian1 avatar hwu25 avatar jcarsey avatar jiaxinwu avatar jljusten avatar jljusten2 avatar jwang36 avatar jyao1 avatar kraxel avatar lcp avatar lersek avatar lgao4 avatar lzeng14 avatar makubacki avatar mdkinney avatar mxu9 avatar niruiyu avatar oliviermartin avatar pierregondois avatar samimujawar avatar sfu5 avatar shenglei10 avatar sun-rui avatar vanjeff avatar ydong10 avatar zhangchaointel avatar zhichaogao 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

Watchers

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

mu_silicon_arm_tiano's Issues

[Feature]: Remove MmuLib Abstraction

Feature Overview

There is a Project Mu specific MmuLib abstraction that is no longer required. It can be removed.

Solution Overview

There is only library using the MmuLib abstraction and this library should live in this repo instead of mu_basecore. With moving into this repo, it can use ArmMmuLib.

Alternatives Considered

No response

Urgency

Low

Are you going to implement the feature request?

I will implement the feature

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

[Bug]: Code marked as NX when boot Ubuntu

Is there an existing issue for this?

  • I have searched existing issues

Current Behavior

There was a report recently on booting Linux ARM64 system, where the system will run into synchronous exception after handing off to Linux bootloader. Where the exception occurs is at the boundary of a memory page. The debugger shows that the code to be executed is marked as not executable from MMU.

The OS is downloaded from below:
https://cdimages.ubuntu.com/jammy/daily-live/pending/

The behavior started to occur after picking up 9bb8982 from 17f0637.

Expected Behavior

System should boot properly.

Steps To Reproduce

To be tested on QEMU. But otherwise, just build the aforementioned commit and try to boot Ubuntu system.

Build Environment

- OS(s): Ubuntu 2204 nightly build.
- Tool Chain(s): GCC5
- Targets Impacted: DEBUG,RELEASE

Version Information

https://github.com/microsoft/mu_silicon_arm_tiano/commit/9bb8982dbc94d7e5d7a553ba80777e2c24f26328

Urgency

Medium

Are you going to fix this?

Someone else needs to fix it

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

[Bug]: Data abortion observed on the release/202302 branch

Is there an existing issue for this?

  • I have searched existing issues

Current Behavior

The current SBSA platform in MU_TIANO_PLATFORMS will run into a data abortion exception when running with the updated TRNG library and trying to boot to Windows image. This issue is two fold.

The first issue being the allocated data array mAvailableAlgoArray = AllocateZeroPool (RNG_AVAILABLE_ALGO_MAX); is only 2 bytes, thus a guid comparison will lead to page fault exceptions.

After fixing this, the issue will become an assert at RandomNumberGenerator/RngDxe/ArmRngDxe.c(98): Index != mAvailableAlgoArrayCount. I believe these are resolved through tianocore/edk2@bfb574d and tianocore/edk2@75fb0cf. This is pending testing.

Expected Behavior

The current SBSA platform in MU_TIANO_PLATFORMS should be able to boot to the OS.

Steps To Reproduce

  1. Build SBSA platform from top of main
  2. Trying to boot to a Windows image with built firmware
  3. Observe the system crash with data abortion exception

Build Environment

- OS(s): Windows Subsystem for Linux v2, running Ubuntu 22.04
- Tool Chain(s): GCC5
- Targets Impacted: DEBUG

Version Information

Top of main

Urgency

High

Are you going to fix this?

I will fix it

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

Fixing issue with _PRT method

Feature Overview

Issues with the current Implementation

  1. The function number is a parameter [ according to ACPI spec : The PCI function number in the Address field of the _PRT packages must be 0xFFFF, indicating “any” function number or “all functions”. Reverting the change added earlier to fix this issue.
  2. The Link Name is hard coded to NULL, adding provision to pass a Link Name associated with the PCI Legacy INT object.

Solution Overview

Issue 1 :
The use of function parameter in the _PRT reverted, using hard coded 0xffff

Issue 2:
The Link name [ 4 Characters ] is passed in as a parameter.

Alternatives Considered

No response

Urgency

Low

Are you going to implement the feature request?

I will implement the feature

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

[Feature]: Support ArmPkg and ArmPlatformPkg Visual Studio compilation

Feature Overview

Currently, packages in this repo do not compile under Visual Studio (currently using VS2022 toolchain).

Consumers could use the VS toolchain, so it would be convenient to catch issues here (upstream) first.

Solution Overview

Enable compilation of at least ArmPkg and ArmPlatformPkg on VS2022.

Alternatives Considered

No response

Urgency

Low

Are you going to implement the feature request?

Someone else needs to implement the feature

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

[Bug]: CLANG build of ArmGicLib failed due to ICC_SGI1R declaration

There has been report on failure of build due to new ICC_SGI1R declaration. Full report as below:

    Hello!

I am still hitting issues with the ICC_SGI1R declaration using CLANG at the following location:

https://github.com/microsoft/mu_silicon_arm_tiano/blob/release/202208/ArmPkg/Drivers/ArmGic/GicV3/AArch64/ArmGicV3.S#L66

Here is a snippet of the error I'm observing:

2022-12-17T15:46:58.0647934Z INFO - /home/vsts/work/1/s/Build/SurfaceDuo1-AARCH64/DEBUG_CLANG38/AARCH64/ArmPkg/Drivers/ArmGic/ArmGicLib/OUTPUT/GicV3/AArch64/ArmGicV3.iiii:66:13: error: expected writable system register or pstate
2022-12-17T15:46:58.0649056Z INFO -         msr ICC_SGI1R, x0
2022-12-17T15:46:58.0652365Z INFO -             ^
2022-12-17T15:46:58.0653314Z INFO - make: *** [GNUmakefile:345: /home/vsts/work/1/s/Build/SurfaceDuo1-AARCH64/DEBUG_CLANG38/AARCH64/ArmPkg/Drivers/ArmGic/ArmGicLib/OUTPUT/GicV3/AArch64/ArmGicV3.obj] Error 1
2022-12-17T15:46:58.0653913Z INFO - 
2022-12-17T15:46:58.0654191Z INFO - 
2022-12-17T15:46:58.0654485Z INFO - build.py...
2022-12-17T15:46:58.0654857Z INFO -  : error 7000: Failed to execute command
2022-12-17T15:46:58.0655440Z INFO - 	m a k e   t b u i l d [/home/vsts/work/1/s/Build/SurfaceDuo1-AARCH64/DEBUG_CLANG38/AARCH64/ArmPkg/Drivers/ArmGic/ArmGicLib]
2022-12-17T15:46:58.5874992Z INFO - 
2022-12-17T15:46:58.5875736Z INFO - 
2022-12-17T15:46:58.5876142Z INFO - build.py...
2022-12-17T15:46:58.5876619Z INFO -  : error F002: Failed to build module
2022-12-17T15:46:58.5877268Z INFO - 	/home/vsts/work/1/s/Silicon/ARM/TIANO/ArmPkg/Drivers/ArmGic/ArmGicLib.inf [AARCH64, CLANG38, DEBUG]
2022-12-17T15:46:58.5877809Z INFO - 
2022-12-17T15:46:58.5878197Z INFO - - Failed -
2022-12-17T15:46:58.5878678Z INFO - Build end time: 15:46:58, Dec.17 2022
2022-12-17T15:46:58.5879168Z INFO - Build total time: 00:00:23

It appears the issue was fixed only in the masm file and not in the .S file as well.
Currently I'm working around the issue by defining a new define like so:

*_*_*_PP_FLAGS = -DICC_SGI1R=ICC_SGI1R_EL1

Originally posted by @gus33000 in #38 (comment)

[Bug]: CLANG build of CpuDxe on ubuntu fails since #128

Is there an existing issue for this?

  • I have searched existing issues

Current Behavior

Building CpuDxe using CLANG LLVM (AArch64) now fails since #128 due to an uninitialized variable with the following error:

Extract from the following pipeline: https://gus33000.visualstudio.com/30642688-6c52-4bc8-b621-7834caee2e2d/_apis/build/builds/4171/logs/12

2023-06-16T07:00:44.0184061Z INFO - "clang" -MMD -MF /home/vsts/work/1/s/Build/SurfaceDuo1-AARCH64/DEBUG_CLANG38/AARCH64/ArmPkg/Drivers/CpuDxe/CpuDxe/OUTPUT/MemoryAttribute.obj.deps -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie -ffixed-x18 -target aarch64-linux-gnu -mcmodel=small -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-access  -flto -O1 -Wno-unused-const-variable -Wno-sometimes-uninitialized -Wno-unaligned-access -D CLANG -march=armv8.2-a+crypto+rcpc -DUSE_MEMORY_FOR_SERIAL_OUTPUT=0 -DUSE_SCREEN_FOR_SERIAL_OUTPUT=0 -DSECURE_BOOT_ENABLE=1 -c -o /home/vsts/work/1/s/Build/SurfaceDuo1-AARCH64/DEBUG_CLANG38/AARCH64/ArmPkg/Drivers/CpuDxe/CpuDxe/OUTPUT/./MemoryAttribute.obj -I/home/vsts/work/1/s/Silicon/Arm/MU_TIANO/ArmPkg/Drivers/CpuDxe/AArch64 -I/home/vsts/work/1/s/Silicon/Arm/MU_TIANO/ArmPkg/Drivers/CpuDxe -I/home/vsts/work/1/s/Build/SurfaceDuo1-AARCH64/DEBUG_CLANG38/AARCH64/ArmPkg/Drivers/CpuDxe/CpuDxe/DEBUG -I/home/vsts/work/1/s/Silicon/Arm/MU_TIANO/ArmPkg -I/home/vsts/work/1/s/Silicon/Arm/MU_TIANO/ArmPkg/Include -I/home/vsts/work/1/s/Common/MU_TIANO/EmbeddedPkg -I/home/vsts/work/1/s/Common/MU_TIANO/EmbeddedPkg/Include -I/home/vsts/work/1/s/MU_BASECORE/MdePkg -I/home/vsts/work/1/s/MU_BASECORE/MdePkg/Include -I/home/vsts/work/1/s/MU_BASECORE/MdePkg/Test/UnitTest/Include -I/home/vsts/work/1/s/MU_BASECORE/MdePkg/Test/Mock/Include -I/home/vsts/work/1/s/MU_BASECORE/MdePkg/Include/AArch64 -I/home/vsts/work/1/s/MU_BASECORE/MdeModulePkg -I/home/vsts/work/1/s/MU_BASECORE/MdeModulePkg/Include /home/vsts/work/1/s/Silicon/Arm/MU_TIANO/ArmPkg/Drivers/CpuDxe/MemoryAttribute.c
2023-06-16T07:00:44.0854573Z INFO - /home/vsts/work/1/s/Silicon/Arm/MU_TIANO/ArmPkg/Drivers/CpuDxe/MemoryAttribute.c:91:15: error: variable 'RegionLength' is uninitialized when used here [-Werror,-Wuninitialized]
2023-06-16T07:00:44.0860866Z INFO -       (UINT64)RegionLength,
2023-06-16T07:00:44.0866415Z INFO -               ^~~~~~~~~~~~
2023-06-16T07:00:44.0872839Z INFO - /home/vsts/work/1/s/MU_BASECORE/MdePkg/Include/Library/DebugLib.h:427:17: note: expanded from macro 'DEBUG'
2023-06-16T07:00:44.0878426Z INFO -         _DEBUG (Expression);       \
2023-06-16T07:00:44.0883977Z INFO -                 ^~~~~~~~~~
2023-06-16T07:00:44.0890080Z INFO - /home/vsts/work/1/s/MU_BASECORE/MdePkg/Include/Library/DebugLib.h:380:42: note: expanded from macro '_DEBUG'
2023-06-16T07:00:44.0895469Z INFO - #define _DEBUG(Expression)  _DEBUG_PRINT Expression
2023-06-16T07:00:44.0899490Z INFO -                                          ^~~~~~~~~~
2023-06-16T07:00:44.0905405Z INFO - /home/vsts/work/1/s/MU_BASECORE/MdePkg/Include/Library/DebugLib.h:377:35: note: expanded from macro '_DEBUG_PRINT'
2023-06-16T07:00:44.0910651Z INFO -         DebugPrint (PrintLevel, ##__VA_ARGS__);      \
2023-06-16T07:00:44.0915587Z INFO -                                   ^~~~~~~~~~~
2023-06-16T07:00:44.0925004Z INFO - /home/vsts/work/1/s/Silicon/Arm/MU_TIANO/ArmPkg/Drivers/CpuDxe/MemoryAttribute.c:80:27: note: initialize the variable 'RegionLength' to silence this warning
2023-06-16T07:00:44.0931485Z INFO -   UINTN       RegionLength;
2023-06-16T07:00:44.0935667Z INFO -                           ^
2023-06-16T07:00:44.0940778Z INFO -                            = 0
2023-06-16T07:00:44.0962264Z INFO - 1 error generated.
2023-06-16T07:00:44.0999427Z INFO - make: *** [GNUmakefile:363: /home/vsts/work/1/s/Build/SurfaceDuo1-AARCH64/DEBUG_CLANG38/AARCH64/ArmPkg/Drivers/CpuDxe/CpuDxe/OUTPUT/MemoryAttribute.obj] Error 1
2023-06-16T07:00:44.1011942Z INFO - 
2023-06-16T07:00:44.1012220Z INFO - 
2023-06-16T07:00:44.1012489Z INFO - build.py...
2023-06-16T07:00:44.1012754Z INFO -  : error 7000: Failed to execute command
2023-06-16T07:00:44.1013146Z INFO - 	m a k e   t b u i l d [/home/vsts/work/1/s/Build/SurfaceDuo1-AARCH64/DEBUG_CLANG38/AARCH64/ArmPkg/Drivers/CpuDxe/CpuDxe]
2023-06-16T07:00:46.5301280Z INFO - 
2023-06-16T07:00:46.5323875Z INFO - 
2023-06-16T07:00:46.5324591Z INFO - build.py...
2023-06-16T07:00:46.5325391Z INFO -  : error F002: Failed to build module
2023-06-16T07:00:46.5325979Z INFO - 	/home/vsts/work/1/s/Silicon/Arm/MU_TIANO/ArmPkg/Drivers/CpuDxe/CpuDxe.inf [AARCH64, CLANG38, DEBUG]
2023-06-16T07:00:46.5326771Z INFO - 
2023-06-16T07:00:46.5327411Z INFO - - Failed -
2023-06-16T07:00:46.5327716Z INFO - Build end time: 07:00:46, Jun.16 2023
2023-06-16T07:00:46.5327979Z INFO - Build total time: 00:01:44
2023-06-16T07:00:46.5328176Z INFO - 
2023-06-16T07:00:46.7156084Z INFO - ------------------------------------------------
2023-06-16T07:00:46.7156911Z INFO - --------------Cmd Output Finished---------------
2023-06-16T07:00:46.7160705Z INFO - --------- Running Time (mm:ss): 01:44 ----------
2023-06-16T07:00:46.7169475Z INFO - ----------- Return Code: 0x00000001 ------------
2023-06-16T07:00:46.7169778Z INFO - ------------------------------------------------
2023-06-16T07:00:46.7403662Z ERROR - Compiler #error from /home/vsts/work/1/s/Silicon/Arm/MU_TIANO/ArmPkg/Drivers/CpuDxe/MemoryAttribute.c variable 'RegionLength' is uninitialized when used here [-Werror,-Wuninitialized]
2023-06-16T07:00:46.7404671Z ERROR - Compiler #7000 from : Failed to execute command
2023-06-16T07:00:46.7406289Z ERROR - EDK2 #002 from : Failed to build module
2023-06-16T07:00:46.7408770Z CRITICAL - Build failed
2023-06-16T07:00:46.7410707Z PROGRESS - End time: 2023-06-16 07:00:46.740900	 Total time Elapsed: 0:01:47

Expected Behavior

The build should not be failing using CLANG LLVM targeting AArch64.

Steps To Reproduce

  1. Use the following environment: Ubuntu latest (AzDo hosted image)
  2. Install clang dependencies using sudo apt install -y uuid-dev clang llvm gcc-aarch64-linux-gnu
  3. Export CLANG variable using export CLANG38_BIN=/usr/lib/llvm-38/bin/ && export CLANG38_AARCH64_PREFIX=aarch64-linux-gnu-
  4. Try to build a project making use of CpuDxe with a debug level compiling the new logs added in #128
  5. Observe the building like above

Build Environment

- OS(s): Ubuntu 22.04.2 LTS
- Tool Chain(s): CLANG AARCH64 LINUX GNU
- Targets Impacted: DEBUG

Version Information

Commit: f4665e122970076929ca4c9513b120dc7b0ced69

Urgency

Medium

Are you going to fix this?

Someone else needs to fix it

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

The pipeline can be found here: https://gus33000.visualstudio.com/SurfaceDuoPkg/_build/results?buildId=4171&view=results

I have not migrated to CLANGPDB from CLAN38 (in terms of naming for the build system) but am using the latest clang version available for Ubuntu 22.04.2 LTS from APT sources. I do not know however if this could be causing a problem.

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.