2019-04-17.log

mntmnold reform unit (my personal) with kernel 5.1, sway, waybar, rofi, firefox. pretty snappy https://twitter.com/mntmn/status/1118248031558696961?s=2101:14
+ darth-cheney (~darth-che@pool-173-52-211-226.nycmny.fios.verizon.net)02:44
- darth-cheney (QUIT: Ping timeout: 246 seconds) (~darth-che@pool-173-52-211-226.nycmny.fios.verizon.net)09:20
+ darth-cheney (~darth-che@pool-173-52-211-226.nycmny.fios.verizon.net)11:16
- darth-cheney (QUIT: Ping timeout: 250 seconds) (~darth-che@pool-173-52-211-226.nycmny.fios.verizon.net)11:20
Jookiamntmn: changing chipsets all of a sudden seems a bit risky11:56
mntmnjookia no risc no fun12:02
Jookiaok you got me12:02
Jookiaisn't firmware still an issue12:02
mntmnfor imx8m “only” ddr training and hdmi12:03
mntmnand hantro but that’s very optional12:03
mntmnhdmi is also not strictly required if you want to avoid it. leaves ddr training. we have to take a look at what that means. is it just a bunch of pokes or is it something turing complete?12:09
mntmnalso we could potentially RE that part12:09
Jookiayou'd probably have to scope it12:14
mntmnhave you looked into the DDR stuff by any chance?12:14
Jookianope12:16
Jookiait's proprietary so it must be impossible to do ;)12:17
mntmnhttps://community.nxp.com/docs/DOC-34017912:19
mntmnimx6 has a ddr “blob” too, a bunch of pokes for setting the ram timing12:19
mntmnbut nobody seems to have a problem with that :) it’s in u-boot12:19
Jookiaoh really?12:19
mntmnsure, without it the system goes pretty crazy and spills garbage12:20
Jookiawhich file is it? just curious12:20
mntmnafaik you have to account for the properties of the ddr traces for every board or mem chip12:21
Jookiaat this point it doesn't really bother me since it's code that runs one time and isn't going to do any weird security stuff12:22
mntmnhttps://github.com/mntmn/u-boot/blob/mntreform/board/mnt/reform/mntreform.cfg12:22
mntmnjookia exactly, that’s my opinion too12:22
mntmnthe blob discussion needs to be much more differentiated12:23
Jookiathere's also a lot more blobs such as the hardware itself and anything burned in to ROM12:23
rvensebut theoretically the blob could do anything, right?12:23
Jookiathe imx6's boot rom has a security vuln that effectively means anyone with physical access can bypass secure boot12:24
rvensesame as the boot rom12:24
Jookiawhich is both proprietary and unfixable12:24
rvenseJookia: it does?12:24
Jookiayeah, it's an errata12:24
Jookiait's fixed on newer chips12:24
rvensehuh, interesting12:24
Jookiait could theoretically do anything12:25
mntmnrvense, the question is, is the blob code or data12:25
mntmnand if code, for what kind of mcu/cpu/ip block and what can that do12:25
mntmnvs what hard code/data is in the ip anyway that you never see12:25
rvensevery true12:26
rvenseftr i think you're completely right about nuance, both concerning blobs and other things12:27
Jookiait's strange to be OK with proprietary chips but not proprietary code that brings up the chips12:27
mntmnthe safest bet would be something like xilinx zynq and then use only open IP for the graphics and IO, defined in the fpga part.12:27
mntmnjookia yes it’s irrational12:27
Jookiabunnie did a talk about all this a few years ago and suggested things like clearly defined interfaces with security fences12:28
mntmncool12:28
Jookiaif you didn't see it i can link12:28
mntmnplease do12:28
mntmnexample: if you hook up your black box baseband to your soc via pcie and let it dma anything then that’s not so smart12:29
Jookiait's from the 2017 and talks about risc-v, a bit about the novena, and expectations from the open source community versus the actual problems in hardware https://www.youtube.com/watch?v=zXwy65d_tu812:29
Jookia25 minutes in is a good wakeup call :P12:30
mntmnthanks, gotta watch!12:32
mntmni will do a bit more explaining but my current plan is to deliver a system that is as open and auditable as possible but at the same time also has enough performance for daily tasks12:34
mntmn100% open is not possible today but it can be dramatically more open than a laptop from a big manufacturer12:35
Jookiayep12:35
mntmnand then iterate over the next years towards more and more openness, hopefully gain enough momentum to make it more attractive for chip suppliers etc / to be able to source risc-v chips or hybrid solutions with fpga12:37
mntmnwhile already all the mechanicals and input devices, custom pcbs are and will be open12:37
mntmnhttps://www.devever.net/~hl/ortega12:45
rvensei love the modular approach from so many perspectives. all those perfectly good displays, casings and keyboards that get thrown away because a transistor or two inside has failed or is deemed to old, it breaks my heart13:15
+ darth-cheney (~darth-che@pool-173-52-211-226.nycmny.fios.verizon.net)13:16
- darth-cheney (QUIT: Ping timeout: 244 seconds) (~darth-che@pool-173-52-211-226.nycmny.fios.verizon.net)13:20
mntmnvery true rvense13:24
mntmni'm taking a closer look at the imx8 firmware files now13:24
mntmnhdmi firmware is for IP by cadence. it's one file, around 100kb. seemingly uncompressed, it has some strings like > SHA224..SHA256..   > $Revision: 1202213:31
mntmnat the end it has a signature by NXP > 0x194C4         Certificate in DER format (x509 v3), header length: 4, sequence length: 68013:31
mntmnit has a bunch of tables / gradient / LUT data and some stuff that looks like code, but binwalk -A doesn't find the architecture13:32
mntmnthis diagram shows an "uCPU" in the cadence HD TX IP https://ip.cadence.com/uploads/images/DIP-v2-Images/HD-Display-TX-Controller.png13:38
mntmnthis firmware blob is very similar and contains blocks of identical data https://github.com/woodsts/linux-firmware/blob/master/cadence/mhdp8546.bin13:45
mntmnreferenced here https://patchwork.kernel.org/patch/10570461/13:45
mntmnsorry, i mean referenced here in a driver https://patchwork.kernel.org/patch/10613795/13:46
mntmnaccording to an etnaviv developer, the uCPU is most likely xtensa.14:03
+ darth-cheney (~darth-che@pool-173-52-211-226.nycmny.fios.verizon.net)14:06
mntmnAFAIK the DSP is also xtensa. this ISA is also popular in the form of the ESP wifi MCU chips14:06
adjtmmntmn, I really love Reform, it's the most exciting laptop since Novena, and it even improves some weakness of Novena!14:10
mntmnthanks adjtm14:10
adjtmbut I disagree with you about changing SOC14:10
mntmnwell, it's always possible to do a version with imx6 if you need that14:10
adjtmI don't use Novena as much as I'd like, but it is not because of lack of processing power, but because novena form factor is not very handy as a portable device14:11
mntmnlike, we could backport some improvements to the existing board14:11
adjtmreform solves that problem14:11
adjtmalso, xillinx tools are horrible, so I have played more with lattice fpgas than with the one included with novena14:12
adjtmanother weakness of novena is the complexity, specially the power board that it's complex, with a lot of expensive components etc.14:13
adjtmreform is much more simple14:13
mntmninteresting, this PDF features "i.MX 10" https://community.nxp.com/servlet/JiveServlet/downloadBody/341872-102-2-287319/AMF-AUT-T3361.pdf15:00
mntmnand i.MX8DX15:00
mntmnJookia, check page 20 of that pdf15:04
mntmnit shows the difference of DDR init between 8QM and 8MQ15:04
mntmnso, i.mx8m ddr init is done by SCU firmware. but i.mx8qm ddr init is just pokes!15:05
Jookiaooh, fun15:05
mntmnthat's actually nice15:05
mntmnsorry, it's not SCU firmware on i.mx8m, it is > Performed by the PHY MCU (firmware loaded into MCU IRAM/DRAM)15:06
mntmnso on i.mx8qm everything is done by the SCU (which afaik is an ARM as well?) and on i.mx8m the DDR PHY (not the DDR controller!) has mystery meat MCU where those iram and dram files go15:07
Jookiayeah i believe the librem is loading the firmware to the DDR PHY15:08
mntmnboth chips have the same DDR controller but not the same DDR PHY (8m has a newer with integrated MCU, 8qm has an older version that does not have such MCU)15:08
mntmnso in this regard for me the 8qm is better, one less mystery MCU there15:09
JookiaPurism are still loading the firmware from MMC -> CPU -> M4 CPU -> DDR PHY15:09
Jookiafor some reason15:09
mntmnyes15:09
Jookias/MMC/SPI/ in future15:10
mntmnthey think this way they can get around some RYF rules15:10
mntmnwhich is silly15:10
JookiaIt's not even running on the CPU :\15:10
mntmnyes15:10
mntmnit's running on a mystery MCU in the PHY15:10
mntmnso it's complete nonsense to make some weird workaround there15:10
mntmni wonder what kind of MCU that is. so far i couldn't get anything useful out of the binaries.15:11
mntmnaha "embedded calibration processor" https://www.synopsys.com/dw/images/ds/DDR43-phy-blockdiagram.jpg15:14
mntmnok the ISA is ARC15:16
mntmni have the datasheet, it says > The PUB also includes an embedded ARC® calibration processor to execute hardware-assisted, firmware-based training algorithms15:17
Jookiasweet15:18
mntmnthat processor's job is to switch between different configuration states of the DDR reacting to temperature changes for example15:20
mntmn> – Each trained state can have unique frequency, I/O equalization and I/O drive and ODT impedance settings15:20
mntmn> – Frequency changes are initiated by the DFI interface without software involvement15:20
mntmn> – Each trained state is maintained across voltage and temperature variation15:20
Jookiasounds complicated15:35
mntmncan’t be super complicated, the firmware is quite little15:39
mntmni’m trying to find an ARC disassembler15:39
mntmnah https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases?after=arc-2017.03-eng00215:41
+ B[] (~Thunderbi@122-61-190-38-fibre.sparkbb.co.nz)15:42
Jookiabeware reverse engineering tainting15:46
Jookiaapparently to get ryf certification the blob can't touch the CPU, so they do it from SPI -> coprocessor -> DDR PHY16:17
adjtmJookia, so for ryf certification the application processor can't read the blog but you can add an auxiliary processor to read it?16:19
Jookiaapparently there's an exception that you can say the M4 CPU is a single-purpose CPU just for loading blobs16:20
Jookiaand thus it's ok16:20
mntmnyeah i find that pretty silly because that doesn't make any difference for the user, except makes the init more complicated16:21
Jookiawell, it means the user loses a CPU ;)16:22
mntmnarc disassembly yields no success. but this could be an RE project for later. i don't think it will have super much value though. i don't think the ddr phy interface is a security risk here16:22
mntmnJookia: hehe16:22
mntmntrue16:22
mntmnbecause the PHY firmware can't have access to the actual data on the DDR's data pins16:24
mntmnbut anyway, this makes 8qm more attractive for me (no phy mcu). more realistic to use 8qm in a blob-free manner16:25
JookiaBut doesn't that mean the 8qm will actually run a blob on the CPU16:27
adjtmwhere is the limit? can I add a PowerVR based SOC as a second processor running proprietary software (read it by itself from a flash), connect it to the main processor through ethernet, using glx to render and ask for ryf certification?16:28
adjtmthat second processor would be single-propose, as the application processor only use it to render...16:28
- darth-cheney (QUIT: Ping timeout: 246 seconds) (~darth-che@pool-173-52-211-226.nycmny.fios.verizon.net)16:29
Jookiai think the stance is ryf only applies to the CPU16:30
Jookiageneral purpose CPU16:31
adjtmso my propose could be approved?16:32
adjtmas soon as I do not document how to reflash the image for that second processor16:33
JookiaI think it's a case by case basis16:33
JookiaLike the standards that apply to the librem are different to the ones that applied to the Novena16:33
Jookiaand EOMA68(?)16:34
JookiaI believe bunnie referenced in the video I linked that rms effectively wanted a custom version of the imx6 with hardware removed just because it could accept nonfree blobs16:36
mntmnJookia, the ddr init code for the 8qm is pretty short and commented at least, sec16:40
mntmnhttps://github.com/Freescale/imx-mkimage/blob/master/iMX8QM/imx8qm_dcd_1.6GHz.cfg#L3516:41
Jookiaah16:41
mntmnand it's only running once (at boot)16:42
mntmnradare2 / cutter can disassemble the imx8m DDR firmware when architecture set to "arc"16:46
mntmnit can also disassemble the hdmi firmware with architecture "xtensa"16:52
Jookiainteresting17:23
mntmni dumped my findings in a twitter thread, will do a real writeup at a later point https://twitter.com/mntmn/status/1118530994871705600?s=2017:30
+ darth-cheney (~darth-che@pool-173-52-211-226.nycmny.fios.verizon.net)18:25
- darth-cheney (QUIT: Ping timeout: 268 seconds) (~darth-che@pool-173-52-211-226.nycmny.fios.verizon.net)18:30
+ darth-cheney (~darth-che@pool-173-52-211-226.nycmny.fios.verizon.net)20:25
- darth-cheney (QUIT: Ping timeout: 250 seconds) (~darth-che@pool-173-52-211-226.nycmny.fios.verizon.net)20:31
- B[] (QUIT: Ping timeout: 250 seconds) (~Thunderbi@122-61-190-38-fibre.sparkbb.co.nz)20:47
* andrej235 -> andrej_test21:25
* andrej_test -> andrej23521:26

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!