started setting up
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/target
|
||||
Generated
+25
@@ -0,0 +1,25 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "2.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
|
||||
|
||||
[[package]]
|
||||
name = "foundryos_kernel"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"limine",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "limine"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9ca87cab008b8efeebdbe037cd4d1438037d48c5cb6fed939ffa5aa06315a321"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
[workspace]
|
||||
members = [
|
||||
"kernel"
|
||||
]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
timeout: 1
|
||||
|
||||
/foundry-os
|
||||
protocol: limine
|
||||
kernel_path: boot()/boot/kernel
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"llvm-target": "x86_64-unknown-none",
|
||||
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
|
||||
"arch": "x86_64",
|
||||
"target-endian": "little",
|
||||
"target-pointer-width": "64",
|
||||
"target-c-int-width": "32",
|
||||
"os": "none",
|
||||
"executables": true,
|
||||
"linker-flavor": "ld.lld",
|
||||
"linker": "rust-lld",
|
||||
"panic-strategy": "abort",
|
||||
"disable-redzone": true,
|
||||
"features": "-mmx,-sse,+soft-float",
|
||||
"relocation-model": "static",
|
||||
"code-model": "kernel",
|
||||
"pre-link-args": {
|
||||
"ld.lld": [
|
||||
"--script=linker/linker.ld",
|
||||
"-nostdlib",
|
||||
"--no-dynamic-linker",
|
||||
"-static",
|
||||
"--no-pie",
|
||||
"--gc-sections",
|
||||
"--build-id=none",
|
||||
"-z", "max-page-size=0x1000"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
[build]
|
||||
target = "../customos"
|
||||
target-dir = "./target"
|
||||
|
||||
[unstable]
|
||||
build-std = ["core", "compiler_builtins"]
|
||||
build-std-features = ["compiler-builtins-mem"]
|
||||
@@ -0,0 +1,7 @@
|
||||
[package]
|
||||
name = "foundryos_kernel"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
limine = "0.3.1"
|
||||
@@ -0,0 +1,7 @@
|
||||
fn main() {
|
||||
let arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
||||
// Tell cargo to pass the linker script to the linker..
|
||||
println!("cargo:rustc-link-arg=-Tlinker-{arch}.ld");
|
||||
// ..and to re-run if it changes.
|
||||
println!("cargo:rerun-if-changed=linker-{arch}.ld");
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
Signature: 8a477f597d28d172789f06886806bc55
|
||||
# This file is a cache directory tag created by cargo.
|
||||
# For information about cache directory tags see https://bford.info/cachedir/
|
||||
+1
@@ -0,0 +1 @@
|
||||
2c12b06536f46cd1
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":5637828655848808591,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[16831489395241507197,"build_script_build",false,2449660372133931133]],"local":[{"RerunIfChanged":{"output":"../customos/debug/build/compiler_builtins-7ff902764ead3159/output","paths":["build.rs","configure.rs"]}}],"rustflags":[],"config":0,"compile_kind":0}
|
||||
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1 @@
|
||||
{"$message_type":"diagnostic","message":"Error loading target specification: Could not find specification for target \"../customos\". Run `rustc --print target-list` for a list of built-in targets","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: Error loading target specification: Could not find specification for target \"../customos\". Run `rustc --print target-list` for a list of built-in targets\u001b[0m\n\n"}
|
||||
+1
@@ -0,0 +1 @@
|
||||
85b0379a2e964349
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":5637828655848808591,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[16831489395241507197,"build_script_build",false,15090704965883138604],[4566724075159146729,"build_script_build",false,12086878114467551400]],"local":[{"RerunIfChanged":{"output":"../customos/debug/build/foundryos_kernel-15da3dc5b1d972d1/output","paths":["linker-x86_64.ld"]}}],"rustflags":[],"config":0,"compile_kind":0}
|
||||
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1,151 @@
|
||||
cargo::rerun-if-changed=build.rs
|
||||
cargo::rerun-if-changed=configure.rs
|
||||
cargo::rustc-check-cfg=cfg(__ashldi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__ashlsi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__ashrdi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__ashrsi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__bswapsi2, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__bswapdi2, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__bswapti2, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__divdi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__divsi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__divmoddi4, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__divmodsi4, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__divmodsi4, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__divmodti4, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__lshrdi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__lshrsi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__moddi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__modsi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__muldi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__udivdi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__udivmoddi4, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__udivmodsi4, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__udivsi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__umoddi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__umodsi3, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas1_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas1_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas1_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas1_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas2_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas2_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas2_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas2_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas4_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas4_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas4_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas4_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas8_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas8_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas8_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas8_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas16_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas16_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas16_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_cas16_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd1_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd1_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd1_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd1_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd2_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd2_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd2_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd2_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd4_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd4_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd4_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd4_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd8_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd8_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd8_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldadd8_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr1_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr1_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr1_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr1_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr2_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr2_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr2_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr2_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr4_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr4_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr4_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr4_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr8_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr8_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr8_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldclr8_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor1_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor1_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor1_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor1_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor2_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor2_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor2_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor2_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor4_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor4_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor4_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor4_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor8_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor8_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor8_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldeor8_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset1_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset1_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset1_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset1_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset2_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset2_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset2_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset2_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset4_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset4_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset4_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset4_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset8_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset8_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset8_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_ldset8_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp1_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp1_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp1_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp1_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp2_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp2_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp2_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp2_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp4_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp4_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp4_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp4_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp8_relax, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp8_acq, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp8_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(__aarch64_swp8_acq_rel, values("optimized-c"))
|
||||
cargo::rustc-check-cfg=cfg(target_feature, values("vis3"))
|
||||
cargo::rustc-check-cfg=cfg(feature, values("checked"))
|
||||
cargo::rustc-check-cfg=cfg(assert_no_panic)
|
||||
cargo::rustc-check-cfg=cfg(f16_enabled)
|
||||
cargo::rustc-check-cfg=cfg(f128_enabled)
|
||||
cargo::rustc-cfg=f16_enabled
|
||||
cargo::rustc-cfg=f128_enabled
|
||||
cargo:rustc-check-cfg=cfg(intrinsics_enabled)
|
||||
cargo:rustc-check-cfg=cfg(arch_enabled)
|
||||
cargo:rustc-check-cfg=cfg(optimizations_enabled)
|
||||
cargo:rustc-check-cfg=cfg(feature, values("unstable-public-internals"))
|
||||
cargo:rustc-cfg=intrinsics_enabled
|
||||
cargo:rustc-cfg=arch_enabled
|
||||
cargo:rustc-check-cfg=cfg(optimizations_enabled)
|
||||
cargo:rustc-check-cfg=cfg(x86_no_sse)
|
||||
cargo:rustc-env=CFG_CARGO_FEATURES=["compiler-builtins", "core", "default", "mem", "rustc-dep-of-std"]
|
||||
cargo:rustc-env=CFG_OPT_LEVEL=0
|
||||
cargo:rustc-env=CFG_TARGET_FEATURES=["x87"]
|
||||
cargo:rustc-cfg=feature="unstable-intrinsics"
|
||||
cargo:compiler-rt=/home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/compiler-rt
|
||||
cargo::rustc-check-cfg=cfg(feature, values("mem-unaligned"))
|
||||
cargo:rustc-cfg=feature="mem-unaligned"
|
||||
cargo::rustc-check-cfg=cfg(thumb)
|
||||
cargo::rustc-check-cfg=cfg(thumb_1)
|
||||
cargo::rustc-check-cfg=cfg(kernel_user_helpers)
|
||||
@@ -0,0 +1 @@
|
||||
/home/zxq5/Projects/OSDev/FoundryOS/kernel/./target/../customos/debug/build/compiler_builtins-7ff902764ead3159/out
|
||||
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1,2 @@
|
||||
cargo:rustc-link-arg=-Tlinker-x86_64.ld
|
||||
cargo:rerun-if-changed=linker-x86_64.ld
|
||||
@@ -0,0 +1 @@
|
||||
/home/zxq5/Projects/OSDev/FoundryOS/kernel/./target/../customos/debug/build/foundryos_kernel-15da3dc5b1d972d1/out
|
||||
@@ -0,0 +1,4 @@
|
||||
[toolchain]
|
||||
channel = "nightly"
|
||||
targets = ["rust-src", "llvm-tools-preview", "rustfmt", "clippy"]
|
||||
components = []
|
||||
@@ -0,0 +1,67 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use core::arch::asm;
|
||||
|
||||
use limine::request::{FramebufferRequest, RequestsEndMarker, RequestsStartMarker};
|
||||
use limine::BaseRevision;
|
||||
|
||||
/// Sets the base revision to the latest revision supported by the crate.
|
||||
/// See specification for further info.
|
||||
/// Be sure to mark all limine requests with #[used], otherwise they may be removed by the compiler.
|
||||
#[used]
|
||||
// The .requests section allows limine to find the requests faster and more safely.
|
||||
#[link_section = ".requests"]
|
||||
static BASE_REVISION: BaseRevision = BaseRevision::new();
|
||||
|
||||
#[used]
|
||||
#[link_section = ".requests"]
|
||||
static FRAMEBUFFER_REQUEST: FramebufferRequest = FramebufferRequest::new();
|
||||
|
||||
/// Define the stand and end markers for Limine requests.
|
||||
#[used]
|
||||
#[link_section = ".requests_start_marker"]
|
||||
static _START_MARKER: RequestsStartMarker = RequestsStartMarker::new();
|
||||
#[used]
|
||||
#[link_section = ".requests_end_marker"]
|
||||
static _END_MARKER: RequestsEndMarker = RequestsEndMarker::new();
|
||||
|
||||
#[no_mangle]
|
||||
unsafe extern "C" fn kmain() -> ! {
|
||||
// All limine requests must also be referenced in a called function, otherwise they may be
|
||||
// removed by the linker.
|
||||
assert!(BASE_REVISION.is_supported());
|
||||
|
||||
if let Some(framebuffer_response) = FRAMEBUFFER_REQUEST.get_response() {
|
||||
if let Some(framebuffer) = framebuffer_response.framebuffers().next() {
|
||||
for i in 0..100_u64 {
|
||||
// Calculate the pixel offset using the framebuffer information we obtained above.
|
||||
// We skip `i` scanlines (pitch is provided in bytes) and add `i * 4` to skip `i` pixels forward.
|
||||
let pixel_offset = i * framebuffer.pitch() + i * 4;
|
||||
|
||||
// Write 0xFFFFFFFF to the provided pixel offset to fill it white.
|
||||
*(framebuffer.addr().add(pixel_offset as usize) as *mut u32) = 0xFFFFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hcf();
|
||||
}
|
||||
|
||||
#[panic_handler]
|
||||
fn rust_panic(_info: &core::panic::PanicInfo) -> ! {
|
||||
hcf();
|
||||
}
|
||||
|
||||
fn hcf() -> ! {
|
||||
loop {
|
||||
unsafe {
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
asm!("hlt");
|
||||
#[cfg(any(target_arch = "aarch64", target_arch = "riscv64"))]
|
||||
asm!("wfi");
|
||||
#[cfg(target_arch = "loongarch64")]
|
||||
asm!("idle 0");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc_fingerprint":10191676143533991604,"outputs":{"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.87.0-nightly (827a0d638 2025-02-18)\nbinary: rustc\ncommit-hash: 827a0d638dabc9a22c56f9c37a557568f86ac76c\ncommit-date: 2025-02-18\nhost: x86_64-unknown-linux-gnu\nrelease: 1.87.0-nightly\nLLVM version: 20.1.0\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/zxq5/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\nfmt_debug=\"full\"\noverflow_checks\npanic=\"unwind\"\nproc_macro\nrelocation_model=\"pic\"\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"x87\"\ntarget_has_atomic\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nub_checks\nunix\n","stderr":""},"16938275954012004043":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.a\n/home/zxq5/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\noff\n___\ndebug_assertions\nfmt_debug=\"full\"\noverflow_checks\npanic=\"abort\"\nproc_macro\nrelocation_model=\"static\"\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_feature=\"x87\"\ntarget_has_atomic\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"none\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nub_checks\n","stderr":"warning: target feature `sse2` must be enabled to ensure that the ABI of the current target can be implemented correctly\n |\n = note: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!\n = note: for more information, see issue #116344 <https://github.com/rust-lang/rust/issues/116344>\n\nwarning: dropping unsupported crate type `dylib` for target `../customos`\n\nwarning: dropping unsupported crate type `cdylib` for target `../customos`\n\nwarning: dropping unsupported crate type `proc-macro` for target `../customos`\n\nwarning: 4 warnings emitted\n\n"}},"successes":{}}
|
||||
@@ -0,0 +1,3 @@
|
||||
Signature: 8a477f597d28d172789f06886806bc55
|
||||
# This file is a cache directory tag created by cargo.
|
||||
# For information about cache directory tags see https://bford.info/cachedir/
|
||||
+1
@@ -0,0 +1 @@
|
||||
7de8642d21f1fe21
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":5637828655848808591,"features":"[\"compiler-builtins\", \"core\", \"default\", \"mem\", \"rustc-dep-of-std\"]","declared_features":"[\"c\", \"cc\", \"compiler-builtins\", \"core\", \"default\", \"mangled-names\", \"mem\", \"no-asm\", \"no-f16-f128\", \"public-test-deps\", \"rustc-dep-of-std\"]","target":5408242616063297496,"profile":15657897354478470176,"path":1296201966205883023,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/compiler_builtins-96bb72fd3eed954b/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
+1
@@ -0,0 +1 @@
|
||||
a81848289b37bda7
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"rustc":5637828655848808591,"features":"[]","declared_features":"[]","target":5408242616063297496,"profile":8731458305071235362,"path":11588123521703303381,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/foundryos_kernel-4c0b4334571dcf0e/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":2069994364910194474,"compile_kind":0}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
+6
@@ -0,0 +1,6 @@
|
||||
/home/zxq5/Projects/OSDev/FoundryOS/kernel/./target/debug/build/compiler_builtins-96bb72fd3eed954b/build_script_build-96bb72fd3eed954b: /home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/build.rs /home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/configure.rs
|
||||
|
||||
/home/zxq5/Projects/OSDev/FoundryOS/kernel/./target/debug/build/compiler_builtins-96bb72fd3eed954b/build_script_build-96bb72fd3eed954b.d: /home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/build.rs /home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/configure.rs
|
||||
|
||||
/home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/build.rs:
|
||||
/home/zxq5/.cargo/bin/registry/src/index.crates.io-1949cf8c6b5b557f/compiler_builtins-0.1.146/configure.rs:
|
||||
BIN
Binary file not shown.
Executable
BIN
Binary file not shown.
+5
@@ -0,0 +1,5 @@
|
||||
/home/zxq5/Projects/OSDev/FoundryOS/kernel/./target/debug/build/foundryos_kernel-4c0b4334571dcf0e/build_script_build-4c0b4334571dcf0e: kernel/build.rs
|
||||
|
||||
/home/zxq5/Projects/OSDev/FoundryOS/kernel/./target/debug/build/foundryos_kernel-4c0b4334571dcf0e/build_script_build-4c0b4334571dcf0e.d: kernel/build.rs
|
||||
|
||||
kernel/build.rs:
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,63 @@
|
||||
/* Tell the linker that we want an x86_64 ELF64 output file */
|
||||
OUTPUT_FORMAT(elf64-x86-64)
|
||||
|
||||
/* We want the symbol kmain to be our entry point */
|
||||
ENTRY(kmain)
|
||||
|
||||
/* Define the program headers we want so the bootloader gives us the right */
|
||||
/* MMU permissions; this also allows us to exert more control over the linking */
|
||||
/* process. */
|
||||
PHDRS
|
||||
{
|
||||
text PT_LOAD;
|
||||
rodata PT_LOAD;
|
||||
data PT_LOAD;
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* We want to be placed in the topmost 2GiB of the address space, for optimisations */
|
||||
/* and because that is what the Limine spec mandates. */
|
||||
/* Any address in this region will do, but often 0xffffffff80000000 is chosen as */
|
||||
/* that is the beginning of the region. */
|
||||
. = 0xffffffff80000000;
|
||||
|
||||
.text : {
|
||||
*(.text .text.*)
|
||||
} :text
|
||||
|
||||
/* Move to the next memory page for .rodata */
|
||||
. = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
|
||||
.rodata : {
|
||||
*(.rodata .rodata.*)
|
||||
} :rodata
|
||||
|
||||
/* Move to the next memory page for .data */
|
||||
. = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
|
||||
.data : {
|
||||
*(.data .data.*)
|
||||
|
||||
/* Place the sections that contain the Limine requests as part of the .data */
|
||||
/* output section. */
|
||||
KEEP(*(.requests_start_marker))
|
||||
KEEP(*(.requests))
|
||||
KEEP(*(.requests_end_marker))
|
||||
} :data
|
||||
|
||||
/* NOTE: .bss needs to be the last thing mapped to :data, otherwise lots of */
|
||||
/* unnecessary zeros will be written to the binary. */
|
||||
/* If you need, for example, .init_array and .fini_array, those should be placed */
|
||||
/* above this. */
|
||||
.bss : {
|
||||
*(.bss .bss.*)
|
||||
*(COMMON)
|
||||
} :data
|
||||
|
||||
/* Discard .note.* and .eh_frame* since they may cause issues on some hosts. */
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame*)
|
||||
*(.note .note.*)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user