Changeset 139


Ignore:
Timestamp:
Apr 8, 2017, 12:27:35 AM (8 years ago)
Author:
Ben Rietbroek
Message:

Removed all the disk stuff from 'PRECRAP' [v1.1.1-testing]

This stuff has always been in the wrong place because no scanning has
taken place yet. The stuff in 'PRECRAP' should be concerned with
initializing stuff only.

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.0-manual.pdf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootcode/regular/other.asm

    r135 r139  
    176176        call    MBR_TeletypeNL
    177177
    178         ;
    179178        ; Write MBR back to disk to sync MBR variables.
    180179        ; Otherwise subsequent MBR loads will differ from the RAM stored one,
    181180        ; which is used by MBR protection to validate parts of the MBR.
    182         ;
    183181        xor     bx, bx
    184182        mov     cx, 1
     
    194192        ;!
    195193
    196 ; =============================================================================
    197 
    198         ; Start with disk at index 0
    199         xor     cx,cx
    200 
    201     PRECRAP_Main_next_disk:
    202 
    203         ; Get next disk and convert to BIOS disk-number
    204         mov     dl,cl
    205         or      dl,80h
    206 
    207         ;
    208         ; This also setup the size of the i13xbuf.
    209         ;
    210         call     DriveIO_GatherDiskInfo              ; Also used to fill the geo, should be separate function
    211 
    212         mov      bx,offset [HugeDisk]
    213         add      bx,cx
    214         mov      [bx], al
    215 
    216 
    217         ; CHECKSUM CALCULATION DOES NOT WORK YET HERE
    218         ; CRC TABLE NOT INITED YET
    219         ; Returns NC if no valid LVM record found
    220         call     DriveIO_LoadMasterLVMSector
    221 
    222         pushf
    223 
    224         mov     bx, offset [TrueSecs]
    225         add     bx,cx
    226         add     bx,cx
    227         add     bx,cx
    228         add     bx,cx
    229 
    230 IFDEF   AUX_DEBUG
    231         IF 0
    232         pushf
    233         pusha
    234             mov     al, '#'
    235             call    AuxIO_Teletype
    236             mov     ax, [bx]
    237             call    AuxIO_TeletypeHexWord
    238             mov     al, '#'
    239             call    AuxIO_Teletype
    240             call    AuxIO_TeletypeNL
    241         popa
    242         popf
    243         ENDIF
    244 ENDIF
    245 
    246         popf
    247 
    248         ; bx now contains pointer to truesecs for this drive
    249 
    250         jnc      NoValidMasterLVM
    251 
    252         ; ?? 3f bij disk 80h maar 0 bij disk 81h
    253         mov     si,offset [LVMSector]
    254         mov     ax,[si+LocLVM_Secs]
    255 
    256         ;~ pusha
    257         ;~ mov     dx,ax
    258         ;~ mov     al,'%'
    259         ;~ call    VideoIO_PrintSingleChar
    260         ;~ mov     ax,dx
    261         ;~ call    VideoIO_PrintHexWord
    262         ;~ mov     al,'%'
    263         ;~ call    VideoIO_PrintSingleChar
    264         ;~ popa
    265 
    266         mov      word ptr [bx],ax
    267         jmp      SkipUseBiosSecs
    268 
    269 
    270     NoValidMasterLVM:
    271         push    bx                   ; push truesecs pointer
    272         mov     bx, offset [BIOS_Secs]
    273         add     bx,cx
    274         add     bx,cx
    275         add     bx,cx
    276         add     bx,cx
    277 
    278         mov     ax,[bx]              ; get biossecs
    279         pop     bx
    280         mov     word ptr [bx],ax     ; store bios secs in truesecs
    281 
    282 
    283     SkipUseBiosSecs:
    284         inc     cx
    285         cmp     cl,[TotalHarddiscs]
    286         jb      PRECRAP_Main_next_disk
    287 
    288 ; =============================================================================
    289194
    290195IFDEF   AUX_DEBUG
     
    294199ENDIF
    295200
    296         ;~ jz      NoValidMasterLVM
    297 ;~
    298         ;~ ; A valid Master LVM has been found.
    299         ;~ ; We use the values in here to determine the number of sectors per track,
    300         ;~ ; since this could be OS/2 extended geometry.
    301 ;~
    302         ;~ jmp     Continue1
    303         ;~
    304         ;~ mov     word ptr [LOG_Secs],63
    305 
    306 ;               mov      al,[HugeDisk]           ;; fout, moet nog index bij
    307 ;               call     AuxIO_TeletypeHexByte
    308 ;               call     AuxIO_TeletypeNL
    309 
    310 ;               mov      ax,word ptr [TrueSecs]  ;; fout, moet nog index bij
    311 ;               call     AuxIO_TeletypeHexWord
    312 ;               call     AuxIO_TeletypeNL
    313 
    314 ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    315 
    316         ; Huge Disk indicator
    317         ;~ mov     si, offset [HugeBootDisk]
    318         ;~ call    MBR_Teletype
    319         ;~ mov     al,[HugeDisk]
    320         ;~ mov     si, offset [No]
    321         ;~ test    al,al
    322         ;~ jz      MBR_HugeDriveIndicator
    323         ;~ mov     si, offset [Yes]
    324 
    325     MBR_HugeDriveIndicator:
    326         ;~ call    MBR_Teletype
    327         ;~ xor     si,si
    328         ;~ call    MBR_TeletypeNL
    329 
    330201
    331202        ;
     
    346217        call    MBR_TeletypeNL
    347218
    348 ; =============================================================================
    349219
    350220        ; Calculate Cooper-Bar Tables
Note: See TracChangeset for help on using the changeset viewer.