diff options
author | Regia König | 2021-06-03 18:28:36 +0200 |
---|---|---|
committer | Regia König | 2021-06-03 18:28:36 +0200 |
commit | 893b251e94d68b920c5463a52f21c7430b4f9397 (patch) | |
tree | e8b65a9b8cb57795e4a53afb62ce053b96899a1b | |
parent | Save code. But it causes emulation failure! (diff) | |
download | memtest86-893b251e94d68b920c5463a52f21c7430b4f9397.tar.gz memtest86-893b251e94d68b920c5463a52f21c7430b4f9397.tar.xz memtest86-893b251e94d68b920c5463a52f21c7430b4f9397.zip |
Save actual state
-rw-r--r-- | efi_memtest/memtest86+/controller.c | 111 | ||||
-rw-r--r-- | efi_memtest/memtest86+/dmi.c | 5 |
2 files changed, 113 insertions, 3 deletions
diff --git a/efi_memtest/memtest86+/controller.c b/efi_memtest/memtest86+/controller.c index 38b1878..c1cebc9 100644 --- a/efi_memtest/memtest86+/controller.c +++ b/efi_memtest/memtest86+/controller.c @@ -122,6 +122,9 @@ void coretemp(void) void print_cpu_line(float dram_freq, float fsb_freq, int ram_type) { + + if (1) print_log("print_cpu_line", 14); + int cur_col = COL_SPEC; cprint(LINE_CPU, cur_col, "RAM: "); @@ -131,6 +134,8 @@ void print_cpu_line(float dram_freq, float fsb_freq, int ram_type) cprint(LINE_CPU, cur_col, "MHz ("); cur_col += 5; + if (1) + switch(ram_type) { default: @@ -1440,6 +1445,10 @@ static float getSNBmultiplier(void) static void poll_fsb_ct(void) { + + print_log("poll_fsb_ct", 16); + + unsigned long mcr, mdr; double dramratio, dramclock, fsb; float coef = getP4PMmultiplier(); @@ -1476,6 +1485,9 @@ static void poll_fsb_ct(void) static void poll_fsb_amd64(void) { + print_log("poll_fsb_nothing", 16); + + unsigned int mcgsrl; unsigned int mcgsth; unsigned long fid, temp2; @@ -1567,6 +1579,9 @@ static void poll_fsb_amd64(void) { static void poll_fsb_k10(void) { + print_log("poll_fsb_nothing", 16); + + unsigned int mcgsrl; unsigned int mcgsth; unsigned long temp2; @@ -1646,6 +1661,9 @@ static void poll_fsb_k10(void) { static void poll_fsb_k12(void) { + print_log("poll_fsb_nothing", 16); + + unsigned long temp2; unsigned long dramchr; double dramratio, dramclock, fsb, did; @@ -1729,6 +1747,9 @@ static void poll_fsb_k12(void) { static void poll_fsb_k16(void) { + print_log("poll_fsb_nothing", 16); + + unsigned long dramchr; double dramratio, dramclock, fsb; @@ -1775,6 +1796,9 @@ static void poll_fsb_k16(void) static void poll_fsb_k15(void) { + print_log("poll_fsb_nothing", 16); + + unsigned long temp2; unsigned long dramchr; double dramratio, dramclock, fsb; @@ -1835,6 +1859,9 @@ static void poll_fsb_k15(void) { static void poll_fsb_k14(void) { + print_log("poll_fsb_nothing", 16); + + unsigned long dramchr; double dramratio, dramclock, fsb; @@ -1870,6 +1897,9 @@ static void poll_fsb_k14(void) static void poll_fsb_i925(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; unsigned long mchcfg, mchcfg2, dev0, drc, idetect; float coef = getP4PMmultiplier(); @@ -1926,6 +1956,9 @@ static void poll_fsb_i925(void) { static void poll_fsb_i945(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; unsigned long mchcfg, dev0; float coef = getP4PMmultiplier(); @@ -1957,6 +1990,9 @@ static void poll_fsb_i945(void) { static void poll_fsb_i945gme(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; unsigned long mchcfg, dev0, fsb_mch; float coef = getP4PMmultiplier(); @@ -2015,6 +2051,9 @@ static void poll_fsb_i945gme(void) { static void poll_fsb_i975(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; unsigned long mchcfg, dev0, fsb_mch; float coef = getP4PMmultiplier(); @@ -2074,6 +2113,9 @@ static void poll_fsb_i975(void) { static void poll_fsb_i965(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; unsigned long mchcfg, dev0, fsb_mch; float coef = getP4PMmultiplier(); @@ -2158,6 +2200,9 @@ static void poll_fsb_i965(void) { static void poll_fsb_p35(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; unsigned long mchcfg, dev0, fsb_mch, Device_ID, Memory_Check, c0ckectrl, offset; float coef = getP4PMmultiplier(); @@ -2278,6 +2323,9 @@ static void poll_fsb_p35(void) { static void poll_fsb_im965(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; unsigned long mchcfg, dev0, fsb_mch; float coef = getP4PMmultiplier(); @@ -2346,6 +2394,9 @@ static void poll_fsb_im965(void) { static void poll_fsb_5400(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; unsigned long ambase_low, ambase_high, ddrfrq; float coef = getP4PMmultiplier(); @@ -2387,6 +2438,9 @@ static void poll_fsb_5400(void) { static void poll_fsb_nf4ie(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; float mratio, nratio; unsigned long reg74, reg60; @@ -2420,6 +2474,9 @@ static void poll_fsb_nf4ie(void) { static void poll_fsb_i875(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; unsigned long mchcfg, smfs; float coef = getP4PMmultiplier(); @@ -2453,6 +2510,9 @@ static void poll_fsb_i875(void) { static void poll_fsb_p4(void) { + print_log("poll_fsb_nothing", 16); + + ulong fsb, idetect; float coef = getP4PMmultiplier(); char *name; @@ -2493,6 +2553,9 @@ static void poll_fsb_p4(void) { static void poll_fsb_i855(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb ; unsigned int msr_lo, msr_hi; ulong mchcfg, idetect; @@ -2543,6 +2606,9 @@ static void poll_fsb_i855(void) { static void poll_fsb_amd32(void) { + print_log("poll_fsb_nothing", 16); + + unsigned int mcgsrl; unsigned int mcgsth; unsigned long temp; @@ -2589,6 +2655,9 @@ static void poll_fsb_amd32(void) { static void poll_fsb_nf2(void) { + print_log("poll_fsb_nothing", 16); + + unsigned int mcgsrl; unsigned int mcgsth; unsigned long temp, mempll; @@ -2627,6 +2696,9 @@ static void poll_fsb_nf2(void) { static void poll_fsb_us15w(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; unsigned long msr; @@ -2680,6 +2752,9 @@ static void poll_fsb_us15w(void) { static void poll_fsb_nhm(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; unsigned long mc_dimm_clk_ratio; float coef = getNHMmultiplier(); @@ -2724,6 +2799,8 @@ static void poll_fsb_nhm(void) { static void poll_fsb_nhm32(void) { + print_log("poll_fsb_nothing", 16); + double dramclock, dramratio, fsb; unsigned long mc_dimm_clk_ratio; float coef = getNHMmultiplier(); @@ -2767,6 +2844,8 @@ static void poll_fsb_nhm32(void) { static void poll_fsb_wmr(void) { + print_log("poll_fsb_nothing", 16); + double dramclock, dramratio, fsb; unsigned long dev0; float coef = getNHMmultiplier(); @@ -2793,6 +2872,8 @@ static void poll_fsb_wmr(void) { static void poll_fsb_snb(void) { + print_log("poll_fsb_nothing", 16); + double dramclock, dramratio, fsb; unsigned long dev0; float coef = getSNBmultiplier(); @@ -2819,6 +2900,8 @@ static void poll_fsb_snb(void) { static void poll_fsb_ivb(void) { + print_log("poll_fsb_ivb", 12); + double dramclock, dramratio, fsb; unsigned long dev0, mchcfg; float coef = getSNBmultiplier(); @@ -2854,6 +2937,9 @@ static void poll_fsb_ivb(void) { static void poll_fsb_snbe(void) { + print_log("poll_fsb_nothing", 16); + + double dramclock, dramratio, fsb; unsigned long dev0; float coef = getSNBmultiplier(); @@ -4099,9 +4185,13 @@ static void print_memory_controller(void) print_log(log, length); } - controllers[ctrl.index].poll_fsb(); + //int index = ctrl.index; + int index = 127; + //controllers[index].poll_fsb(); + poll_fsb_ivb(); + //controllers[127].poll_fsb(); - print_log("print_controller(): 2sd", 23); + print_log("print_controller(): 2nd", 23); // TODO REMOVE UNTIL HERE @@ -4224,6 +4314,20 @@ void find_controller(void) // Detect IMC by CPUID if(imc_type) { vendor = 0xFFFF; device = imc_type; } if(vv->fail_safe & 1) { vendor = 0xFFFF; device = 0xFFFF; } + + { + char log[48] = "find_controller(): vendor = "; + int length = 28; + int_to_charr(vendor, log, &length); + print_log(log, length); + } + + { + char log[48] = "find_controller(): device = "; + int length = 28; + int_to_charr(device, log, &length); + print_log(log, length); + } //hprint(11,0,vendor); hprint(11,10,device); @@ -4269,7 +4373,7 @@ void find_controller(void) print_log(log, length); } - //controllers[ctrl.index].setup_ecc(); + // controllers[ctrl.index].setup_ecc(); print_log("4m.bm", 5); @@ -4277,6 +4381,7 @@ void find_controller(void) /* Don't enable ECC polling by default unless it has * been well tested. */ + // TODO this function contains a variable 'COL_ECC' which is defined nowhere // set_ecc_polling(-1); print_memory_controller(); diff --git a/efi_memtest/memtest86+/dmi.c b/efi_memtest/memtest86+/dmi.c index 066e2ce..c6e6e3f 100644 --- a/efi_memtest/memtest86+/dmi.c +++ b/efi_memtest/memtest86+/dmi.c @@ -12,6 +12,8 @@ #include "test.h" #include "stdint.h" +#include "logger.h" + #define round_up(x,y) (((x) + (y) - 1) & ~((y)-1)) #define round_down(x,y) ((x) & ~((y)-1)) @@ -250,6 +252,9 @@ void init_dmi(void){ void print_dmi_startup_info(void) { + + if (1) print_log("print_dmi_startup_info", 22); + char *string1; char *string2; char *string3; |