Changeset 389
- Timestamp:
- Oct 8, 2008, 4:42:59 PM (17 years ago)
- Location:
- GPL/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/drv32/irq.cpp
r63 r389 92 92 ULONG ulIrqNo; 93 93 94 // enable interrupts that have higher priority we should 95 // allow higher priority interrupts 96 sti(); 94 97 if( process_interrupt(ulSlotNo, &ulIrqNo) ) { 98 // We've cleared all service requests. 99 // Clear (disable) Interrupts, Send EOI 100 // and clear the carry flag (tells OS/2 kernel that Int was handled). 101 // Note carry flag is handled in setup.asm 95 102 cli(); 96 // We've cleared all service requests. Send EOI and clear97 // the carry flag (tells OS/2 kernel that Int was handled).98 103 DevEOI( (WORD16)ulIrqNo ); 99 104 return TRUE; 100 }101 // Indicate Interrupt not serviced by setting carry flag before102 // returning to OS/2 kernel. OS/2 will then shut down the interrupt!103 // NOTE: Make sure interrupts are not turned on again when this irq isn't ours!104 return FALSE;105 } 106 // Indicate Interrupt not serviced by setting carry flag before 107 // returning to OS/2 kernel. OS/2 will then shut down the interrupt! 108 // NOTE: Make sure interrupts are not turned on again when this irq isn't ours! 109 return FALSE; 105 110 } 106 111 //****************************************************************************** -
GPL/trunk/drv32/startup.asm
r63 r389 1 ; $Id: startup.asm,v 1.1.1.1 2003/07/02 13:56:56 eleph Exp $ 1 ; $Id: startup.asm,v 1.1.1.1 2003/07/02 13:56:56 eleph Exp $ 2 2 ;* 3 3 ;* 16bit entrypoints to the PDD with thunks to the 32bit functions … … 42 42 public _MSG_TABLE16 43 43 public DevHelpInit 44 public fOpen 44 public fOpen 45 45 public InitPktSeg 46 46 public InitPktOff … … 165 165 cmp eax, 04h ; DosRead 166 166 je uniaud_stub_strategy 167 167 168 168 enter 0, 0 169 169 and sp, 0fffch ; align stack 170 170 171 pushad 171 pushad 172 172 push ds 173 173 push es … … 208 208 leave 209 209 ret 210 210 211 211 @@help_init: 212 212 mov eax, dword ptr es:[bx].i_devHelp … … 218 218 mov ax, STDON 219 219 jmp short @@help_ret 220 220 221 221 @@help_close: 222 222 call far ptr FLAT:HelpClose … … 235 235 and sp, 0fffch ; align stack 236 236 237 pushad 237 pushad 238 238 push ds 239 239 push es … … 251 251 push es 252 252 mov ax, bx 253 xor ebx, ebx 253 xor ebx, ebx 254 254 mov bx, ax 255 255 mov ax, es … … 328 328 ; device_init 329 329 ; 330 ; Use DosOpen to tell the 1st driver to handle init for us. We must do it this 330 ; Use DosOpen to tell the 1st driver to handle init for us. We must do it this 331 331 ; way since right now our CPL is 3 and the flat code selector has DPL 0, so 332 332 ; we can't load it. In the open strategy request, CPL is 0 … … 600 600 call near ptr _CallRM 601 601 mov sp,bp 602 ret16 602 ret16 603 603 DeAllocL1: test byte ptr _RMFlags,02H 604 604 je short DeAllocL2 605 605 sub ax,ax 606 ret16 606 ret16 607 607 DeAllocL2: mov ax,0001H 608 ret16 608 ret16 609 609 _RMDeallocResourceOrg endp 610 610 … … 622 622 623 623 ALIGN 2 624 PUBLIC MY_DEVHELP_ATTACHDD 624 PUBLIC MY_DEVHELP_ATTACHDD 625 625 MY_DEVHELP_ATTACHDD proc near 626 626 push bp … … 638 638 pop es 639 639 pop di 640 leave 640 leave 641 641 ret 0004H 642 642 L2: pop es 643 643 pop di 644 leave 644 leave 645 645 ret 0004H 646 646 MY_DEVHELP_ATTACHDD endp … … 659 659 call near ptr _CallRM 660 660 add sp,0006H 661 ret16 661 ret16 662 662 CreateDrL4: test byte ptr _RMFlags,02H 663 663 je short CreateDrL6 … … 670 670 pop bx 671 671 pop es 672 ret16 672 ret16 673 673 CreateDrL6: mov ax, word ptr DevHelpInit + 2H 674 674 or ax, word ptr DevHelpInit 675 675 jne short CreateDrL7 676 676 mov ax,0008H 677 ret16 677 ret16 678 678 CreateDrL7: push offset ResMgr 679 679 push offset _RMIDCTable … … 708 708 709 709 ALIGN 2 710 PUBLIC _CallRM 710 PUBLIC _CallRM 711 711 _CallRM proc near 712 712 enter 0002H,00H … … 719 719 call dword ptr _RM_Help3 720 720 add sp,0006H 721 leave 721 leave 722 722 ret 723 723 L1: push word ptr +6H[bp] 724 724 call dword ptr _RM_Help0 725 leave 725 leave 726 726 ret 727 727 _CallRM endp … … 733 733 pop word ptr -2H[bp] 734 734 mov ax,word ptr -2H[bp] 735 leave 736 ret 735 leave 736 ret 737 737 _GetCS endp 738 738 … … 754 754 je short DestroyDrvL2 755 755 sub ax,ax 756 ret16 756 ret16 757 757 DestroyDrvL2: mov ax,0001H 758 758 ret16 … … 788 788 GetNodeInfo_L1: mov ax,0014H 789 789 ret16 790 nop 790 nop 791 791 GetNodeInfo_L2: test byte ptr _RMFlags,02H 792 792 je short GetNodeInfo_L3 … … 799 799 ALIGN 2 800 800 PUBLIC _RMGetNodeInfo16 801 _RMGetNodeInfo16 proc far 801 _RMGetNodeInfo16 proc far 802 802 enter32 803 803 xor eax, eax 804 push word ptr [bp+18] ;pushed as dword by watcom 805 push dword ptr [bp+14] 804 push word ptr [bp+18] ;pushed as dword by watcom 805 push dword ptr [bp+14] 806 806 push dword ptr [bp+10] 807 807 call _RMGetNodeInfoOrg … … 825 825 mov sp,bp 826 826 ret16 827 RMDevIDToHandleList_L1: 827 RMDevIDToHandleList_L1: 828 828 mov ax,0014H 829 829 ret16 830 nop 831 RMDevIDToHandleList_L2: 830 nop 831 RMDevIDToHandleList_L2: 832 832 test byte ptr _RMFlags,02H 833 833 je short RMDevIDToHandleList_L3 834 834 sub ax,ax 835 835 ret16 836 nop 837 RMDevIDToHandleList_L3: 836 nop 837 RMDevIDToHandleList_L3: 838 838 mov ax,0001H 839 839 ret16 840 nop 840 nop 841 841 _RMDevIDToHandleListOrg endp 842 842 843 843 ALIGN 2 844 844 PUBLIC _RMDevIDToHandleList16 845 _RMDevIDToHandleList16 proc far 845 _RMDevIDToHandleList16 proc far 846 846 enter32 847 847 xor eax, eax … … 874 874 call near ptr _CallRM 875 875 ret16 876 nop 876 nop 877 877 RMHandleToResourceHandleList_L1: 878 878 mov ax,0014H 879 879 ret16 880 nop 880 nop 881 881 RMHandleToResourceHandleList_L2: 882 882 test byte ptr _RMFlags,02H … … 884 884 sub ax,ax 885 885 ret16 886 nop 886 nop 887 887 RMHandleToResourceHandleList_L3: 888 888 mov ax,0001H 889 889 ret16 890 nop 890 nop 891 891 _RMHandleToResourceHandleListOrg endp 892 892 893 893 ALIGN 2 894 894 PUBLIC _RMHandleToResourceHandleList16 895 _RMHandleToResourceHandleList16 proc far 895 _RMHandleToResourceHandleList16 proc far 896 896 enter32 897 897 xor eax, eax … … 985 985 public __GETDS 986 986 public thunk1632_devhelp 987 public thunk1632_devhelp_modified_ds 987 public thunk1632_devhelp_modified_ds 988 988 public DevHlp 989 989 public DevHlp_ModifiedDS … … 1082 1082 shr edx, 13 1083 1083 and edx, 3 1084 1084 1085 1085 ;has the OS/2 kernel finally changed the DPL to 0? 1086 1086 cmp edx, 0 … … 1089 1089 mov SelRef, 0 1090 1090 jmp short @@endchange 1091 1091 1092 1092 @@changedpl: 1093 1093 mov oldDPL, eax … … 1101 1101 inc SelRef 1102 1102 @@fixdpl_end: 1103 ret 1104 FixSelDPL endp 1103 ret 1104 FixSelDPL endp 1105 1105 ;;****************************************************************************** 1106 1106 ; RestoreSelDPL: … … 1114 1114 cmp fWrongDPL, 1 1115 1115 jne short @@restdpl_end 1116 1116 1117 1117 cmp SelRef, 1 1118 1118 jne short @@restdpl_endrest … … 1138 1138 ;******************************************************************************* 1139 1139 ;Copy parameters to 16 bits stack and call 16:32 IDC handler 1140 ; 1140 ; 1141 1141 ; Paramters: IDC16_HANDLER pHandler 1142 1142 ; ULONG cmd … … 1159 1159 call fword ptr [ebx] 1160 1160 add sp, 12 1161 1161 1162 1162 DevThunkStackTo32_Int 1163 1163 … … 1173 1173 ;******************************************************************************* 1174 1174 ALIGN 4 1175 STRATEGY_ proc far 1175 STRATEGY_ proc far 1176 1176 push ds 1177 1177 push es … … 1198 1198 cmp eax, 0 1199 1199 jne @@stackswitchfail_strat 1200 1200 1201 1201 call ALSA_STRATEGY 1202 1202 … … 1224 1224 ;******************************************************************************* 1225 1225 ALIGN 4 1226 IDC_ proc far 1226 IDC_ proc far 1227 1227 push ds 1228 1228 push es … … 1261 1261 ;******************************************************************************* 1262 1262 ALIGN 4 1263 TIMER_ proc far 1263 TIMER_ proc far 1264 1264 push ds 1265 1265 push es … … 1316 1316 1317 1317 pushfd 1318 cli 1318 1319 ; At this point a cli is redundant 1320 ; we enter the interrupt handler with interrupts disabled. 1321 ;cli 1319 1322 1320 1323 IFDEF FLATSTACK … … 1327 1330 1328 1331 DevThunkStackTo16 1329 1332 1330 1333 @@stackswitchfail_irq: 1331 1334 ELSE … … 1346 1349 1347 1350 endofirq: 1348 1351 1349 1352 pop gs 1350 1353 pop fs … … 1358 1361 1359 1362 ALIGN 4 1360 HelpClose proc far 1363 HelpClose proc far 1361 1364 push ds 1362 1365 mov eax, DOS32FLATDS … … 1459 1462 enterKEERM 1460 1463 xor eax, eax 1461 push dword ptr [edi+16] 1462 push dword ptr [edi+12] 1464 push dword ptr [edi+16] 1465 push dword ptr [edi+12] 1463 1466 push dword ptr [edi+8] 1464 1467 call fword ptr RMGetNodeInfo1632 … … 1532 1535 1533 1536 stackbase dd 0 1534 stacksel dd 0 1537 stacksel dd 0 1535 1538 ELSE 1536 1539 … … 1558 1561 _MSG_TABLE32 dw OFFSET DATA16:_MSG_TABLE16 1559 1562 dw SEG DATA16:_MSG_TABLE16 1560 1561 ;16:16 address of driver name 1563 1564 ;16:16 address of driver name 1562 1565 PDDName dw OFFSET DATA16:pddname16 1563 1566 dw SEG DATA16:pddname16 -
GPL/trunk/lib32/irq.c
r346 r389 200 200 rc = pSlot->irqHandlers[u].handler(pSlot->irqNo, 201 201 pSlot->irqHandlers[u].x2, 0); 202 203 // HDA Hardware generates controller interrupts and stream interrupts 204 // the uniaud16 driver only cares about stream interrupts. 205 // azx_process_interrupt will return rc 2 if the interttupt is from the 206 // controller. There is no need to call uniaud16 for these interrupts 207 if ( rc == 2 ) { 208 fInInterrupt = FALSE; 209 *pulIrq = pSlot->irqNo; 210 eoiIrq[pSlot->irqNo] = 0; 211 return TRUE; 212 } 213 202 214 if (rc == 1) eoi_irq(pSlot->irqNo); 203 215 rc = (eoiIrq[pSlot->irqNo] > 0);
Note:
See TracChangeset
for help on using the changeset viewer.