Changeset 36 for trunk/BOOTCODE/REGULAR


Ignore:
Timestamp:
Jan 13, 2013, 9:29:14 AM (13 years ago)
Author:
Ben Rietbroek
Message:

## RC1 ## -- Various Fixes and Enhancements [2012-01-25]

Fixes

o Fixed BootManager chaining

Chainloaing IBM BootManager would did now work because it was not
supplied with the correct information. It needs some special
signatures and data setup, especially when it is located above the
8 MiB boundary. In addidtion, when IBM BootManager is located on the
secon harddisk, a copy of the 1st harddisk MBR needs to be
at 0000:7E00 before relinguishing control to IBM-BM.

o Fixed Boot from Floppy

This did not work because Int13X was used to access the floppy
instead of the classic Int13 interface. On fresh installations the
booot from floppy menu-item is now enabled by default.

o Fixed drive-letter feature for when using JFS

The JFS boot-strap code does not use the boot-sector passed to it
in memory. Instead is uses the one that resides on disk. This made
the drive-letter feature disfunctional on JFS. Now, when using the
dl-feature on JFS, a modified PBR with the new drive-letter is
written to disk so the JFS boot-strap code uses the new
drive-letter.

o Fixed bug in LVM label editing

When editing an LVM-label, it was padded with spaces instead of
zero's. Labels in the PBR need to be space padded to 8 chars, LVM
labels need to be zero padded to 32-chars in the LVM-record.

o Fixed stuck Phase #1 indicator

When an eCS installation is taking place, and somehow this
installation passed a wrong volume-name or was aborted, the Phase #1
indicator would not be reset on next reboot, causing AiR-BOOT to
skip the menu and try to boot the partition that was being
installed, but has no system due to incorrect name or user abort.

Changes

o Show LVM Volume Label instead of LVM Partition Label

This makes the display of the labels more consistent with IBM-BM.
Since most systems will be partitioned with MiniLVM, which sets
both to the same name, this change will not be noted on the majority
of installations.

o Synchronize LVM-labels

When editing the LVM-lavel from AiR-BOOT SETUP, the LVM Partition
Label is synced with the new LVM Volume Label. This synchronization
only occurs when both were the same before the edit. It they were
different, only the LVM V-label is changed and the P-label remains
untouched.

o Protect type 0x35 partitions from label editing

These are spanned volumes and are not bootable anyway.
The normal eCS Volume Management tools should be used to change
the labels of these partition types.

Note

This commit and all following commits upto and including the RC3
commit [2012-09-09] are delayed commits from a local repository.
Also, the RC (Release Candidate) naming of the corresponding commits
is a bit misleading. One would label a revision with RC when near to
a final release. Since many things have changed between RC1,RC2 & RC3,
these RC's should be interpreted as mile-stones.

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 ABOVE COMMITS!!

Location:
trunk/BOOTCODE/REGULAR
Files:
6 edited

Legend:

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

    r34 r36  
    179179         jc      DIOILUT_Error
    180180         and     cl, 111111b    ; Isolate lower 6 bits of CL -> sector count
    181 
    182          ; huge disk 127 sec/track on <1TB using DANI
    183 ;         mov     cl, 07Fh
    184181
    185182         ;movzx   ax, cl
     
    668665; #########################################################################
    669666DriveIO_LoadSector              Proc Near  Uses ax bx ds si es di
    670    test     cs:[CurIO_UseExtension], 1
    671    jz       DIOLS_UseNormal
    672    ; Are we forced do use LBA via Setting? ; Rousseau: LBA
    673    jnz      DIOLS_UseExtension
    674667   ; Is the drive not a harddrive?
    675668   cmp      dl, 80h
    676669   jb       DIOLS_UseNormal
     670
     671   test     cs:[CurIO_UseExtension], 1
     672   jz       DIOLS_UseNormal
     673   ; Are we forced do use LBA via Setting?
     674   jnz      DIOLS_UseExtension
     675
    677676   ; Upper 8 bits of LBA-address set? -> Use LBA (maximum boundary is FB0400h)
    678677   or       bh, bh
     
    757756      int     13h
    758757
    759       ; Looking goot so far
     758      ; Looking good so far
    760759      jnc     DriveIO_LoadSectorLBA_succes1
    761760
     
    864863
    865864; ------------------------------------------------------
    866 ; Rousseau: # Load the master LVM-sector is one exists #
     865; Rousseau: # Load the master LVM-sector if one exists #
    867866; ------------------------------------------------------
    868867; Load the master LVM-sector to get the number of sectors per track as eCS views the drive.
     
    884883        pusha
    885884
    886         mov      si,offset db_lmlvm
     885        ;mov      si,offset db_lmlvm
    887886        ;call     AuxIO_Print
    888887
     
    12401239secs_per_track_table:   db    63,127,255,255,255,255
    12411240
    1242 db_lmlvm:   db 'Load Master LVM -- disk: ',0
     1241;db_lmlvm:   db 'Load Master LVM -- disk: ',0
  • trunk/BOOTCODE/REGULAR/OTHER.ASM

    r32 r36  
    289289   endif
    290290
    291    call    PRECRAP_CheckFor13extensions
     291
     292    ; This sets [CurIO_UseExtension] flag.
     293    call    PRECRAP_CheckFor13extensions
     294
     295
    292296
    293297   IFNDEF ReleaseCode
     
    295299   ENDIF
    296300
     301
    297302   call    PRECRAP_CheckConfiguration
     303
    298304
    299305   ; =======================================
  • trunk/BOOTCODE/REGULAR/PARTMAIN.ASM

    r34 r36  
    753753;        In: DL - Number of partition (filtered view)
    754754;       Out: No Return...
    755 ; Destroyed: None, due no return ;-)
     755; Destroyed: None, due to no return ;-)
    756756;     Logic: - Harddrive: loads partition Table
    757757;                         sets partition active
     
    768768   local BootPartNo:byte
    769769   local PhysDiskBpbIndex:word    ; Index into BPB to field of phys-disk
     770   local FSType:byte                ; The FS used on the loaded BPB
     771                                    ; Only used for FAT/HPFS/JFS
     772
    770773   ; Get Partition-Pointer (SI) to Partition-To-Boot (DL)
    771774   call    PART_GetPartitionPointer
     
    787790      ; Copy Partition-Name to BootingNow area for display purposes
    788791         add     si, LocIPT_Name
     792
     793
     794;pusha
     795;call    MBR_Teletype
     796;mov     si,offset TXT_BootingNowPartName
     797;call    MBR_Teletype
     798;popa
     799
    789800         mov     cx, 11
    790801         call    GetLenOfName
     
    800811;      cmp     dh, 0FDh
    801812;      je      PSP_IsKernel
     813
     814;pusha
     815;call    MBR_Teletype
     816;mov     si,offset TXT_BootingNowPartName
     817;call    MBR_Teletype
     818;popa
     819
     820
    802821      or      dl, dl
    803822      jnz     PSP_IsHarddisc
    804823      ; When booting floppy/CD-ROM/etc., we got other text to be displayed...
    805824      mov     si, offset TXT_BootingNowPartName
    806       call    MBR_Teletype
     825      call    MBR_TeletypeVolName
    807826      jmp     PSP_IsFloppyCDROMetc
    808827
     
    821840      IFDEF ReleaseCode
    822841         ; Save configuration on HDD boots (save CFG_PartLast)
    823          call    DriveIO_SaveConfiguration                                       ; Rouaaseu: SAVE CONFIGURATION !
     842         call    DriveIO_SaveConfiguration                                       ; Rousseau: SAVE CONFIGURATION !
    824843      ENDIF
    825       call    MBR_Teletype     ; Prints out BootingNow2 including PartitionName
     844      ;call    MBR_Teletype     ; Prints out BootingNow2 including PartitionName
     845      mov     si, offset TXT_BootingNowPartName
     846      call    MBR_TeletypeVolName
    826847      mov     si, offset TXT_BootingNowPartition
    827848      call    MBR_Teletype
     
    834855   mov     dl, [si+LocIPT_Drive]
    835856
     857
     858
     859   ; This loads the MBR in case of PRI or the EBR in case of LOG partitions.
    836860   call    DriveIO_LoadPartition         ; Load Table...                [LOAD]
     861
     862
    837863
    838864   ; --------------------------------------------------- MODIFY PARTITION TABLE
     
    878904   ENDIF
    879905
     906
     907
    880908   ; ---------------------------------------------------------- OS/2 / eCS I13X
    881909   ; Now check if the partition to get booted is above 8 GB.
    882910   ;  If yes, set magic bytes 'I13X' at 3000:0 for boot-loader to recognize.
    883911   ;  This method is (c) by IBM <g>
     912   ; Rousseau: Booting IBM-BM also requires the LBA address of the IBM-BM
     913   ; partitionafter the 'I13X' signature.
     914   ; Also, FS needs to be set to 3000H.
     915   ; This info was obtained by examining the LVM 2,x MBR-code.
    884916   mov     ax, wptr [si+LocIPT_AbsoluteBegin+0]
    885917   mov     bx, wptr [si+LocIPT_AbsoluteBegin+2]
     
    893925   cmp     bx, 00FBh
    894926   jb      PSP_NoI13X
     927
     928
    895929  PSP_ForceI13X:
    896    push    es di si
    897       mov     ax, 3000h
    898       mov     es, ax
    899       xor     di, di
    900       ; Blokkeert starten van IBM BM !!
    901       mov     wptr es:[di], '1I'
    902       mov     wptr es:[di+2], 'X3'
    903 
    904       ;mov      si,3000h
    905       ;call     AuxIO_DumpSector
    906 
    907    pop     si di es
     930        push    es di si
     931
     932        ; Setup ES and FS.
     933        ; FS needs to keep this address.
     934        mov     ax, 3000h
     935        mov     es, ax
     936        ; mov fs,ax
     937        db  08eh
     938        db  0e0h
     939
     940        ; Insert signature
     941        xor     di, di
     942        mov     wptr es:[di+00], '1I'
     943        mov     wptr es:[di+02], 'X3'
     944
     945        ;mov     wptr es:[di], 0
     946        ;mov     wptr es:[di+2], 0
     947
     948        ; Insert LBA address.
     949        mov     ax, wptr [si+LocIPT_AbsoluteBegin+0]
     950        mov     wptr es:[di+04], ax
     951        mov     ax, wptr [si+LocIPT_AbsoluteBegin+2]
     952        mov     wptr es:[di+06], ax
     953
     954        pop     si di es
     955
     956
     957
    908958  PSP_NoI13X:
    909959
     
    10281078   mov     dh, [si+LocIPT_LocationBegin+0]
    10291079   mov     dl, [si+LocIPT_Drive]
     1080
     1081   ; This loads the PBR of the partition.
    10301082   call    DriveIO_LoadPartition         ; Loads boot-sector...   [PARTBOOTSEC]
     1083
     1084    ;
     1085    ; The JFS PBR-code does not use the passed BPB in memory but uses the BPB
     1086    ; on disk. This breaks the drive-letter feature on JFS.
     1087    ; So we make a copy of the PBR in memory, and if the partition is JFS
     1088    ; we later adjust the physical-disk and boot-drive-letter in this
     1089    ; copy and write it back to disk.
     1090    ; Then the JFS PBR-code will see the correct boot-drive-letter.
     1091    ;
     1092    pusha
     1093    mov     si,offset PartitionSector
     1094    mov     di,offset JfsPBR
     1095    mov     cx,100h
     1096    cld
     1097    rep     movsw
     1098    popa
     1099
     1100
     1101
     1102   ; Check if the disk is a harddisk or a floppy.
     1103   mov     dl,[si+LocIPT_Drive]
     1104   cmp      dl, 80h
     1105   jae      is_harddisk
     1106
     1107   ;
     1108   ; This is a dirty hack to fix booting from a floppy.
     1109   ; With all the modifications made since v1.06 this feature was broken
     1110   ; because Int13X is used implicitly now, and that does not work
     1111   ; for diskette access.
     1112   ; This jumps to the code that loads and starts the pbr-code.
     1113   ; Note that it also skips virus checking !
     1114   ; This will be fixed at a later date.
     1115   jmp     boot_from_floppy
     1116
     1117
     1118
     1119
     1120  ;
     1121  ; The disk is a harddisk so we need to do various checks and fixes.
     1122  ;
     1123  is_harddisk:
    10311124
    10321125   test    CFG_DetectVIBR, 1
     
    11141207        ; Display volume-name in bold
    11151208        ; Just before booting the selected partition
    1116         pushf
    1117         pusha
    1118         push    si
    1119         add     si, LocIPT_Name
    1120         call    MBR_TeletypeVolName
    1121         xor     si,si
    1122         call    MBR_TeletypeNL
    1123         pop     si
    1124         popa
    1125         popf
    1126 
    1127 
    1128         ; Locate cursor for output of debug-info
    1129         pusha
    1130         mov     ch,7
    1131         mov     cl,0
    1132         call    VideoIO_Color
    1133         mov     ch,6
    1134         mov     cl,1
    1135         call    VideoIO_Locate
    1136         popa
     1209        ;pushf
     1210        ;pusha
     1211        ;push    si
     1212        ;add     si, LocIPT_Name
     1213        ;call    MBR_TeletypeVolName
     1214        ;xor     si,si
     1215        ;call    MBR_TeletypeNL
     1216        ;pop     si
     1217        ;popa
     1218        ;popf
     1219
     1220
     1221
    11371222
    11381223
     
    11511236
    11521237        ;
    1153         ; At this point, SI points to IPT and SI points to the PBR from disk.
     1238        ; At this point, SI points to IPT and DI points to the PBR from disk.
    11541239        ; Depending on the type of BPB used, the physical disk field is at
    11551240        ; different locations: 24h for old-style (OS/2) BPB's and 40h for
     
    11771262        mov     bx,ax
    11781263
     1264        ; Locate cursor for output of debug-info
    11791265        pusha
     1266        mov     ch,7
     1267        mov     cl,0
     1268        call    VideoIO_Color
     1269        mov     ch,6
     1270        mov     cl,1
     1271        call    VideoIO_Locate
     1272        popa
     1273
     1274        ; Debug display physdisk, ptype and physdisk offset in BPB
     1275        pusha
     1276        mov     ah,[si+LocIPT_Drive]
     1277        mov     al,[si+LocIPT_SystemID]
     1278        call    VideoIO_PrintHexWord
     1279        mov     ax,bx
    11801280        call    VideoIO_PrintHexWord
    11811281        popa
    11821282
     1283
     1284        ;
     1285        ; If the partition is IBM-BM we skip all the BPB adjustments.
     1286        ; IBM-BM does no need them.
     1287        ;
     1288        cmp     byte ptr [si+LocIPT_SystemID], 0ah
     1289        jnz     no_os2_bm
     1290        jmp     chainload_ibm_bm
     1291
     1292
     1293    no_os2_bm:
     1294
     1295        ;
    11831296        ; Update the phys-drive field
     1297        ;
    11841298        mov     al,byte ptr [si+LocIPT_Drive]
    11851299        mov     es:[di+bx],al
    1186         mov     al,al
    1187 
    1188         pusha
    1189         call    VideoIO_PrintHexByte
    1190         popa
     1300
     1301
     1302        ;
     1303        ; Legacy systems do not put the correct values in the "hidden sectors"
     1304        ; field. Also, this field will be incorrect if a partition is moved on
     1305        ; disk by a disktool not accounting for this field.
     1306        ; Linux does not have a BPB at all, and does not use this field.
     1307        ; So we set the correct value here obtained by the partition scanner.
     1308        ; This fixing is done by OS/2 BM as well, according to Martin.
     1309        ;
    11911310
    11921311        ;
     
    12021321
    12031322
     1323
     1324
     1325
    12041326        ;
    12051327        ; Check partitions to see if boot-drive-letter fixing is needed.
     
    12181340        ; AL will be <> 0 and the boot-drive-letter can be tested / fixed.
    12191341        mov     al,0
     1342
     1343
     1344        ; FIXME:
     1345        ; The PBR is already loaded, no need to load it again in the
     1346        ; calls below.
     1347        ;
     1348        ; Better use the already done discovery to determine the system.
     1349        ;
    12201350
    12211351        ; When FAT12/FAT16/HPFS/JFS then boot-drive-letter can be tested
     
    12291359        mov     ah,al
    12301360
    1231         pusha
    1232         mov     al,'='
    1233         call    VideoIO_PrintSingleChar
    1234         mov     al,ah
    1235         call    VideoIO_PrintHexByte
    1236         mov     al,'='
    1237         call    VideoIO_PrintSingleChar
    1238         popa
    1239 
    1240         ; See if boot-drive-letter fix is needed depending on FS used.
     1361        ; Store for later reference.
     1362        mov     [FSType],al
     1363
     1364
     1365        ;
     1366        ; When the phys-disk byte (80h) is put in this BPB in RAM,
     1367        ; Windows will not find it's loader if Windows itself
     1368        ; is installed in a logical partition but the loader is on FAT
     1369        ; in a primary.
     1370        ; This goes for all NT-based versions ?
     1371        ;
     1372
     1373
     1374        ;
     1375        ; See if phys-disk / boot-drive-letter fix is needed
     1376        ; depending on FS used.
    12411377        ; AL will be 0 for any file-system other than FAT12/FAT16/HPFS/JFS.
     1378        ;
    12421379        test    al,al
    12431380        jz      bdl_ok
     1381
     1382
    12441383
    12451384        ; Check if the boot-drive-letter is non-zero.
     
    12611400        mov     bx,[si+LocIPT_AbsoluteBegin+02h]
    12621401        call    LVM_GetDriveLetter
     1402
    12631403        ; Save the status for later use
    12641404        pushf
    1265         ; Save drive-letter in AH
    1266         mov     ah,al
    12671405
    12681406        ; See if the drive-letter feature is active.
    12691407        ; If active, we force the drive-letter from the user.
    12701408        test    byte ptr [si+LocIPT_Flags], Flags_DriveLetter
     1409
    12711410        ; Nope, it's not so we don't force the boot-drive-letter
    12721411        ; using field 25h.
     
    12811420        mov     al, bptr [DriveLetters+bx]
    12821421        sub     al,3dh      ; Convert BIOS notation to ASCII drive-letter
    1283         pusha
    1284         mov     al,'!'
    1285         call    VideoIO_PrintSingleChar
    1286         popa
     1422
     1423
     1424
    12871425    PSP_NoLogicalSupport:
    12881426
     
    12901428        ; Save it in AH.
    12911429        mov     ah,al
    1292         pusha
    1293         mov     al,'+'
    1294         call    VideoIO_PrintSingleChar
    1295         mov     al,ah
    1296         call    VideoIO_PrintHexByte
    1297         mov     al,'+'
    1298         call    VideoIO_PrintSingleChar
    1299         popa
     1430
    13001431
    13011432        ; Restore the status whether an LVM drive-letter could be obtained
     
    13031434
    13041435
     1436        ;
    13051437        ; No valid LVM-info if no info found or drive-letter is zero.
     1438        ;
    13061439        jnc     no_valid_lvm_info
    13071440        test    al,al
     
    13161449        add     al,3dh
    13171450
    1318         ; Fix the boot-drive-letter field in the BPB
    1319         mov     bx,PhysDiskBpbIndex
    1320         inc     bx
    1321         mov     es:[di+bx],al
    1322 
    1323         pusha
    1324         call    VideoIO_PrintHexByte
    1325         popa
    1326 
    1327         jmp     bdl_ok
    1328 
    1329 
    1330     no_valid_lvm_info:
    1331         ; HERE SHOULD COME AN ERROR POP-UP ABOUT NO BOOT-DRIVE.
    1332         ; WE CONTINUE BOOTING BUT OS/2 - eCS WILL MOST PROBABLY FAIIL TO BOOT.
    1333 
    1334         mov     ah,07h
    1335         mov     si,offset CheckID_MBR
    1336         call    VideoIO_Print
    1337 
    1338     hang:
    1339         jmp     hang
    1340 
    1341 
    1342     bdl_ok:
    1343 
    1344 
    1345 
    1346         ;xor     ax,ax
    1347         ;int     16h
    1348 
    1349 
    1350 
    1351 
    1352 
    1353         ; Check FS-types
    1354         ; Adjust fields
    1355 
    1356 
    1357 
    1358 
    1359 
    1360         ; Rousseau: # Boot Logical Partitions)
    1361         ; FreeDOS and eCS on extpart on non-huge needs special support.
    1362         ; (old ja jump)
    1363         ; PC-DOS7 on huge pri fat16 2G works with both (XP too) when at start of disk.
    1364         ; (also when offset at 20MiB)
    1365         ; PCD7 bonkt vast als in 2GiB log at start of space.
    1366         ; "Starting PC DOS..." verschijnt. PCD Loader probleem.
    1367         ; Offset van start-of-disk bij PCD7 niet meer dan 2GiB maken.
    1368         ; Special is needed to boot ECS-CXXVAC (log-part) on Douwskie Box with 40G disk.
    1369         ; FreeDOS 20G PRI SOD op 400G start niet met special.
    1370         ; Heeft drive-id op 26h (36d) van 0dh !
    1371         ; WinXP werkt met special en not-special op 400G normal geo.
    1372         ; eCS op PRI op 2G met os2 ext geo werkt ook met beide.
    1373         ; eCS LOG werkt niet zonder special op 400G.
    1374         ; (hidden secs op 3F en moet 3F00 zijn; BM staat ervoor, 3F00=255*63+63)
    1375         ; Laatste 63 is MBR.
    1376         ;
    1377 
    1378 
    1379 
    1380 
    1381         ;
    1382         ; When the phys-disk byte (80h) is put in this BPB in RAM,
    1383         ; Windows will not find it's loader if Windows itself
    1384         ; is installed in a logical partition but the loader is on FAT
    1385         ; in a primary.
    1386         ; This goes for all NT-based versions ?
    1387         ;
    1388         ; Get saved value of phys drive from BPB on disk.
    1389         ; See if it's high nibble is above 9, which would indicate
    1390         ; FreeDOS or WinBMGR/Loader on FAT32. (0FBh)
    1391         ; In that case we don't write the phys-disk number to the BPB.
    1392         ;
    1393 
    1394 
    1395 
    1396 
    1397 
    1398 
    1399 
    1400 
    1401         ;
    1402         ; Legacy systems do not put the correct values in the "hidden sectors"
    1403         ; field. Also, this field will be incorrect if a partition is moved on
    1404         ; disk by a disktool not accounting for this field.
    1405         ; Linux does not have a BPB at all, and does not use this field.
    1406         ; So we set the correct value here obtained by the partition scanner.
    1407         ; This fixing is done by OS/2 BM as well, according to Martin.
    1408         ;
    1409 
    1410 
    1411 
    1412 
    1413     ; ----------------------------------------------- LOGICAL PARTITION SUPPORT
    1414 
    1415 
    1416         ;
    1417         ; OS/2 uses this field to indicate the boot-drive for the system.
     1451
     1452        ;
     1453        ; OS/2 uses this field to indicate the boot-drive-letter for the system.
    14181454        ; It is in BIOS notation where 80h='C', 81h='D' ... 97h='Z'.
    14191455        ; This is the field that get's forced to a specific value when the
     
    14241460        ; See issues #3067 and #3119 on http://bugs.ecomstation.nl
    14251461        ;
     1462
     1463
     1464        ; Fix the boot-drive-letter field in the BPB
     1465        mov     bx,PhysDiskBpbIndex
     1466        ; Advance to field for drive-letter in BIOS notation (OS/2 - eCS)
     1467        inc     bx
     1468        mov     es:[di+bx],al
     1469
     1470
     1471        jmp     bdl_ok
     1472
     1473
     1474    no_valid_lvm_info:
     1475        ; HERE SHOULD COME AN ERROR POP-UP ABOUT NO BOOT-DRIVE OR NO LVM-INFO.
     1476        ; WE CONTINUE BOOTING BUT OS/2 - eCS WILL MOST PROBABLY FAIL TO BOOT.
     1477
     1478        ;mov     ah,07h
     1479        ;mov     si,offset CheckID_MBR
     1480        ;call    VideoIO_Print
     1481
     1482    hang:
     1483        ;jmp     hang
     1484
     1485
     1486    ;
     1487    ; Boot DriveLetter OK.
     1488    ;
     1489    bdl_ok:
     1490
     1491
     1492        ;
     1493        ; If the partition getting booted is a JFS partition then write-back
     1494        ; the modified PBR to the disk.
     1495        ; Note that it's not the in-memory PBR that get's written back, but
     1496        ; a copy of the original where only the phys-disk and boot-drive-letter
     1497        ; are adjusted.
     1498        ;
     1499        pusha
     1500        mov     al,[FSType]
     1501        cmp     al,04h      ; JFS
     1502        jnz     no_jfs_pbr
     1503
     1504        ; Save IPT pointer
     1505        push    si
     1506
     1507        ; Copy the boot-drive and boot-drive-letter fields.
     1508        mov     si,offset PartitionSector
     1509        mov     di,offset JfsPBR
     1510        mov     al,[si+24h]
     1511        mov     [di+24h],al
     1512        mov     al,[si+25h]
     1513        mov     [di+25h],al
     1514
     1515        ; Restore IPT pointer
     1516        pop     si
     1517
     1518        ; Setup the registers for the partition location.
     1519        mov     ax, wptr [si+LocIPT_AbsoluteBegin+0]
     1520        mov     bx, wptr [si+LocIPT_AbsoluteBegin+2]
     1521        mov     cx, [si+LocIPT_LocationBegin+1]
     1522        mov     dh, [si+LocIPT_LocationBegin+0]
     1523        mov     dl, [si+LocIPT_Drive]
     1524
     1525        ; Write the adjusted JFS PBR to disk.
     1526        mov     si, offset JfsPBR
     1527        call    DriveIO_SaveSector
     1528
     1529    no_jfs_pbr:
     1530        popa
     1531
     1532
     1533        ;xor     ax,ax
     1534        ;int     16h
     1535
     1536
     1537
     1538
     1539
     1540
     1541
     1542
     1543
     1544
     1545
     1546
     1547
     1548
     1549
     1550
     1551
     1552    ; ----------------------------------------------- LOGICAL PARTITION SUPPORT
     1553
     1554
     1555
    14261556        ; AiR-BOOT now works around it by using the LVM-info (DLAT) of
    14271557        ; the partiton if present.
     
    14391569
    14401570
    1441 
    1442 
    1443         ;
    1444         ; At this point it's possible that a system is being booted from
    1445         ; HPFS with the boot-drive field (25h) set to zero.
    1446         ; This will result in OS/2 - eCS being unable to boot the system.
    1447         ; So we're gonna check this byte here and if it's zero we will
    1448         ; replace it with information found in LVM DLAT info.
    1449         ;
    1450 
    1451 
    1452 
    1453 
    1454 
    1455     ; <<<< KNIP >>>> LVM STUFF
    1456 
    1457 
    1458 
    1459 
    1460 
    1461 
    1462         ;
    1463         ; Here we copy the prepared partition boot-record to 7C00h
     1571    ;
     1572    ; Control is transferred to this point if we are booting IBM-BM.
     1573    ; IBM-BM does not need the BPB fixes.
     1574    ; It does require a other special stuff, which is already taken care of.
     1575    ;
     1576    chainload_ibm_bm:
     1577
     1578    ;
     1579    ; Control is transferred to this point if we are booting a floppy.
     1580    ; Booting from floppy skips all the harddisk related stuff.
     1581    ; This is a dirty hack to fix the boot from floppy feature.
     1582    ;
     1583    boot_from_floppy:
     1584
     1585        ;
     1586        ; Here we copy the prepared partition boot-record to 0000:7C00h
    14641587        ; to give it control later on.
    14651588        ;
     1589        push    es
    14661590        push    si
    14671591        mov     ax, StartBaseSeg
     
    14701594        mov     si, offset PartitionSector
    14711595        mov     di, StartBasePtr
     1596        cld
    14721597        rep     movsw
    14731598        pop     si
     1599        pop     es
    14741600
    14751601    ; --------------------------------------------------- NOW START BOOT-RECORD
     
    14881614;
    14891615
     1616    ; Skip wait-for-key
     1617    jmp start_pbr
     1618
    14901619        ;
    14911620        ; Wait for keypress
     
    15001629        jne      start_pbr
    15011630
     1631        ;xor     ax,ax
     1632        ;mov     [CurPartition_Location+00],ax
     1633        ;mov     [CurPartition_Location+02],ax
     1634        ;mov     [CurPartition_Location+04],ax
     1635        ;mov     [CurPartition_Location+06],ax
     1636
     1637        ;pusha
     1638        ;xor     al,al
     1639        ;mov     di,si
     1640        ;add     di,LocIPT_Name
     1641        ;mov     cx,12
     1642        ;cld
     1643        ;rep     stosb
     1644        ;popa
     1645
     1646
     1647        ;push    ds
     1648        ;pop     es
     1649
    15021650        ; Yep, Reenter bootmenu
    15031651        jmp      MBR_Main_ReEnterBootMenuPre
     
    15091657;
    15101658start_pbr:
     1659
     1660        ; Debug display index
     1661        ;pusha
     1662        ;mov     al, cs:[si+LocIPT_Drive]        ; Drive Physical No
     1663        ;mov     ah, cs:[si+LocIPT_SystemID]     ; SystemID
     1664        ;call    VideoIO_PrintHexWord
     1665        ;xor     ax, ax
     1666        ;int     16h
     1667        ;popa
     1668
     1669
     1670        ; About 1.5 seconds
     1671        mov     al,30
     1672        call    TIMER_WaitTicCount
    15111673
    15121674        ;
     
    15171679        xor     cx, cx
    15181680        mov     ds, ax
    1519         mov     es, ax                        ; DS == ES == 0
    1520         xor     dh, dh                        ; Drive supported by BIOS
     1681        mov     es, ax
     1682        xor     dh, dh
    15211683        mov     dl, cs:[si+LocIPT_Drive]      ; Drive Physical No
     1684
     1685
    15221686
    15231687        ;
  • trunk/BOOTCODE/REGULAR/PARTSCAN.ASM

    r32 r36  
    311311      stosw
    312312                              ; Set Serial-Field to LVM-VolumeID
     313
    313314      push     di
    314       add     si, LocLVM_PartitionName
    315 
     315      add     si, LocLVM_VolumeName     ; Use LVM VolumeName
     316      ;add     si, LocLVM_PartitionName  ; Use LVM PartitionName
    316317      mov     cx, 5
    317318      rep     movsw                      ; Copy LVM-PartitionName to Temp Space
    318319      movsb                               ;  (11 bytes in total)
    319 
    320320      pop   di
     321
     322
     323      ; Check if this is an IBM-BM partition
    321324      cmp   PartSystemID, 0ah
    322 
    323325      jne   PCCTP_NoIbmBm
     326
     327      ; It is, so override the name given by IBM-BM by one that
     328      ; fits in 11 chars.
    324329      mov   si, offset ibm_bm_name
    325330      mov   cx,5
     
    330335
    331336   PCCTP_NoIbmBm:
    332 
    333 
    334337   pop     di si dx ax
    335338   mov     si, offset MBR_NoName_Patched
     
    660663   cmp     NewPartitions, LocIPT_MaxPartitions
    661664   jbe     PCCTP_NotTooManyPartitions
     665
    662666   mov     si, offset TXT_TooManyPartitions
    663667   call    MBR_Teletype
    664668   jmp     MBR_HaltSystem
     669
    665670
    666671  PCCTP_NotTooManyPartitions:
     
    693698   ret
    694699PARTSCAN_CheckThisPartition     EndP
     700
     701stop_scanning   db  0
    695702
    696703; ===================
     
    805812PARTSCAN_SyncHideConfigWithXref EndP
    806813
    807 ibm_bm_name:   db 'IBM BootMan',0
     814ibm_bm_name:   db 'OS2 BootMgr',0
    808815;win_bm_name:   db 'BOOTMGR',0
  • trunk/BOOTCODE/REGULAR/STD_TEXT.ASM

    r35 r36  
    3737;Copyright             db ' AiR-BOOT v1.07 - (c) 1998-2011 M. Kiewitz, Dedicated to Gerd Kiewitz', 0
    3838;Copyright             db ' AiR-BOOT v1.0.8 - (c) 1998-2011 M. Kiewitz, Dedicated to Gerd Kiewitz', 0
     39
    3940;Copyright             db ' AiR-BOOT v1.0.8-internal-beta - ** !! NOT FOR DISTRIBUTION !! **', 0
    40 Copyright             db ' AiR-BOOT v1.0.8 - (c) 1998-2012 M. Kiewitz, Dedicated to Gerd Kiewitz', 0
     41;Copyright             db ' AiR-BOOT v1.0.8 - (c) 2012 M. Kiewitz    <<Release Candidate>>    (build: #18)', 0
     42Copyright             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) 1998-2012 M. Kiewitz, Dedicated to Gerd Kiewitz', 0
    4144
    4245; Rousseau: switch around
    43 BootEndMsg           db 'This is GPLv3+ software. Please visit: http://www.gnu.org/licenses/gpl.txt', 0
    44 BootEndMsg2          db 'http://svn.netlabs.org/air-boot', 0
     46BootEndMsg           db 'This is GPLv3+ software, please visit: http://www.gnu.org/licenses/gpl.txt', 0
     47BootEndMsg2          db 'To obtain the sources,   please visit: http://svn.netlabs.org/air-boot', 0
    4548
    4649AuxInitMsg           db 'Initializing Serial Communications on COM',0
     
    5053
    5154; Colors for special words hard-coded. Keep all 0s.
    52 TXT_SETUP_LowerMessage      db 'This software is released under ', 0, 'GPLv3+.', 0
     55TXT_SETUP_LowerMessage      db 'This software is released under ', 0, 'GPLv3+', 0
    5356                            db 'http://www.gnu.org/licenses/gpl.txt', 0
    54                             db 'For more information and source, please visit', 0
     57                            db 'For more information and source, please visit:', 0
    5558                            db 'http://svn.netlabs.org/air-boot', 0
    5659                            db 'Contact via e-mail: ', 0, 'airboot@ecomstation.com', 0
  • trunk/BOOTCODE/REGULAR/VIDEOIO.ASM

    r34 r36  
    853853
    854854ShowMenu:         db "Press TAB to return to the AiR-BOOT Menu",0
    855 ShowBootLog:      db "Press TAB to see the Boot Log...",0
     855;ShowBootLog:      db "Press TAB to see the Boot Log...",0
    856856
    857857Yes:              db "YES",0
Note: See TracChangeset for help on using the changeset viewer.