From 1db789889c84f15fe8f9b45280e0255b0370ba6b Mon Sep 17 00:00:00 2001 From: Mark Date: Sun, 2 Mar 2025 10:06:10 -0800 Subject: [PATCH] Remove unused `start()` args --- bios/stage2.asm | 11 +---------- bios/thunk.asm | 24 ------------------------ tetros/src/lib.rs | 8 +------- 3 files changed, 2 insertions(+), 41 deletions(-) diff --git a/bios/stage2.asm b/bios/stage2.asm index d069312..9dcb4a4 100644 --- a/bios/stage2.asm +++ b/bios/stage2.asm @@ -31,18 +31,9 @@ stage3.entry: ; stage3 stack at 448 KiB (512KiB minus 64KiB disk buffer) mov esp, 0x70000 - ; push arguments - mov eax, thunk.int16 - push eax - mov eax, thunk.int15 - push eax - mov eax, thunk.int13 - push eax + ; push arguments to `start()` mov eax, thunk.int10 push eax - xor eax, eax - mov al, [disk] - push eax mov eax, [stage3 + 0x18] call eax diff --git a/bios/thunk.asm b/bios/thunk.asm index 4423132..4a115ed 100644 --- a/bios/thunk.asm +++ b/bios/thunk.asm @@ -6,18 +6,6 @@ thunk: mov dword [.func], .int10_real jmp .enter -.int13: - mov dword [.func], .int13_real - jmp .enter - -.int15: - mov dword [.func], .int15_real - jmp .enter - -.int16: - mov dword [.func], .int16_real - jmp .enter - .func: dd 0 .esp: dd 0 .cr0: dd 0 @@ -65,18 +53,6 @@ USE16 int 0x10 ret -.int13_real: - int 0x13 - ret - -.int15_real: - int 0x15 - ret - -.int16_real: - int 0x16 - ret - .pm16: ; set segment selectors to protected mode 16-bit mov eax, gdt.pm16_data diff --git a/tetros/src/lib.rs b/tetros/src/lib.rs index 660421b..2dada67 100644 --- a/tetros/src/lib.rs +++ b/tetros/src/lib.rs @@ -123,13 +123,7 @@ extern "x86-interrupt" fn double_fault_handler( } #[no_mangle] -pub unsafe extern "C" fn start( - _boot_disk: usize, - thunk10: extern "C" fn(), - _thunk13: extern "C" fn(), - _thunk15: extern "C" fn(), - _thunk16: extern "C" fn(), -) -> ! { +pub unsafe extern "C" fn start(thunk10: extern "C" fn()) -> ! { println!("Entered Rust, serial ready."); {