wok view memtest/stuff/memtest86+-5.01-array-size.patch @ rev 25457

Normazile https://sourceforge.net/projects web_sites
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Sep 23 08:28:09 2022 +0000 (20 months ago)
parents d44f69067aca
children
line source
1 --- memtest86+-5.01/controller.c 2013-08-10 02:01:58.000000000 +0000
2 +++ memtest86+-5.01/controller.c 2013-12-12 20:58:12.873555378 +0000
3 @@ -292,7 +292,7 @@
5 /* First, locate the PCI bus where the MCH is located */
7 - for(i = 0; i < sizeof(possible_nhm_bus); i++) {
8 + for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
9 pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
10 pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
11 vid &= 0xFFFF;
12 @@ -327,7 +327,7 @@
13 ctrl.mode = ECC_NONE;
15 /* First, locate the PCI bus where the MCH is located */
16 - for(i = 0; i < sizeof(possible_nhm_bus); i++) {
17 + for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
18 pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
19 pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
20 vid &= 0xFFFF;
21 @@ -1424,7 +1424,7 @@
22 unsigned long dramchr;
23 float clockratio;
24 double dramclock;
25 - unsigned int dummy[3];
26 + unsigned int dummy[4];
27 int ram_type;
29 float coef = 10;
30 @@ -3680,7 +3680,7 @@
31 static void poll_timings_k16(void) {
33 ulong dramt0, dramt1;
34 - int cas, rcd, rp, rc, ras;
35 + int cas, rcd, rp, ras;
37 pci_conf_read(0, 24, 2, 0x200, 4, &dramt0);
38 pci_conf_read(0, 24, 2, 0x204, 4, &dramt1);
39 @@ -3690,7 +3690,7 @@
40 rp = ((dramt0 >> 16) & 0x1F);
41 ras = ((dramt0 >> 24) & 0x3F);
43 - rc = (dramt1 & 0x3F);
44 + //int rc = (dramt1 & 0x3F);
46 print_ram_line(cas, rcd, rp, ras, 1);
47 }