Adding a SizeStudy directory - #173
Merged
Merged
Conversation
…ased drivers, per an OEM request.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new uefi/SizeStudy area intended to serve as a baseline for measuring size impacts of simple UEFI “hello world” style drivers implemented in both C and Rust.
Changes:
- Introduces a minimal C DXE driver (
CHelloWorld) that emits aDEBUG_INFOmessage and exits successfully. - Introduces a Rust DXE driver (
RustHelloWorld) with a PL011-UART-backedlogimplementation that emits aninfo!message and returns success. - Adds documentation describing baseline size/compression comparisons and how to use the directory for experiments.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| uefi/SizeStudy/RustHelloWorld/src/main.rs | New Rust DXE driver entrypoint with a simple UART logger and hello-world log message. |
| uefi/SizeStudy/RustHelloWorld/Cargo.toml | New Rust driver manifest defining dependencies and build profile settings. |
| uefi/SizeStudy/RustHelloWorld/.cargo/config.toml | New per-crate cargo configuration for aarch64-unknown-uefi build and linker flags. |
| uefi/SizeStudy/README.md | Documentation for the size study rationale and baseline measurement results. |
| uefi/SizeStudy/CHelloWorld/CHelloWorld.inf | New EDK2 INF for the C DXE driver baseline module. |
| uefi/SizeStudy/CHelloWorld/CHelloWorld.c | New C DXE driver baseline implementation emitting a debug message. |
williampMSFT
previously approved these changes
Aug 5, 2026
kat-perez
previously approved these changes
Aug 6, 2026
felipebalbi
previously approved these changes
Aug 12, 2026
* Copyright and license properly set to expected text * Unnecessary config in Rust code removed
rogurr
dismissed stale reviews from felipebalbi, kat-perez, and williampMSFT
via
August 18, 2026 00:25
45b6c60
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (2)
uefi/SizeStudy/CHelloWorld/CHelloWorld.c:6
- The C driver source header comment style (
//// ...) doesn’t match the established UEFI C style in this repo, where sources start with a Doxygen-style/** @fileheader (e.g.uefi/SrePkg/Application/NvmeBpWrite/NvmeBpWrite.c:1). Aligning the header keeps documentation consistent and improves tooling support.
////
// SizeStudy baseline DXE driver that prints a debug message and exits, written in C.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// SPDX-License-Identifier: MIT
uefi/SizeStudy/RustHelloWorld/Cargo.toml:16
logis used from a#![no_std]UEFI binary, but this dependency enables default features. In this repo’s UEFI Rust crates,logis consistently pulled in withdefault-features = false(e.g.uefi/crates/patina_boot/Cargo.toml,uefi/OdpPkg/Drivers/ODP_PatinaSmbiosDemo/Cargo.toml), which also helps keep the size-study baseline smaller and avoids accidentally relying onstd.
log = { version = "0.4" }
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (1)
uefi/SizeStudy/RustHelloWorld/Cargo.toml:17
logis pulled in with default features enabled. For a#![no_std]UEFI driver (and especially for a size baseline), this can unnecessarily pull instdsupport fromlogand inflate the resulting .efi size. Other UEFI crates in this repo consistently disablelogdefault features.
[dependencies]
arm-pl011-uart = { version = "0.5.0", default-features = false }
log = { version = "0.4" }
spin = { version = "0.10.0", default-features = false, features = ["mutex", "spin_mutex"] }
felipebalbi
approved these changes
Aug 18, 2026
kurtjd
approved these changes
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ./uefi/SizeStudy directory contains 2 drivers that both produce a hello world debug message string in the driver entry then exit, one written in C and the other in Rust. They are intended to be a baseline to allow making modifications such as adding C libraries or Rust Patina components to see how the changes affect size.