update a few missed fields and correct ALIGN on FSInfoPrinter

disable bad cluster jmp for now
This commit is contained in:
2024-10-17 14:34:23 -04:00
parent ccf846909a
commit 508bf1aa55

View File

@@ -85,7 +85,7 @@ InitFATDriver:
.error: .error:
ERROR STAGE2_FAT32_INIT_CF ERROR STAGE2_FAT32_INIT_CF
ALIGN4, db 0x90 ALIGN 4, db 0x90
FSInfoPrinter: FSInfoPrinter:
__CDECL16_ENTRY __CDECL16_ENTRY
.func: .func:
@@ -138,7 +138,7 @@ SearchFATDIR:
add sp, 0x4 add sp, 0x4
cmp eax, 0x0fff_fff7 cmp eax, 0x0fff_fff7
je SearchFATDIR.bad_cluster ;je SearchFATDIR.bad_cluster
jb SearchFATDIR.load_next_dir_next_OK jb SearchFATDIR.load_next_dir_next_OK
ERROR STAGE2_FAT32_END_OF_CHAIN ERROR STAGE2_FAT32_END_OF_CHAIN
@@ -237,7 +237,7 @@ NextCluster:
shr edx, 16 shr edx, 16
xchg si, di ; switch to fat32_bpb in si xchg si, di ; switch to fat32_bpb in si
mov cx, word [si + FAT32_bpb_t.bytes_per_sector_16] mov cx, word [si + FAT32_bpb_t.bytes_per_sector_word]
xchg si, di xchg si, di
cmp edx, 0 cmp edx, 0
@@ -311,7 +311,7 @@ ClusterToLBA:
.func: .func:
mov dword eax, [bp + 4] mov dword eax, [bp + 4]
sub eax, 2 sub eax, 2
movzx edx, byte [fat32_bpb + FAT32_bpb_t.sectors_per_cluster_8] movzx edx, byte [fat32_bpb + FAT32_bpb_t.sectors_per_cluster_byte]
mul edx mul edx
jc ClusterToLBA.error jc ClusterToLBA.error
add eax, dword [fat32_state + FAT32_State_t.first_data_sector_32] add eax, dword [fat32_state + FAT32_State_t.first_data_sector_32]