Rev 406 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 406 | Rev 412 | ||
---|---|---|---|
Line 283... | Line 283... | ||
283 | end if |
283 | end if |
284 | call init_controller |
284 | call init_controller |
285 | test eax, eax |
285 | test eax, eax |
286 | jz .fail |
286 | jz .fail |
287 | jmp .fail ;force fail |
- | |
Line -... | Line 287... | ||
- | 287 | ||
Line 288... | Line 288... | ||
288 | 288 | jmp .fail ;force fail |
|
289 | 289 | ||
290 | if DEBUG |
290 | if DEBUG |
291 | mov esi, msgInitCodec |
291 | mov esi, msgInitCodec |
Line 607... | Line 607... | ||
607 | mov esi, msgIObase |
607 | mov esi, msgIObase |
608 | call SysMsgBoardStr |
608 | call SysMsgBoardStr |
Line 609... | Line 609... | ||
609 | 609 | ||
610 | stdcall PciRead32, [ctrl.bus], [ctrl.devfn], dword 0x10 |
610 | stdcall PciRead32, [ctrl.bus], [ctrl.devfn], dword 0x10 |
611 | and eax,0xFFFE |
611 | ; and eax, -16 |
Line 612... | Line 612... | ||
612 | mov [ctrl.codec_io_base], eax |
612 | mov [ctrl.ctrl_io_base], eax |
613 | 613 | ||
Line 614... | Line 614... | ||
614 | call dword2str |
614 | call dword2str |
615 | call SysMsgBoardStr |
615 | call SysMsgBoardStr |
Line 616... | Line 616... | ||
616 | 616 | ||
617 | mov esi, msgIntline |
617 | mov esi, msgIRQline |
618 | call SysMsgBoardStr |
618 | call SysMsgBoardStr |
Line 644... | Line 644... | ||
644 | mov [ctrl.ctrl_write32], ctrl_io_w32 ;virtual |
644 | mov [ctrl.ctrl_write32], ctrl_io_w32 ;virtual |
645 | ret |
645 | ret |
646 | endp |
646 | endp |
647 | 647 | ||
Line 648... | Line -... | ||
648 | PG_SW equ 0x003 |
- | |
649 | PG_NOCACHE equ 0x018 |
- | |
650 | - | ||
651 | - | ||
652 | align 4 |
648 | align 4 |
653 | proc reset_controller |
649 | proc reset_controller |
Line 654... | Line 650... | ||
654 | 650 | ||
655 | xor eax, eax |
651 | xor eax, eax |
Line 1055... | Line 1051... | ||
1055 | ; CONTROLLER IO functions |
1051 | ; CONTROLLER IO functions |
1056 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1052 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1057 | 1053 | ||
Line 1058... | Line 1054... | ||
1058 | align 4 |
1054 | align 4 |
1059 | proc codec_io_r16 |
1055 | codec_io_r16: |
1060 | add edx, [ctrl.codec_io_base] |
1056 | add edx, [ctrl.codec_io_base] |
1061 | in ax, dx |
1057 | in ax, dx |
1062 | ret |
1058 | ret |
1063 | endp |
- | |
Line 1064... | Line 1059... | ||
1064 | 1059 | ||
1065 | align 4 |
1060 | align 4 |
1066 | proc codec_io_w16 |
1061 | codec_io_w16: |
1067 | add edx, [ctrl.codec_io_base] |
1062 | add edx, [ctrl.codec_io_base] |
1068 | out dx, ax |
1063 | out dx, ax |
1069 | ret |
- | |
Line 1070... | Line 1064... | ||
1070 | endp |
1064 | ret |
1071 | 1065 | ||
1072 | align 4 |
1066 | align 4 |
1073 | proc ctrl_io_r8 |
1067 | ctrl_io_r8: |
1074 | add edx, [ctrl.ctrl_io_base] |
1068 | add edx, [ctrl.ctrl_io_base] |
1075 | in al, dx |
- | |
Line 1076... | Line 1069... | ||
1076 | ret |
1069 | in al, dx |
1077 | endp |
1070 | ret |
1078 | 1071 | ||
1079 | align 4 |
1072 | align 4 |
1080 | proc ctrl_io_r16 |
1073 | ctrl_io_r16: |
1081 | add edx, [ctrl.ctrl_io_base] |
- | |
Line 1082... | Line 1074... | ||
1082 | in ax, dx |
1074 | add edx, [ctrl.ctrl_io_base] |
1083 | ret |
1075 | in ax, dx |
1084 | endp |
1076 | ret |
1085 | 1077 | ||
1086 | align 4 |
1078 | align 4 |
1087 | proc ctrl_io_r32 |
- | |
Line 1088... | Line 1079... | ||
1088 | add edx, [ctrl.ctrl_io_base] |
1079 | ctrl_io_r32: |
1089 | in eax, dx |
1080 | add edx, [ctrl.ctrl_io_base] |
1090 | ret |
1081 | in eax, dx |
1091 | endp |
1082 | ret |
1092 | 1083 | ||
1093 | align 4 |
- | |
Line 1094... | Line 1084... | ||
1094 | proc ctrl_io_w8 |
1084 | align 4 |
1095 | add edx, [ctrl.ctrl_io_base] |
1085 | ctrl_io_w8: |
1096 | out dx, al |
1086 | add edx, [ctrl.ctrl_io_base] |
1097 | ret |
1087 | out dx, al |
1098 | endp |
1088 | ret |
1099 | - | ||
Line 1100... | Line 1089... | ||
1100 | align 4 |
1089 | |
1101 | proc ctrl_io_w16 |
1090 | align 4 |
1102 | add edx, [ctrl.ctrl_io_base] |
1091 | ctrl_io_w16: |
1103 | out dx, ax |
1092 | add edx, [ctrl.ctrl_io_base] |
1104 | ret |
1093 | out dx, ax |
1105 | endp |
- | |
Line 1106... | Line 1094... | ||
1106 | 1094 | ret |
|
1107 | align 4 |
1095 | |
1108 | proc ctrl_io_w32 |
1096 | align 4 |
Line 1136... | Line 1124... | ||
1136 | devices dd (0x5000 shl 16)+0x1274,msgEnsoniq,set_ICH |
1124 | devices dd (0x5000 shl 16)+0x1274,msgEnsoniq,set_ICH |
1137 | dd (0x5880 shl 16)+0x1274,msgVibra128,set_ICH |
1125 | dd (0x5880 shl 16)+0x1274,msgVibra128,set_ICH |
1138 | dd 0 ;terminator |
1126 | dd 0 ;terminator |
1139 | 1127 | ||
Line 1140... | Line 1128... | ||
1140 | version dd 0x00040000 |
1128 | version dd 0x00040004 |
Line 1141... | Line 1129... | ||
1141 | 1129 | ||
1142 | msgEnsoniq db 'Ensonic 1371',0 |
1130 | msgEnsoniq db 'Ensonic 1371',13,10,0 |
Line 1143... | Line 1131... | ||
1143 | msgVibra128 db 'Sound Blaster AudioPCI Vibra 128',0 |
1131 | msgVibra128 db 'Sound Blaster AudioPCI Vibra 128',13,10,0 |
Line 1144... | Line 1132... | ||
1144 | 1132 | ||
1145 | sz_sound_srv db 'SOUND',0 |
1133 | sz_sound_srv db 'SOUND',0 |
Line 1166... | Line 1154... | ||
1166 | msgStatus db 'global status ',0 |
1154 | msgStatus db 'global status ',0 |
1167 | msgControl db 'global control ',0 |
1155 | msgControl db 'global control ',0 |
1168 | msgPCIcmd db 'PCI command ',0 |
1156 | msgPCIcmd db 'PCI command ',0 |
1169 | msgIObase db 'IO base ',0 |
1157 | msgIObase db 'IO base ',0 |
1170 | msgIntline db 'Interrupt line ',0 |
1158 | msgIRQline db 'IRQ line ',0 |
1171 | 1159 | ||
Line 1172... | Line 1160... | ||
1172 | section '.data' data readable writable align 16 |
1160 | section '.data' data readable writable align 16 |
Line 1173... | Line 1161... | ||
1173 | 1161 | ||
1174 | pcmout_bdl rq 32 |
1162 | pcmout_bdl rq 32 |