License rust and c source files

This commit is contained in:
Jianfeng Jiang
2024-01-03 03:22:36 +00:00
committed by Tate, Hongliang Tian
parent 5fb8a9f7e5
commit faaa4438d6
559 changed files with 1192 additions and 89 deletions

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
//! The definition of Linux Boot Protocol boot_params struct.
//!
//! The bootloader will deliver the address of the `BootParams` struct

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
//! The linux bzImage builder.
//!
//! This crate is responsible for building the bzImage. It contains methods to build

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
//! In the setup, VA - SETUP32_LMA == FileOffset - LEGACY_SETUP_SEC_SIZE.
//! And the addresses are specified in the ELF file.
//!

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
//! Big zImage PE/COFF header generation.
//!
//! The definition of the PE/COFF header is in the Microsoft PE/COFF specification:

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use std::path::PathBuf;
fn main() {

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use core::fmt::{self, Write};
use uart_16550::SerialPort;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use xmas_elf::program::{ProgramHeader, SegmentData};
/// Load the kernel ELF payload to memory.

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
//! The linux bzImage setup binary.
//!
//! With respect to the format of the bzImage, we design our bzImage setup in the similar

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use uefi::{
data_types::Handle,
proto::loaded_image::LoadedImage,

View File

@ -1,3 +1,5 @@
/* SPDX-License-Identifier: MPL-2.0 */
// The compatibility file for the Linux x86 Boot Protocol.
// See https://www.kernel.org/doc/html/v5.6/x86/boot.html for
// more information on the Linux x86 Boot Protocol.

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
mod efi;
mod paging;
mod relocation;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
//! This module provides abstraction over the Intel IA32E paging mechanism. And
//! offers method to create linear page tables.
//!

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use crate::x86::get_image_loaded_offset;
struct Elf64Rela {

View File

@ -1,3 +1,5 @@
/* SPDX-License-Identifier: MPL-2.0 */
// The compatibility file for the Linux x86 Boot Protocol.
// See https://www.kernel.org/doc/html/v5.6/x86/boot.html for
// more information on the Linux x86 Boot Protocol.

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
use linux_boot_params::BootParams;
use core::arch::{asm, global_asm};

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
cfg_if::cfg_if! {
if #[cfg(target_arch = "x86_64")] {
mod amd64_efi;