Changeset 518 for GPL/trunk/drv32
- Timestamp:
- Jul 20, 2010, 5:46:55 PM (15 years ago)
- Location:
- GPL/trunk/drv32
- Files:
-
- 4 edited
-
init.c (modified) (1 diff)
-
irq.cpp (modified) (2 diffs)
-
rmhelp.cpp (modified) (2 diffs)
-
strategy.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/drv32/init.c
r502 r518 218 218 } 219 219 if (!HeapInit(HEAP_SIZE)) { 220 dprintf(("HeapInit failed!"));220 rprintf(("HeapInit failed!")); 221 221 } 222 222 -
GPL/trunk/drv32/irq.cpp
r458 r518 67 67 BYTE LowIRQ; 68 68 BYTE HighIRQ; 69 BYTE Pin; 69 BYTE Pin; 70 70 } sISRHigh[8]; //FIX me to MAX_DEVICES or same 71 71 … … 136 136 ULONG ulIrqNo; 137 137 138 // enable interrupts that have higher priority we should 138 // enable interrupts that have higher priority we should 139 139 // allow higher priority interrupts 140 sti(); 140 sti(); 141 141 if( process_interrupt(ulSlotNo, &ulIrqNo) ) { 142 // We've cleared all service requests. 143 // Clear (disable) Interrupts, Send EOI 142 // We've cleared all service requests. 143 // Clear (disable) Interrupts, Send EOI 144 144 // and clear the carry flag (tells OS/2 kernel that Int was handled). 145 // Note carry flag is handled in setup.asm 145 // Note carry flag is handled in setup.asm 146 146 cli(); 147 147 DevEOI( (WORD16)ulIrqNo ); -
GPL/trunk/drv32/rmhelp.cpp
r421 r518 150 150 //****************************************************************************** 151 151 //PS+++ see to irq.cpp 152 #ifdef ACPI 152 #ifdef ACPI 153 153 #ifdef __cplusplus 154 154 extern "C" { … … 159 159 BYTE LowIRQ; 160 160 BYTE HighIRQ; 161 BYTE Pin; 161 BYTE Pin; 162 162 }; 163 163 extern struct SaveIRQForSlot sISRHigh[]; -
GPL/trunk/drv32/strategy.c
r501 r518 24 24 25 25 #define INCL_NOPMAPI 26 #define INCL_DOSINFOSEG // Need Global info seg in rm.cpp algorithms26 #define INCL_DOSINFOSEG // Need Global info seg in rm.cpp algorithms 27 27 #include <os2.h> 28 28 … … 51 51 } 52 52 numOS2Opens++; 53 return RPDONE;53 return RPDONE; 54 54 } 55 55 //****************************************************************************** … … 66 66 ULONG StratInit(RP __far* _rp) 67 67 { 68 ULONG rc;69 70 RPInit __far* rp = (RPInit __far*)_rp;71 rc = DiscardableInit(rp);72 dprintf(("StratInit End rc=%d", rc));73 return rc;68 ULONG rc; 69 70 RPInit __far* rp = (RPInit __far*)_rp; 71 rc = DiscardableInit(rp); 72 dprintf(("StratInit End rc=%d", rc)); 73 return rc; 74 74 } 75 75 //****************************************************************************** … … 77 77 #ifdef ACPI 78 78 // See desription in irq.cpp 79 #include "irqos2.h" //PS+++79 #include "irqos2.h" //PS+++ 80 80 #ifdef __cplusplus 81 81 extern "C" { 82 82 #endif 83 ULONG InitCompleteWas = 0; //PS+++ Indication of InitComplete call83 ULONG InitCompleteWas = 0; //PS+++ Indication of InitComplete call 84 84 struct SaveIRQForSlot 85 85 { 86 ULONG ulSlotNo;87 BYTE LowIRQ;88 BYTE HighIRQ;89 BYTE Pin;86 ULONG ulSlotNo; 87 BYTE LowIRQ; 88 BYTE HighIRQ; 89 BYTE Pin; 90 90 }; 91 91 extern struct SaveIRQForSlot sISRHigh[]; 92 extern int SaveIRQCounter;92 extern int SaveIRQCounter; 93 93 #ifdef __cplusplus 94 94 } … … 102 102 #ifdef ACPI 103 103 //PS+++ Begin 104 ULONG i, rc = 0;105 106 InitCompleteWas = 1;107 for (i = 0; i < SaveIRQCounter; i++)108 {109 dprintf(("Close IRQ%d - Open IRQ%d",(ULONG)sISRHigh[i].LowIRQ,(ULONG)sISRHigh[i].HighIRQ));110 if (sISRHigh[i].HighIRQ)111 {112 ALSA_FreeIrq(sISRHigh[i].LowIRQ);113 if (!ALSA_SetIrq(sISRHigh[i].HighIRQ, sISRHigh[i].ulSlotNo, 1))114 {115 return (RPERR_COMMAND | RPDONE);116 }117 }118 }104 ULONG i, rc = 0; 105 106 InitCompleteWas = 1; 107 for (i = 0; i < SaveIRQCounter; i++) 108 { 109 dprintf(("Close IRQ%d - Open IRQ%d",(ULONG)sISRHigh[i].LowIRQ,(ULONG)sISRHigh[i].HighIRQ)); 110 if (sISRHigh[i].HighIRQ) 111 { 112 ALSA_FreeIrq(sISRHigh[i].LowIRQ); 113 if (!ALSA_SetIrq(sISRHigh[i].HighIRQ, sISRHigh[i].ulSlotNo, 1)) 114 { 115 return (RPERR_COMMAND | RPDONE); 116 } 117 } 118 } 119 119 #endif 120 120 //PS++ End 121 #ifdef DEBUG 122 dprintf(("StratInitComplete")); 123 #endif 121 dprintf(("StratInitComplete")); 124 122 return(RPDONE); 125 123 } … … 130 128 #pragma on (unreferenced) 131 129 { 132 RPShutdown __far *rp = (RPShutdown __far *)_rp; 133 134 #ifdef DEBUG 135 dprintf(("StratShutdown %d", rp->Function)); 136 #endif 137 if(rp->Function == 1) {//end of shutdown 138 OSS32_Shutdown(); 139 } 130 RPShutdown __far *rp = (RPShutdown __far *)_rp; 131 132 dprintf(("StratShutdown Start %d", rp->Function)); 133 if(rp->Function == 1) {//end of shutdown 134 OSS32_Shutdown(); 135 } 136 dprintf(("StratShutdown End")); 140 137 return(RPDONE); 141 138 } … … 155 152 RPHandler StratDispatch[] = 156 153 { 157 StratInit, // 00 (BC): Initialization158 StratError, // 01 (B ): Media check159 StratError, // 02 (B ): Build BIOS parameter block160 StratError, // 03 ( ): Unused161 StratRead, // 04 (BC): Read162 StratError, // 05 ( C): Nondestructive read with no wait163 StratError, // 06 ( C): Input status164 StratError, // 07 ( C): Input flush165 StratWrite, // 08 (BC): Write166 StratError, // 09 (BC): Write verify167 StratError, // 0A ( C): Output status168 StratError, // 0B ( C): Output flush169 StratError, // 0C ( ): Unused170 StratOpen, // 0D (BC): Open171 StratClose, // 0E (BC): Close172 StratError, // 0F (B ): Removable media check173 StratIOCtl, // 10 (BC): IO Control174 StratError, // 11 (B ): Reset media175 StratError, // 12 (B ): Get logical unit176 StratError, // 13 (B ): Set logical unit177 StratError, // 14 ( C): Deinstall character device driver178 StratError, // 15 ( ): Unused179 StratError, // 16 (B ): Count partitionable fixed disks180 StratError, // 17 (B ): Get logical unit mapping of fixed disk181 StratError, // 18 ( ): Unused182 StratError, // 19 ( ): Unused183 StratError, // 1A ( ): Unused184 StratError, // 1B ( ): Unused185 StratShutdown, // 1C (BC): Notify start or end of system shutdown186 StratError, // 1D (B ): Get driver capabilities187 StratError, // 1E ( ): Unused188 StratInitComplete // 1F (BC): Notify end of initialization154 StratInit, // 00 (BC): Initialization 155 StratError, // 01 (B ): Media check 156 StratError, // 02 (B ): Build BIOS parameter block 157 StratError, // 03 ( ): Unused 158 StratRead, // 04 (BC): Read 159 StratError, // 05 ( C): Nondestructive read with no wait 160 StratError, // 06 ( C): Input status 161 StratError, // 07 ( C): Input flush 162 StratWrite, // 08 (BC): Write 163 StratError, // 09 (BC): Write verify 164 StratError, // 0A ( C): Output status 165 StratError, // 0B ( C): Output flush 166 StratError, // 0C ( ): Unused 167 StratOpen, // 0D (BC): Open 168 StratClose, // 0E (BC): Close 169 StratError, // 0F (B ): Removable media check 170 StratIOCtl, // 10 (BC): IO Control 171 StratError, // 11 (B ): Reset media 172 StratError, // 12 (B ): Get logical unit 173 StratError, // 13 (B ): Set logical unit 174 StratError, // 14 ( C): Deinstall character device driver 175 StratError, // 15 ( ): Unused 176 StratError, // 16 (B ): Count partitionable fixed disks 177 StratError, // 17 (B ): Get logical unit mapping of fixed disk 178 StratError, // 18 ( ): Unused 179 StratError, // 19 ( ): Unused 180 StratError, // 1A ( ): Unused 181 StratError, // 1B ( ): Unused 182 StratShutdown, // 1C (BC): Notify start or end of system shutdown 183 StratError, // 1D (B ): Get driver capabilities 184 StratError, // 1E ( ): Unused 185 StratInitComplete // 1F (BC): Notify end of initialization 189 186 }; 190 187 //****************************************************************************** … … 199 196 { 200 197 if (rp->Command < sizeof(StratDispatch)/sizeof(StratDispatch[0])) 201 return(StratDispatch[rp->Command](rp));198 return(StratDispatch[rp->Command](rp)); 202 199 else return(RPERR_COMMAND | RPDONE); 203 200 }
Note:
See TracChangeset
for help on using the changeset viewer.
