-
-
Notifications
You must be signed in to change notification settings - Fork 1
Fixed most major issues but currently triple faulting at boot #13
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
67afe42
Fixed most major issues but currently triple faulting at boot
PinkQween dcbea4c
Refactor Makefile and boot sector files for improved functionality
PinkQween af07123
Update Makefile and boot sector files for improved functionality and …
PinkQween 29c2d2c
Refactor Makefile and boot sector files for improved functionality an…
PinkQween 439a85f
Update Makefile and boot sector files for improved partition handling…
PinkQween f11440c
Refactor vbr.asm for improved clarity and functionality
PinkQween 7c69267
saving progress couldn't get fat32 fs on main drive someone else plea…
PinkQween File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,4 @@ mnt/ | |
| **/bin/ | ||
| **/build/ | ||
| .venv/ | ||
| external/ | ||
|
|
||
| pushTags.sh | ||
| external/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| ; FAT32 FSInfo Sector | ||
| ; This sector provides information about the filesystem state | ||
|
|
||
| ORG 0x0000 | ||
| BITS 16 | ||
|
|
||
| ; FSInfo sector structure | ||
| FSInfo_LeadSig dd 0x41615252 ; Lead signature "RRaA" | ||
| FSInfo_Reserved1 times 480 db 0 ; Reserved bytes | ||
| FSInfo_StrucSig dd 0x61417272 ; Structure signature "rrAa" | ||
| FSInfo_Free_Count dd 0xFFFFFFFF ; Free cluster count (unknown) | ||
| FSInfo_Nxt_Free dd 0xFFFFFFFF ; Next free cluster (unknown) | ||
| FSInfo_Reserved2 times 12 db 0 ; Reserved bytes | ||
| FSInfo_TrailSig dd 0xAA550000 ; Trail signature | ||
|
|
||
| ; Pad to 512 bytes | ||
| times 512-($-$$) db 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,63 +1,61 @@ | ||
| ; MBR FAT32 Bootloader - loads first cluster of BOOT file | ||
| BITS 16 | ||
| ORG 0x7C00 | ||
| BITS 16 | ||
|
|
||
| start: | ||
| cli | ||
| xor ax, ax | ||
| mov ds, ax | ||
| mov es, ax | ||
| mov ss, ax | ||
| mov sp, 0x7C00 | ||
| sti | ||
|
|
||
| ; Save boot drive | ||
| mov [boot_drive], dl | ||
|
|
||
| ; Set text mode | ||
| mov ax, 0x03 | ||
| int 0x10 | ||
|
|
||
| ; Load first sector of partition at LBA 2048 | ||
| mov eax, 2048 ; Sector number to load | ||
| mov [dap_lba], eax | ||
| mov [dap_mem], word 0x8000 ; Destination segment:offset | ||
| mov [dap_mem + 2], word 0x0000 | ||
| mov si, load_msg | ||
| call print | ||
|
|
||
| ; INT 13h Extended Read (0x42) | ||
| mov si, disk_address_packet | ||
| mov dl, [boot_drive] | ||
| ; Setup Disk Address Packet (DAP) for partition start (LBA 2048) | ||
| mov si, dap | ||
| mov ah, 0x42 | ||
| mov dl, 0x80 ; First hard disk | ||
| int 0x13 | ||
| jc disk_error | ||
|
|
||
| ; Jump to loaded VBR/Stage2 | ||
| jmp 0:0x8000 | ||
| ; Far jump to loaded VBR at 0x0000:0x7E00 | ||
| jmp 0x0000:0x7E00 | ||
|
|
||
| disk_error: | ||
| mov si, err_msg | ||
| .print_err: | ||
| lodsb | ||
| or al, al | ||
| jz $ | ||
| mov si, error_msg | ||
| call print | ||
| jmp $ | ||
|
|
||
| print: | ||
| mov ah, 0x0E | ||
| .next_char: | ||
| lodsb | ||
| cmp al, 0 | ||
| je .done | ||
| int 0x10 | ||
| jmp .print_err | ||
|
|
||
| ; --- Disk Address Packet --- | ||
| disk_address_packet: | ||
| db 0x10 ; Size | ||
| db 0x00 ; Reserved | ||
| dw 1 ; Sectors to read | ||
| dap_mem: | ||
| dw 0x8000 ; Offset | ||
| dw 0x0000 ; Segment | ||
| dap_lba: | ||
| dd 0x00000800 ; LBA = 2048 | ||
| dd 0x00000000 ; LBA high dword | ||
|
|
||
| boot_drive: db 0 | ||
| err_msg db "Disk Error", 0 | ||
|
|
||
| times 510 - ($ - $$) db 0 | ||
| dw 0xAA55 | ||
| jmp .next_char | ||
| .done: | ||
| ret | ||
|
|
||
| load_msg db "MBR: Loading VBR...", 0 | ||
| error_msg db "MBR: Disk read error!", 0 | ||
|
|
||
| ; --- Disk Address Packet (DAP) --- | ||
| dap: | ||
| db 0x10 ; size of DAP | ||
| db 0x00 ; reserved | ||
| dw 0x0003 ; number of sectors to read | ||
| dw 0x7E00 ; offset | ||
| dw 0x0000 ; segment | ||
| dq 2050 ; LBA - VBR location | ||
|
|
||
| times 446 - ($ - $$) db 0 ; Pad to partition table | ||
|
|
||
| ; === Partition Table === | ||
| db 0x80 ; Bootable | ||
| db 0x01, 0x01, 0x00 ; CHS start — dummy | ||
| db 0x0C ; FAT32 (LBA) | ||
| db 0xFE, 0xFF, 0xFF ; CHS end — dummy | ||
| dd 3000 ; LBA of first sector of partition | ||
| dd 260096 ; Number of sectors in partition (262144 - 2048) | ||
|
|
||
| times 3*16 db 0 ; Empty partitions | ||
| dw 0xAA55 ; Boot signature |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Document cross-compiler requirement and ensure CI has it installed.
The build requires
i686-elf-gcccross-compiler which is missing in the CI environment, causing pipeline failures.Consider:
Also applies to: 194-194
🏁 Script executed:
Length of output: 3605
Add CI installation for i686-elf-gcc and a prereqs check
i686-elf-gccrequirement under Build Requirements..github/workflows/build.yml) to install the cross-compiler before runningmake. For example:check-prereqstarget in theMakefileto fail early ifi686-elf-gccis missing:These changes will ensure the CI environment installs the cross-compiler and that local builds fail fast with a clear error.
🤖 Prompt for AI Agents