Changeset 52 for trunk/BOOTCODE/REGULAR


Ignore:
Timestamp:
Apr 13, 2014, 4:45:41 PM (12 years ago)
Author:
Ben Rietbroek
Message:

Added BOOKMARK Comments [2013-02-27]

I recently added the 'addons' plugin to Geany, the editor I use on
Linux, and it contains a very handy feature to scan sources for tags
like FIXME:, BOOKMARK: and the like. Custom tags can also be defined.

So I added some major bookmark locations to easily navigate around
multiple sources. What's also nice is that of course these tags can be
listed with grep. For instance, grep -r -n 'BOOKMARK:' *.ASM will
display a list of all bookmark comments with line-numbers in the
assembler sources in the current and underlying directories.

Changes:

o Started fixing the CRC issue

Since AiR-BOOT now updates the PBR on HPFS and JFS, the CRC needs to
be recalculated and stored in the IPT. Otherwise AB will think the
PBR is infected and a virus message will appear.

o Changed PART_UpdateBootRecordCRC

Only PartitionSector could be CRC'd because it was hard coded.
Also, SI got immediately overwritten and that might have been an
unsurfaced bug, even in v.106. Have to investigate this further.
Changed to use BX as a pointer to the sector to be CRC'd.

Location:
trunk/BOOTCODE/REGULAR
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BOOTCODE/REGULAR/PARTMAIN.ASM

    r51 r52  
    134134;        In: DS:SI - IPT-Entry of partition
    135135;            DS:PartitionSector - Actual Boot-Record of partition
    136 ;       Out: *none* (BootRecordCRD updated)
     136;       Out: *none* (BootRecordCRC updated)
     137; CHECKME: Verify the change (BX points to sector to CRC) is working OK
    137138PART_UpdateBootRecordCRC        Proc Near Uses bx
    138         mov     si, offset PartitionSector
     139        push    si
     140        ;~ mov     si, offset PartitionSector
     141        mov     si, bx
    139142        mov     bx, 4B4Dh            ; Magic: 'MK'
    140143        call    MBR_GetCheckOfSector
     144        pop     si
    141145        mov     [si+LocIPT_BootRecordCRC], bx
    142146        ret
     
    144148
    145149
    146 ;
    147 ; What happens here ?
    148 ;
    149150
    150151; Rousseau:
     
    167168; presumably pointed to an area where a null byte was near.
    168169;
    169 ; Fix:
    170 ; Test BX for zero and if so, skip the
     170; BOOKMARK: The nasty pointer bug
    171171
    172172
     
    781781
    782782
    783 ; Rousseau: added
     783
    784784; Compare a volume-label in the IPT to the install-volume
    785785; SI holds pointer to entry in IPT
     
    858858
    859859
    860 ; Setup Phase1
     860
    861861; If found CY=1, AL=partnum, else CY=0, AL=0FFH
     862; BOOKMARK: Setup Phase1
    862863PART_SetupPhase1    Proc    Uses bx cx dx si di
    863864
     
    11421143    ; This loads the MBR in case of PRI or the EBR in case of LOG partitions.
    11431144    ;
     1145    ; BOOKMARK: PBR/EBR loading
    11441146    call    DriveIO_LoadPartition         ; Load Table...                [LOAD]
    11451147
     
    12351237
    12361238    ;
    1237     ; Setup 'I13X' signature.
     1239    ; BOOKMARK: Setup 'I13X' signature.
    12381240    ;
    12391241    PSP_ForceI13X:
     
    14921494        jz      PSP_NoVIBR
    14931495
     1496
    14941497        ; ----------------------------------------------------- CHECKS FOR VIBR
     1498        ; BOOKMARK: Check for virus in PBR
    14951499        push    si
    14961500            mov     si, offset PartitionSector
     
    16991703        ;
    17001704
    1701         ;
    1702         ; Fix hidden sectors field
    1703         ;
     1705        ; BOOKMARK: Fix hidden sectors field
    17041706        mov     ax,[si+LocIPT_AbsoluteBegin]
    17051707        mov     es:[di+1ch], ax     ; Low word of 32-bits "hidden sectors"
     
    17261728
    17271729
    1728         ; FIXME:
     1730        ;
    17291731        ; The PBR is already loaded, no need to load it again in the
    17301732        ; calls below.
     
    17321734        ; Better use the already done discovery to determine the system.
    17331735        ;
    1734 
     1736        ; FIXME: PBR Already loaded
     1737       
    17351738        ; When FAT12/FAT16/HPFS/JFS then boot-drive-letter can be tested
    17361739        ; or adjusted.
     
    19551958        ; WE CONTINUE BOOTING BUT OS/2 - eCS WILL MOST PROBABLY FAIL TO BOOT.
    19561959
    1957         ; FIXME:
    1958         ; ISSUE SOME KIND OF WARNING...
    1959 
     1960        ; FIXME: Issue some kind of warning
     1961       
    19601962        ;mov     ah,07h
    19611963        ;mov     si,offset CheckID_MBR
     
    20352037        pop     si
    20362038
     2039       
     2040        ; BOOKMARK: Update the CRC of the Partition Boot Record.
     2041        ; FIXME:    Update CRC on PBR
     2042        ;~ mov     bx, offset [PBRSector]
     2043        ;~ call    PART_UpdateBootRecordCRC
     2044
     2045       
    20372046        ; Setup the registers for the partition location.
    20382047        mov     ax, wptr [si+LocIPT_AbsoluteBegin+0]
     
    20422051        mov     dl, [si+LocIPT_Drive]
    20432052
    2044         ; Write the adjusted JFS PBR to disk.
     2053       
     2054        ; BOOKMARK: Write the adjusted HPFS/JFS PBR to disk.
    20452055        mov     si, offset [PBRSector]
    20462056        call    DriveIO_SaveSector
     
    20482058    no_jfs_pbr:
    20492059        popa
    2050 
    2051 
    2052         ;xor     ax,ax
    2053         ;int     16h
    2054 
    2055 
    20562060
    20572061
     
    20902094    boot_from_floppy:
    20912095
    2092         ;
    2093         ; Here we copy the prepared partition boot-record to 0000:7C00h
     2096
     2097   
     2098
     2099        ;
     2100        ; Here we copy the prepared boot-record to 0000:7C00h
    20942101        ; to give it control later on.
    20952102        ;
     
    21972204
    21982205
    2199 
     2206        ; BOOKMARK: JUMP TO PBR CODE
    22002207        ; ###############################
    22012208        ; # JUMP TO THE PBR LOADER CODE #
  • trunk/BOOTCODE/REGULAR/STD_TEXT.ASM

    r51 r52  
    5858            ;~ db ' M. Kiewitz  <<@ Interim Release @>> (bld: '
    5959            ;~ db ' M. Kiewitz  <<Release Candidate 2>> (bld: '
    60             db ' M. Kiewitz  <<Release Candidate 3>> (bld: '
     60            db ' M. Kiewitz  <<Release Candidate 4>> (bld: '
    6161            db BLDLVL_YEAR
    6262            db BLDLVL_MONTH
Note: See TracChangeset for help on using the changeset viewer.