[OpenPower-Firmware] SBE questions
Daniel M Crowell
dcrowell at us.ibm.com
Sat Jul 20 04:33:14 AEST 2019
I can answer one question.
> Also, why 65529 and not 64*1024=65536?
With the 9-byte ECC algorithm there are 6 bytes leftover. We don't cross
chips with the data/ecc so the last 6 bytes are not part of the image.
--
Dan Crowell
Senior Software Engineer - Power Systems Enablement Firmware
IBM Rochester: t/l 553-2987
dcrowell at us.ibm.com
From: "Marty E. Plummer" <hanetzer at startmail.com>
To: Dean Sanner <dsanner at us.ibm.com>
Cc: Stewart Smith <stewart at linux.ibm.com>, Daniel M Crowell
<dcrowell at us.ibm.com>, openpower-firmware at lists.ozlabs.org
Date: 07/19/2019 11:31 AM
Subject: [EXTERNAL] Re: [OpenPower-Firmware] SBE questions
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_eddiejames_iicmaster&d=DwIBAg&c=jf_iaSHvJObTbx-siA1ZOg&r=mCj3CQvqek9g0fdziO-GEHyU1m9T3SAh0ZPd5s_AGpo&m=Fc8n1ON0faZm2nqo5kZH_D8kSa-zPTQ7xs8RU_XAbh8&s=dwTJgXgftrQP8Q82cBphMs6mzWkRsv7LHjlutsaSfVg&e=
[2]:
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_eddiejames_fsidbg&d=DwIBAg&c=jf_iaSHvJObTbx-siA1ZOg&r=mCj3CQvqek9g0fdziO-GEHyU1m9T3SAh0ZPd5s_AGpo&m=Fc8n1ON0faZm2nqo5kZH_D8kSa-zPTQ7xs8RU_XAbh8&s=E_F34xxMvuSxJ6XTG6N0P0S-x7BWktFmfW01KMajnXg&e=
[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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openpower-firmware/attachments/20190719/0ae13281/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openpower-firmware/attachments/20190719/0ae13281/attachment.gif>
More information about the OpenPower-Firmware
mailing list