New Post: Wrangling the EC: Adventures in Power Sequencing

As we outlined in a previous post, the Librem 14 is the first Purism laptop to ship with our new, free software Librem-EC firmware for the laptop’s embedded controller (EC). This was a big undertaking, and as with any effort of this magnitude, issues arise in corner cases that often don’t show themselves during developmental testing, when only a small number of devices are tested. One such issue was with the power sequencing — the order and timing of all the different voltage rails and power sources/signals in the laptop.

The Problem

We were preparing to ship out the first batch of Librem 14s right as we were putting the finishing touches on the firmware (both for the embedded controller, and the main coreboot/Pureboot firmware), and everything was looking good to finally get devices flashed and into our users’ hands. But as we flashed the laptops’ firmware to prep for shipping, a small but not insignificant number of devices were failing to boot. At first we thought the issue was with our flashing process, which was new for the Librem 14, as both the EC and main firmware are flashed in sequence on a live system. But re-flashing these problematic devices externally (using a USB flash programmer and a chip clip) did not resolve the issue, so the issue wasn’t with the flashing process itself.

Initial Troubleshooting

Since our flashing process didn’t appear to be the issue, the next step was to determine if the issue lie within the EC firmware or coreboot. As it is easier to get live debug output from the EC than coreboot, we started there. We compiled and flashed a debug build of the EC firmware, and attached the debugger. The debug console showed that the EC was booting and properly transitioning the main CPU from off (the S5 power state) to normal boot (the S0 power state). Since the laptop was in S0, it meant that coreboot should be running, so it was time to see what was going on there.

Read the rest of the post here:

5 Likes

I wrote a thing :slight_smile:

12 Likes

When the post refers to “future L14s” what does this mean? Those shipping starting from what X date just curious.

Also is this update going to be announced on a post or will a notification be automatically pushed to devices running PureOS telling users to install it?

The new firmware should get applied to Librem 14s that are shipped out starting next week. As far as the ones that are already shipped out, they were stable with the existing firmware (otherwise they would have been held back). But if someone wants the newer firmware anyway, they’d need to download and run our firmware update tool. I spoke too soon, we are still working on a mechanism for end users to update the EC firmware like we do with our boot firmware.

3 Likes

You need to change your opening sentence on every post to fit the title. We all know by know puri.sm makes “stuff” by now. Make it the footer. We need to see interesting “reads” up front. Otherwise it isn’t worth clicking.

1 Like

What exactly do you mean? The opening sentence of the blog post directly references the title. Nothing to do with “making stuff.” If you’re referring to the link preview generated by the forum, that’s something else entirely.

When you see “Read the rest of the post here:”

Same blurb every time.

Granted, it was at the top of my screen. I should have scrolled “up”.

It would be better had I said, “When you reference other puri.sm posts, change the opening sentence to fit the title.”

that link preview is auto-generated by the forum software, and likely pulled from the domain itself not the page being linked. I’m not sure how easily we can fix that, but seems like an odd thing to be upset over. Especially given the first few paragraphs of the blog post are readable before the link.

2 Likes

Who said anything about being upset?

It was a suggestion.

(I have other things to be upset over, like the inability of librem.one team support to create a new email address after 4 weeks.)

re-reading your original reply, it’s fairly aggressive - “you need to,” “we all know by now,” “not worth clicking.” That certainly doesn’t read as a helpful suggestion, IMO. I’d argue that repeating the first sentence or two of the blog post, for which the first few paragraphs are already previewed, doesn’t have any value either. If the first few paragraphs of the post aren’t enticing enough, I’m not sure how another sentence is going to help.

1 Like

While emphatic and conditional, I’ll assert I was not upset. My IMO versus your IMO.

(Remember I wrote it versus the standard quote blurb and not original. Which as I now understand it can’t be fixed easily.)

1 Like

Pretty impressive that you figured out what was the root cause of the problem with the EC. I’m guessing that the laptop ODMs (Compal, Quanta, Wistron, Inventec, Pegatron, etc) and BIOS makers (AMI, Award and Phoenix) have to figure out these sorts of problems, but then they just use the same code over and over, and nobody touches it for years since it just works.

One of the reasons why I try to support Linux hardware companies like Purism is because they can ask component suppliers for the proprietary source code and the documentation that isn’t publicly released, and with that information, so they have more power to liberate hardware than random free software hackers.

Being able to control our own hardware is going to become more and more important in the future as the industry increasingly embraces Surveillance Capitalism and planned obsolescence. It is pretty clear to me that a lot of hardware in the future is going to become like Apple’s locked-down devices, and we won’t have the ability to just buy any PC that we want and install whatever OS that we want. PCs are going to become like phones and tablets with custom ARM processors and locked bootloaders, and it is going become harder and harder to find PCs where we can install Linux. If we want to avoid that dark future, we need Linux hardware companies that are capable of designing devices for us that aren’t locked down.

I foresee a future, where most of the PCs on the market are running a Qualcomm Snapdragon or MediaTek Dimensity processor, or they are custom ARM processors made by OEMs like Apple’s M1. At this point, Dell, HP and Lenovo are mostly branding companies, and I doubt that that the Taiwanese laptop ODMs (Quanta, Compal, etc.) are going to design their own custom ARM processors, but it looks like Google and Microsoft will, and Samsung will also have the opportunity to become a major PC maker with its Exynos processors. Eventually the trade war with China will end, so Huawei can get its chips made again by TSMC, so I expect Huawei to also become a significant PC maker.

Whatever we may think about Intel and AMD, they are both major contributors to the Linux kernel and they make sure that their processors are quickly supported by mainline Linux, so everything works with the standard distros within a few months after release. With Qualcomm, we get decent access to their Linux kernel code through Code Aurora, but it usually takes 3-4 years to get Snapdragon processors fully supported in mainline Linux, and every other major ARM processor is worse. Samsung is becoming better with its recent Exynos processors, but MediaTek, Huawei, Apple and UNISOC are simply rotten.

I assume that Google and Microsoft will decide that their custom ARM processors should be able to run on mainline Linux, but both of those companies have embraced Surveillance Capitalism in a major way for their operating systems. I foresee a future where PC makers have profit sharing agreements with Google and Microsoft based on targeted advertising, so they will be incentivized to lock the bootloaders so people don’t change the preinstalled operating system. Of course, businesses won’t put up with all the spyware, so there will be “enterprise PCs” that allow unlocking the bootloader and some replaceable parts (standard RAM and a few M.2 slots for SSD, WiFi/BT, cellular modem), but most people will be stuck with the “consumer PCs” that are locked-down devices loaded with spyware with everything soldered to the motherboard.

7 Likes