Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SPDX headers #1532

Merged
merged 8 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions uefi-macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

#![recursion_limit = "128"]

extern crate proc_macro;
Expand Down
2 changes: 2 additions & 0 deletions uefi-macros/tests/compilation.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

#[test]
fn ui() {
let t = trybuild::TestCases::new();
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/capsule.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! UEFI update capsules.
//!
//! Capsules are used to pass information to the firmware, for example to
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/enums.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! This module provides tooling that facilitates dealing with C-style enums
//!
//! C-style enums and Rust-style enums are quite different. There are things
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/firmware_storage.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Types related to firmware storage.

use crate::Guid;
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Raw interface for working with UEFI.
//!
//! This crate is intended for implementing UEFI services. It is also used for
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/block.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::{guid, Guid, Status};
use core::ffi::c_void;

Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/console.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

pub mod serial;

use crate::{guid, Char16, Event, Guid, PhysicalAddress, Status};
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/console/serial.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::{guid, Guid, Status};
use bitflags::bitflags;

Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/device_path.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

mod device_path_gen;

use crate::{guid, Char16, Guid};
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/device_path/device_path_gen.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

// DO NOT EDIT
//
// This file was automatically generated with:
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/disk.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::{guid, Event, Guid, Status};
use core::ffi::c_void;

Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/driver.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::protocol::device_path::DevicePathProtocol;
use crate::{guid, Guid, Handle, Status};

Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/file_system.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::time::Time;
use crate::{guid, Char16, Event, Guid, Status};
use bitflags::bitflags;
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/firmware_volume.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::firmware_storage::FirmwareVolumeAttributes;
use crate::protocol::block::Lba;
use crate::{guid, Guid, Handle, PhysicalAddress, Status};
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/hii/database.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Bindings for HII Database Protocol

use super::{HiiHandle, HiiPackageHeader, HiiPackageListHeader, KeyDescriptor};
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/hii/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! HII Protocols

pub mod database;
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/loaded_image.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::protocol::device_path::DevicePathProtocol;
use crate::table::boot::MemoryType;
use crate::table::system::SystemTable;
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/media.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::protocol::device_path::DevicePathProtocol;
use crate::{guid, Guid, Status};
use core::ffi::c_void;
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/memory_protection.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::table::boot::MemoryAttribute;
use crate::{guid, Guid, PhysicalAddress, Status};

Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/misc.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::table::runtime;
use crate::{guid, Guid, Status};

Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Protocol definitions.
//!
//! Protocols are sets of related functionality identified by a unique
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/network/dhcp4.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::{guid, Char8, Event, Guid, Ipv4Address, MacAddress, Status};
use core::ffi::c_void;

Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/network/http.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::{guid, Char16, Char8, Event, Guid, Ipv4Address, Ipv6Address, Status};
use core::ffi::c_void;
use core::fmt::{self, Debug, Formatter};
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/network/ip4.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::Ipv4Address;

#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/network/ip4_config2.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::protocol::network::ip4::Ip4RouteTable;
use crate::{guid, Char16, Event, Guid, Ipv4Address, MacAddress, Status};
use core::ffi::c_void;
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/network/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

pub mod dhcp4;
pub mod http;
pub mod ip4;
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/network/tls.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::{guid, Guid, Status};
use core::ffi::c_void;

Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/rng.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! `Rng` protocol.

use crate::{guid, Guid, Status};
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/scsi.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::{guid, Event, Guid, Status};
use core::ffi::c_void;

Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/shell_params.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::{guid, Char16, Guid};
use core::ffi::c_void;

Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/string.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::{guid, Char16, Char8, Guid};

#[derive(Debug)]
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/tcg.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! [TCG] (Trusted Computing Group) protocols.
//!
//! These protocols provide access to the [TPM][tpm] (Trusted Platform Module).
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/tcg/enums.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

newtype_enum! {
/// Algorithm identifiers.
///
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/tcg/v1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! [TCG] (Trusted Computing Group) protocol for [TPM] (Trusted Platform
//! Module) 1.1 and 1.2.
//!
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/protocol/tcg/v2.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! [TCG] (Trusted Computing Group) protocol for [TPM] (Trusted Platform
//! Module) 2.0.
//!
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/status.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use core::fmt::Debug;

newtype_enum! {
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/table/boot.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! UEFI services available during boot.

use crate::protocol::device_path::DevicePathProtocol;
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/table/configuration.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::Guid;
use core::ffi::c_void;

Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/table/header.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use super::Revision;

/// The common header that all UEFI tables begin with.
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/table/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Standard UEFI tables.

mod header;
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/table/revision.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use core::fmt;

/// A revision of the UEFI specification.
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/table/runtime.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! UEFI services available at runtime, even after the OS boots.

use crate::capsule::CapsuleHeader;
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/table/system.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::protocol::console::{SimpleTextInputProtocol, SimpleTextOutputProtocol};
use crate::table::boot::BootServices;
use crate::table::configuration::ConfigurationTable;
Expand Down
2 changes: 2 additions & 0 deletions uefi-raw/src/time.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Date and time types.

use bitflags::bitflags;
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/examples/hello_world.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

// ANCHOR: all
// ANCHOR: features
#![no_main]
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/examples/loaded_image.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

// ANCHOR: all
#![no_main]
#![no_std]
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/examples/shell_params.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

// ANCHOR: all
// ANCHOR: features
#![no_main]
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/examples/sierpinski.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

// ANCHOR: all
#![no_main]
#![no_std]
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/examples/timestamp.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

// ANCHOR: all
// ANCHOR: features
#![no_main]
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/bin/shell_launcher.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! This application launches the UEFI shell app and runs the main
//! uefi-test-running app inside that shell. This allows testing of protocols
//! that require the shell.
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/boot/memory.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use alloc::vec::Vec;
use uefi::boot::{self, AllocateType};
use uefi::mem::memory_map::{MemoryMap, MemoryMapMut, MemoryType};
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/boot/misc.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use core::ffi::c_void;
use core::ptr::{self, NonNull};

Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/boot/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use alloc::string::ToString;
use uefi::boot::{LoadImageSource, SearchType};
use uefi::fs::FileSystem;
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/fs/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

//! Tests functionality from the `uefi::fs` module. See function [`test`].

use alloc::string::{String, ToString};
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

#![no_std]
#![no_main]

Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/proto/console/gop.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::{send_request_to_host, HostRequest};
use uefi::boot::{self, OpenProtocolAttributes, OpenProtocolParams};
use uefi::proto::console::gop::{BltOp, BltPixel, FrameBuffer, GraphicsOutput, PixelFormat};
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/proto/console/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use uefi::prelude::*;

pub fn test() {
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/proto/console/pointer.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use uefi::boot;
use uefi::proto::console::pointer::Pointer;

Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/proto/console/serial.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use crate::reconnect_serial_to_console;
use uefi::proto::console::serial::{ControlBits, Serial};
use uefi::{boot, Result, ResultExt, Status};
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/proto/console/stdout.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use uefi::prelude::*;
use uefi::proto::console::text::{Color, Output};

Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/proto/debug.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use alloc::vec::Vec;
use core::ffi::c_void;
use uefi::boot;
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/proto/device_path.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use alloc::boxed::Box;
use alloc::vec::Vec;
use uefi::proto::device_path::build::{self, DevicePathBuilder};
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/proto/driver.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use uefi::boot::{self, ScopedProtocol, SearchType};
use uefi::prelude::*;
use uefi::proto::driver::{ComponentName, ComponentName2, LanguageError, LanguageIter};
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/proto/load.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use alloc::boxed::Box;
use alloc::string::{String, ToString};
use alloc::vec::Vec;
Expand Down
2 changes: 2 additions & 0 deletions uefi-test-runner/src/proto/loaded_image.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT OR Apache-2.0

use uefi::prelude::*;
use uefi::proto::loaded_image::LoadedImage;

Expand Down
Loading