[OpenPower-Firmware] SBE questions

Marty E. Plummer hanetzer at startmail.com
Sat Jul 20 02:29:34 AEST 2019


> On Thu, Jul 18, 2019 at 07:11:09AM -0500, Dean Sanner wrote:
> Here is info on how to extract and remove the ECC on the SBE SEEPROM image.
> There are
> actually 4 unique SEEPROMs that the SBE treats as a logical "flash".  The
> following
> commands are from IBM's service processor -- you will have to tweak, but in
> general
> just need to read the "-a" address, offset 0 for 65529 bytes, then append
> all the images
> together.  Notice that the althernate is on a different I2C bus, but same
> addresses:
> 
> #Read primary image and reconstruct
> iicmaster -b /dev/iic/L02C0E06P01  -t 24C512 -a 0xa8 -W 2 -o 0 --file=./sbe_0 -r 65529
> iicmaster -b /dev/iic/L02C0E06P01  -t 24C512 -a 0xaa -W 2 -o 0 --file=./sbe_1 -r 65529
> iicmaster -b /dev/iic/L02C0E06P01  -t 24C512 -a 0xac -W 2 -o 0 --file=./sbe_2 -r 65529
> iicmaster -b /dev/iic/L02C0E06P01  -t 24C512 -a 0xae -W 2 -o 0 --file=./sbe_3 -r 65529
> cat sbe_0 sbe_1 sbe_2 sbe_3 > sbe.bin.ecc
> 
> To remove ECC use this tool from op-build
> <op-build repo>/output/host/bin/ecc --remove ./sbe.bin.ecc --output sbe.bin
> --p8
So, I'm having a bit of trouble following these instructions. Googling
iicmaster leads me to this github repo[1], and following an issue trail
shows that iicmaster is to be replaced with fsidbg[2] going forward. Using
it in a loop yeilds the following:
```
root at bmc:~# for i in {0..12}; do echo 'Scanning /dev/i2c-'$i && /tmp/fsidbg /dev/i2c-$i -s; done
Scanning /dev/i2c-0
found 6 devices:
5C 5E D4 D6 DC DE 
Scanning /dev/i2c-1
found 6 devices:
5C 5E D4 D6 DC DE 
Scanning /dev/i2c-2
found 0 devices:
Scanning /dev/i2c-3
found 0 devices:
Scanning /dev/i2c-4
found 4 devices:
70 72 F0 F2 
Scanning /dev/i2c-5
found 4 devices:
70 72 F0 F2 
Scanning /dev/i2c-6
found 0 devices:
Scanning /dev/i2c-7
found 0 devices:
Scanning /dev/i2c-8
found 0 devices:
Scanning /dev/i2c-9
found 0 devices:
Scanning /dev/i2c-10
found 0 devices:
Scanning /dev/i2c-11
found 1 devices:
B2 
Scanning /dev/i2c-12
found 4 devices:
1A 9A CC D2
```
Given the two sysfs eeprom interfaces are on busses 0 and 1 (and per the
devicetree for the openbmc build source) I've tried using the fsidbg
read command on addresses 0xD4-DE I can only reliably grab 8k worth of
stuff, and they don't 'look' like 'XIP SEPM' images anyways. Those
0xa8-0xae addresses, are they 'fixed' and always true for every p9 cpu?
Also, why 65529 and not 64*1024=65536? And how does /dev/iic/L02C0E06P01
translate to say /dev/i2c-0 and friends? Note that using the stripping
mechanism on the combined 4x32k dumps I've got via my method (simply a
cat from a sysfs interface[3]) ends up with a final binary of 29056b in
size, so I don't think thats right considering the XIP header specifies
some portions beyond this size limit.

If you could help with this I'd appreciate it, thanks for all that you
have already helped with!

Regards,
Marty

[1]: https://github.com/eddiejames/iicmaster
[2]: https://github.com/eddiejames/fsidbg
[3]: /sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c at 1e78a000/+
1e78a040.i2c-bus/i2c-0/0-0056/eeprom
1e78a040.i2c-bus/i2c-0/0-0054/eeprom
1e78a040.i2c-bus/i2c-0/0-0057/eeprom
1e78a040.i2c-bus/i2c-0/0-0055/eeprom
1e78a080.i2c-bus/i2c-1/1-0056/eeprom
1e78a080.i2c-bus/i2c-1/1-0054/eeprom
1e78a080.i2c-bus/i2c-1/1-0057/eeprom
1e78a080.i2c-bus/i2c-1/1-0055/eeprom


More information about the OpenPower-Firmware mailing list