注意;以下的陣列可能因版本不同會有修改;此處版本是memtest86 + 4.00
const struct tseq tseq[] = {
          {1,  5,   4, 0, "[Address test, walking ones]          "}, //pattern0
          {1,  6,   4, 0, "[Address test, own address]           "}, //pattern1
          {1,  0,   4, 0, "[Moving inversions, ones & zeros]     "}, //pattern2
          {1,  1,   2, 0, "[Moving inversions, 8 bit pattern]    "}, //pattern3
          {1, 10,  50, 0, "[Moving inversions, random pattern]   "}, //pattern4
          {1,  7,  80, 0, "[Block move, 80 moves]                "}, //pattern5
          {1,  2,   2, 0, "[Moving inversions, 32 bit pattern]   "}, //pattern6
          {1,  9,  30, 0, "[Random number sequence]              "}, //pattern7 
          {1, 11,   6, 0, "[Modulo 20, Random pattern]           "}, //pattern8
          {1,  8,   1, 0, "[Bit fade test, 90 min, 2 patterns]   "}, //pattern9
          {0,  0,   0, 0, NULL}
};
正常狀況下開機後只會測試pattern1~pattern8,因此若要測試pattern0及pattern9只好手動設定。
來看一下tsaq結構:以下的結構就是對應到上面的陣列元素
struct tseq {
        short cache; //1:打開cpu快取;o:關閉快取
        short pat; //pattern id注意這和patter執行順序無關
        short iter; //pattern測試的重複次數
        short errors; //此攔位一看就知道記錄著個別pattern error數量
        char *msg;//這就是pattern的名稱:例如 "Address test, walking ones"
};
 
Dear Colorben,
回覆刪除我是一個最近要改memtest source code 的苦主,最近上
頭下達指令要我用memtest 測2G的DIMM module,但是要跳過前面1G的空間從1G測到2G,所以就開始死啃source code了.
在 main.c 中有此段:
static struct pmap windows[] =
{
{ 0, 0x080000 },
{ 0, 0 },
{ 0x080000, 0x100000 },
{ 0x100000, 0x180000 },
{ 0x180000, 0x200000 },
{ 0x200000, 0x280000 },
{ 0x280000, 0x300000 },
{ 0x300000, 0x380000 },
{ 0x380000, 0x400000 },
{ 0x400000, 0x480000 },
{ 0x480000, 0x500000 },
{ 0x500000, 0x580000 },
{ 0x580000, 0x600000 },
{ 0x600000, 0x680000 },
{ 0x680000, 0x700000 },
{ 0x700000, 0x780000 },
{ 0x780000, 0x800000 },
{ 0x800000, 0x880000 },
{ 0x880000, 0x900000 },
{ 0x900000, 0x980000 },
{ 0x980000, 0xA00000 },
{ 0xA00000, 0xA80000 },
{ 0xA80000, 0xB00000 },
{ 0xB00000, 0xB80000 },
{ 0xB80000, 0xC00000 },
{ 0xC00000, 0xC80000 },
{ 0xC80000, 0xD00000 },
{ 0xD00000, 0xD80000 },
{ 0xD80000, 0xE00000 },
{ 0xE00000, 0xE80000 },
{ 0xE80000, 0xF00000 },
{ 0xF00000, 0xF80000 },
{ 0xF80000, 0x1000000 },
};
不知你對這個pmap window有無了解?因為我希望它是memtest 開的一扇窗戶,每一個集合都是測試窗戶的最小位址和最大位址,這個pmap大小只有1M,是不是如果有2G Module的話會切成2048個pmap,再來若我更動pmap內容
讓它每個窗戶不是互相連續的,又會如何呢?期待您給我解惑
謝謝
static struct pmap windows[]這個陣列裡頭的值都是4k的單位。因為要定址到64G,且以1G為一個單位來進行分頁配置。
回覆刪除