BIOS rewrite on x86 -


my question rather simple, yet couldn't find out answer.

how write on bios memory chip ?

allright, write data io devices on x86 (or whatever), process seems accessing io device through port-mapped or memory mapped io. me, modern bios flash memory chip io device, , if writable, must through process. coreboot opensource replacement pc bioses, however, believe uses flashrom rewrite bios chip code, , flashrom proprietary, wonder why hard write bios can't find reliable answer how it.

in x86 market there 2 kind of devices: ones standard interface , ones without. case fall in second category.

to write flash rom have send specific command specific address.
have rom chip of 1kb, responds read requests 000h 0fffh. can send write requests, chip won't consider them. cannot write f-rom read it.
have send write command writing, say, 55h address aah , sending page want reflash followed writes data. proprietary interface (there efforts standardize it) , have simplified omitting not theoretically relevant parts.

so have send write commands rom chip.
matter rom chip not next cpu, beyond called bridge, more one.
in x86 architecture 1 hell of chip chipset, hub routing request between devices (recently there have been decentralization devices roms still connected chip once called south bridge). you, cpu programmer, communicate chipset requests in memory , io address spaces.

by default chipsets won't let writes reach flash rom, have enable setting/clearing bits in chipset registers (which memory mapped or in pci(e) register space). proprietary interface.

if lucky , chipset documented enough (like intel's ones) let known how allow writes reach rom, have figure how requests routed.
bridges not transparent, perform address translations, example may write 8123h , bridge may alter address 0123h.
surely happen bridge in front of flash rom (this lpc bridge sio chip, spi bridge) since rom ordinary chip respond in range 0h - xxxxxxxxxh while cpu perspective mapped in top end of 4gb. have figure out base address rom, again chipset specific , rom specific since depends on rom size (the chipset let choose fixed number of different base address).

flashing bios not hard, have done fun, extremely not portable point every computer model may need different program it. requires having chipset datasheet , not common may expect.

if want more practical idea can download intel x99 pch datasheet here (http://www.intel.com/content/www/us/en/chipsets/x99-chipset-pch-datasheet.html) , spi chapter.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -