Page MenuHomeFreeBSD

fixed amd type flash write opration and diaplay chip infomation at boot
ClosedPublic

Authored by yamori813_yahoo.co.jp on Feb 9 2018, 4:33 AM.

Details

Summary

amd type flash that is mx chip can't update correctly.
This is fixed by datasheet method.

Test Plan

AR9132 with AMD chip and RT3050 with MX chip
write data by dd command then read data check md5 value.

cfi0: Manufacturer ID:1 Device ID:227e
cfi0: Manufacturer ID:c2 Device ID:22a8

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Current code is very dangerous because of doing sector erase to address 0. 0 is boot sector in mips. Almost system is sector 0 is protected then no effect. I see Juniper not tested this code on AMD type flash.

imp added a subscriber: imp.Mar 18 2018, 5:39 PM
imp added inline comments.
sys/dev/cfi/cfi_core.c
513 ↗(On Diff #39083)

This should be a bool function. It returns true/false over whether the erase succeeded / failed.

810 ↗(On Diff #39083)

why are we doing the read-back with interrupts enabled?

imp accepted this revision.Jun 14 2018, 1:53 PM

I think this looks good now.

This revision is now accepted and ready to land.Jun 14 2018, 1:53 PM
sbruno accepted this revision.Jun 21 2018, 4:03 PM

I will compile commit this review.

This revision was automatically updated to reflect the committed changes.