Changeset 45 for trunk/BOOTCODE/REGULAR


Ignore:
Timestamp:
Apr 12, 2014, 12:36:45 AM (12 years ago)
Author:
Ben Rietbroek
Message:

Now using compressed HidePartTable (auxdebug on) [2012-02-24]

WARNING!!

All commits upto and including the commit of [2012-05-13] contain
a severe bug!! Building from these sources and then disabling
the 'force LBA' feature while also using the drive-letter feature or
editing the label can DESTROY THE MBR on ALL ATTACHED DISKS!!
DO NOT DISABLE 'FORCE LBA USAGE' WHEN BUILT FROM THE THESE COMMITS!!

Fixes

o HidePartTabled now uses a 6-bit compressed format

Bitfield functions are used to manipulate the table.
Modifications mostly in PARTSCAN.ASM, PART_SET.ASM and PARTMAIN.ASM.
TODO: Determine impact on upgrading from previous versions.

Changes

o Changed LVM Label behavior

If they are the same, the LVM VolumeName is synced to LVM PartitionName
so they are the same again after the edit.
If they differ, only the LVM VolumeName is updated.

o Implemented stop scanning when partition limit of 45 is exceeded

User is presented with a warning pop-up.
Pressing a key will continue and the partitions that were found
so far are displayed in the menu.
The color of the selection bar is changed to red to indicate this
overflow situation.

o New overlap macro that works correctly with JWasm and Tasm

Now uses DB n DUP (<filler>) to fill space before a new ORG.
When overlap occurs n goes negative causing assembler error.

Location:
trunk/BOOTCODE/REGULAR
Files:
6 edited

Legend:

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

    r44 r45  
    8484    AuxIO_Teletype_NoLogging:
    8585        ret
    86 AuxIO_TeleType  EndP
     86AuxIO_Teletype  EndP
    8787
    8888
     
    9292        call    AuxIO_Teletype
    9393        ret
    94 AuxIO_TeleTypeNL    EndP
     94AuxIO_TeletypeNL    EndP
    9595
    9696
     
    107107        call    AuxIO_Teletype             ; Output to com-port
    108108        ret
    109 AuxIO_TeleTypeHexByte   EndP
     109AuxIO_TeletypeHexByte   EndP
    110110
    111111; Print hex-word to com-port (teletype style)
     
    120120        call    AuxIO_TeletypeHexByte      ; Output to com-port
    121121        ret
    122 AuxIO_TeleTypeHexWord   EndP
     122AuxIO_TeletypeHexWord   EndP
    123123
    124124
     
    134134        call    AuxIO_TeletypeHexWord      ; Low word next
    135135        ret
    136 AuxIO_TeleTypeHexDWord  EndP
     136AuxIO_TeletypeHexDWord  EndP
    137137
    138138
     
    150150        call    AuxIO_TeletypeHexDWord     ; Low dword next
    151151        ret
    152 AuxIO_TeleTypeHexQWord  EndP
     152AuxIO_TeletypeHexQWord  EndP
    153153
    154154
  • trunk/BOOTCODE/REGULAR/BOOTMENU.ASM

    r43 r45  
    7272   mov     Menu_AbsoluteX, dl
    7373
    74    ; Display Top-Infos in Boot-Window
     74   ; Display Top-Infos (labels) in Boot-Window
    7575
    7676CLR_TOP_INFOS_CLASSIC    = 0b01h
     
    190190   mov     cx, CLR_INFO_WINDOW_BM
    191191   ;mov     cx, 0C06h ; brown, main background
    192    call    VideoIO_Color                                                         ; Ccolor info window
     192   call    VideoIO_Color                    ; Color info window
    193193
    194194   mov     bx, 1401h
    195195   mov     dx, 1950h
    196    call    VideoIO_MakeWindow            ; Information-Window
     196   call    VideoIO_MakeWindow               ; Information-Window
    197197   ; den kleinen Strich...
    198198   mov     cx, 1602h
     
    210210CLR_INFO_TEXT_BM   = 0701h
    211211
    212    mov     cx, CLR_INFO_TEXT_BM                   ; Info text
    213    call    VideoIO_Color                                                         ; Color info text
     212   mov     cx, CLR_INFO_TEXT_BM             ; Info text
     213   call    VideoIO_Color                    ; Color info text
    214214
    215215   mov     si, offset TXT_BootMenuHelpText1
     
    587587CLR_SELECTION_BAR_CLASSIC  = 50h
    588588CLR_SELECTION_BAR_BM = 090h
     589CLR_SELECTION_BAR_WARNING = 040h
    589590
    590591
    591592
    592593  BMBCB_AfterScrolling:
    593    mov     cl, CLR_SELECTION_BAR_BM    ; Color PINK, Partition DL
     594   mov     cl, CLR_SELECTION_BAR_BM
     595   test     byte ptr [TooManyPartitions],0ffh ; Check for too many partitions.
     596   jz       BOOTMENU_BuildChoiceBar_normal
     597   mov     cl, CLR_SELECTION_BAR_WARNING    ; Set red bar if so.
     598   BOOTMENU_BuildChoiceBar_normal:
    594599   call    BOOTMENU_ReColorPart
    595600   ret
  • trunk/BOOTCODE/REGULAR/DEBUG.ASM

    r44 r45  
    3737
    3838DEBUG_CheckMath Proc    Near
    39         pushf
    40         pusha
    41 
    42         ; Msg check math-module
    43         mov     si,offset db_checkmath
    44         call    AuxIO_Print
    45 
    46         ; Output hex-word
    47         mov     ax,0BABEh
    48         call    AuxIO_TeletypeHexWord
    49 
    50         mov     al,' '
    51         call    AuxIO_Teletype
    52         mov     al,'*'
    53         call    AuxIO_Teletype
    54         mov     al,' '
    55         call    AuxIO_Teletype
    56 
    57         ; Output hex-word
    58         mov     ax,0BABEh
    59         call    AuxIO_TeletypeHexWord
    60 
    61         mov     al,' '
    62         call    AuxIO_Teletype
    63         mov     al,'='
    64         call    AuxIO_Teletype
    65         mov     al,' '
    66         call    AuxIO_Teletype
    67 
    68         mov     ax,0BABEh
    69         mul     ax
    70         call    AuxIO_TeletypeHexDWord
    71 
    72         ; Start new line
    73         call    AuxIO_TeletypeNL
    74 
    75         ; Output hex-dword
    76         mov     dx,0DEADh
    77         mov     ax,0FACEh
    78         call    AuxIO_TeletypeHexDWord
    79 
    80         mov     al,' '
    81         call    AuxIO_Teletype
    82         mov     al,'*'
    83         call    AuxIO_Teletype
    84         mov     al,' '
    85         call     AuxIO_Teletype
    86 
    87         ; Output hex-dword
    88         mov     dx,0DEADh
    89         mov     ax,0FACEh
    90         call    AuxIO_TeletypeHexDWord
    91 
    92         mov     al,' '
    93         call    AuxIO_Teletype
    94         mov     al,'='
    95         call    AuxIO_Teletype
    96         mov     al,' '
    97         call    AuxIO_Teletype
    98 
    99         mov     bx,0DEADh
    100         mov     cx,0FACEh
    101         mov     dx,0DEADh
    102         mov     ax,0FACEh
    103         call    MATH_Mul32
    104         call    AuxIO_TeletypeHexQWord
    105 
    106         ; Start new line
    107         call    AuxIO_TeletypeNL
    108 
     39        ;~ pushf
     40        ;~ pusha
     41;~
     42        ;~ ; Msg check math-module
     43        ;~ mov     si,offset db_checkmath
     44        ;~ call    AuxIO_Print
     45;~
     46        ;~ ; Output hex-word
     47        ;~ mov     ax,0BABEh
     48        ;~ call    AuxIO_TeletypeHexWord
     49;~
     50        ;~ mov     al,' '
     51        ;~ call    AuxIO_Teletype
     52        ;~ mov     al,'*'
     53        ;~ call    AuxIO_Teletype
     54        ;~ mov     al,' '
     55        ;~ call    AuxIO_Teletype
     56;~
     57        ;~ ; Output hex-word
     58        ;~ mov     ax,0BABEh
     59        ;~ call    AuxIO_TeletypeHexWord
     60;~
     61        ;~ mov     al,' '
     62        ;~ call    AuxIO_Teletype
     63        ;~ mov     al,'='
     64        ;~ call    AuxIO_Teletype
     65        ;~ mov     al,' '
     66        ;~ call    AuxIO_Teletype
     67;~
     68        ;~ mov     ax,0BABEh
     69        ;~ mul     ax
     70        ;~ call    AuxIO_TeletypeHexDWord
     71;~
    10972        ;~ ; Start new line
    110         call    AuxIO_TeletypeNL
    111 
    112         popa
    113         popf
     73        ;~ call    AuxIO_TeletypeNL
     74;~
     75        ;~ ; Output hex-dword
     76        ;~ mov     dx,0DEADh
     77        ;~ mov     ax,0FACEh
     78        ;~ call    AuxIO_TeletypeHexDWord
     79;~
     80        ;~ mov     al,' '
     81        ;~ call    AuxIO_Teletype
     82        ;~ mov     al,'*'
     83        ;~ call    AuxIO_Teletype
     84        ;~ mov     al,' '
     85        ;~ call     AuxIO_Teletype
     86;~
     87        ;~ ; Output hex-dword
     88        ;~ mov     dx,0DEADh
     89        ;~ mov     ax,0FACEh
     90        ;~ call    AuxIO_TeletypeHexDWord
     91;~
     92        ;~ mov     al,' '
     93        ;~ call    AuxIO_Teletype
     94        ;~ mov     al,'='
     95        ;~ call    AuxIO_Teletype
     96        ;~ mov     al,' '
     97        ;~ call    AuxIO_Teletype
     98;~
     99        ;~ mov     bx,0DEADh
     100        ;~ mov     cx,0FACEh
     101        ;~ mov     dx,0DEADh
     102        ;~ mov     ax,0FACEh
     103        ;~ call    MATH_Mul32
     104        ;~ call    AuxIO_TeletypeHexQWord
     105;~
     106        ;~ call    AuxIO_TeletypeNL
     107        ;~ call    AuxIO_TeletypeNL
     108;~
     109        ;~ popa
     110        ;~ popf
    114111
    115112        ret
     
    118115
    119116DEBUG_DumpGeo   Proc
    120         pushf
    121         pusha
    122 
    123         ; BIOS cyls
    124         mov     dx,word ptr [BIOS_Cyls+02]
    125         mov     ax,word ptr [BIOS_Cyls+00]
    126         call    AuxIO_TeletypeHexDWord
    127         call    AuxIO_TeletypeNL
    128 
    129         ; BIOS heads
    130         mov     dx,word ptr [BIOS_Heads+02]
    131         mov     ax,word ptr [BIOS_Heads+00]
    132         call    AuxIO_TeletypeHexDWord
    133         call    AuxIO_TeletypeNL
    134 
    135         ; BIOS secs
    136         mov     dx,word ptr [BIOS_Secs+02]
    137         mov     ax,word ptr [BIOS_Secs+00]
    138         call    AuxIO_TeletypeHexDWord
    139         call    AuxIO_TeletypeNL
    140 
    141         ; Bytes per sector
    142         mov     ax,[BIOS_Bytes]
    143         call    AuxIO_TeletypeHexWord
    144         call    AuxIO_TeletypeNL
    145 
    146         ; Total secs
    147         mov     bx, word ptr [BIOS_TotalSecs+06]
    148         mov     cx, word ptr [BIOS_TotalSecs+04]
    149         mov     dx, word ptr [BIOS_TotalSecs+02]
    150         mov     ax, word ptr [BIOS_TotalSecs+00]
    151         call    AuxIO_TeletypeHexDWord
    152         call    AuxIO_TeletypeNL
    153 
    154         ; CHS to LBA
    155         mov     dx,1
    156         mov     ax,29e5h
    157         mov     bx,23h
    158         mov     cx,9h
    159         call    CONV_CHS2LBA
    160         call     AuxIO_TeletypeHexDWord
    161         call     AuxIO_TeletypeNL
    162 
    163         popa
    164         popf
     117        ;~ pushf
     118        ;~ pusha
     119;~
     120        ;~ ; BIOS cyls
     121        ;~ mov     dx,word ptr [BIOS_Cyls+02]
     122        ;~ mov     ax,word ptr [BIOS_Cyls+00]
     123        ;~ call    AuxIO_TeletypeHexDWord
     124        ;~ call    AuxIO_TeletypeNL
     125;~
     126        ;~ ; BIOS heads
     127        ;~ mov     dx,word ptr [BIOS_Heads+02]
     128        ;~ mov     ax,word ptr [BIOS_Heads+00]
     129        ;~ call    AuxIO_TeletypeHexDWord
     130        ;~ call    AuxIO_TeletypeNL
     131;~
     132        ;~ ; BIOS secs
     133        ;~ mov     dx,word ptr [BIOS_Secs+02]
     134        ;~ mov     ax,word ptr [BIOS_Secs+00]
     135        ;~ call    AuxIO_TeletypeHexDWord
     136        ;~ call    AuxIO_TeletypeNL
     137;~
     138        ;~ ; Bytes per sector
     139        ;~ mov     ax,[BIOS_Bytes]
     140        ;~ call    AuxIO_TeletypeHexWord
     141        ;~ call    AuxIO_TeletypeNL
     142;~
     143        ;~ ; Total secs
     144        ;~ mov     bx, word ptr [BIOS_TotalSecs+06]
     145        ;~ mov     cx, word ptr [BIOS_TotalSecs+04]
     146        ;~ mov     dx, word ptr [BIOS_TotalSecs+02]
     147        ;~ mov     ax, word ptr [BIOS_TotalSecs+00]
     148        ;~ call    AuxIO_TeletypeHexDWord
     149        ;~ call    AuxIO_TeletypeNL
     150;~
     151        ;~ ; CHS to LBA
     152        ;~ mov     dx,1
     153        ;~ mov     ax,29e5h
     154        ;~ mov     bx,23h
     155        ;~ mov     cx,9h
     156        ;~ call    CONV_CHS2LBA
     157        ;~ call     AuxIO_TeletypeHexDWord
     158        ;~ call     AuxIO_TeletypeNL
     159;~
     160        ;~ popa
     161        ;~ popf
    165162
    166163        ret
     
    186183        call    AuxIO_TeletypeNL
    187184
     185        ;~ call    DEBUG_DumpHidePartTables
     186
    188187        ;~ call    DEBUG_CheckMath
    189188
    190189        ;~ call    DEBUG_DumpGeo
    191190
    192         call    DEBUG_CheckBitFields
     191        ;~ call    DEBUG_CheckBitFields
    193192
    194193        popa
     
    199198
    200199DEBUG_DumpBSSSectors    Proc    Near
     200        ;~ pushf
     201        ;~ pusha
     202;~
     203        ;~ mov     si, offset [PartitionSector]
     204        ;~ call    AuxIO_DumpSector
     205        ;~ call    AuxIO_TeletypeNL
     206;~
     207        ;~ mov     si, offset [JfsPBR]
     208        ;~ call    AuxIO_DumpSector
     209        ;~ call    AuxIO_TeletypeNL
     210;~
     211        ;~ mov     si, offset [LVMSector]
     212        ;~ call    AuxIO_DumpSector
     213        ;~ call    AuxIO_TeletypeNL
     214;~
     215        ;~ mov     si, offset [TmpSector]
     216        ;~ call    AuxIO_DumpSector
     217        ;~ call    AuxIO_TeletypeNL
     218;~
     219        ;~ mov     si, offset [NewPartTable]
     220        ;~ call    AuxIO_DumpSector
     221        ;~ call    AuxIO_TeletypeNL
     222        ;~ call    AuxIO_TeletypeNL
     223;~
     224        ;~ popa
     225        ;~ popf
     226        ret
     227DEBUG_DumpBSSSectors    EndP
     228
     229
     230DEBUG_DumpHidePartTables    Proc    Near
    201231        pushf
    202232        pusha
    203233
    204         mov     si, offset [PartitionSector]
     234        mov     cx,3
     235        mov     si, offset [HidePartitionTable]
     236    again1:
    205237        call    AuxIO_DumpSector
    206         call    AuxIO_TeletypeNL
    207 
    208         mov     si, offset [JfsPBR]
     238        add     si,512
     239        loop    again1
     240        call    AuxIO_TeletypeNL
     241
     242        mov     cx,3
     243        mov     si, offset [PartitionXref]
     244    again2:
     245        call    AuxIO_DumpParagraph
     246        call    AuxIO_TeletypeNL
     247        add     si,16
     248        loop    again2
     249        call    AuxIO_TeletypeNL
     250
     251        mov     cx,3
     252        mov     si, offset [NewHidePartTable]
     253    again3:
    209254        call    AuxIO_DumpSector
    210         call    AuxIO_TeletypeNL
    211 
    212         mov     si, offset [LVMSector]
    213         call    AuxIO_DumpSector
    214         call    AuxIO_TeletypeNL
    215 
    216         mov     si, offset [TmpSector]
    217         call    AuxIO_DumpSector
    218         call    AuxIO_TeletypeNL
    219 
    220         mov     si, offset [NewPartTable]
    221         call    AuxIO_DumpSector
    222         call    AuxIO_TeletypeNL
     255        add     si,512
     256        loop    again3
    223257        call    AuxIO_TeletypeNL
    224258
     
    226260        popf
    227261        ret
    228 DEBUG_DumpBSSSectors    EndP
     262DEBUG_DumpHidePartTables    EndP
    229263
    230264
    231265DEBUG_CheckBitFields    Proc
    232         pushf
    233         pusha
    234 
    235         mov     bx,offset [ott]
    236 
    237         mov     al,0
    238         mov     dl,0
    239         mov     dh,6
    240     DEBUG_CheckBitFields_next_write:
    241         call    CONV_SetBitfieldValue
    242         inc     al
    243         inc     dl
    244         ;~ cmp     dl,70
    245         jnz     DEBUG_CheckBitFields_next_write
    246 
    247         mov     dl,0
    248         mov     dh,6
    249     DEBUG_CheckBitFields_next_read:
    250         mov     al,dl
    251         call    AuxIO_TeletypeHexByte
    252         mov     al,':'
    253         call    AuxIO_Teletype
    254         call    CONV_GetBitfieldValue
    255         call    AuxIO_TeletypeHexWord
    256         call    AuxIO_TeletypeNL
    257         inc     dl
    258         ;~ cmp     dl,70
    259         jnz     DEBUG_CheckBitFields_next_read
    260 
    261         popa
    262         popf
     266        ;~ pushf
     267        ;~ pusha
     268;~
     269        ;~ mov     bx,offset [ott]
     270;~
     271        ;~ mov     al,0
     272        ;~ mov     dl,0
     273        ;~ mov     dh,6
     274    ;~ DEBUG_CheckBitFields_next_write:
     275        ;~ call    CONV_SetBitfieldValue
     276        ;~ inc     al
     277        ;~ inc     dl
     278        ;~ jnz     DEBUG_CheckBitFields_next_write
     279;~
     280        ;~ mov     dl,0
     281        ;~ mov     dh,6
     282    ;~ DEBUG_CheckBitFields_next_read:
     283        ;~ mov     al,dl
     284        ;~ call    AuxIO_TeletypeHexByte
     285        ;~ mov     al,':'
     286        ;~ call    AuxIO_Teletype
     287        ;~ call    CONV_GetBitfieldValue
     288        ;~ call    AuxIO_TeletypeHexWord
     289        ;~ call    AuxIO_TeletypeNL
     290        ;~ inc     dl
     291        ;~ jnz     DEBUG_CheckBitFields_next_read
     292;~
     293        ;~ popa
     294        ;~ popf
    263295        ret
    264296DEBUG_CheckBitFields    EndP
  • trunk/BOOTCODE/REGULAR/PARTMAIN.ASM

    r44 r45  
    972972      ; First, find Hide-Config
    973973      mov     dl, BootPartNo             ; EntryNumber is straight view
    974       mov     ax, LocIPT_MaxPartitions
     974      ;~ mov     ax, LocIPT_MaxPartitions
     975      mov     ax, LocHPT_LenOfHPT
    975976      mul     dl
    976977      mov     di, offset HidePartitionTable
    977978      add     di, ax                        ; We got the pointer
    978       ; So process Hide-Config. Read out Byte-Entries, each points to a partition
    979       ;  0FFh is end-marker / maximum entries = CFG_Partitions
    980       mov     cl, CFG_Partitions
    981      PSP_PartitionsHideLoop:
    982          mov     dl, es:[di]
    983          inc     di
    984          cmp     dl, 0FFh
    985          je      PSP_EndOfHideProcess    ; -> End of Hiding
    986          call    PART_HidePartition      ; Now hide that partition
    987       dec     cl
    988       jnz     PSP_PartitionsHideLoop
    989      PSP_EndOfHideProcess:
     979
     980
     981        ; So process Hide-Config. Read out Bitfield-Entries,
     982        ; each points to a partition.
     983        ; 3Fh is end-marker / maximum entries = CFG_Partitions
     984        mov     cl, CFG_Partitions
     985        mov     ch,0    ; Index in bitfield array.
     986        mov     dh,6    ; Bitfield width.
     987        mov     bx,di   ; Pointer to entry.
     988    PSP_PartitionsHideLoop:
     989        mov     dl,ch
     990        call    CONV_GetBitfieldValue
     991        mov     dl,al
     992
     993        ;~ mov     dl, es:[di]
     994        ;~ inc     di
     995        ;~ cmp     dl, 0FFh
     996        cmp     dl,3fh  ; Max value for 6-bits field.
     997        je      PSP_EndOfHideProcess    ; -> End of Hiding
     998        call    PART_HidePartition      ; Now hide that partition
     999        inc     ch      ; Next bitfield.
     1000        dec     cl
     1001        jnz     PSP_PartitionsHideLoop
     1002    PSP_EndOfHideProcess:
     1003
    9901004      ; --- HIDE COMPLETED ---
    9911005      ; So something got hidden and we have to remark a primary partition,
     
    16461660        jne      start_pbr
    16471661
    1648         ;xor     ax,ax
    1649         ;mov     [CurPartition_Location+00],ax
    1650         ;mov     [CurPartition_Location+02],ax
    1651         ;mov     [CurPartition_Location+04],ax
    1652         ;mov     [CurPartition_Location+06],ax
    1653 
    1654         ;pusha
    1655         ;xor     al,al
    1656         ;mov     di,si
    1657         ;add     di,LocIPT_Name
    1658         ;mov     cx,12
    1659         ;cld
    1660         ;rep     stosb
    1661         ;popa
    1662 
    1663 
    16641662        ;push    ds
    16651663        ;pop     es
     
    17421740
    17431741PART_StartPartition             EndP
     1742
     1743
     1744
     1745;
     1746; THE FUNCTIONS HERE BELOW WERE INTRODUCED TO ENHANCE THE PBR PROCESSING,
     1747; BUT THEY ARE ACTUALLY OBSOLETE BECAUSE THE INFORMATION THEY PROVIDE CAN
     1748; ALSO BE OBTAINED FROM THE IPT. HOWEVER, THE IPT USES DIFFERENT IDENTIFIERS
     1749; FOR PARTICULAR FILE-SYSTEMS / PBR TYPES, LIKE JFS BEING REPRESENTED AS 0FCh.
     1750; POSSIBLY THE INFO IN THE IPT NEEDS TO BE EXPANDED TO DISTINGUISH BETWEEN
     1751; OTHER BOOT-RECORDS AND FILE-SYSTEMS TOO, LIKE VISTA/WIN7 BMGR AND GRUB, ETC.
     1752; THIS WOULD NEED TO BE DONE IN THE PARTSCAN ROUTINES.
     1753; SO, FOR NOW WE KEEP USING THE STUFF BELOW.
     1754;
    17441755
    17451756
  • trunk/BOOTCODE/REGULAR/PARTSCAN.ASM

    r44 r45  
    4848        mov     CurIO_Scanning, 0             ; Reset flag due scanning complete
    4949
     50IFDEF   AUX_DEBUG
     51        pusha
     52        call    DEBUG_DumpHidePartTables
     53        popa
     54ENDIF
    5055        ; Use X-Reference to sync NewPartitionTable with Hide-Config
    5156        call    PARTSCAN_SyncHideConfigWithXref
     57
     58IFDEF   AUX_DEBUG
     59        pusha
     60        call    DEBUG_DumpHidePartTables
     61        popa
     62ENDIF
    5263
    5364        ; Now we copy the new IPT over the old one...
     
    197208        je      PSSP_IgnorePartition
    198209        ; Ignore these partitions, because there are no real Partitions
    199                 ;~ call    DEBUG_DumpBSSSectors
     210
     211        ;
     212        ; Stop scanning if too many partitions.
     213        ;
     214        cmp     word ptr [cs:NewPartitions],LocIPT_MaxPartitions
     215        jae     skip_check
    200216        call    PARTSCAN_CheckThisPartition
    201                 ;~ call    DEBUG_DumpBSSSectors
     217        jmp     PSSP_IgnorePartition
     218    skip_check:
     219        ; Cannot boot LVM-Data partitions
     220        pusha
     221        mov     byte ptr [cs:TooManyPartitions],1
     222        mov     cx, 0C04h
     223        ;~ mov     si, offset TXT_ERROR_TooManyPartitions
     224        mov     si, offset TXT_TooManyPartitions
     225        add     si,5    ; We stole this string, so skip new-line and dash.
     226        ;~ call    SETUP_Warning_AreYouSure
     227        call    SETUP_ShowErrorBox
     228        popa
     229
    202230    PSSP_IgnorePartition:
    203231        ; L”scht das Boot-Able Flag...
     
    687715        jbe     PCCTP_NotTooManyPartitions
    688716
     717        ; Should not be reached since scanning is stopped outside this
     718        ; function when partition limit exceeds.
    689719        mov     si, offset TXT_TooManyPartitions
    690720        call    MBR_Teletype
     
    730760; Reset X-Reference
    731761PARTSCAN_ResetXref  Proc Near   Uses ax cx di
    732         mov     di, offset PartitionXref      ; X-Reference for later syncing
     762        mov     di, offset PartitionXref        ; X-Reference for later syncing
    733763        mov     cx, LocIPT_MaxPartitions
    734         mov     ax, 0FFFFh                                                  ; Fill up with FFh -- Influences OVERWRITE BUG !
     764        mov     ax, 0FFFFh                      ; Fill up with FFh
    735765        rep     stosb
    736         mov     di, offset NewHidePartTable   ; Temporary Hide-Config Table
     766        mov     di, offset NewHidePartTable     ; Temporary Hide-Config Table
    737767        ;~ mov     cx, LocIPT_MaxPartitions * LocIPT_LenOfIPT
    738         mov     cx, LocIPT_MaxPartitions * LocHPT_LenOfHPT                  ; Checken !!!
    739         rep     stosb                         ; Fill up with FFFFh
     768        mov     cx, LocIPT_MaxPartitions * LocHPT_LenOfHPT
     769        rep     stosb                           ; Fill up with FFFFh
    740770        mov     di, offset NewDriveLetters
    741         mov     cx, LocIPT_MaxPartitions                        ; Temporary Logical-Drive Letter Table
     771        mov     cx, LocIPT_MaxPartitions        ; Temporary Logical-Drive Letter Table
    742772        xor     ax, ax
    743         rep     stosb                         ; Fill up with 0000h
     773        rep     stosb                           ; Fill up with 0000h
    744774        ret
    745775PARTSCAN_ResetXref  EndP
     
    759789        mov     si, offset HidePartitionTable
    760790        mov     di, offset NewHidePartTable
    761         mov     bl, LocIPT_MaxPartitions
     791        ;~ mov     bl, LocIPT_MaxPartitions
     792        mov     bl, LocHPT_LenOfHPT
    762793        mov     al, dl
    763794        mul     bl
     
    766797        mul     bl
    767798        add     di, ax
    768         mov     cx, LocIPT_MaxPartitions
     799        ;~ mov     cx, LocIPT_MaxPartitions
     800        mov     cx, LocHPT_LenOfHPT
    769801        rep     movsb                            ; Copy Hide-Config to NewHideTable
    770802        ; Process Logical-Drive-Letter table as well...
     
    797829
    798830
    799 
     831;
     832; Rousseau: Adjusted for packed hidden-part-table !
     833;           Needs to be re-written.
     834;
    800835; This here updates the contents of the Hide-Configuration to the current IPT
    801836;  table.
     
    803838        mov     si, offset NewHidePartTable
    804839        mov     di, offset HidePartitionTable
    805         mov     ch, LocIPT_MaxPartitions
     840        mov     dh, LocIPT_MaxPartitions    ; Max entries in hide-tables.
     841
    806842    PSSHCWX_SyncPartLoop:
    807         mov     cl, LocIPT_MaxPartitions
     843        mov     cl, LocIPT_MaxPartitions    ; Max entries per hide-entry.
    808844        xor     dl, dl                        ; Partition Lost Counter
     845
     846        mov     ch,0    ; Index.
     847
    809848    PSSHCWX_SyncLoop:
    810         lodsb                              ; Get Part-Pointer from Hide-Cfg
    811         cmp     al, 0FFh
     849        mov     bx,si
     850
     851        ;~ lodsb                              ; Get Part-Pointer from Hide-Cfg
     852
     853        push    dx
     854        mov     dl,ch
     855        mov     dh,6
     856        call    CONV_GetBitfieldValue
     857        pop     dx
     858
     859        ;~ cmp     al, 0FFh
     860        cmp     al, 3Fh
    812861        je      PSSHCWX_SyncEmpty
    813862        ;movzx   bx, al
     
    816865
    817866        mov     al, [PartitionXref+bx]     ; Translate it
    818         cmp     al, 0FFh
     867        ;~ cmp     al, 0FFh
     868        cmp     al, 3Fh
    819869        je      PSSHCWX_PartLost
     870
    820871    PSSHCWX_SyncEmpty:
    821         stosb                              ; Put translated pointer to new table
     872        mov     bx,di
     873        ;~ stosb                              ; Put translated pointer to new table
     874
     875        push    dx
     876        mov     dl,ch
     877        mov     dh,6
     878        call    CONV_SetBitfieldValue
     879        pop     dx
     880
     881        inc     ch
    822882        dec     cl
    823883        jnz     PSSHCWX_SyncLoop
     884
    824885        jmp     PSSHCWX_SyncLoopEnd
     886
    825887    PSSHCWX_PartLost:
    826888        inc     dl                         ; One partition got lost...
     
    829891
    830892    PSSHCWX_SyncLoopEnd:
     893
     894
     895    IFDEF   AUX_DEBUG
     896        pusha
     897        mov     al,dl
     898        call    AuxIO_TeletypeHexByte
     899        call    AuxIO_TeletypeNL
     900        popa
     901    ENDIF
     902
     903
    831904        or      dl, dl
    832905        jz      PSSHCWX_NothingLost
    833         mov     al, 0FFh                                                    ; Influences OVERWRITE BUG ! (OUT OF BOUNDS !!)
    834     PSSHCWX_LostFillLoop:
    835         stosb
     906        ;~ mov     al, 0FFh                     ; Influences OVERWRITE BUG ! (OUT OF BOUNDS !!)
     907        mov     al, 3Fh
     908
     909    PSSHCWX_LostFillLoop:                       ; CHECK !!
     910        ;~ stosb
    836911        dec     cl
    837912        jnz     PSSHCWX_LostFillLoop
    838913
    839                                         ; debug code
    840                                         mov     ax,di
    841                                         call    AuxIO_TeletypeHexWord
    842                                         call    AuxIO_TeletypeNL
     914    IFDEF   AUX_DEBUG
     915        ; debug code
     916        mov     ax,di
     917        call    AuxIO_TeletypeHexWord
     918        call    AuxIO_TeletypeNL
     919    ENDIF
    843920
    844921    PSSHCWX_NothingLost:
    845         dec     ch
     922        add     si, LocHPT_LenOfHPT
     923        add     di, LocHPT_LenOfHPT
     924        dec     dh
    846925        jnz     PSSHCWX_SyncPartLoop
     926
    847927        ret
    848928PARTSCAN_SyncHideConfigWithXref EndP
  • trunk/BOOTCODE/REGULAR/STD_TEXT.ASM

    r44 r45  
    4141;Copyright             db ' AiR-BOOT v1.0.8 - (c) 2012 M. Kiewitz    <<Release Candidate>>    (build: #18)', 0
    4242;Copyright             db ' AiR-BOOT v1.0.8 - (c) 2012 M. Kiewitz  <<Release Candidate 1>> (bld: 20120124)', 0
    43 ;Copyright             db ' AiR-BOOT v1.0.8 - (c) 2012 M. Kiewitz  <<Release Candidate 2>> (bld: 20120214)', 0
    44 Copyright             db ' AiR-BOOT v1.0.8 - (c) 2012 M. Kiewitz  <<Internal Release 2g>> (bld: 20120221)', 0
     43;Copyright             db ' AiR-BOOT v1.0.8 - (c) 2012 M. Kiewitz  <<Release Candidate 2>> (bld: 20120224)', 0
     44Copyright             db ' AiR-BOOT v1.0.8 - (c) 2012 M. Kiewitz  <<Internal Release 2l>> (bld: 20120224)', 0
    4545;Copyright             db ' AiR-BOOT v1.0.8 - (c) 1998-2012 M. Kiewitz, Dedicated to Gerd Kiewitz', 0
    4646
    4747; Message in case the user wants to edit the label of a type 0x35 partition
    48 TXT_SETUP_NoEditType35         db 'The label of an LVM-Data partition cannot be edited', 0
     48TXT_SETUP_NoEditType35          db 'Labels of LVM-Data partitions cannot be changed.', 0
    4949; Message in case the user wants to make a type 0x35 partition bootable
    50 TXT_SETUP_NoBootType35         db 'An LVM-Data partition cannot be set bootable', 0
     50TXT_SETUP_NoBootType35          db 'LVM-Data partitions cannot be set bootable.', 0
     51
     52;TXT_ERROR_TooManyPartitions     db 'Too many partitions! -- Proper operation not guaranteed!', 0
    5153
    5254; Rousseau: switch around
Note: See TracChangeset for help on using the changeset viewer.