Perier Posted December 5, 2018 Share Posted December 5, 2018 Friends, tell me is it possible to get the SID on the device itself? With the article, read:http://linux-sunxi.org/SID_Register_Guide In my sun50i-h5.dtsi: soc { sid: eeprom @ 1c14000 { compatible = "allwinner, sun50i-h5-sid"; reg = <0x1c14000 0x400>; } } #: sunxi-fel sid > ERROR: Allwinner USB FEL device not found! As I understand it, this utility retrieves from a remote device connected in FEL mode. But is it possible to somehow get the SID directly on the summit device? Link to comment Share on other sites More sharing options...
martinayotte Posted December 5, 2018 Share Posted December 5, 2018 3 hours ago, Evgeny said: tell me is it possible to get the SID on the device itself? Yes ! Using the method explained in the Guide you've mentioned ... Grab this source https://bootlin.com/pub/mirror/devmem2.c , compile it, and use this from the Guide : d0=`./devmem2 0x01c14200 w|grep Value|sed 's/^.*: 0x/ /'` d1=`./devmem2 0x01c14204 w|grep Value|sed 's/^.*: 0x/ /'` d2=`./devmem2 0x01c14208 w|grep Value|sed 's/^.*: 0x/ /'` d3=`./devmem2 0x01c1420c w|grep Value|sed 's/^.*: 0x/ /'` echo $d0 $d1 $d2 $d3 Link to comment Share on other sites More sharing options...
Perier Posted December 16, 2018 Author Share Posted December 16, 2018 On 12/5/2018 at 11:43 PM, martinayotte said: Yes ! Using the method explained in the Guide you've mentioned ... Grab this source https://bootlin.com/pub/mirror/devmem2.c , compile it, and use this from the Guide : d0=`./devmem2 0x01c14200 w|grep Value|sed 's/^.*: 0x/ /'` d1=`./devmem2 0x01c14204 w|grep Value|sed 's/^.*: 0x/ /'` d2=`./devmem2 0x01c14208 w|grep Value|sed 's/^.*: 0x/ /'` d3=`./devmem2 0x01c1420c w|grep Value|sed 's/^.*: 0x/ /'` echo $d0 $d1 $d2 $d3 Thanks for your reply! It was very useful for me and I will definitely apply it in the future. Link to comment Share on other sites More sharing options...
t-bob Posted December 16, 2018 Share Posted December 16, 2018 i get bus errors on memory access for 0x01c14204 & 0x01c1420c. is this expected ? 92C000BA 50368518 Link to comment Share on other sites More sharing options...
martinayotte Posted December 16, 2018 Share Posted December 16, 2018 1 hour ago, t-bob said: i get bus errors on memory access for 0x01c14204 & 0x01c1420c. is this expected ? Good catch !!! The original file from https://bootlin.com/pub/mirror/devmem2.c is only supporting 32bits SoC, so for 64bits accesses, those 2 addresses are invalid. I've found patches written by denix0 here : https://github.com/openembedded/meta-openembedded/tree/master/meta-oe/recipes-support/devmem2/devmem2 The first patch to apply is "devmem2-fixups-2.patch", then we can apply "0001-devmem.c-ensure-word-is-32-bit-and-add-support-for-6.patch" ... Then run the following : d0=`./devmem2 0x01c14200 l|grep Read|sed 's/^.*: 0x/ /'` d1=`./devmem2 0x01c14208 l|grep Read|sed 's/^.*: 0x/ /'` echo $d0 $d1 Link to comment Share on other sites More sharing options...
t-bob Posted December 17, 2018 Share Posted December 17, 2018 excellent. many thanks for that. now i get this which seems like an impressive SID 6400462092C000BA:541500CE50368518 Link to comment Share on other sites More sharing options...
t-bob Posted December 18, 2018 Share Posted December 18, 2018 here's the patched devmem2 if anyone needs it devmem2-64.c Link to comment Share on other sites More sharing options...
Recommended Posts