From a22006b6ea844a60dadd7ca0633ec0479d9be221 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Thu, 22 Aug 2024 19:35:37 +0100 Subject: [PATCH] Boot from different disks/partitions and bug fixes --- build/chimaera.img | Bin 368640 -> 368640 bytes build/chimaera.vhd | Bin 34120704 -> 34120704 bytes src/boot/freeldr/core/config.asm | 273 ++++++++++++++++++++++++++++++ src/boot/freeldr/core/disk.asm | 13 +- src/boot/freeldr/core/freeldr.asm | 41 ++++- src/boot/freeldr/core/int21.asm | 134 ++++++++++----- src/boot/freeldr/freeldr.cfg | 6 +- src/kernel/bootstrap.asm | 18 +- src/kernel/disk.asm | 21 ++- src/kernel/kernel.asm | 6 + 10 files changed, 451 insertions(+), 61 deletions(-) diff --git a/build/chimaera.img b/build/chimaera.img index 4066ef5b2d0939bb27bc7d312ea185f65dc28108..d7a921cf140520799dcdb1860c2a27fad5a0c7a2 100644 GIT binary patch delta 13078 zcmch730RZI*8lq^kN}2&F#*}Kuml0~LR?S;q96uP!~hBb6pPhfy;boGpsiIw@wS8@ zRmW?sdM!w+)|IMlu~@~Xb*Wkvds{8ttX+nt)*VpP{Lj2e1Qoq~zWY6Y9y0IjbLPyM zGw1wf%A38)o4rjv(^~$9v@}=0n#0e87%58t1wtPo9hb`A;jv14dlqt{3&5}P_?o6$Vqo{FX zGSkPT$$Kf6P$}6IHG0DM@d@cka`?)rzU;t`0V1fgar@5Qn&!T`zi@m{%4{PujGZpI z{4vUGlshPcT91`;fgSH~q1OpLd*!mtp5E)D^Bt{Cer&!@)M@Cqp1WEuDGMr@HD^Xq zX$ecAI?AnQGRn+B10SGI6SmzojW#$qFP2GFojlp>XgG{ zOwa@Br;3$TJ}|t5-+9nIvPn2rsJ1Fjlt`F5tq{#o`Ic#gI(#t%8p;|yDRqlfmx()- zkYwsd33WBiYOC?Wj>c0eUG?#r3%G%;$i%<|N?n<{v#J!P{!@hdal#Cz`-bK5?l@TvO-?oLam@mko0 zicSvX?WP*%^wDMEtM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ax&QzG diff --git a/src/boot/freeldr/core/config.asm b/src/boot/freeldr/core/config.asm index 0652296..dbfcbea 100644 --- a/src/boot/freeldr/core/config.asm +++ b/src/boot/freeldr/core/config.asm @@ -167,6 +167,78 @@ _is_digit.check: stc ret +;****************************************************************************** +; @function _strstart +;****************************************************************************** +_strstart: + + push bp + mov bp, sp + + push bx + push si + push di + + mov si, word ptr [bp + 4] + mov di, word ptr [bp + 6] + + xor ah, ah + xor bh, bh + +_strstart.loop: + + mov al, cs:[di] + + and al, al + jz _strstart.done + + push ax + + call _tolower + add sp, 2 + + mov bl, al + + mov al, [si] + push ax + + call _tolower + add sp, 2 + + cmp al, bl + jne _strstart.error + + inc si + inc di + + jmp _strstart.loop + +_strstart.error: + + xor ax, ax + + pop di + pop si + pop bx + + pop bp + stc + + ret + +_strstart.done: + + mov ax, si + + pop di + pop si + pop bx + + pop bp + clc + + ret + ;****************************************************************************** ; @function _skip_whitespace ;****************************************************************************** @@ -516,6 +588,202 @@ _pc_label.collision: call _error db "duplicate entry name found", HEX (0D), HEX (0A), HEX (00) +;****************************************************************************** +; @function _pc_root +;****************************************************************************** +_pc_root: + + push ax + push bx + push cx + push dx + push di + + mov bx, si + + call _is_name_beginner + jc _pc_root.error + +_pc_root.loop: + + call _is_name_part + jc _pc_root.check + + lodsb + jmp _pc_root.loop + +_pc_root.check: + + mov ax, si + sub ax, bx + + cmp ax, 2 + jb _pc_root.error + + mov ax, offset _pc_root.fd_check + push ax + + push bx + + call _strstart + add sp, 4 + + and ax, ax + jz _pc_root.check2 + + xor bx, bx + jmp _pc_root.got_disk + +_pc_root.check2: + + mov ax, offset _pc_root.hd_check + push ax + + push bx + + call _strstart + add sp, 4 + + and ax, ax + jz _pc_root.error + + mov bx, 2 + +_pc_root.got_disk: + + mov si, ax + + xor ax, ax + xor dx, dx + + mov cx, 10 + xor di, di + +_pc_root.convert: + + call _is_digit + jc _pc_root.check3 + + lodsb + push ax + + mov ax, di + mul cx + mov di, ax + + pop ax + + test dx, dx + jnz _pc_root.error + + sub al, '0' + add di, ax + + jmp _pc_root.convert + +_pc_root.check3: + + cmp word ptr cs:[_curr_entry], 0 + jne _pc_root.set + + push ax + push bx + push dx + push ds + + mov bx, cs + mov ds, bx + + mov bx, cs:[_filename] + call _writestr + + mov al, ':' + call _writechr + + mov ax, cs:[_line_number] + xor dx, dx + + call _writedec + + mov al, ':' + call _writechr + + mov al, ' ' + call _writechr + + mov bx, offset _error_root_without_label + call _writestr + + pop ds + pop dx + pop bx + pop ax + jmp _pc_root.done + +_pc_root.set: + + and di, di + jz _pc_root.error + + cmp bx, 2 + je _pc_root.ok + + cmp di, 2 + ja _pc_root.error + +_pc_root.ok: + + add bx, di + + push di + push es + + mov di, cs:[_curr_entry] + mov es, di + xor di, di + + mov es:[di + 6], bx + pop es + pop di + +_pc_root.done: + + pop di + pop dx + pop cx + pop bx + pop ax + + ret + +_pc_root.error: + + mov bx, cs + mov ds, bx + + mov bx, cs:[_filename] + call _writestr + + mov al, ':' + call _writechr + + mov ax, cs:[_line_number] + xor dx, dx + + call _writedec + + mov al, ':' + call _writechr + + mov al, ' ' + call _writechr + + call _error + db "invalid root provided", HEX (0D), HEX (0A), HEX (00) + +_pc_root.fd_check: db "fd", HEX (00) +_pc_root.hd_check: db "hd", HEX (00) + ;****************************************************************************** ; @function _pc_timeout ;****************************************************************************** @@ -972,6 +1240,7 @@ _parse_config.got_carry: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; _error_kernel_without_label: db "kernel specified outside label", HEX (0D), HEX (0A), HEX (00) _error_title_without_label: db "title specified outside label", HEX (0D), HEX (0A), HEX (00) +_error_root_without_label: db "root specified outside label", HEX (0D), HEX (0A), HEX (00) _error_noparam: db "missing parameter", HEX (0D), HEX (0A), HEX (00) _error_badcfg: db "unknown keyword", HEX (0D), HEX (0A), HEX (00) @@ -1004,6 +1273,10 @@ _pc_keywd_table: dw 0 dw _pc_label + dw hash_root + dw 0 + dw _pc_root + dw hash_timeout dw 0 dw _pc_timeout diff --git a/src/boot/freeldr/core/disk.asm b/src/boot/freeldr/core/disk.asm index 7e762ef..e849994 100644 --- a/src/boot/freeldr/core/disk.asm +++ b/src/boot/freeldr/core/disk.asm @@ -544,6 +544,8 @@ _get_partition_info: .L7: + inc byte ptr cs:[_last_drive] + mov ax, es jmp .L19 @@ -673,9 +675,6 @@ _get_hard_disk_partitions: add sp, 4 - and ax, ax - jz .L15 - mov es, ax xor bx, bx @@ -694,6 +693,9 @@ _get_hard_disk_partitions: .L17: add sp, 4 + + and ax, ax + jz .L15 .L16: @@ -704,8 +706,6 @@ _get_hard_disk_partitions: call _vec_push add sp, 4 - - jmp .L15 .L15: @@ -963,6 +963,9 @@ _read_sectors.done: global _drive_no _drive_no: db HEX (00) +global _last_drive +_last_drive: db HEX (00) + global _edd_available _edd_available: dw HEX (0000) diff --git a/src/boot/freeldr/core/freeldr.asm b/src/boot/freeldr/core/freeldr.asm index 5b3cc46..3894fe7 100644 --- a/src/boot/freeldr/core/freeldr.asm +++ b/src/boot/freeldr/core/freeldr.asm @@ -1010,6 +1010,27 @@ _config_ok: mov es, ax xor bx, bx + mov dx, es:[bx + 6] + + and dx, dx + jz .L18 + + dec dx + + mov ah, HEX (0E) + int HEX (21) + + mov ah, HEX (19) + int HEX (21) + + cmp al, dl + je .L18 + + call _error + db "panic: the root for the selected kernel is not ready", HEX (0D), HEX (0A), HEX (00) + +.L18: + mov ax, es:[bx + 4] mov ds, ax xor di, di @@ -1331,6 +1352,24 @@ _segment_ok2: mov es, bx push es + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; Check if we're FAT32. + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + mov di, cs:[_sectors_per_fat32] + or di, cs:[_sectors_per_fat32 + 2] + + and di, di + jnz .L16 + + mov byte ptr cs:[_fat_jump + 1], HEX (3C) + jmp .L17 + +.L16: + + mov byte ptr cs:[_fat_jump + 1], HEX (58) + +.L17: + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Zero out the di register. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1374,7 +1413,7 @@ _segment_ok2: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; If we're not FAT32 then jump passed the next couple of copies. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - cmp byte ptr [_fat_jump + 1], HEX (58) + cmp byte ptr cs:[_fat_jump + 1], HEX (58) jne .L13 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/src/boot/freeldr/core/int21.asm b/src/boot/freeldr/core/int21.asm index 4259003..c14edae 100644 --- a/src/boot/freeldr/core/int21.asm +++ b/src/boot/freeldr/core/int21.asm @@ -26,60 +26,18 @@ _get_disk_info: mov ax, cs:[_selected_disk] mov word ptr [bp - 2], ax -_get_disk_info.check: +_get_disk_info.got_disk: - push si - - call _strlen - add sp, 2 - - cmp ax, 2 - jb _get_disk_info.got_disk - - cmp byte ptr [si + 1], ':' - jne _get_disk_info.got_disk - - xor ah, ah - mov al, [si] - - push ax - - call _isalpha - mov cx, ax - - pop ax - - and cx, cx - jz _get_disk_info.got_disk - - add si, 2 - push ax - - call _toupper - add sp, 2 - - sub al, HEX (41) - - cmp ax, cs:[_selected_disk] - je _get_disk_info.got_disk - - mov word ptr [bp - 2], ax - inc ax - - cmp cs:[_vec_parts + 4], ax - jb _get_disk_info.error - - dec ax + mov ax, word ptr [bp - 2] cmp ax, 2 - jae _get_disk_info.got_disk + jae _get_disk_info.ok call _probe_disk jc _get_disk_info.error -_get_disk_info.got_disk: +_get_disk_info.ok: - mov ax, word ptr [bp - 2] xor dx, dx mov cx, 2 @@ -551,6 +509,18 @@ _int21_dispatch.err: _int21_dispatch.list: + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; Select Disk. + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + db HEX (0E) + dw _int21_0E + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; Get Current Default Drive. + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + db HEX (19) + dw _int21_19 + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Open File Using Handle. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -594,6 +564,78 @@ iretc.ret: iret +;****************************************************************************** +; @function _int21_OE +; @brief Select Disk +;****************************************************************************** +_int21_0E: + + push ax + push bx + push cx + push dx + push si + push di + push es + push ds + + mov cx, cs:[_selected_disk] + +_int21_0E.check: + + xor dh, dh + + cmp dx, cs:[_selected_disk] + je _int21_0E.get_info + + inc dx + + cmp cs:[_vec_parts + 4], dx + jb _int21_0E.done + + mov cs:[_selected_disk], dx + dec word ptr cs:[_selected_disk] + +_int21_0E.get_info: + + call _get_disk_info + + jnc _int21_0E.done + mov cs:[_selected_disk], cx + +_int21_0E.done: + + pop ds + pop es + pop di + pop si + pop dx + pop cx + pop bx + pop ax + + mov al, cs:[_last_drive] + + cmp al, 5 + jae _int21_0E.ret + + mov al, 5 + +_int21_0E.ret: + + iret + +;****************************************************************************** +; @function _int21_19 +; @brief Get Current Default Drive +; +; @out AL -> Current default drive. +;****************************************************************************** +_int21_19: + + mov al, cs:[_selected_disk] + iret + ;****************************************************************************** ; @function _int21_3D ; @brief Open File Using Handle diff --git a/src/boot/freeldr/freeldr.cfg b/src/boot/freeldr/freeldr.cfg index ee79cff..290601e 100644 --- a/src/boot/freeldr/freeldr.cfg +++ b/src/boot/freeldr/freeldr.cfg @@ -1,6 +1,10 @@ default chimaera -timeout 10 +#timeout 10 +timeout 0 label chimaera + title Chimaera OS + +# root hd2 # Second parition that's found for hard disks. kernel /kernel.sys diff --git a/src/kernel/bootstrap.asm b/src/kernel/bootstrap.asm index 3dad07f..14dbde9 100644 --- a/src/kernel/bootstrap.asm +++ b/src/kernel/bootstrap.asm @@ -397,9 +397,14 @@ _after_copy: mov dl, [_drive_no] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ;; Zero out the bx register. + ;; Move the hidden sectors into BX:CX. + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + mov bx, [_hidden_sectors] + mov cx, [_hidden_sectors + 2] + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; Clear the carry flag. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - xor bx, bx clc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -584,9 +589,14 @@ _not_fat32: mov dl, [_drive_no] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ;; Zero out the bx register. + ;; Move the hidden sectors into BX:CX. + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + mov bx, [_hidden_sectors] + mov cx, [_hidden_sectors + 2] + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; Clear the carry flag. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - xor bx, bx clc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/src/kernel/disk.asm b/src/kernel/disk.asm index 56ab33c..7c42816 100644 --- a/src/kernel/disk.asm +++ b/src/kernel/disk.asm @@ -235,7 +235,14 @@ _get_partition_info: cmp word ptr [bp + 4], cx jne .L23 - cmp byte ptr es:[si], 128 + mov bx, es:[si + 10] + + cmp bx, cs:[_part_start + 2] + jne .L23 + + mov bx, es:[si + 8] + + cmp bx, cs:[_part_start] jne .L23 mov word ptr [bp - 2], 1 @@ -640,9 +647,6 @@ _get_hard_disk_partitions: add sp, 4 - and ax, ax - jz .L15 - mov es, ax xor bx, bx @@ -664,6 +668,9 @@ _get_hard_disk_partitions: .L20: add sp, 4 + + and ax, ax + jz .L15 .L16: @@ -1209,3 +1216,9 @@ _disk_transfer_addr: dw HEX (0000) dw HEX (0000) + +global _part_start +_part_start: + + dw HEX (0000) + dw HEX (0000) diff --git a/src/kernel/kernel.asm b/src/kernel/kernel.asm index 2f8689b..8f21869 100644 --- a/src/kernel/kernel.asm +++ b/src/kernel/kernel.asm @@ -32,6 +32,12 @@ _all_read: cli cld + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; Save the hidden sectors. + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + mov cs:[_part_start], bx + mov cs:[_part_start + 2], cx + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Save the value that's in the extra segment. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- 2.34.1