data_type
large_stringclasses
3 values
source
large_stringclasses
29 values
code
large_stringlengths
98
49.4M
filepath
large_stringlengths
5
161
message
large_stringclasses
234 values
commit
large_stringclasses
234 values
subject
large_stringclasses
418 values
critique
large_stringlengths
101
1.26M
metadata
dict
source
edk2
/** @file Copyright (c) 2023, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UefiPayloadEntry.h" #include <Library/FdtLib.h> #include <Guid/UniversalPayloadBase.h> #include <Guid/MemoryTypeInformation.h> #include <Library/FdtParserLib.h> #include <Library/Hob...
UefiPayloadPkg/UefiPayloadEntry/FitUniversalPayloadEntry.c
null
null
null
null
null
source
edk2
/** @file Copyright (c) 2020, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UefiPayloadEntry.h" /** Allocate pages for code. @param[in] Pages Number of pages to be allocated. @return Allocated memory. **/ VOID * AllocateCodePages ( IN UIN...
UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
null
null
null
null
null
source
edk2
/** @file Copyright (c) 2021, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UefiPayloadEntry.h" #include <UniversalPayload/AcpiTable.h> #include <UniversalPayload/SerialPortInfo.h> #include <UniversalPayload/PciRootBridges.h> #include <UniversalPayload/Extra...
UefiPayloadPkg/UefiPayloadEntry/PrintHob.c
null
null
null
null
null
source
edk2
/** @file Copyright (c) 2014 - 2021, Intel Corporation. All rights reserved.<BR> Copyright (C) 2025 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <Guid/MemoryTypeInformation.h> #include <Library/BaseArchLibSupport.h> #include "UefiPayloadEntry.h" ...
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c
null
null
null
null
null
source
edk2
/** @file Copyright (c) 2021, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #pragma once #include <PiPei.h> #include <Library/BaseLib.h> #include <Library/BaseMemoryLib.h> #include <Library/MemoryAllocationLib.h> #include <Library/DebugLib.h> #include <Library/Pe...
UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
null
null
null
null
null
source
edk2
/** @file Copyright (c) 2021, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <Guid/MemoryTypeInformation.h> #include "UefiPayloadEntry.h" #define MEMORY_ATTRIBUTE_MASK (EFI_RESOURCE_ATTRIBUTE_PRESENT | \ ...
UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c
null
null
null
null
null
source
edk2
/** @file Generic version of arch-specific functionality for DxeLoad. Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> Copyright 2024 Google LLC SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <Library/BaseLib.h> #include <Library/DebugLib.h> #include <Library/BaseMemoryLib.h>...
UefiPayloadPkg/UefiPayloadEntry/AArch64/DxeHandoff.c
null
null
null
null
null
source
edk2
/** @file aarch64-specifc functionality for Module Entry Point. Copyright 2024 Google LLC SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UefiPayloadEntry.h" /** Entry point to the C language phase of UEFI payload. @param[in] FdtBaseAddr Pointer to the FDT @param[in] AdditionalPar...
UefiPayloadPkg/UefiPayloadEntry/AArch64/DxeLoadFuncFit.c
null
null
null
null
null
source
edk2
/** @file Ia32-specific functionality for DxeLoad. Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR> Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiPei.h> #include <Library/BaseLib.h> #include <Library/DebugLib.h> #i...
UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c
null
null
null
null
null
source
edk2
/** @file Ia32-specific functionality for DxeLoad. Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UefiPayloadEntry.h" /** Entry point to the C language phase of UEFI payload. @param[in] BootloaderParameter The starting addres...
UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFuncFit.c
null
null
null
null
null
source
edk2
/** @file RISC-V specific functionality for DxeLoad. Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> Copyright (c) 2023, Rivos Inc SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiPei.h> #include <Library/BaseLib.h> #include <Library/DebugLib.h> #include <L...
UefiPayloadPkg/UefiPayloadEntry/RiscV64/DxeLoadFunc.c
null
null
null
null
null
source
edk2
/** @file RISC-V specific functionality for DxeLoad. Copyright (C) 2023, Rivos Inc. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiPei.h> #include <Library/BaseLib.h> #include <Library/DebugLib.h> #include <Library/BaseMemoryLib.h> #include <Library/MemoryAllocationLib.h>...
UefiPayloadPkg/UefiPayloadEntry/RiscV64/DxeLoadFuncFit.c
null
null
null
null
null
source
edk2
/** @file x64-specifc functionality for DxeLoad. Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiPei.h> #include <Library/BaseLib.h> #include <Library/DebugLib.h> #include <Library/BaseMemoryLib.h> #include <Library/MemoryAllocatio...
UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFunc.c
null
null
null
null
null
source
edk2
/** @file x64-specifc functionality for DxeLoad. Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UefiPayloadEntry.h" /** Entry point to the C language phase of UEFI payload. @param[in] BootloaderParameter The starting address ...
UefiPayloadPkg/UefiPayloadEntry/X64/DxeLoadFuncFit.c
null
null
null
null
null
source
edk2
/** @file x64 Virtual Memory Management Services in the form of an IA-32 driver. Used to establish a 1:1 Virtual to Physical Mapping that is required to enter Long Mode (x64 64-bit mode). While we make a 1:1 mapping (identity mapping) for all physical pages we still need to use the MTRR's to ensure that the ...
UefiPayloadPkg/UefiPayloadEntry/X64/VirtualMemory.c
null
null
null
null
null
source
edk2
/** @file x64 Long Mode Virtual Memory Management Definitions References: 1) IA-32 Intel(R) Architecture Software Developer's Manual Volume 1:Basic Architecture, Intel 2) IA-32 Intel(R) Architecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel 3) IA-32 Intel(R) Architecture Sof...
UefiPayloadPkg/UefiPayloadEntry/X64/VirtualMemory.h
null
null
null
null
null
source
edk2
# Unit Test Framework Package ## About This package provides unit test frameworks capable of building tests for multiple contexts including the UEFI shell environment and host-based environments. It allows for unit test development to focus on the tests and leave error logging, result formatting, context persistence,...
UnitTestFrameworkPkg/ReadMe.md
null
null
null
null
null
source
edk2
/** @file This header allows the mocking of free (C style) functions using gmock. Copyright (c) 2023, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ #pragma once #include <Library/GoogleTestLib.h> #include <Library/SubhookLib.h> #include <type_traits> ////////////////...
UnitTestFrameworkPkg/Include/Library/FunctionMockLib.h
null
null
null
null
null
source
edk2
/** @file GoogleTestLib class with APIs from the googletest project Copyright (c) 2022, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #pragma once #include <gtest/gtest.h> #include <gmock/gmock.h> #include <cstring> #include <iomanip> // // For all use of Google...
UnitTestFrameworkPkg/Include/Library/GoogleTestLib.h
null
null
null
null
null
source
edk2
/** @file HostMemoryAllocationBelowAddressLib class Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef HOST_MEMORY_ALLOCATION_BELOW_ADDRESS_LIB_H_ /** Allocate memory below a specifies address. @param[in] MaximumAddress The address bel...
UnitTestFrameworkPkg/Include/Library/HostMemoryAllocationBelowAddressLib.h
null
null
null
null
null
source
edk2
/** @file SubhookLib class with APIs from the subhook project Copyright (c) 2022, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #pragma once #define SUBHOOK_STATIC #include <subhook.h>
UnitTestFrameworkPkg/Include/Library/SubhookLib.h
null
null
null
null
null
source
edk2
/** @file This header file describes a library that contains functions to save and restore unit test internal state, in case the test needs to pause and resume (eg. a reboot-based test). Copyright (c) Microsoft Corporation.<BR> Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.<BR> SPDX-Lic...
UnitTestFrameworkPkg/Include/Library/UnitTestPersistenceLib.h
null
null
null
null
null
source
edk2
/** @file Macro-only FunctionMockLib library instance with no services. Copyright (c) 2023, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/
UnitTestFrameworkPkg/Library/FunctionMockLib/FunctionMockLib.c
null
null
null
null
null
source
edk2
/** @file Instance of Debug Library based on POSIX APIs Uses Print Library to produce formatted output strings sent to printf(). Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <stdio.h> #include <Base.h> #include <Library/Debu...
UnitTestFrameworkPkg/Library/Posix/DebugLibPosix/DebugLibPosix.c
null
null
null
null
null
source
edk2
/** @file Instance of Memory Below Address Allocation Library based on Windows APIs and Linux APIs. Uses Windows APIs VirtualAlloc() and VirtualFree() to allocate and free memory below a specified virtual address. Uses Linux APIs mmap() and munmap() to allocate and free memory below a specified virtual ad...
UnitTestFrameworkPkg/Library/Posix/MemoryAllocationLibPosix/AllocateBelowAddress.c
null
null
null
null
null
source
edk2
/** @file Instance of Memory Allocation Library based on POSIX APIs Uses POSIX APIs malloc() and free() to allocate and free memory. Copyright (c) 2018 - 2020, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <stdlib.h> #include <string.h> #include <Uefi....
UnitTestFrameworkPkg/Library/Posix/MemoryAllocationLibPosix/MemoryAllocationLibPosix.c
null
null
null
null
null
source
edk2
/** @file Include windows.h addressing conflicts with forced include of Base.h Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #pragma once #define GUID _WINNT_DUP_GUID_____ #define _LIST_ENTRY _WINNT_DUP_LIST_ENTRY_FORWARD #define LIST_...
UnitTestFrameworkPkg/Library/Posix/MemoryAllocationLibPosix/WinInclude.h
null
null
null
null
null
source
edk2
/** NULL implementation for UnitTestBootLib to allow simple compilation Copyright (c) Microsoft Corporation.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiDxe.h> /** Set the boot manager to boot from a specific device on the next boot. This should be set only for the next boot and should...
UnitTestFrameworkPkg/Library/UnitTestBootLibNull/UnitTestBootLibNull.c
null
null
null
null
null
source
edk2
/** Implement UnitTestBootLib using USB Class Boot option. This should be industry standard and should work on all platforms Copyright (c) Microsoft Corporation.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiDxe.h> #include <Library/DebugLib.h> #include <Library/UefiRuntimeServicesTableLib...
UnitTestFrameworkPkg/Library/UnitTestBootLibUsbClass/UnitTestBootLibUsbClass.c
null
null
null
null
null
source
edk2
/** @file Unit Test Debug Assert Library Copyright (c) 2020, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <Uefi.h> #include <Library/BaseLib.h> #include <Library/UnitTestLib.h> /// /// Point to jump buffer used with SetJump()/LongJump() to test if a fun...
UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLib.c
null
null
null
null
null
source
edk2
/** @file Unit Test Debug Assert Library for host-based environments Copyright (c) 2020, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <stdexcept> #ifdef NULL #undef NULL #endif extern "C" { #include <Uefi.h> #include <UnitTestFrameworkTypes.h> ...
UnitTestFrameworkPkg/Library/UnitTestDebugAssertLib/UnitTestDebugAssertLibHost.cpp
null
null
null
null
null
source
edk2
/** Implement UnitTestLib assert services Copyright (c) Microsoft Corporation.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <Uefi.h> #include <UnitTestFrameworkTypes.h> #include <Library/UnitTestLib.h> #include <Library/BaseLib.h> #include <Library/BaseMemoryLib.h> #include <Library/DebugLib.h>...
UnitTestFrameworkPkg/Library/UnitTestLib/Assert.c
null
null
null
null
null
source
edk2
/** @file Implement UnitTestLib assert services using cmocka services Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <stdio.h> #include <string.h> #include <stdarg.h> #include <stddef.h> #include <setjmp.h> #include <cmocka.h> #i...
UnitTestFrameworkPkg/Library/UnitTestLib/AssertCmocka.c
null
null
null
null
null
source
edk2
/** Implemnet UnitTestLib log services Copyright (c) Microsoft Corporation.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiDxe.h> #include <UnitTestFrameworkTypes.h> #include <Library/UnitTestLib.h> #include <Library/BaseLib.h> #include <Library/BaseMemoryLib.h> #include <Library/MemoryAllocat...
UnitTestFrameworkPkg/Library/UnitTestLib/Log.c
null
null
null
null
null
source
edk2
/** UnitTestLib APIs to run unit tests Copyright (c) Microsoft Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <Uefi.h> #include <Library/UnitTestLib.h> #include <Library/BaseLib.h> #include <Library/BaseMemoryLib.h> #include <Library/DebugLib.h> #include <Library/UnitTestResultReportLib....
UnitTestFrameworkPkg/Library/UnitTestLib/RunTests.c
null
null
null
null
null
source
edk2
/** @file UnitTestLib APIs to run unit tests using cmocka Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <stdio.h> #include <string.h> #include <stdarg.h> #include <stddef.h> #include <setjmp.h> #include <cmocka.h> #include <Uefi...
UnitTestFrameworkPkg/Library/UnitTestLib/RunTestsCmocka.c
null
null
null
null
null
source
edk2
/** Implement UnitTestLib Copyright (c) Microsoft Corporation. Copyright (c) 2022, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <Uefi.h> #include <Library/UnitTestLib.h> #include <Library/BaseLib.h> #include <Library/BaseMemoryLib.h> #include <Library/M...
UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c
null
null
null
null
null
source
edk2
/** @file This library supports a PEI Service table Pointer library implementation that allows code dependent upon PEI Service to operate in an isolated execution environment such as within the context of a host-based unit test framework. Copyright (c) 2023, Intel Corporation. All rights reserved.<BR> SPDX-L...
UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.c
null
null
null
null
null
source
edk2
/** @file An internal header file for the Unit Test instance of the PEI services Table Pointer Library. Copyright (c) 2023, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #pragma once #include <Base.h> #include <PiPei.h> #include <Pi/PiMultiPhase.h> #include <Libr...
UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLib.h
null
null
null
null
null
source
edk2
/** @file This file implements some PEI services about Hob. Copyright (c) 2023, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UnitTestPeiServicesTablePointerLib.h" /** Gets the pointer to the HOB List. @param PeiServices An indir...
UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLibHob.c
null
null
null
null
null
source
edk2
/** @file This file implements some PEI services. Copyright (c) 2023, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UnitTestPeiServicesTablePointerLib.h" /** This service enables PEIMs to ascertain the present value of the boot mode. @param PeiServ...
UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLibMisc.c
null
null
null
null
null
source
edk2
/** @file This file implements some PEI services about PPI. Copyright (c) 2023, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UnitTestPeiServicesTablePointerLib.h" /** This function installs an interface in the PEI PPI database by GUID. The purpose...
UnitTestFrameworkPkg/Library/UnitTestPeiServicesTablePointerLib/UnitTestPeiServicesTablePointerLibPpi.c
null
null
null
null
null
source
edk2
/** @file This is an instance of the Unit Test Persistence Lib that does nothing. Copyright (c) Microsoft Corporation.<BR> Copyright (c) 2022, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <Uefi.h> #include <Library/UnitTestPersistenceLib.h> /** Deter...
UnitTestFrameworkPkg/Library/UnitTestPersistenceLibNull/UnitTestPersistenceLibNull.c
null
null
null
null
null
source
edk2
/** @file This is an instance of the Unit Test Persistence Lib that will utilize the filesystem that a test application is running from to save a serialized version of the internal test state in case the test needs to quit and restore. Copyright (c) Microsoft Corporation.<BR> Copyright (c) 2022, Intel Corpor...
UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileSystem.c
null
null
null
null
null
source
edk2
/** @file Implement UnitTestResultReportLib doing plain txt out to console Copyright (c) Microsoft Corporation.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <Uefi.h> #include <Library/UnitTestResultReportLib.h> #include <Library/BaseLib.h> #include <Library/DebugLib.h> VOID EFIAPI ReportPrint ...
UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLib.c
null
null
null
null
null
source
edk2
/** @file Implement UnitTestResultReportLib doing plain txt out to console Copyright (c) Microsoft Corporation.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <Uefi.h> #include <Library/BaseLib.h> #include <Library/PrintLib.h> #include <Library/UefiBootServicesTableLib.h> #include <Library/DebugL...
UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibConOut.c
null
null
null
null
null
source
edk2
/** @file Implement UnitTestResultReportLib doing plain txt out to console Copyright (c) Microsoft Corporation.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <Uefi.h> #include <Library/BaseLib.h> #include <Library/PrintLib.h> #include <Library/DebugLib.h> VOID EFIAPI ReportPrint ( IN CONST CH...
UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportLibDebugLib.c
null
null
null
null
null
source
edk2
/** @file This library supports a Boot Services table library implementation that allows code dependent upon UefiBootServicesTableLib to operate in an isolated execution environment such as within the context of a host-based unit test framework. The unit test should initialize the Boot Services database with a...
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.c
null
null
null
null
null
source
edk2
/** @file An internal header file for the Unit Test instance of the UEFI Boot Services Table Library. This file includes common header files, defines internal structure and functions used by the library implementation. Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent **/ #pragm...
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLib.h
null
null
null
null
null
source
edk2
/** @file Implementation of event and timer related services in the UEFI Boot Services table for use in unit tests. Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UnitTestUefiBootServicesTableLib.h" /** Creates an event. @param Type The type ...
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibEventTimer.c
null
null
null
null
null
source
edk2
/** @file Implementation of image related services in the UEFI Boot Services table for use in unit tests. Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UnitTestUefiBootServicesTableLib.h" /** Loads an EFI image into memory and returns a handle to the image. @p...
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibImage.c
null
null
null
null
null
source
edk2
/** @file Implementation of memory related services in the UEFI Boot Services table for use in unit tests. Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UnitTestUefiBootServicesTableLib.h" /** Allocates pages from the memory map. @param Type ...
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibMemory.c
null
null
null
null
null
source
edk2
/** @file Implementation of miscellaneous services in the UEFI Boot Services table for use in unit tests. Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UnitTestUefiBootServicesTableLib.h" /** Returns a monotonically increasing count for the platform. @param[ou...
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibMisc.c
null
null
null
null
null
source
edk2
/** @file Implementation of protocol related services in the UEFI Boot Services table for use in unit tests. Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UnitTestUefiBootServicesTableLibProtocol.h" STATIC LIST_ENTRY mProtocolDatabase = INITIALIZE_LIST_HEAD_...
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibProtocol.c
null
null
null
null
null
source
edk2
/** @file An internal header file for the Unit Test instance of the UEFI Boot Services Table Library. This file includes common header files, defines internal structure and functions used by the library implementation. Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent **/ #pragm...
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibProtocol.h
null
null
null
null
null
source
edk2
/** @file Implementation of Task Priority Level (TPL) related services in the UEFI Boot Services table for use in unit tests. Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "UnitTestUefiBootServicesTableLib.h" /** Raise the task priority level to the new level. H...
UnitTestFrameworkPkg/Library/UnitTestUefiBootServicesTableLib/UnitTestUefiBootServicesTableLibTpl.c
null
null
null
null
null
source
edk2
/** @file Provides the basic types and common elements of the unit test framework Copyright (c) Microsoft Corporation.<BR> Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #pragma once #include <Library/UnitTestLib.h> /// /// The maximu...
UnitTestFrameworkPkg/PrivateInclude/UnitTestFrameworkTypes.h
null
null
null
null
null
source
edk2
/** @file Provides a library function that can be customized to set the platform to boot from USB on the next boot. This allows the test framework to reboot back to USB. Since boot managers are not all the same creating a lib to support platform customization will make porting to new code base/platform easier...
UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestBootLib.h
null
null
null
null
null
source
edk2
/** @file Provides a unit test result report. This allows new result output formats to be easily customized. Copyright (c) Microsoft Corporation.<BR> Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #pragma once #include <UnitTestFram...
UnitTestFrameworkPkg/PrivateInclude/Library/UnitTestResultReportLib.h
null
null
null
null
null
source
edk2
/** @file This is a sample to demonstrates the use of GoogleTest that supports host execution environments. Copyright (c) 2022, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <Library/GoogleTestLib.h> extern "C" { #include <Uefi.h> #include <Library/...
UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoogleTest/SampleGoogleTest.cpp
null
null
null
null
null
source
edk2
/** @file This is a sample to demonstrates the use of GoogleTest that supports host execution environments for test case that are always expected to fail to demonstrate the format of the log file and reports when failures occur. Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Ide...
UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoogleTestExpectFail/SampleGoogleTestExpectFail.cpp
null
null
null
null
null
source
edk2
/** @file This is a sample to demonstrates the use of GoogleTest that supports host execution environments for test case that generates an exception. For some host-based environments, this is a fatal condition that terminates the unit tests and no additional test cases are executed. On other environments, this...
UnitTestFrameworkPkg/Test/GoogleTest/Sample/SampleGoogleTestGenerateException/SampleGoogleTestGenerateException.cpp
null
null
null
null
null
source
edk2
/** @file This is a sample to demonstrate the usage of the Unit Test Library that supports the PEI, DXE, SMM, UEFI SHell, and host execution environments. Copyright (c) Microsoft Corporation.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiPei.h> #include <Uefi.h> #include <Library/UefiLib.h>...
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTest/SampleUnitTest.c
null
null
null
null
null
source
edk2
/** @file Sample UnitTest built for execution on a Host machine. This test case generates a buffer overflow that is caught by a sanitizer. Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiPei.h> #include <Uefi.h> #include <Library/Uef...
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestBufferOverflow/SampleUnitTestBufferOverflow.c
null
null
null
null
null
source
edk2
/** @file Sample UnitTest built for execution on a Host machine. This test case generates a buffer underflow that is caught by a sanitizer. Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiPei.h> #include <Uefi.h> #include <Library/Ue...
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestBufferUnderflow/SampleUnitTestBufferUnderflow.c
null
null
null
null
null
source
edk2
/** @file Sample UnitTest built for execution on a Host machine. This test case generates a double free that is caught by a sanitizer. Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiPei.h> #include <Uefi.h> #include <Library/UefiLib...
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestDoubleFree/SampleUnitTestDoubleFree.c
null
null
null
null
null
source
edk2
/** @file This is a sample to demonstrate the usage of the Unit Test Library that supports the PEI, DXE, SMM, UEFI Shell, and host execution environments. All test case are always expected to fail to demonstrate the format of the log file and reports when failures occur. Copyright (c) 2024, Intel Corporation...
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestExpectFail/SampleUnitTestExpectFail.c
null
null
null
null
null
source
edk2
/** @file This is a sample to demonstrate the usage of the Unit Test Library that supports the PEI, DXE, SMM, UEFI Shell, and host execution environments. This test case generates an exception. For some host-based environments, this is a fatal condition that terminates the unit tests and no additional test ca...
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestGenerateException/SampleUnitTestGenerateException.c
null
null
null
null
null
source
edk2
/** @file Sample UnitTest built for execution on a Host machine. This test case accesses an invalid address that is caught by a sanitizer. Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiPei.h> #include <Uefi.h> #include <Library/Uef...
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestInvalidAddress/SampleUnitTestInvalidAddress.c
null
null
null
null
null
source
edk2
/** @file Sample UnitTest built for execution on a Host machine. This test case dereferences a NULL pointer that is caught by a sanitizer. Copyright (c) 2024, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include <PiPei.h> #include <Uefi.h> #include <Library/Uef...
UnitTestFrameworkPkg/Test/UnitTest/Sample/SampleUnitTestNullAddress/SampleUnitTestNullAddress.c
null
null
null
null
null
source
asterinas
<p align="center"> <img src="book/src/images/logo_en.svg" alt="asterinas-logo" width="620"><br> Toward a production-grade Linux alternative—memory safe, high-performance, and more<br/> </p> <!-- Asterinas NixOS 0.17.0 demo. It is uploaded as a Github attachment so that GitHub will render that URL as a video pl...
README.md
null
null
null
null
null
source
asterinas
# Version 0.17.0 (2025-12-17) This release marks a significant milestone in the evolution of Asterinas as we transition from "just a kernel" to a more complete, usable system. The headline of this release is the introduction of **Asterinas NixOS**, our first distribution that integrates the Asterinas kernel with the N...
RELEASES.md
null
null
null
null
null
source
asterinas
# The Asterinas Book <p align="center"> <img src="images/logo_en.svg" alt="asterinas-logo" width="620"><br> </p> Welcome to the documentation for Asterinas, an open-source project and community focused on developing cutting-edge Rust OS kernels. ## Book Structure This book is divided into six distinct parts: #...
book/src/README.md
null
null
null
null
null
source
asterinas
# Summary [Introduction](README.md) # Asterinas NixOS * [Getting Started](distro/README.md) * [Popular Applications](distro/popular-applications/README.md) * [Package Management](distro/popular-applications/package-management.md) * [Desktop Environment](distro/popular-applications/desktop-environment.md) ...
book/src/SUMMARY.md
null
null
null
null
null
source
asterinas
# Asterinas NixOS Asterinas NixOS is the first distribution for Asterinas. We choose [NixOS](https://nixos.org/) as the base OS for its unparalleled customizability and rich package ecosystem. Asterinas NixOS is intended to look and feel like vanilla NixOS, except that it replaces Linux with Asterinas as its kernel. F...
book/src/distro/README.md
null
null
null
null
null
source
asterinas
# Popular Applications The [Nix package collection](https://search.nixos.org/packages) contains over 120,000 packages. Many of them may already work out of the box on Asterinas NixOS, but it is impractical to test every package and document its support status. Instead, we group popular applications into categories and...
book/src/distro/popular-applications/README.md
null
null
null
null
null
source
asterinas
# Containerization ## Podman [Podman](https://docs.podman.io/en/stable/Introduction.html) is a modern, daemonless container engine that provides a Docker-compatible command-line interface, making it easy for users familiar with Docker to transition. ### Installation To install Podman, add the following line to `con...
book/src/distro/popular-applications/containerization.md
null
null
null
null
null
source
asterinas
# Desktop Environment ## Xfce [Xfce](https://www.xfce.org/) is a lightweight desktop environment for UNIX-like operating systems. ### Installation Add the following lines to the `configuration.nix` file: ```nix services.xserver.enable = true; services.xserver.desktopManager.xfce.enable = true; ``` <!-- TODO: upgr...
book/src/distro/popular-applications/desktop-environment.md
null
null
null
null
null
source
asterinas
# Package Management NixOS provides a set of [tools](https://nix.dev/manual/nix/2.28/command-ref/main-commands) for building, installing, and managing packages. ## Verified Usage ### `nix-build` `nix-build` builds Nix derivations and produces outputs in the Nix store. It is the preferred way to build software repro...
book/src/distro/popular-applications/package-management.md
null
null
null
null
null
source
asterinas
# Asterinas Kernel ## Overview Asterinas is a _secure_, _fast_, and _general-purpose_ OS kernel that provides an _Linux-compatible_ ABI. It can serve as a seamless replacement for Linux while enhancing _memory safety_ and _developer friendliness_. * Asterinas prioritizes memory safety by employing Rust as its sole p...
book/src/kernel/README.md
null
null
null
null
null
source
asterinas
# Advanced Build and Test Instructions ## User-Mode Unit Tests Asterinas consists of many crates, some of which do not require a VM environment and can be tested with the standard `cargo test`. They are listed in the root `Makefile` and can be tested together through the following Make command. ```bash make test ```...
book/src/kernel/advanced-instructions.md
null
null
null
null
null
source
asterinas
# Intel TDX Asterinas can serve as a secure guest OS for Intel TDX-protected virtual machines (VMs). This documentation describes how Asterinas can be run and tested easily on a TDX-enabled Intel server. Intel TDX (Trust Domain Extensions) is a Trusted Execution Environment (TEE) technology that enhances VM security ...
book/src/kernel/intel-tdx.md
null
null
null
null
null
source
asterinas
# Roadmap Asterinas is a general-purpose OS kernel designed to support multiple CPU architectures and a variety of use cases. Currently, it only supports x86-64 VMs. Our roadmap includes the following plans: * By 2024, we aim to achieve production-ready status for VM environments on x86-64. * In 2025 and beyond, we w...
book/src/kernel/roadmap.md
null
null
null
null
null
source
asterinas
# The Framekernel Architecture ## Framekernel: What and Why > The security of a microkernel, the speed of a monolithic kernel. Asterinas introduces a novel OS architecture called _framekernel_, which unleashes the full power of Rust to bring the best of both monolithic kernels and microkernels. Within the framekern...
book/src/kernel/the-framekernel-architecture.md
null
null
null
null
null
source
asterinas
# Linux Compatibility > "We don't break user space." > > --- Linus Torvalds Asterinas is dedicated to maintaining compatibility with the Linux ABI, ensuring that applications and administrative tools designed for Linux can seamlessly operate within Asterinas. While we prioritize compatibility, it is important to note...
book/src/kernel/linux-compatibility/README.md
null
null
null
null
null
source
asterinas
# Syscall Flag Coverage This section documents the flag coverage of Asterinas's implementation of Linux system calls. It introduces [**System Call Matching Language (SCML)**](system-call-matching-language.md), a lightweight domain‑specific language for specifying allowed and disallowed patterns of system‑call invocati...
book/src/kernel/linux-compatibility/syscall-flag-coverage/README.md
null
null
null
null
null
source
asterinas
# System Call Matching Language (SCML) SCML specifies matching patterns for system‑call invocations. Asterinas developers can easily write SCML rules to describe supported patterns. Likewise, users and developers can intuitively read these rules to understand which system calls and features are available. SCML is de...
book/src/kernel/linux-compatibility/syscall-flag-coverage/system-call-matching-language.md
null
null
null
null
null
source
asterinas
# File and Directory Operations <!-- Put system calls such as open, openat, creat, close, read, write, readv, writev, pread64, pwrite64, lseek, stat, fstat, lstat, statx, mkdir, rmdir, link, unlink, rename, symlink, readlink, chmod, fchmod, chown, fchown, utime, and utimensat under this category. --> ### `open` an...
book/src/kernel/linux-compatibility/syscall-flag-coverage/file-and-directory-operations/README.md
null
null
null
null
null
source
asterinas
# File Descriptor and I/O Control <!-- Put system calls such as dup, dup2, dup3, fcntl, ioctl, pipe, pipe2, splice, tee, vmsplice, sendfile, eventfd, eventfd2, memfd_create and fadvise64 under this category. --> ### `fcntl` Supported functionality in SCML: ```c {{#include fcntl.scml}} ``` Unsupported commands: * `...
book/src/kernel/linux-compatibility/syscall-flag-coverage/file-descriptor-and-io-control/README.md
null
null
null
null
null
source
asterinas
# File Systems & Mount Control <!-- Put system calls such as mount, umount2, pivot_root, statfs, fstatfs, truncate, ftruncate, fsync, fdatasync, sync, syncfs, sync_file_range, open_tree, move_mount, fsopen, fsconfig, fsmount, fspick, inotify_init, inotify_init1, inotify_add_watch, inotify_rm_watch under this category...
book/src/kernel/linux-compatibility/syscall-flag-coverage/file-systems-and-mount-control/README.md
null
null
null
null
null
source
asterinas
# Inter-Process Communication <!-- Put system calls such as msgget, msgsnd, msgrcv, msgctl, semget, semop, semctl, shmget, shmat, shmctl futex, set_robust_list, and get_robust_list under this category. --> ### `futex` Supported functionality in SCML: ```c {{#include futex.scml}} ``` Unsupported operations: * `FUTE...
book/src/kernel/linux-compatibility/syscall-flag-coverage/inter-process-communication/README.md
null
null
null
null
null
source
asterinas
# Memory Management <!-- Put system calls such as brk, mmap, munmap, mprotect, mremap, msync, mincore, madvise, shmget, shmat, shmctl, mlock, munlock, mbind, and set_mempolicy under this part. --> ## Memory Mappings ### `mmap` and `munmap` Supported functionality in SCML: ```c {{#include mmap_and_munmap.scml}} `...
book/src/kernel/linux-compatibility/syscall-flag-coverage/memory-management/README.md
null
null
null
null
null
source
asterinas
# Namespaces, Cgroups & Security <!-- Put system calls such as unshare, setns, clone (with namespace flags), chroot, pivot_root, prctl, capset, seccomp, landlock_create_ruleset, landlock_add_rule, landlock_restrict_self, and bpf under this category. --> ### `prctl` Supported functionality in SCML: ```c {{#include ...
book/src/kernel/linux-compatibility/syscall-flag-coverage/namespaces-cgroups-and-security/README.md
null
null
null
null
null
source
asterinas
# Networking & Sockets <!-- Put system calls such as socket, socketpair, bind, listen, accept, connect, getsockname, getpeername, sendto, recvfrom, sendmsg, recvmsg, shutdown, setsockopt, getsockopt, sendmmsg, recvmmsg, accept4, recvmsg, and socketcall under this category. --> ## Socket Creation ### `socket` Sup...
book/src/kernel/linux-compatibility/syscall-flag-coverage/networking-and-sockets/README.md
null
null
null
null
null
source
asterinas
# Process & Thread Management <!-- Put system calls such as fork, vfork, clone, execve, exit, exit_group, wait4, waitid, getpid, getppid, gettid, setuid, setgid, getuid, getgid, and prctl under this category. --> ### `sched_getattr` and `sched_setattr` Supported functionality in SCML: ```c {{#include sched_getattr_...
book/src/kernel/linux-compatibility/syscall-flag-coverage/process-and-thread-management/README.md
null
null
null
null
null
source
asterinas
# Signals & Timers <!-- Put system calls such as rt_sigaction, rt_sigprocmask, rt_sigpending, rt_sigqueueinfo, rt_tgsigqueueinfo, rt_sigreturn, kill, tkill, tgkill, alarm, setitimer, getitimer, nanosleep, timer_create, timer_settime, timer_gettime, and timer_delete under this category. --> ## Signals ### `rt_sigact...
book/src/kernel/linux-compatibility/syscall-flag-coverage/signals-and-timers/README.md
null
null
null
null
null
source
asterinas
# System Information & Misc. <!-- Put system calls such as uname, getrlimit, reboot, setrlimit, sysinfo, times, gettimeofday, clock_gettime, clock_settime, getrusage, getdents, getdents64, personality, syslog, arch_prctl, set_tid_address, and getrandom under this category. --> ### `arch_prctl` Supported functionalit...
book/src/kernel/linux-compatibility/syscall-flag-coverage/system-information-and-misc/README.md
null
null
null
null
null
source
asterinas
# OSDK User Guide ## Overview The Asterinas OSDK (short for Operating System Development Kit) is designed to simplify the development of Rust operating systems. It aims to streamline the process by leveraging [the framekernel architecture](../../kernel/the-framekernel-architecture.md). The OSDK provides a command...
book/src/osdk/guide/README.md
null
null
null
null
null
source
asterinas
# Advanced topics This chapter delves into advanced topics regarding OSDK, including its application in TEE environments such as Intel TDX.
book/src/osdk/guide/advanced-topics.md
null
null
null
null
null
source
asterinas
# Creating an OS Project The OSDK can be used to create a new kernel project or a new library project. A kernel project defines the entry point of the kernel and can be run with QEMU. A library project can provide certain OS functionalities and be imported by other OSes. ## Creating a new kernel project Creating a n...
book/src/osdk/guide/create-project.md
null
null
null
null
null