若是要讀SPI ROM裡的資料,可以用Hardware sequence 的方式讀取。
SPIBAR+06h : Hardware Sequencing Flash Control Register,用來下Command去讀取值。
SPIBAR+08h : Flash Address Register,要讀的SPI Address。
SPIBAR+10h : Flash Data 0 Register,讀回來的值會放在這裡。
SPIBAR+14h~4Ch : Flash Data [N] Register,如果是讀超過1個byte,接下來會放在這裡。
Example1: 讀SPI 0x00000200,讀一個byte,Command 如下:
SPIBAR+08h = 0200h
SPIBAR+06h = 01h
Result會在SPIBAR+10h
Example2: 讀SPI 0x0000000,讀2個byte,Command 如下:
SPIBAR+08h = 0200h
SPIBAR+07h = 01h
SPIBAR+06h = 01h
Result會在SPIBAR+10h, SPIBAR+11h
另外,在SPIBAR+B0h中,Flash Descriptor Observability Control Register,可以選擇要去看的Descriptor的region的值,選完之後,值會出現在SPIBAR+B4h。
Example3: 在ICH9中要看ICH9 Soft Straps的值。
SPIBAR+B0h = 0x00004000
Value = SPIBAR+B4h

那寫的Hardware sequencing要如何操作呢?