Linux Luddites interview Ron Minnich in episode #49.
Jump to minute 36 to hear Ron discuss a number of coreboot related topics, including; coreboot, legacy BIOS, EFI, libreboot, chromebooks, Purism, RISCV and some other interesting things.
Linux Luddites interview Ron Minnich in episode #49.
Jump to minute 36 to hear Ron discuss a number of coreboot related topics, including; coreboot, legacy BIOS, EFI, libreboot, chromebooks, Purism, RISCV and some other interesting things.
TL;DR: Book your flights/hotel now and submit talks! More info at http://coreboot.org/Coreboot_conference_Bonn_2015
Dear vendors, developers, users and interested parties,
on behalf of the Federal Office for Information Security (BSI) Germany I would like to invite you to the coreboot conference and developer meeting on October 9-11 2015 in Bonn, Germany.
This conference and developer meeting is geared towards manufacturers of hardware (processors, chipsets, mainboards and servers/ laptops/ tablets/ desktops/ appliances) as well as developers of firmware with an interest in coreboot and the possibilities it offers as well as (potential) coreboot users. Both professionals and hobbyists are invited.
The Federal Office for Information Security (BSI) in Germany will host the conference in Bonn, Germany. As the national cyber security authority, the goal of the BSI is to promote IT security in Germany. For this reason, the BSI has funded coreboot development in the past for security reasons.
The date of the coreboot conference is Friday October 9 to Sunday October 11, 2015. This is scheduled directly after Embedded Linux Conference Europe to make travel arrangements easier for people attending both events.
For the rest of the invitation letter, travel information, a call for presentations and more please see http://coreboot.org/Coreboot_conference_Bonn_2015
Author: Larry.Moberg@puri.sm
This post gives some details on the Librem 15 rev2 prototype. One challenge with developing BIOS is finding parts that can be reused; coreboot makes heavy reuse of certain pieces of code.
Starting with the chips on the back of the mainboard, the 15 prototype uses the same ene KB3930QF-A1 as the Librem 13, and it is configured to read from an external Macronix MX25L512 SPI flash for firmware. The 15 has this SPI chip on the front side of the board between the DIMMs and the USB3 ports.
The 15 prototype uses a Realtek ALC269 codec via the AC’97. The Librem 13 should have a very similar codec.
On the front (the side visible just by removing the back laptop case), the 15 prototype uses an MX25L6406E SPI flash for the BIOS. The Librem 13 prototype uses a GD25Q64B, but other than the Intel Firmware Descriptor fields for JEDEC ID etc, these chips are interchangeable.
Both CPUs are Broadwell-U. They use the same FSP. They both have the LPC bus exposed on pads.
These similarities help us by reducing the amount of variation between the board subdirs in coreboot and can use the same development rig.
We’ve put together the following tests to validate coreboot builds:
The effort to write Free Software implementations for all binary blobs will continue in parallel.
Secondary items would include further tweaks to PCI IRQ routing, additional ACPI tables, and optimizing battery life/power use.
this report covers commits 1cbef1c to 410f9ad
The vast majority of changes in these two weeks were upstreamed from Chrome OS and cover work on the Intel Skylake chipset and two mainboards based on it.
QEmu and Getac P470 saw a couple of improvements.
On AMD, there were some bugfixes to Fam10h concerning VGA memory and SMM initialization. The latter was in response to the Memory Sinkhole vulnerability, although it is as yet unclear if it even affects AMD.
Finally, an important memory structure used on pre-AGESA AMD code is now also usable outside Cache-as-RAM.
There was more progress on fixing 64bit issues across the codebase.
Our reference compiler was updated to gcc 5.2. This became necessary to support an update to the RISC-V specification.
Our other tools also saw a couple of improvements: ifdtool now works for descriptors on Skylake and newer platforms. cbfstool saw some refactorings that allow us to extend the format. cbmem now emits the accumulated boot time.
In our configuration system, the Kconfig definitions were cleaned up, so that boards don’t define symbols that their code never uses, that Chrome OS capable boards define “MAINBOARD_HAS_CHROMEOS” (which defines the capability) instead of “CHROMEOS” (which defines that this mode should be
used) and that dependencies between Kconfig options become more consistent.
There is a pending commit on gerrit to enforce clean dependencies by making errors out of kconfig’s warnings, that the latter changes prepare for.
On the build system side, it is now possible to build SeaBIOS as part of our build system even with an enabled ccache. The payload config and revision can also be stored in CBFS for better reproducibility. Finally, it’s possible to override the location from where the vboot source code for Chrome OS-style verified boot is taken from.
In libpayload, the non-accelerated memmove implementation now also works with size == 0 (instead of trying to move 4GB), and there were a couple of bug fixes to the DWC2 (some ARM) and XHCI (USB3) controller drivers, including support for the newer XHCI 1.1 specification.
In the last post I talked about using aarch64-linux-gnu-gdb and debugging in qemu. In these two weeks I was intensely involved in stepping through gdb, disassembly and in-turn debugging the qemu port. I summarise the major highlights below.
Firstly, the correct instruction to invoke qemu is as follows
./aarch64-softmmu/qemu-system-aarch64 -machine virt -cpu cortex-a57 -machine type=virt -nographic -smp 1 -m 2048 -bios ~/coreboot/build coreboot.rom -s -S
After invoking gdb, I moved onto tracing the execution of the instructions step by step to determine where and how the code fails. A compendium of the code execution is as follows
gdb) target remote :1234Remote debugging using :1234(gdb) set disassemble-next-line on(gdb) stepi0x0000000000000980 in ?? ()=> 0x0000000000000980: 02 00 00 14 b 0x988(gdb)0x0000000000000988 in ?? ()=> 0x0000000000000988: 1a 00 80 d2 mov x26, #0x0 // #0(gdb)0x000000000000098c in ?? ()=> 0x000000000000098c: 02 00 00 14 b 0x994(gdb) cContinuing.^CProgram received signal SIGINT, Interrupt.0x0000000000000750 in ?? ()=> 0x0000000000000750: 3f 08 00 71 cmp w1, #0x2
The detailed version can be seen here.
The first sign of error can be seen here, where the instruction is 0 and the address is way off.
0x64672d3337303031 in ?? ()
=> 0x64672d3337303031: 00 00 00 00 .inst 0x00000000 ; undefined
To find insights as to why this is happening, I resorted to tracing in gdb. This can be done by adding the following in the qemu invoke command. This creates a log file in /tmp which can be read to determine suitable information.
-d out_asm,in_asm,exec,cpu,int,guest_errors -D /tmp/qemu.log
Looking at the disassembly, it can be seen that execution of instructions till 0x784 is correct and it goes bonkers immediately after it. Looking at the trace, this is where the code hangs
IN:0x0000000000000784: d65f03c0 ret
0x0000000000000908: 97fffe06 bl #-0x7e8 (addr 0x120)…0x0000000000000120: 3800a017 sturb w23, [x0, #10]0x0000000000000124: 001c00d5 unallocated (Unallocated)…
Taking exception 1 [Undefined Instruction]…from EL1…with ESR 0x2000000
0000000000010908 <arm64_c_environment>:10908: 97fffe06 bl 10120 <loop3_csw+0x1b>1090c: aa0003f8 mov x24, x0
Now loop3_csw is defined at (from objdump)
0000000000010105 <loop3_csw>:
Thus it wants to branch and link to 0x120 but smp_processor_id is at 121.
smp_processor_id is at (from objdump)
0000000000010121 <smp_processor_id>:
Hello!
During week 13 I worked on:
All functions and variables are now documented in javadoc style, I also attached some comments in code, documentation can be generated with doxygen. Besides documenting code I prepared documentation for functional tests which I executed. It contains described test cases and test results.
To make automatic building of coreboot image feature more useful it is necessary to add more data about working configurations. Every added configuration also needs to be tested to check if tool correctly recognizes hardware on target system and builds working coreboot image. I can do this for my hardware, so of course I did, I can also add some fake configurations for testing purposes, but I can’t do this for hardware which I do not have.
Here is description of application, building process and information about data I need to add a working configuration: link. I will be grateful for every configuration which you will send!
Tool is targeted mostly for users which are not familiar with coreboot and flashrom details and also dont know how to proceed with building a working coreboot image. Taking it into consideration I changed most debug/error messages to appear in a form of a popup with description what action is needed from application user to proceed or what went wrong.
End user flash tool is my first experience with coreboot and flashrom. Both of them are not easy projects, especially for someone who does not have great experience with firmware programming, because most code involves serious low level implementations, but in End user flash tool project I have been working always few layers above it because my work involved GUI programming, system programming, integration of external tools like bios_extract or cbfs_tool and adding few features to libflashrom. By doing it I learned a bit how these tools work internally. I am now also more familiar with coreboot itself. This work gave me good basics and smooth entry to the coreboot world. As all of this is interesting and working for such project is very satisfying I want to dive in more and also maintain and extend the tool.
We had an table on the cccamp 2015 in Mildenberg. The cccamp (chaos communication camp) is one of Europe big hacker events every 4 years where several hackers come together and do camping. Everybody could relax a little bit and talk to each other in a nice background. The camp infrastructure contained own wifi, dect, gsm network and a 10 GBit uplink in the middle of nowhere. You could give your tent a 1 Gbit uplink to the internet ;).
Our table was in the BER village, named to the never finished airport near Berlin, Germany. Several people from the coreboot community showed up (CareBear, felix, mue, paulk-collins, tnias, zaolin, […]) and we shared a lot of ideas to each other. In that way we flashed several laptops, replaced some WSON chips with SOIC-8’s. Also we’ve found another bug in the sandybridge ram init, a fix is waiting for merge on gerrit #11248.
paulk-collins came by to talk about a EC open source firmware for the ENE KBxxx embedded controllers.
One of the MAME hackers visited us to get ideas how to port a Dell notebook (ENE KBxxx based EC).
Felix did some work on ME as well other hackers joined him.
Tnias and zaolin started the idea of a raspberry pi doing all the flashing including detection of the device. This could let us drink more Mate while other do the flashing themself.
In the end a thunderstorm reached our tent and we had to evacuate it.
Hopefully everybody can come to Bonn this year.
Hello!
During weeks 10, 11 and 12 I worked on:
As I mentioned in my last post, if coreboot image should be built automatically then application needs to collect hardware specific data. During last weeks I added functions responsible for:
It is now possible to build and flash coreboot image by clicking few application buttons without taking care which options are correct for system. Of course this is not possible for all hardware configurations, for now this is very limited, but with time database of known good configurations will grow and more users will be able to flash coreboot in such easy way.
Process of automated image building:
I decided to change a look of ‘ROM options’ tab. Previously just raw output of cbfs_tool with rom contents info was redirected to GUI log window. Now it is visible in a form of table, what in my opinion is more readable.
GSoC “pencils down” date is coming up on Friday, so only few days are left. I want to use this time for:
What after GSoC? I would like to still contribute, there is place for many improvements and possible extensions.
A question coreboot developers are commonly asked is this: “can you port coreboot to my board?”
For my first coreboot post I’d like to show some of the steps required to port coreboot to the Librem 13. In particular, this post is a good example of some of the challenges involved in such a port.
This post is also the first weekly progress update for the Librem 13. Please email me with questions or comments: larry.moberg@puri.sm.
The Librem 13 has convenient test points for the LPC bus. This allows a bed-of-nails test setup to quickly diagnose problems during manufacturing. But it has the added bonus of facilitating coreboot development.
The earliest coreboot stages are the most important to get right. Debugging using port 0x80 writes on the Librem 13 is possible because port 0x80 writes are configured as LPC writes, which can be traced by connecting to the LPC pins.
BIOS development is hard. I applied a little too much force on the SPI flash chip and tore the solder pads off the board.
I attached the LPC connection to a test setup and didn’t check using a multimeter before applying power. LAD2 was shorted to LAD3. This immediately bricked the laptop without even releasing any smoke. Remembering to double check for shorts is a tedious but important lesson.
The LPC bus wires go under the board. Don’t Cross The Streams!
Imagine a laptop where the LPC bus is only available by soldering directly to the pins of the EC. Yes, they exist! That level of fine soldering is a significant barrier for future coreboot hackers. (The Librem 13’s external USB ports are all USB 3, which makes an EHCI debug port harder, but the LPC bus is a good substitute.)
Porting coreboot to a new laptop takes a lot of time and work. Even a good laptop design like the Librem 13 where the LPC pads are available still has a non-trivial level of engineering work to get to a Free Software BIOS.
Next week, I’ll document the engineering considerations around writing to the SPI flash chip, and how that affects coreboot development.
Hello!
During weeks 7, 8 and 9 I worked on:
Main purpose of End user flash tool project is to provide an easy way to build and flash coreboot ROM. To achieve it there is a need to collect hardware specific data such as:
Sometimes when flashrom probes for all known chips there are multiple chips found. I needed to implement a function which will return all such chips to GUI. Now in this case it is possible to just select which chip is correct by clicking a proper one in dialog box.
I decided to change a bit visual design of the app. There is a new (but most important for the project) tab – ‘Auto’. In this tab it is possible to gather hardware specific data, which will be then used in a process of automatic building of coreboot image and flashing. I also decided to move programmer selection combobox from ‘Flash tab’ to main application window and add edit text field for parameters.
GSoC ends in next week, application is almost done (but will be improved and extended also after GSoC), so this is time for some testing! I would be very grateful if some of you could help me with it. It would be the best if you have Lenovo T60 and external programmer. First there is a need to collect some hardware specific data and then it would be possible to check if application creates working coreboot image basing on this data. So it is not only about testing, but also about making white list of hardware configurations bigger to let more users flash their hardware with coreboot in easy way!
Please contact me on:
Thanks in advance!