Ignore:
Timestamp:
Jan 27, 2021, 9:35:47 AM (5 years ago)
Author:
Paul Smedley
Message:

Remove remaining support for non-KEE builds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/drv32/startup.asm

    r655 r667  
    10401040        extrn  ALSA_Interrupt : near
    10411041        extrn  _rdOffset: dword
    1042 
    1043 IFDEF KEE
    10441042        extrn  KernThunkStackTo16 : near
    10451043        extrn  KernThunkStackTo32 : near
    1046 ELSE
    1047         extrn  GetTKSSBase : near
    1048         extrn  StackAlloc : near
    1049         extrn  StackFree  : near
    1050 ENDIF
    10511044
    10521045;Called by Watcom to set the DS
     
    10871080        ret
    10881081DevHlp_ModifiedDS endp
    1089 
    1090 
    1091 IFNDEF KEE
    1092 ;;******************************************************************************
    1093 ;FixSelDPL:
    1094 ;
    1095 ; Set DPL of DOS32FLATDS selector to 0 or else we'll get a trap D when loading
    1096 ; it into the SS register (DPL must equal CPL when loading a selector into SS)
    1097 ;;******************************************************************************
    1098         PUBLIC FixSelDPL
    1099         ALIGN  4
    1100 FixSelDPL proc near
    1101         cmp     fWrongDPL, 1
    1102         jne     short @@fixdpl_end
    1103         cmp     SelRef, 0
    1104         jne     short @@fixdpl_endfix
    1105         push    eax
    1106         push    ebx
    1107         push    edx
    1108         sgdt    fword ptr [gdtsave]             ; access the GDT ptr
    1109         mov     ebx, dword ptr [gdtsave+2]      ; get lin addr of GDT
    1110         mov     eax, ds                         ; build offset into table
    1111         and     eax, 0fffffff8h                 ; mask away DPL
    1112         add     ebx, eax                        ; build address
    1113 
    1114         mov     eax, dword ptr [ebx+4]
    1115         mov     edx, eax
    1116         shr     edx, 13
    1117         and     edx, 3
    1118 
    1119         ;has the OS/2 kernel finally changed the DPL to 0?
    1120         cmp     edx, 0
    1121         jne     @@changedpl
    1122         mov     fWrongDPL, 0            ;don't bother anymore
    1123         mov     SelRef, 0
    1124         jmp     short @@endchange
    1125 
    1126 @@changedpl:
    1127         mov     oldDPL, eax
    1128         and     eax, NOT 6000h          ;clear bits 5 & 6 in the high word (DPL)
    1129         mov     dword ptr [ebx+4], eax
    1130 @@endchange:
    1131         pop     edx
    1132         pop     ebx
    1133         pop     eax
    1134 @@fixdpl_endfix:
    1135         inc     SelRef
    1136 @@fixdpl_end:
    1137         ret
    1138 FixSelDPL endp
    1139 ;;******************************************************************************
    1140 ; RestoreSelDPL:
    1141 ;
    1142 ;  Restore DPL of DOS32FLATDS selector or else OS/2 kernel code running in ring 3
    1143 ;  will trap (during booting only; this sel has a DPL of 0 when PM starts up)
    1144 ;;******************************************************************************
    1145         PUBLIC RestoreSelDPL
    1146         ALIGN  4
    1147 RestoreSelDPL proc near
    1148         cmp     fWrongDPL, 1
    1149         jne     short @@restdpl_end
    1150 
    1151         cmp     SelRef, 1
    1152         jne     short @@restdpl_endrest
    1153         push    eax
    1154         push    ebx
    1155         sgdt    fword ptr [gdtsave]             ; access the GDT ptr
    1156         mov     ebx, dword ptr [gdtsave+2]      ; get lin addr of GDT
    1157         mov     eax, ds                         ; build offset into table
    1158         and     eax, 0fffffff8h                 ; mask away DPL
    1159         add     ebx, eax                        ; build address
    1160 
    1161         mov     eax, oldDPL
    1162         mov     dword ptr [ebx+4], eax
    1163         pop     ebx
    1164         pop     eax
    1165 @@restdpl_endrest:
    1166         dec     SelRef
    1167 @@restdpl_end:
    1168         ret
    1169 RestoreSelDPL endp
    1170 ENDIF
    11711082
    11721083;*******************************************************************************
     
    11841095        mov  ebp, esp
    11851096        push ebx
    1186 
    11871097        lea  ebx, [ebp+8]
    11881098        DevThunkStackTo16_Int
    1189 
    11901099        push dword ptr [ebx+16]    ;param2
    11911100        push dword ptr [ebx+12]    ;param1
     
    11931102        call fword ptr [ebx]
    11941103        add  sp, 12
    1195 
    11961104        DevThunkStackTo32_Int
    1197 
    11981105        pop  ebx
    11991106        pop  ebp
     
    12151122        mov     ds, eax
    12161123        mov     es, eax
    1217 IFNDEF KEE
    1218         ;done in init.cpp for the KEE version
    1219         cmp     dword ptr [intSwitchStack], 0
    1220         jne     stratcontinue
    1221         ;get TKSSBase & intSwitchStack pointers
    1222         call    GetTKSSBase
    1223 stratcontinue:
    1224 ENDIF
    12251124        DevThunkStackTo32
    1226         cmp     eax, 0
    1227         jne     @@stackswitchfail_strat
    12281125        call    ALSA_STRATEGY
    12291126        DevThunkStackTo16
    1230 @@stackswitchfail_strat:
    12311127        pop     gs
    12321128        pop     fs
     
    12531149        mov     es, eax
    12541150        DevThunkStackTo32
    1255         cmp     eax, 0
    1256         jne     @@stackswitchfail_idc
    12571151        call    ALSA_IDC
    12581152        DevThunkStackTo16
    1259 @@stackswitchfail_idc:
    12601153        pop     gs
    12611154        pop     fs
     
    12811174ENDIF
    12821175        DevThunkStackTo32
    1283         cmp     eax, 0
    1284         jne     @@stackswitchfail_timer
    12851176        call    ALSA_TIMER_
    12861177        DevThunkStackTo16
    1287 @@stackswitchfail_timer:
    12881178IFDEF DEBUG
    12891179        add     DbgU32TimerCnt, -1
     
    13221212        ;cli
    13231213        DevThunkStackTo32
    1324         cmp     eax, 0
    1325         jne     @@stackswitchfail_irq
    13261214        ;returns irq status in eax (1=handled; 0=unhandled)
    13271215        call    ALSA_Interrupt
    13281216        DevThunkStackTo16
    1329 @@stackswitchfail_irq:
    13301217IFDEF DEBUG
    13311218                add         DbgU32IntCnt, -1
     
    15021389_RMHandleToResourceHandleList endp
    15031390
     1391; shifted from devhlp.asm
     1392        extrn  DOSIODELAYCNT : ABS
     1393        ALIGN 4
     1394        public iodelay32_
     1395iodelay32_ proc near
     1396        mov   eax, DOSIODELAYCNT
     1397        align 4
     1398@@:     dec   eax
     1399        jnz   @b
     1400        loop  iodelay32_
     1401        ret
     1402iodelay32_ endp
    15041403
    15051404CODE32 ends
     
    15301429    public  _ISR07
    15311430
    1532 IFDEF KEE
    15331431    public  stackbase
    15341432    public  stacksel
     
    15361434    stackbase dd 0
    15371435    stacksel  dd 0
    1538 ELSE
    1539     extrn   intSwitchStack : dword
    1540 
    1541     public  gdtsave
    1542     public  fWrongDPL
    1543     public  oldDPL
    1544     public  SelRef
    1545 
    1546     tempeax          dd 0
    1547     tempedx          dd 0
    1548     tempesi          dd 0
    1549     cpuflags         dd 0
    1550 
    1551     gdtsave          dq 0
    1552     fWrongDPL        dd 1       ;DOS32FLATDS has the wrong DPL for SS
    1553     SelRef           dd 0
    1554     oldDPL           dd 0
    1555 
    1556     fInitStack       dd 0
    1557 ENDIF
    15581436
    15591437    __OffsetFinalCS16 dw OFFSET CODE16:__OffFinalCS16
Note: See TracChangeset for help on using the changeset viewer.