Changeset 363 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot
- Timestamp:
- Mar 26, 2012, 4:20:43 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Boot
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuInfo.asm
r269 r363 17 17 ; ES:BX: Ptr to BOOTMENUINFO (if successful) 18 18 ; Corrupts registers: 19 ; AX, BX,CX, DX, DI19 ; AX, CX, DX, DI 20 20 ;-------------------------------------------------------------------- 21 21 BootMenuInfo_CreateForHardDisk: 22 22 call BootMenuInfo_ConvertDPTtoBX ; ES:BX now points to new BOOTMENUINFO 23 push ds ; Preserve RAMVARS... 24 push si ; ...and SI 25 26 push es ; ES to be copied to DS 27 28 %ifdef MODULE_ADVANCED_ATA 29 ; Copy DPT_ADVANCED_ATA to BOOTMENUINFO to keep DPTs small. 30 ; DPT_ADVANCED_ATA has variables that are only needed during initialization. 31 mov ax, [di+DPT_ADVANCED_ATA.wIdeBasePort] 32 mov [es:bx+BOOTMENUINFO.wIdeBasePort], ax 33 mov dx, [di+DPT_ADVANCED_ATA.wMinPioActiveTimeNs] 34 mov [es:bx+BOOTMENUINFO.wMinPioActiveTimeNs], dx 35 36 mov ax, [di+DPT_ADVANCED_ATA.wMinPioRecoveryTimeNs] 37 mov cx, [di+DPT_ADVANCED_ATA.wControllerID] 38 mov dx, [di+DPT_ADVANCED_ATA.wControllerBasePort] 39 pop ds ; ES copied to DS 40 mov [bx+BOOTMENUINFO.wMinPioRecoveryTimeNs], ax 41 mov [bx+BOOTMENUINFO.wControllerID], cx 42 mov [bx+BOOTMENUINFO.wControllerBasePort], dx 43 44 %else 45 pop ds ; ES copied to DS 46 %endif 23 47 24 48 ; Store Drive Name 25 push ds ; Preserve RAMVARS26 push si27 28 push es ; ES copied to DS29 pop ds30 31 49 add si, BYTE ATA1.strModel ; DS:SI now points drive name 32 50 lea di, [bx+BOOTMENUINFO.szDrvName] ; ES:DI now points to name destination … … 42 60 pop si 43 61 pop ds 44 45 62 ret 46 63 … … 55 72 ; CX 56 73 ;-------------------------------------------------------------------- 57 ALIGN JUMP_ALIGN58 74 BootMenuInfo_GetTotalSectorCount: 59 75 test BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA … … 62 78 .ReturnFullCapacity: 63 79 jmp AccessDPT_GetLbaSectorCountToBXDXAX 80 81 82 ;-------------------------------------------------------------------- 83 ; BootMenuInfo_IsAvailable 84 ; Parameters: 85 ; Nothing 86 ; Returns: 87 ; ES: Segment to BOOTVARS with BOOTMENUINFOs 88 ; ZF: Set if BOOTVARS with BOOTMENUINFOs is available 89 ; Cleared if not available (no longer initializing) 90 ; Corrupts registers: 91 ; BX 92 ;-------------------------------------------------------------------- 93 BootMenuInfo_IsAvailable: 94 LOAD_BDA_SEGMENT_TO es, bx 95 cmp WORD [es:BOOTVARS.wMagicWord], BOOTVARS_MAGIC_WORD 96 ret 64 97 65 98 … … 73 106 ; BX: Offset to BOOTMENUINFO struct 74 107 ; Corrupts registers: 75 ; AX108 ; Nothing 76 109 ;-------------------------------------------------------------------- 77 ALIGN JUMP_ALIGN78 110 BootMenuInfo_ConvertDPTtoBX: 111 push ax 79 112 mov ax, di 80 sub ax, RAMVARS_size; subtract off base of DPTs113 sub ax, BYTE RAMVARS_size ; subtract off base of DPTs 81 114 mov bl, DPT_BOOTMENUINFO_SIZE_MULTIPLIER ; BOOTMENUINFO's are a whole number multiple of DPT size 82 115 mul bl 83 116 add ax, BOOTVARS.rgBootNfo ; add base of BOOTMENUINFO 84 117 xchg ax, bx 118 pop ax 85 119 ret -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm
r294 r363 111 111 ; Nothing (falls to next push below) 112 112 ; Corrupts registers: 113 ; AX 113 ; AX, BX, DX, ES 114 114 ;-------------------------------------------------------------------- 115 115 .PushResetStatus: 116 mov al, [di+DPT.bFlagsHigh]117 and al, MASKH_DPT_RESET ; ah already zero from last push118 push ax116 call BootMenuInfo_IsAvailable ; Load segment to ES 117 call BootMenuInfo_ConvertDPTtoBX 118 push WORD [es:bx+BOOTMENUINFO.wInitErrorFlags] 119 119 120 120 ;;; fall-out to BootMenuPrint_HardDiskRefreshInformation.
Note:
See TracChangeset
for help on using the changeset viewer.