init.c
上传用户:qiulin1960
上传日期:2013-10-16
资源大小:2844k
文件大小:15k
源码类别:

Windows CE

开发平台:

Windows_Unix

  1. /*++
  2. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3. ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5. PARTICULAR PURPOSE.
  6. Copyright (c) 2002. Samsung Electronics, co. ltd  All rights reserved.
  7. [Updates]
  8. 2003.03.14 PCMCIA Wakeup fixed. jylee
  9. --*/
  10. #include <windows.h>
  11. #include <types.h>
  12. #include <cardserv.h>
  13. #include <sockserv.h>
  14. #include <sockpd.h>
  15. #include <ceddk.h>
  16. //#include <pc.h>
  17. #include <nkintr.h>
  18. #include <oalintr.h>
  19. #include <S2440.h> 
  20. #include <pd6710.h>
  21. #include <drv_glob.h>
  22. extern VOID InitSocketNoCard(UINT uSocket);
  23. //void PD_DataBackup();
  24. void PD_DataRestore();
  25. DWORD gIntrPcmciaState = SYSINTR_PCMCIA_STATE;
  26. DWORD gIntrPcmciaLevel = SYSINTR_PCMCIA_LEVEL;
  27. DWORD g_Irq = 3;        // fixed by S3C2440 development platform
  28. volatile PUCHAR g_PCICIndex;
  29. volatile PUCHAR g_PCICData;
  30. CRITICAL_SECTION g_PCIC_Crit;
  31. volatile IOPreg *v_pIOPRegs;
  32. volatile MEMreg *v_pMEMRegs;
  33. volatile PUCHAR *v_pPCMCIAPort;  
  34. // be written by fwood for wake-up
  35. //volatile IOPreg IOPRegs_bak;
  36. //volatile MEMreg MEMRegs_bak;
  37. // when power up, restore datas
  38. // by shlim
  39. void PD_DataRestore()
  40. {
  41. UINT8 tmp;
  42. // Register Restore for wake-up
  43. // Initialize S3C2440 for PD6710           
  44. // EINT3(GPF3) is enabled.
  45. v_pIOPRegs->rGPFCON = (v_pIOPRegs->rGPFCON & ~(0x3<<6)) | (0x2<<6); 
  46. // EINT3 is PULLUP enabled.
  47. v_pIOPRegs->rGPFUP = (v_pIOPRegs->rGPFUP & ~(0x1<<3));              
  48. // EINT8(GPG0) is enabled.
  49. v_pIOPRegs->rGPGCON = (v_pIOPRegs->rGPGCON & ~(0x3<<0)) | (0x2<<0); 
  50. // EINT8 is *not* PULLUP enabled.
  51. //v_pIOPRegs->rGPGUP = (v_pIOPRegs->rGPGUP | (0x1<<0));
  52. // jylee
  53. v_pIOPRegs->rGPGUP = (v_pIOPRegs->rGPGUP & ~(0x1<<0)); // pullup enabled
  54. // nGCS2=nUB/nLB(nSBHE),nWAIT,16-bit
  55. v_pMEMRegs->rBWSCON = (v_pMEMRegs->rBWSCON & ~(0xf<<8)) | (0xd<<8); 
  56. // BANK2 access timing
  57. v_pMEMRegs->rBANKCON2 = ((B6710_Tacs<<13)+(B6710_Tcos<<11)+(B6710_Tacc<<8)+(B6710_Tcoh<<6)
  58. +(B6710_Tah<<4)+(B6710_Tacp<<2)+(B6710_PMC));
  59. //v_pIOPRegs->rEINTMASK |= (1<<8);
  60. v_pIOPRegs->rEXTINT1=(v_pIOPRegs->rEXTINT1 & ~(0xf<<0)) | (0x2<<0);  // EINT8 : falling edge trigger
  61. v_pIOPRegs->rEXTINT0=(v_pIOPRegs->rEXTINT0 & ~(0xf<<12)) | (0x2<<12);  // EINT3 : falling edge trigger
  62. v_pIOPRegs->rEINTMASK &= ~(1<<8);
  63. g_PCICIndex = ((volatile PUCHAR)((ULONG)v_pPCMCIAPort+0x3e0));
  64. g_PCICData  = ((volatile PUCHAR)((ULONG)v_pPCMCIAPort+0x3e1));
  65. //
  66. // 0x3E0 is the standard Intel compatible socket controller I/O port.
  67. //
  68. PCICIndex(0, REG_CHIP_REVISION);
  69. tmp = PCICDataRead();
  70. if ((tmp != 0x83) && (tmp != 0x82)) {
  71. DEBUGMSG(1,
  72. (TEXT("PDCardInitServices CHIP_REVISION = 0x%x, expected = 0x83 !!!rn"), tmp));
  73. return ;
  74. }
  75. // otput2card_disable, AUTO_POWER, VCC_POWER_OFF,Vpp1=0V
  76. PCICIndex(0, REG_POWER_CONTROL);
  77. PCICDataWrite((0<<7) | (1<<5) | (0<<4) | (0<<0));
  78. // INPACK_ignored,speak_enable,edge_irq_intr,edge_management_intr,nVCC_3_enabled(temp)
  79. PCICIndex(0, REG_GENERAL_CONTROL);
  80. // Management int, System int -> edge triggering(PULSE)  
  81. //  PCICDataWrite(MISC1_VCC_33|MISC1_PM_IRQ|MISC1_PS_IRQ|MISC1_SPK_ENABLE);
  82. // Management int -> edge triggering(PULSE), System int -> LEVEL triggering 
  83. PCICDataWrite(MISC1_VCC_33|MISC1_PM_IRQ|MISC1_SPK_ENABLE);
  84. // 25Mhz_bypass,low_power_dynamic,IRQ12=drive_LED
  85. PCICIndex(0, REG_GLOBAL_CONTROL);
  86. //  PCICDataWrite(MISC2_BFS|MISC2_LOW_POWER_MODE|MISC2_LED_ENABLE);
  87. PCICDataWrite(MISC2_LOW_POWER_MODE|MISC2_LED_ENABLE);
  88. // before configuring timing register, FIFO should be cleared.
  89. PCICIndex(0, REG_FIFO_CTRL);
  90. PCICDataWrite(FIFO_EMPTY_WRITE);    //Flush FIFO
  91. //default access time is 300ns
  92. PCICIndex(0, REG_SETUP_TIMING0);
  93. PCICDataWrite(5);                   //80ns(no spec)
  94. PCICIndex(0, REG_CMD_TIMING0);
  95. PCICDataWrite(20);                  //320ns(by spec,25Mhz clock)
  96. PCICIndex(0, REG_RECOVERY_TIMING0);
  97. PCICDataWrite(5);                   //80ns(no spec)
  98. //default access time is 300ns
  99. PCICIndex(0, REG_SETUP_TIMING1);
  100. PCICDataWrite(2);                   //80ns(no spec)
  101. PCICIndex(0, REG_CMD_TIMING1);
  102. PCICDataWrite(8);                   //320ns(by spec,25Mhz clock)
  103. PCICIndex(0, REG_RECOVERY_TIMING1);
  104. PCICDataWrite(2);                   //80ns(no spec)
  105. PCICIndex(0, REG_CHIP_INFO);
  106. PCICDataWrite(0);
  107. PCICIndex(0, REG_CHIP_REVISION);
  108. tmp = PCICDataRead();
  109. RETAILMSG(0, (TEXT("PDCardInitServices REG_CHIP_REVISION = 0x%xrn"), tmp));
  110. DEBUGMSG(1, (TEXT("InitSocketNoCard(0) is calledrn")));
  111. // InitSocketNoCard(0);
  112. }
  113. //
  114. // The PCMCIA MDD calls PDCardInitServices to initialize the PDD layer.
  115. //
  116. STATUS
  117. PDCardInitServices(DWORD dwInfo)
  118. {
  119. UINT8 tmp;
  120.  
  121. DEBUGMSG (1,(TEXT("++PDCardInitServicesnr")));
  122. // Since the single PCMCIA slot can be used for download/KITL, we need to check to see if it's in use supporting a KITL
  123. // NIC.  If so, we shouldn't proceed with PCMCIA initialization.
  124. //
  125. // Allocate PCMCIA buffers.
  126. v_pIOPRegs = VirtualAlloc(0, sizeof(IOPreg), MEM_RESERVE, PAGE_NOACCESS);
  127. if (v_pIOPRegs == NULL) 
  128. {
  129. DEBUGMSG (1,(TEXT("v_pIOPRegs is not allocatednr")));
  130. goto pcis_fail;
  131. }
  132. if (!VirtualCopy((PVOID)v_pIOPRegs, (PVOID)IOP_BASE, sizeof(IOPreg), PAGE_READWRITE|PAGE_NOCACHE)) {
  133. DEBUGMSG (1,(TEXT("v_pIOPRegs is not mappednr")));
  134. goto pcis_fail;
  135. }
  136. DEBUGMSG (1,(TEXT("v_pIOPRegs is mapped to %xnr"), v_pIOPRegs));
  137. v_pMEMRegs = VirtualAlloc(0,sizeof(MEMreg), MEM_RESERVE,PAGE_NOACCESS);
  138. if(v_pMEMRegs == NULL) 
  139. {
  140. DEBUGMSG (1,(TEXT("v_pMEMRegs is not allocatednr")));
  141. goto pcis_fail;
  142. }
  143. if(!VirtualCopy((PVOID)v_pMEMRegs,(PVOID)MEMCTRL_BASE,sizeof(MEMreg), PAGE_READWRITE|PAGE_NOCACHE)) {
  144. DEBUGMSG (1,(TEXT("v_pMEMRegs is not mappednr")));
  145. goto pcis_fail;
  146. }    
  147. DEBUGMSG (1,(TEXT("v_pMEMRegs is mapped to %xnr"), v_pMEMRegs));
  148. v_pPCMCIAPort = VirtualAlloc(0, 0x0400, MEM_RESERVE,PAGE_NOACCESS);
  149. if(v_pPCMCIAPort == NULL) 
  150. {
  151. DEBUGMSG (1,(TEXT("v_pPCMCIAPort is not allocatednr")));
  152. goto pcis_fail;
  153. }
  154. if(!VirtualCopy((PVOID)v_pPCMCIAPort,(PVOID)PD6710_IO_BASE_ADDRESS, 0x0400, PAGE_READWRITE|PAGE_NOCACHE)) {
  155. DEBUGMSG (1,(TEXT("v_pPCMCIAPort is not mappednr")));
  156. goto pcis_fail;
  157. }    
  158. DEBUGMSG (1,(TEXT("v_pPCMCIAPort is mapped to %xnr"), v_pPCMCIAPort));
  159. // Initialize S3C2440 for PD6710           
  160. // EINT3(GPF3) is enabled.
  161. v_pIOPRegs->rGPFCON = (v_pIOPRegs->rGPFCON & ~(0x3<<6)) | (0x2<<6); 
  162. // EINT3 is PULLUP enabled.
  163. v_pIOPRegs->rGPFUP = (v_pIOPRegs->rGPFUP & ~(0x1<<3));              
  164. // EINT8(GPG0) is enabled.
  165. v_pIOPRegs->rGPGCON = (v_pIOPRegs->rGPGCON & ~(0x3<<0)) | (0x2<<0); 
  166. // EINT8 is *not* PULLUP enabled.
  167. //v_pIOPRegs->rGPGUP = (v_pIOPRegs->rGPGUP | (0x1<<0));
  168. // jylee
  169. v_pIOPRegs->rGPGUP = (v_pIOPRegs->rGPGUP & ~(0x1<<0)); // pullup enabled
  170. // nGCS2=nUB/nLB(nSBHE),nWAIT,16-bit
  171. v_pMEMRegs->rBWSCON = (v_pMEMRegs->rBWSCON & ~(0xf<<8)) | (0xd<<8); 
  172. // BANK2 access timing
  173. v_pMEMRegs->rBANKCON2 = ((B6710_Tacs<<13)+(B6710_Tcos<<11)+(B6710_Tacc<<8)+(B6710_Tcoh<<6)
  174. +(B6710_Tah<<4)+(B6710_Tacp<<2)+(B6710_PMC));
  175. // jylee 2003.03.19
  176. //v_pIOPRegs->rEXTINT1=(v_pIOPRegs->rEXTINT1 & ~(0xf<<0)) | (0x7<<0); // both edge trigger
  177. v_pIOPRegs->rEXTINT1=(v_pIOPRegs->rEXTINT1 & ~(0xf<<0)) | (0x2<<0);  // EINT8 : falling edge trigger
  178. v_pIOPRegs->rEXTINT0=(v_pIOPRegs->rEXTINT0 & ~(0xf<<12)) | (0x2<<12);  // EINT3 : falling edge trigger
  179. g_PCICIndex = ((volatile PUCHAR)((ULONG)v_pPCMCIAPort+0x3e0));
  180. g_PCICData = ((volatile PUCHAR)((ULONG)v_pPCMCIAPort+0x3e1));
  181. DEBUGMSG(1,
  182. (TEXT("PDCardInitServices g_PCICIndex = 0x%x, g_PCICData = 0x%xrn"),
  183. g_PCICIndex, g_PCICData));
  184. InitializeCriticalSection(&g_PCIC_Crit);
  185. //
  186. // 0x3E0 is the standard Intel compatible socket controller I/O port.
  187. //
  188. PCICIndex(0, REG_CHIP_REVISION);
  189. tmp = PCICDataRead();
  190. if ((tmp != 0x83) && (tmp != 0x82)) {
  191. DEBUGMSG(1,
  192. (TEXT("PDCardInitServices CHIP_REVISION = 0x%x, expected = 0x83 !!!rn"), tmp));
  193. return CERR_BAD_ADAPTER;
  194. }
  195. // otput2card_disable, AUTO_POWER, VCC_POWER_OFF,Vpp1=0V
  196. PCICIndex(0, REG_POWER_CONTROL);
  197. PCICDataWrite((0<<7) | (1<<5) | (0<<4) | (0<<0));
  198. // INPACK_ignored,speak_enable,edge_irq_intr,edge_management_intr,nVCC_3_enabled(temp)
  199. PCICIndex(0, REG_GENERAL_CONTROL);
  200. // Management int, System int -> edge triggering(PULSE)  
  201. //  PCICDataWrite(MISC1_VCC_33|MISC1_PM_IRQ|MISC1_PS_IRQ|MISC1_SPK_ENABLE);
  202. // Management int -> edge triggering(PULSE), System int -> LEVEL triggering 
  203. PCICDataWrite(MISC1_VCC_33|MISC1_PM_IRQ|MISC1_SPK_ENABLE);
  204. // 25Mhz_bypass,low_power_dynamic,IRQ12=drive_LED
  205. PCICIndex(0, REG_GLOBAL_CONTROL);
  206. //  PCICDataWrite(MISC2_BFS|MISC2_LOW_POWER_MODE|MISC2_LED_ENABLE);
  207. PCICDataWrite(MISC2_LOW_POWER_MODE|MISC2_LED_ENABLE);
  208. // before configuring timing register, FIFO should be cleared.
  209. PCICIndex(0, REG_FIFO_CTRL);
  210. PCICDataWrite(FIFO_EMPTY_WRITE);    //Flush FIFO
  211. //default access time is 300ns
  212. PCICIndex(0, REG_SETUP_TIMING0);
  213. PCICDataWrite(5);                   //80ns(no spec)
  214. PCICIndex(0, REG_CMD_TIMING0);
  215. PCICDataWrite(20);                  //320ns(by spec,25Mhz clock)
  216. PCICIndex(0, REG_RECOVERY_TIMING0);
  217. PCICDataWrite(5);                   //80ns(no spec)
  218. //default access time is 300ns
  219. PCICIndex(0, REG_SETUP_TIMING1);
  220. PCICDataWrite(2);                   //80ns(no spec)
  221. PCICIndex(0, REG_CMD_TIMING1);
  222. PCICDataWrite(8);                   //320ns(by spec,25Mhz clock)
  223. PCICIndex(0, REG_RECOVERY_TIMING1);
  224. PCICDataWrite(2);                   //80ns(no spec)
  225. DEBUGMSG(1, (TEXT("InitSocketNoCard(0) is calledrn")));
  226. InitSocketNoCard(0);
  227. //  InitSocketNoCard(1);
  228. PCICIndex(0, REG_CHIP_REVISION);
  229. tmp = PCICDataRead();
  230. DEBUGMSG(1, (TEXT("PDCardInitServices REG_CHIP_REVISION = 0x%xrn"), tmp));
  231. #ifdef DEBUG
  232. DumpSocketRegisters(0);
  233. #endif
  234. DEBUGMSG (1,(TEXT("--PDCardInitServicesnr")));
  235. return CERR_SUCCESS;
  236. pcis_fail:
  237. if (v_pIOPRegs) {
  238. VirtualFree((LPVOID)v_pIOPRegs, 0, MEM_RELEASE);
  239. }
  240. if (v_pMEMRegs) {
  241. VirtualFree((LPVOID)v_pMEMRegs, 0, MEM_RELEASE);
  242. }
  243. if (v_pPCMCIAPort) {
  244. VirtualFree((LPVOID)v_pPCMCIAPort, 0, MEM_RELEASE);
  245. }
  246. return CERR_OUT_OF_RESOURCE;    
  247. }
  248. //
  249. // Function to set the PCIC index register
  250. //
  251. VOID
  252. PCICIndex(
  253. UINT socket_num,
  254. UINT8  register_num
  255. )
  256. {
  257. WRITE_PORT_UCHAR(g_PCICIndex,
  258. (UINT8)((socket_num == 0 ? 0 : 0x40)|register_num));
  259. }
  260. //
  261. // Function to write to the PCIC data register
  262. //
  263. VOID
  264. PCICDataWrite(
  265. UINT8 value
  266. )
  267. {
  268. WRITE_PORT_UCHAR(g_PCICData, value);
  269. }
  270. //
  271. // Function to read the PCIC data register
  272. //
  273. UINT8
  274. PCICDataRead(VOID)
  275. {
  276. return READ_PORT_UCHAR(g_PCICData);
  277. }
  278. #ifdef DEBUG
  279. UCHAR SocketRegisters[2][REG_LAST_INDEX+1];
  280. LPWSTR RegisterNames[] = {
  281. TEXT("REG_CHIP_REVISION"), //                    0x00
  282. TEXT("REG_INTERFACE_STATUS"), //                 0x01
  283. TEXT("REG_POWER_CONTROL"), //                    0x02
  284. TEXT("REG_INTERRUPT_AND_GENERAL_CONTROL"), //    0x03
  285. TEXT("REG_CARD_STATUS_CHANGE"), //               0x04
  286. TEXT("REG_STATUS_CHANGE_INT_CONFIG"), //         0x05
  287. TEXT("REG_WINDOW_ENABLE"), //                    0x06
  288. TEXT("REG_IO_WINDOW_CONTROL"), //                0x07
  289. TEXT("REG_IO_MAP0_START_ADDR_LO"), //            0x08
  290. TEXT("REG_IO_MAP0_START_ADDR_HI"), //            0x09
  291. TEXT("REG_IO_MAP0_END_ADDR_LO"), //              0x0A
  292. TEXT("REG_IO_MAP0_END_ADDR_HI"), //              0x0B
  293. TEXT("REG_IO_MAP1_START_ADDR_LO"), //            0x0C
  294. TEXT("REG_IO_MAP1_START_ADDR_HI"), //            0x0D
  295. TEXT("REG_IO_MAP1_END_ADDR_LO"), //              0x0E
  296. TEXT("REG_IO_MAP1_END_ADDR_HI"), //              0x0F
  297. TEXT("REG_MEM_MAP0_START_ADDR_LO"), //           0x10
  298. TEXT("REG_MEM_MAP0_START_ADDR_HI"), //           0x11
  299. TEXT("REG_MEM_MAP0_END_ADDR_LO"), //             0x12
  300. TEXT("REG_MEM_MAP0_END_ADDR_HI"), //             0x13
  301. TEXT("REG_MEM_MAP0_ADDR_OFFSET_LO"), //          0x14
  302. TEXT("REG_MEM_MAP0_ADDR_OFFSET_HI"), //          0x15
  303. TEXT("REG_GENERAL_CONTROL"), //                  0x16
  304. TEXT("REG_FIFO_CTRL"), //                        0x17
  305. TEXT("REG_MEM_MAP1_START_ADDR_LO"), //           0x18
  306. TEXT("REG_MEM_MAP1_START_ADDR_HI"), //           0x19
  307. TEXT("REG_MEM_MAP1_END_ADDR_LO"), //             0x1A
  308. TEXT("REG_MEM_MAP1_END_ADDR_HI"), //             0x1B
  309. TEXT("REG_MEM_MAP1_ADDR_OFFSET_LO"), //          0x1C
  310. TEXT("REG_MEM_MAP1_ADDR_OFFSET_HI"), //          0x1D
  311. TEXT("REG_GLOBAL_CONTROL"), //                   0x1E
  312. TEXT("REG_CHIP_INFO"), //                        0x1F
  313. TEXT("REG_MEM_MAP2_START_ADDR_LO"), //           0x20
  314. TEXT("REG_MEM_MAP2_START_ADDR_HI"), //           0x21
  315. TEXT("REG_MEM_MAP2_END_ADDR_LO"), //             0x22
  316. TEXT("REG_MEM_MAP2_END_ADDR_HI"), //             0x23
  317. TEXT("REG_MEM_MAP2_ADDR_OFFSET_LO"), //          0x24
  318. TEXT("REG_MEM_MAP2_ADDR_OFFSET_HI"), //          0x25
  319. TEXT("REG_ATA_CTRL"), //                         0x26
  320. TEXT("REG_SCRATCHPAD"), //                       0x27
  321. TEXT("REG_MEM_MAP3_START_ADDR_LO"), //           0x28
  322. TEXT("REG_MEM_MAP3_START_ADDR_HI"), //           0x29
  323. TEXT("REG_MEM_MAP3_END_ADDR_LO"), //             0x2A
  324. TEXT("REG_MEM_MAP3_END_ADDR_HI"), //             0x2B
  325. TEXT("REG_MEM_MAP3_ADDR_OFFSET_LO"), //          0x2C
  326. TEXT("REG_MEM_MAP3_ADDR_OFFSET_HI"), //          0x2D
  327. TEXT("REG_EXTENDED_INDEX"), //                   0x2E
  328. TEXT("REG_EXTENDED_DATA"), //                    0x2F
  329. TEXT("REG_MEM_MAP4_START_ADDR_LO"), //           0x30
  330. TEXT("REG_MEM_MAP4_START_ADDR_HI"), //           0x31
  331. TEXT("REG_MEM_MAP4_END_ADDR_LO"), //             0x32
  332. TEXT("REG_MEM_MAP4_END_ADDR_HI"), //             0x33
  333. TEXT("REG_MEM_MAP4_ADDR_OFFSET_LO"), //          0x34
  334. TEXT("REG_MEM_MAP4_ADDR_OFFSET_HI"), //          0x35
  335. TEXT("REG_CARD_IO_MAP0_OFFSET_L"), //            0x36
  336. TEXT("REG_CARD_IO_MAP0_OFFSET_H"), //            0x37
  337. TEXT("REG_CARD_IO_MAP1_OFFSET_L"), //            0x38
  338. TEXT("REG_CARD_IO_MAP1_OFFSET_H"), //            0x39
  339. TEXT("REG_SETUP_TIMING0"), //                    0x3A
  340. TEXT("REG_CMD_TIMING0"), //                      0x3B
  341. TEXT("REG_RECOVERY_TIMING0"), //                 0x3C
  342. TEXT("REG_CMD_TIMING1"), //                      0x3D
  343. TEXT("REG_CMD_TIMING1"), //                      0x3E
  344. TEXT("REG_RECOVERY_TIMING1"), //                 0x3F
  345. };
  346. VOID
  347. DisplaySocketRegister(
  348. UINT socket,
  349. UCHAR reg,
  350. UCHAR value
  351. )
  352. {
  353. if (reg > (REG_LAST_INDEX+1)) return;
  354. if (RegisterNames[reg] != NULL) {
  355. DEBUGMSG(1,
  356. (TEXT("PCMCIA:PCIC Register[%d:%2x:%s] = 0x%xrn"),
  357. socket, reg, RegisterNames[reg & 0x3f], value));
  358. }
  359. }
  360. VOID
  361. DumpSocketRegisters(
  362. UINT socket
  363. )
  364. {
  365. UCHAR i;
  366.     if (!DEBUGZONE(ZONE_PDD)) return;
  367. for (i = 0; i < REG_LAST_INDEX+1; i++) {
  368. PCICIndex(socket, i);
  369. SocketRegisters[socket][i] = PCICDataRead();
  370. DisplaySocketRegister(socket, i, SocketRegisters[socket][i]);
  371. }
  372. }
  373. VOID
  374. DeltaSocketRegisters(
  375. UINT socket
  376. )
  377. {
  378. static UCHAR idx;
  379. UCHAR CurrentRegisters[REG_LAST_INDEX];
  380.     if (!DEBUGZONE(ZONE_PDD)) return;
  381. DEBUGMSG (1,(TEXT("++DeltaSocketRegisters #%xnr"), socket));
  382. for (idx = 0; idx < REG_LAST_INDEX+1; idx++) {
  383. PCICIndex(socket, idx);
  384. CurrentRegisters[idx] = PCICDataRead();
  385. }
  386. for (idx = 0; idx < REG_LAST_INDEX+1; idx++) {
  387. if (CurrentRegisters[idx] != SocketRegisters[socket][idx]) {
  388. DisplaySocketRegister(socket, idx, CurrentRegisters[idx]);
  389. SocketRegisters[socket][idx] = CurrentRegisters[idx];
  390. }
  391. }
  392. DEBUGMSG (1,(TEXT("--DeltaSocketRegistersnr")));
  393. }
  394. #endif  // DEBUG