initial commit uwu

main
anna 1 year ago
commit ed4c57a773
Signed by: fef
GPG Key ID: 2585C2DC6D79B485

@ -0,0 +1,6 @@
[build]
target = "config/x86-pc-none.json"
[unstable]
build-std-features = ["compiler-builtins-mem"]
build-std = ["core", "compiler_builtins"]

6
.gitignore vendored

@ -0,0 +1,6 @@
/.idea
/.vscode
/target
# raw disk files used for development
/*.img

7
Cargo.lock generated

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "bussy"
version = "0.1.0"

@ -0,0 +1,10 @@
[package]
name = "bussy"
version = "0.1.0"
edition = "2021"
[profile.dev]
panic = "abort"
[profile.release]
panic = "abort"

@ -0,0 +1,28 @@
OUTPUT_FORMAT(elf32-i386)
ENTRY(_start)
SECTIONS {
. = 0x7c00;
.text : {
*(.text .text.*)
}
.data : {
*(.data .data.*)
}
.rodata : {
*(.rodata)
}
. = 0x7db8;
.header : {
KEEP(*(.header))
}
. = 0x7e00;
.bss(NOLOAD) : {
*(.bss .bss.*)
}
}

@ -0,0 +1,21 @@
{
"arch": "x86",
"cpu": "i386",
"data-layout": "e-m:e-i32:32-f80:128-n8:16:32-S128-p:32:32",
"dynamic-linking": false,
"executables": true,
"linker-flavor": "ld.lld",
"linker": "rust-lld",
"llvm-target": "i386-pc-none",
"max-atomic-width": 64,
"position-independent-executables": false,
"disable-redzone": true,
"target-c-int-width": "32",
"target-pointer-width": "32",
"target-endian": "little",
"panic-strategy": "abort",
"os": "none",
"vendor": "pc",
"relocation-model": "static",
"features": "-sse,-mmx,+soft-float"
}

@ -0,0 +1,4 @@
[toolchain]
channel = "nightly"
components = ["rustfmt", "clippy", "rust-src", "llvm-tools-preview"]
targets = ["x86-pc-none"]

@ -0,0 +1,24 @@
#![no_std]
#![no_main]
use core::arch::asm;
use core::panic::PanicInfo;
#[no_mangle]
pub extern "C" fn main() -> ! {
panic!();
}
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
unsafe {
asm!(
"1: cli",
" hlt",
" jmp 1b", // NMI may resume the CPU or something, idk
options(att_syntax)
);
}
unreachable!()
}
Loading…
Cancel
Save