Changeset 398 in xtideuniversalbios for trunk


Ignore:
Timestamp:
Apr 19, 2012, 3:08:06 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • IRQ related stuff is now optional MODULE_IRQ.
  • XT builds no longer include support for IDE IRQ.
Location:
trunk/XTIDE_Universal_BIOS
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc

    r397 r398  
    2626%endif
    2727
     28%ifdef MODULE_SERIAL_FLOPPY
     29    %ifndef MODULE_SERIAL
     30        %define MODULE_SERIAL
     31    %endif
     32%endif
     33
    2834
    2935
    3036; Include module specific .INC files
     37%ifdef MODULE_ADVANCED_ATA
     38    %include "Vision.inc"           ; For QDI Vision QD65xx VLB IDE Controllers
     39%endif
     40
    3141%ifdef MODULE_EBIOS
    3242    %include "EBIOS.inc"            ; Equates for EBIOS functions
     
    4050%endif
    4151
    42 %ifdef MODULE_ADVANCED_ATA
    43     %include "Vision.inc"           ; For QDI Vision QD65xx VLB IDE Controllers
     52%ifdef MODULE_IRQ
     53    %include "IntController.inc"
    4454%endif
     55
    4556
    4657
     
    7081%endif
    7182
     83%ifdef MODULE_IRQ
     84    MAIN_FLG_MODULE_IRQ     EQU FLG_ROMVARS_MODULE_IRQ
     85%else
     86    MAIN_FLG_MODULE_IRQ     EQU 0
     87%endif
     88
    7289%ifdef MODULE_JRIDE
    7390    MAIN_FLG_MODULE_JRIDE   EQU FLG_ROMVARS_MODULE_JRIDE
     
    94111%endif
    95112
    96 MASK_ROMVARS_INCLUDED_MODULES   EQU MAIN_FLG_MODULE_ADVANCED_ATA | MAIN_FLG_MODULE_BOOT_MENU | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_HOTKEYS | MAIN_FLG_MODULE_JRIDE | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_SERIAL_FLOPPY | MAIN_FLG_MODULE_STRINGS_COMPRESSED
     113MASK_ROMVARS_INCLUDED_MODULES   EQU MAIN_FLG_MODULE_ADVANCED_ATA | MAIN_FLG_MODULE_BOOT_MENU | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_HOTKEYS | MAIN_FLG_MODULE_IRQ | MAIN_FLG_MODULE_JRIDE | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_SERIAL_FLOPPY | MAIN_FLG_MODULE_STRINGS_COMPRESSED
  • trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc

    r397 r398  
    7070                                                ; (Conveniently, this is 8, a fact we exploit when testing the bit)
    7171
    72 FLG_ROMVARS_MODULE_ADVANCED_ATA         EQU (1<<8)  ; Here in case the configuration needs to know functionality is present
    73 FLG_ROMVARS_MODULE_BOOT_MENU            EQU (1<<9)  ; Here in case the configuration needs to know functionality is present
    74 FLG_ROMVARS_MODULE_EBIOS                EQU (1<<10) ; Here in case the configuration needs to know functionality is present
    75 FLG_ROMVARS_MODULE_HOTKEYS              EQU (1<<11) ; Here in case the configuration needs to know functionality is present
     72FLG_ROMVARS_MODULE_ADVANCED_ATA         EQU (1<<7)  ; Here in case the configuration needs to know functionality is present
     73FLG_ROMVARS_MODULE_BOOT_MENU            EQU (1<<8)  ; Here in case the configuration needs to know functionality is present
     74FLG_ROMVARS_MODULE_EBIOS                EQU (1<<9)  ; Here in case the configuration needs to know functionality is present
     75FLG_ROMVARS_MODULE_HOTKEYS              EQU (1<<10) ; Here in case the configuration needs to know functionality is present
     76FLG_ROMVARS_MODULE_IRQ                  EQU (1<<11) ; Here in case the configuration needs to know functionality is present
    7677FLG_ROMVARS_MODULE_JRIDE                EQU (1<<12) ; Here in case the configuration needs to know functionality is present
    7778FLG_ROMVARS_MODULE_SERIAL               EQU (1<<13) ; Here in case the configuration needs to know functionality is present
     
    118119;
    119120DEVICE_XTIDE_DEFAULT_PORT               EQU     300h
    120 DEVICE_XTIDE_DEFAULT_PORTCTRL           EQU     308h
    121 DEVICE_ATA_DEFAULT_PORT                 EQU     1F0h
    122 DEVICE_ATA_DEFAULT_PORTCTRL             EQU     3F0h
    123 DEVICE_ATA_DEFAULT_SECONDARY_PORT       EQU     170h
    124 DEVICE_ATA_DEFAULT_SECONDARY_PORTCTRL   EQU     370h
     121DEVICE_XTIDE_DEFAULT_PORTCTRL           EQU     DEVICE_XTIDE_DEFAULT_PORT + 8h
     122
     123DEVICE_ATA_PRIMARY_PORT                 EQU     1F0h
     124DEVICE_ATA_PRIMARY_PORTCTRL             EQU     DEVICE_ATA_PRIMARY_PORT + 200h
     125
     126DEVICE_ATA_SECONDARY_PORT               EQU     170h
     127DEVICE_ATA_SECONDARY_PORTCTRL           EQU     DEVICE_ATA_SECONDARY_PORT + 200h
     128
     129DEVICE_ATA_TERTIARY_PORT                EQU     1E8h
     130DEVICE_ATA_TERTIARY_PORTCTRL            EQU     DEVICE_ATA_TERTIARY_PORT + 200h
     131
     132DEVICE_ATA_QUATERNARY_PORT              EQU     168h
     133DEVICE_ATA_QUATERNARY_PORTCTRL          EQU     DEVICE_ATA_QUATERNARY_PORT + 200h
     134
    125135
    126136; Device types for IDEVARS.bDevice
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeWait.asm

    r376 r398  
    5555IDEDEVICE%+Wait_IRQorStatusFlagInBLwithTimeoutInBH:
    5656%ifdef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS     ; JR-IDE/ISA does not support IRQ
    57     call    IdeIrq_WaitForIRQ
     57    %ifdef MODULE_IRQ
     58        call    IdeIrq_WaitForIRQ
     59    %endif
    5860%endif
    5961    ; Always fall to IdeWait_PollStatusFlagInBLwithTimeoutInBH for error processing
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHDh_HReset.asm

    r376 r398  
    6262    push    di
    6363
     64%ifdef MODULE_IRQ
    6465    call    Interrupts_UnmaskInterruptControllerForDriveInDSDI
     66%endif
    6567    call    Device_ResetMasterAndSlaveController
    6668    ;jc     SHORT .ReturnError                  ; CF would be set if slave drive present without master
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm

    r397 r398  
    104104.DoNotDisplayBootMenu:
    105105%endif
    106 %endif
    107106
    108107    ; Check if ROM boot (INT 18h) wanted
    109 %ifdef MODULE_HOTKEYS
    110108    cmp     BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode], ROM_BOOT_HOTKEY_SCANCODE
    111109    je      SHORT JumpToBootSector_or_RomBoot   ; CF clear so ROM boot
    112 %endif
    113 
    114     ; Try to boot from Primary boot drive (00h by default)
    115 %ifdef MODULE_HOTKEYS
     110
     111    ; Get Primary boot drive number to DL
    116112    call    HotkeyBar_GetPrimaryBootDriveNumberToDL
    117113%else
    118     mov     dl, [cs:ROMVARS.bBootDrv]
    119     and     dl, 80h     ; Only 00h and 80h allowed when not using MODULE_HOTKEYS
    120 %endif
     114    call    GetPrimaryBootDriveToDLwhenNotUsingModuleHotkeys
     115%endif  ; MODULE_HOTKEYS
     116
     117    ; Try to boot from Primary boot drive (00h by default)
    121118    call    TryToBootFromPrimaryOrSecondaryBootDevice
    122119    jc      SHORT JumpToBootSector_or_RomBoot
     
    126123    call    HotkeyBar_GetSecondaryBootDriveNumberToDL
    127124%else
    128     mov     dl, [cs:ROMVARS.bBootDrv]
    129     and     dl, 80h
     125    call    GetPrimaryBootDriveToDLwhenNotUsingModuleHotkeys
    130126    xor     dl, 80h
    131127%endif
     
    203199    jmp     BootSector_TryToLoadFromDriveDL
    204200%endif
     201
     202
     203;--------------------------------------------------------------------
     204; GetPrimaryBootDriveToDLwhenNotUsingModuleHotkeys
     205;   Parameters
     206;       Nothing
     207;   Returns:
     208;       DL:     Drive to boot from (00h or 80h)
     209;   Corrupts registers:
     210;       Nothing
     211;--------------------------------------------------------------------
     212%ifndef MODULE_HOTKEYS
     213GetPrimaryBootDriveToDLwhenNotUsingModuleHotkeys:
     214    mov     dl, [cs:ROMVARS.bBootDrv]
     215    and     dl, 80h     ; Only 00h and 80h allowed when not using MODULE_HOTKEYS
     216    ret
     217%endif
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/Vision.asm

    r392 r398  
    9191    ; QD6580 always have Primary IDE at 1F0h
    9292    ; Secondary IDE at 170h can be enabled or disabled
    93     cmp     bx, DEVICE_ATA_DEFAULT_PORT
     93    cmp     bx, DEVICE_ATA_PRIMARY_PORT
    9494    je      SHORT .ReturnResultInZF
    9595
     
    108108    test    al, FLG_QDCONFIG_PRIMARY_IDE
    109109    jz      SHORT .CompareBXtoSecondaryIDE
    110     cmp     bx, DEVICE_ATA_DEFAULT_PORT
     110    cmp     bx, DEVICE_ATA_PRIMARY_PORT
    111111    ret
    112112
    113113.CompareBXtoSecondaryIDE:
    114     cmp     bx, DEVICE_ATA_DEFAULT_SECONDARY_PORT
     114    cmp     bx, DEVICE_ATA_SECONDARY_PORT
    115115.ReturnResultInZF:
    116116    ret
     
    180180    ; QD6580 always has Primary channel at 1F0h. Secondary channel at 170h can be Enabled or Disabled.
    181181    call    AccessDPT_GetIdeBasePortToBX
    182     cmp     bx, DEVICE_ATA_DEFAULT_PORT
     182    cmp     bx, DEVICE_ATA_PRIMARY_PORT
    183183    je      SHORT .CalculateTimingTicksForQD6580    ; Primary Channel so no need to modify DX
    184184    times 2 inc dx                                  ; Secondary Channel IDE Timing Register
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm

    r392 r398  
    6767    mov     al, BIOS_BOOT_LOADER_INTERRUPT_19h  ; INT 19h interrupt vector offset
    6868    mov     si, Int19hReset_Handler             ; INT 19h handler to reboot the system
     69%ifndef MODULE_IRQ
     70    ; Fall to Interrupts_InstallHandlerToVectorInALFromCSSI
     71%else
    6972    call    Interrupts_InstallHandlerToVectorInALFromCSSI
    7073    ; Fall to .InitializeHardwareIrqHandlers
     
    136139    mov     si, IdeIrq_InterruptServiceRoutineForIrqs2to7
    137140    ; Fall to Interrupts_InstallHandlerToVectorInALFromCSSI
     141%endif ; MODULE_IRQ
    138142
    139143
     
    158162
    159163
     164%ifdef MODULE_IRQ
    160165;--------------------------------------------------------------------
    161166; Interrupts_UnmaskInterruptControllerForDriveInDSDI
     
    227232.Return:
    228233    ret
     234
     235%endif ; MODULE_IRQ
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r397 r398  
    4646    ; Included .inc files
    4747    %include "AssemblyLibrary.inc"  ; Assembly Library. Must be included first!
     48    %include "ModuleDependency.inc" ; Dependency checks for optional modules
    4849    %include "Version.inc"
    49     %include "ModuleDependency.inc" ; Dependency checks for optional modules
    50     %include "IntController.inc"    ; For Interrupt Controller equates
    5150    %include "ATA_ID.inc"           ; For ATA Drive Information structs
    5251    %include "IdeRegisters.inc"     ; For ATA Registers, flags and commands
     
    8988    at  ROMVARS.bIdleTimeout,   db  0                       ; Standby timer disabled by default
    9089
    91     at  ROMVARS.ideVars0+IDEVARS.wPort,         dw  DEVICE_ATA_DEFAULT_PORT         ; Controller Command Block base port
    92     at  ROMVARS.ideVars0+IDEVARS.wPortCtrl,     dw  DEVICE_ATA_DEFAULT_PORTCTRL     ; Controller Control Block base port
     90    at  ROMVARS.ideVars0+IDEVARS.wPort,         dw  DEVICE_ATA_PRIMARY_PORT         ; Controller Command Block base port
     91    at  ROMVARS.ideVars0+IDEVARS.wPortCtrl,     dw  DEVICE_ATA_PRIMARY_PORTCTRL     ; Controller Control Block base port
    9392    at  ROMVARS.ideVars0+IDEVARS.bDevice,       db  DEVICE_16BIT_ATA
    9493    at  ROMVARS.ideVars0+IDEVARS.bIRQ,          db  0
     
    9695    at  ROMVARS.ideVars0+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE
    9796
    98     at  ROMVARS.ideVars1+IDEVARS.wPort,         dw  DEVICE_ATA_DEFAULT_SECONDARY_PORT
    99     at  ROMVARS.ideVars1+IDEVARS.wPortCtrl,     dw  DEVICE_ATA_DEFAULT_SECONDARY_PORTCTRL
     97    at  ROMVARS.ideVars1+IDEVARS.wPort,         dw  DEVICE_ATA_SECONDARY_PORT
     98    at  ROMVARS.ideVars1+IDEVARS.wPortCtrl,     dw  DEVICE_ATA_SECONDARY_PORTCTRL
    10099    at  ROMVARS.ideVars1+IDEVARS.bDevice,       db  DEVICE_16BIT_ATA
    101100    at  ROMVARS.ideVars1+IDEVARS.bIRQ,          db  0
     
    103102    at  ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE
    104103
    105     at  ROMVARS.ideVars2+IDEVARS.wPort,         dw  1E8h
    106     at  ROMVARS.ideVars2+IDEVARS.wPortCtrl,     dw  3E8h
     104    at  ROMVARS.ideVars2+IDEVARS.wPort,         dw  DEVICE_ATA_TERTIARY_PORT
     105    at  ROMVARS.ideVars2+IDEVARS.wPortCtrl,     dw  DEVICE_ATA_TERTIARY_PORTCTRL
    107106    at  ROMVARS.ideVars2+IDEVARS.bDevice,       db  DEVICE_16BIT_ATA
    108107    at  ROMVARS.ideVars2+IDEVARS.bIRQ,          db  0
     
    110109    at  ROMVARS.ideVars2+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,   db  DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE
    111110
    112     at  ROMVARS.ideVars3+IDEVARS.wPort,         dw  168h
    113     at  ROMVARS.ideVars3+IDEVARS.wPortCtrl,     dw  368h
     111    at  ROMVARS.ideVars3+IDEVARS.wPort,         dw  DEVICE_ATA_QUATERNARY_PORT
     112    at  ROMVARS.ideVars3+IDEVARS.wPortCtrl,     dw  DEVICE_ATA_QUATERNARY_PORTCTRL
    114113    at  ROMVARS.ideVars3+IDEVARS.bDevice,       db  DEVICE_16BIT_ATA
    115114    at  ROMVARS.ideVars3+IDEVARS.bIRQ,          db  0
     
    232231    %include "IdeDPT.asm"
    233232    %include "IdeIO.asm"
     233%ifdef MODULE_IRQ
    234234    %include "IdeIrq.asm"
     235%endif
    235236%undef IDEDEVICE
    236237%undef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS
  • trunk/XTIDE_Universal_BIOS/makefile

    r397 r398  
    1919# MODULE_EBIOS              Enhanced functions for accessing drives over 8.4 GB                  #
    2020# MODULE_HOTKEYS            Hotkey Bar to boot from any drive                                    #
     21# MODULE_IRQ                IDE IRQ support                                                      #
    2122# MODULE_JRIDE              Support for JR-IDE/ISA                                               #
    2223# MODULE_SERIAL             Virtual hard disks using serial port                                 #
     
    9596DEFINES_XT = $(DEFINES_COMMON) ELIMINATE_CGA_SNOW MODULE_JRIDE MODULE_SERIAL MODULE_SERIAL_FLOPPY
    9697DEFINES_XTPLUS = $(DEFINES_COMMON) $(DEFINES_XT) USE_186
    97 DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA
     98DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA
    9899
    99100DEFINES_XT_LARGE = $(DEFINES_XT) $(DEFINES_COMMON_LARGE)
Note: See TracChangeset for help on using the changeset viewer.