<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Post on Arthur's blog</title><link>https://blog.aheymans.xyz/post/</link><description>Recent content in Post on Arthur's blog</description><generator>Hugo</generator><language>en</language><copyright>Copyright © 2018–2024, Arthur Heymans; all rights reserved.</copyright><lastBuildDate>Mon, 02 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.aheymans.xyz/post/index.xml" rel="self" type="application/rss+xml"/><item><title>Rust firmware tools: rflasher and rem100</title><link>https://blog.aheymans.xyz/post/rflasher/</link><pubDate>Tue, 24 Feb 2026 17:24:40 +0100</pubDate><guid>https://blog.aheymans.xyz/post/rflasher/</guid><description>&lt;p>
After the &lt;a href="../serprog_in_rust">serprog adventures&lt;/a> with Embassy on microcontrollers, it was time to tackle the host side of firmware tooling. Two tools that come up constantly in firmware development are &lt;a href="https://flashprog.org/wiki/Flashprog">flashprog&lt;/a> for reading and writing SPI flash chips, and the &lt;a href="https://www.dediprog.com/product/EM100Pro-G2">Dediprog EM100Pro&lt;/a> tool for controlling the EM100 SPI flash emulator. Both are C tools that have been around for a while. We ported both to Rust: &lt;a href="https://github.com/9elements/rflasher">rflasher&lt;/a> and &lt;a href="https://github.com/ArthurHeymans/rem100">rem100&lt;/a>. On top of that, both now have browser-based WebUIs that run as pure WASM with no server-side processing.&lt;/p></description></item><item><title>Vibe Coding an Emacs-Style Hugo Theme</title><link>https://blog.aheymans.xyz/post/hugo-emacs-theme/</link><pubDate>Mon, 02 Feb 2026 00:00:00 +0000</pubDate><guid>https://blog.aheymans.xyz/post/hugo-emacs-theme/</guid><description>&lt;p>
I&amp;#39;ve been using &lt;a href="https://github.com/panr/hugo-theme-terminal">hugo-theme-terminal&lt;/a> for my blog and really liked its clean, terminal-inspired aesthetic. But as someone who spends most of their day in Emacs, I wanted something that felt more like home.&lt;/p>
&lt;p>
So I vibe coded an Emacs-style theme with Claude. The entire thing - HTML templates, CSS, JavaScript interactions - was built through conversation with AI.&lt;/p>
&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
Features
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;ul>
&lt;li>Dired-style article list with reading time, word count, and dates&lt;/li>
&lt;li>Window splitting with &lt;code class="verbatim">C-x 2&lt;/code> (vertical) and &lt;code class="verbatim">C-x 3&lt;/code> (horizontal)&lt;/li>
&lt;li>Navigate with &lt;code class="verbatim">n/p&lt;/code>, open with &lt;code class="verbatim">RET&lt;/code>, go back with &lt;code class="verbatim">q&lt;/code>&lt;/li>
&lt;li>Modus Vivendi (dark) and Modus Operandi (light) themes, toggle with &lt;code class="verbatim">t&lt;/code>&lt;/li>
&lt;li>Emacs modeline showing buffer name, scroll position, and mode&lt;/li>
&lt;li>Even has a working menu bar&lt;/li>
&lt;/ul>
&lt;/div>
&lt;/div>
&lt;div id="outline-container-headline-2" class="outline-2">
&lt;h2 id="headline-2">
The Result
&lt;/h2>
&lt;div id="outline-text-headline-2" class="outline-text-2">
&lt;p>
The theme is available at &lt;a href="https://github.com/ArthurHeymans/hugo-emacs-theme">github.com/ArthurHeymans/hugo-emacs-theme&lt;/a>.&lt;/p></description></item><item><title>Experimenting with a faster TRAMP backend using Rust and JSON-RPC</title><link>https://blog.aheymans.xyz/post/emacs-tramp-rpc/</link><pubDate>Fri, 16 Jan 2026 11:23:08 +0100</pubDate><guid>https://blog.aheymans.xyz/post/emacs-tramp-rpc/</guid><description>&lt;p>
TRAMP is one of Emacs&amp;#39; killer features. The ability to transparently edit files on remote machines, run shells, and use version control as if everything were local is remarkable. The implementation is impressively portable - it works over SSH, sudo, docker, and countless other methods by cleverly parsing shell command output.&lt;/p>
&lt;p>
I&amp;#39;ve been experimenting with an alternative approach that trades some of TRAMP&amp;#39;s universality for speed improvements in the common SSH use case. This is very much an alpha project and nowhere near as battle-tested as TRAMP, but the early results are promising enough that I wanted to share it and get feedback.&lt;/p></description></item><item><title>Sending receipts to my accountant from Emacs</title><link>https://blog.aheymans.xyz/post/sending_docs_to_accountant_from_emacs/</link><pubDate>Thu, 11 Dec 2025 14:19:22 +0100</pubDate><guid>https://blog.aheymans.xyz/post/sending_docs_to_accountant_from_emacs/</guid><description>&lt;p>
Living inside Emacs is a dream - email, git, project management, writing, coding all in one environment. But every so often, something forces you back to a web browser. Uploading receipts to my accountant through ClearFacts was one of those moments.&lt;/p>
&lt;p>
Every month, receipts and invoices accumulate that need to reach my accountant. ClearFacts provides an API for this, but the journey from documentation to working solution proved more interesting than expected.&lt;/p></description></item><item><title>My first emacs package: lsp-cargo-feature-switcher</title><link>https://blog.aheymans.xyz/post/emacs-lsp-rust-features-revisited/</link><pubDate>Thu, 16 Oct 2025 18:16:52 +0200</pubDate><guid>https://blog.aheymans.xyz/post/emacs-lsp-rust-features-revisited/</guid><description>&lt;p>
This explains how to properly configure LSP Rust features in Emacs and introduces an interactive tool for managing them.&lt;/p>
&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
Glossary
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;ul>
&lt;li>&lt;strong>rust-analyzer&lt;/strong>: The LSP server for Rust that provides IDE-like features in editors.&lt;/li>
&lt;li>&lt;strong>Cargo features&lt;/strong>: Conditional compilation flags in Rust projects defined in Cargo.toml.&lt;/li>
&lt;li>&lt;strong>LSP&lt;/strong>: Language Server Protocol, providing language intelligence to editors.&lt;/li>
&lt;li>&lt;strong>.dir-locals.el&lt;/strong>: Emacs mechanism for setting directory-local variables.&lt;/li>
&lt;/ul>
&lt;/div>
&lt;/div>
&lt;div id="outline-container-headline-2" class="outline-2">
&lt;h2 id="headline-2">
The wrong way and the right way
&lt;/h2>
&lt;div id="outline-text-headline-2" class="outline-text-2">
&lt;p>
In my previous post &lt;a href="https://blog.aheymans.xyz/post/emacs-lsp-rust-features/">Making Emacs LSP work with Rust conditional features&lt;/a>, I suggested using &lt;code>safe-local-variable-values&lt;/code> to bypass Emacs&amp;#39; safety prompts for LSP rust features. That approach was wrong. The code I suggested:&lt;/p></description></item><item><title>Adding MCP support to Aider via NixOS overrides</title><link>https://blog.aheymans.xyz/post/aider_with_mcp/</link><pubDate>Thu, 03 Jul 2025 16:29:32 +0200</pubDate><guid>https://blog.aheymans.xyz/post/aider_with_mcp/</guid><description>&lt;p>
In software engineering the part I like the least is the actual typing of coding.
LLMs provide a nice solution to this problem. With very precise prompting and the right documentation, code, text, … in the context the code output is very close to how I would write it.&lt;/p>
&lt;p>
My preferred tool until now was &lt;a href="https://aider.chat/">aider&lt;/a>. It works great, but the development pace seems to have slowed sadly.
One of the latest innovation in the vibe coding space has been &lt;a href="https://modelcontextprotocol.io/introduction">model context protocol&lt;/a>.
MCP is basically a standardized way to provide tools to LLMs and the majority of the AI coding agents are using it.&lt;/p></description></item><item><title>Making Emacs LSP work with Rust conditional features</title><link>https://blog.aheymans.xyz/post/emacs-lsp-rust-features/</link><pubDate>Wed, 11 Jun 2025 11:23:17 +0200</pubDate><guid>https://blog.aheymans.xyz/post/emacs-lsp-rust-features/</guid><description>&lt;p>
So here is where it all started. I&amp;#39;m working on a Rust project that makes heavy use of conditional compilation through cargo features. The codebase has chunks of code that are only compiled when certain features are enabled, like this:&lt;/p>
&lt;div class="src src-rust">
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-rust" data-lang="rust">&lt;span class="line">&lt;span class="cl">&lt;span class="cp">#[cfg(feature = &lt;/span>&lt;span class="s">&amp;#34;generate_templates&amp;#34;&lt;/span>&lt;span class="cp">)]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">mod&lt;/span> &lt;span class="nn">cert&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="cp">#[cfg(feature = &lt;/span>&lt;span class="s">&amp;#34;generate_templates&amp;#34;&lt;/span>&lt;span class="cp">)]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">mod&lt;/span> &lt;span class="nn">code_gen&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="cp">#[cfg(feature = &lt;/span>&lt;span class="s">&amp;#34;generate_templates&amp;#34;&lt;/span>&lt;span class="cp">)]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">mod&lt;/span> &lt;span class="nn">csr&lt;/span>&lt;span class="p">;&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="cp">#[cfg(feature = &lt;/span>&lt;span class="s">&amp;#34;generate_templates&amp;#34;&lt;/span>&lt;span class="cp">)]&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w">&lt;/span>&lt;span class="k">fn&lt;/span> &lt;span class="nf">gen_init_devid_csr&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">out_dir&lt;/span>: &lt;span class="kp">&amp;amp;&lt;/span>&lt;span class="kt">str&lt;/span>&lt;span class="p">)&lt;/span>&lt;span class="w"> &lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="w">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="w"> &lt;/span>&lt;span class="c1">// ... implementation
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span>&lt;span class="p">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/div>
&lt;p>
The problem? My trusty Emacs LSP setup was giving me a cold shoulder on all this conditional code. No completions, no error checking, no &amp;#34;go to definition&amp;#34; - basically treating it like it doesn&amp;#39;t exist. And technically, it&amp;#39;s right! By default, &lt;code>rust-analyzer&lt;/code> only analyzes code with the default set of features enabled.&lt;/p></description></item><item><title>Serprog adventures in rust</title><link>https://blog.aheymans.xyz/post/serprog_in_rust/</link><pubDate>Sat, 24 May 2025 10:44:02 +0200</pubDate><guid>https://blog.aheymans.xyz/post/serprog_in_rust/</guid><description>&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
Serprog
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;p>Serprog is a serial flasher protocol that allows a userspace program like &lt;a href="https://flashprog.org/wiki/Flashprog">flashprog&lt;/a> to communicate over a serial connection like RS232, USB endpount or a TCP stream to a microcontroller which talks to flash chip to read, write or erase it. Serprog works for all kinds of different flash chips but in this article we&amp;#39;ll focus on SPI NOR since those are ubiquitous nowadays.&lt;/p>
&lt;/div>
&lt;/div>
&lt;div id="outline-container-headline-2" class="outline-2">
&lt;h2 id="headline-2">
Picoprog at OSFC: using embassy as a multifunction device
&lt;/h2>
&lt;div id="outline-text-headline-2" class="outline-text-2">
&lt;p>
For OSFC 2024, 9elements hosted a coreboot workshop, which involved compiling coreboot and flashing it onto a &lt;a href="https://radxa.com/products/x/x4/">Raxda x4 N100 board&lt;/a>. To flash it and get uart output we needed some hardware. We thought it would be fun to create our own and allow people to take it home. We used an off the shelf Raspberry Pi Pico and designed a breakout board which makes it easy to attach a SPI clip and connect the boards UART pins.&lt;/p></description></item><item><title>probe-rs: Making Embedded Development Feel Like Userspace Programming</title><link>https://blog.aheymans.xyz/post/probe_rs_remote/</link><pubDate>Sat, 24 May 2025 10:03:20 +0200</pubDate><guid>https://blog.aheymans.xyz/post/probe_rs_remote/</guid><description>&lt;p>
If you&amp;#39;ve ever developed embedded firmware, you know the pain: cryptic flashing tools, primitive debugging methods, and a workflow that feels decades behind modern software development. You write code, compile it, flash it to hardware through a complex toolchain, and then… hope it works. When it doesn&amp;#39;t, you&amp;#39;re stuck with blinking LEDs and printf debugging over UART. &lt;a href="https://probe.rs">probe-rs&lt;/a> fundamentally changes this experience by bringing the productive, familiar workflow of userspace development to the embedded world.&lt;/p></description></item><item><title>Panics in rust and how to track them</title><link>https://blog.aheymans.xyz/post/don_t_panic_rust/</link><pubDate>Thu, 19 Dec 2024 20:11:27 +0100</pubDate><guid>https://blog.aheymans.xyz/post/don_t_panic_rust/</guid><description>&lt;img src="https://blog.aheymans.xyz/panic.png" alt="/panic.png" title="/panic.png" class="center no-border" width="700px"/>
&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
Introduction to panics in rust
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;p>Undefined behavior (UB) is one of the most dangerous issues in systems programming, leading to crashes, security vulnerabilities, and unpredictable results. Rust prevents UB by panicking - forcefully stopping the program - when potentially unsafe operations are detected.&lt;/p>
&lt;p>
Panics are Rust&amp;#39;s way of handling unrecoverable errors. Unlike &lt;code class="verbatim">Result&lt;/code> which handles expected errors, panics occur when:&lt;/p>
&lt;ul>
&lt;li>Array bounds are exceeded&lt;/li>
&lt;li>Integer overflow in debug mode&lt;/li>
&lt;li>Explicit calls to &lt;code class="verbatim">panic!()&lt;/code> macro&lt;/li>
&lt;li>Failed assertions&lt;/li>
&lt;li>Calling &lt;code class="verbatim">unwrap()&lt;/code> on &lt;code class="verbatim">None&lt;/code> or &lt;code class="verbatim">Err&lt;/code> values&lt;/li>
&lt;li>Attempting operations that may cause undefined behavior&lt;/li>
&lt;/ul>
&lt;p>Key points about panics:&lt;/p></description></item><item><title>Ontology in Software Programming: Understanding the Nature of What We Build</title><link>https://blog.aheymans.xyz/post/ontology_software_development/</link><pubDate>Mon, 09 Dec 2024 12:16:52 +0100</pubDate><guid>https://blog.aheymans.xyz/post/ontology_software_development/</guid><description>&lt;p>
&lt;img src="https://blog.aheymans.xyz/socrates_code.jpg" alt="/socrates_code.jpg" title="/socrates_code.jpg" />&lt;/p>
&lt;p>
As software developers, we spend our days creating objects, defining relationships, and modeling reality in code. But have you ever stopped to think about the philosophical implications of what we&amp;#39;re doing? Enter ontology – a branch of philosophy that deals with the nature of being, existence, and reality.&lt;/p>
&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
Understanding Ontology
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;p>
In philosophy, ontology asks fundamental questions like &amp;#34;What exists?&amp;#34; and &amp;#34;What are the relationships between different things that exist?&amp;#34; These might sound abstract, but as programmers, we deal with similar questions every day. When we create a class hierarchy or design a database schema, we&amp;#39;re actually doing ontological work – we&amp;#39;re defining what &amp;#34;exists&amp;#34; in our software universe and how these things relate to each other.&lt;/p></description></item><item><title>Getting Hypridle to work with Hyprlock</title><link>https://blog.aheymans.xyz/post/hyprlock/</link><pubDate>Thu, 05 Dec 2024 09:09:17 +0100</pubDate><guid>https://blog.aheymans.xyz/post/hyprlock/</guid><description>&lt;p>
I recently switched from Sway to Hyprland. The primary reason for this change was my interest in content creation. Hyprland can record single windows, whereas Sway can only record the entire screen or part of it.&lt;/p>
&lt;p>
So far, the transition has been smooth until I encountered the following issue after waking it from suspend with the lid closed.&lt;/p>
&lt;p>
&lt;img src="https://blog.aheymans.xyz/hypridle_oopsie.jpg" alt="/hypridle_oopsie.jpg" title="/hypridle_oopsie.jpg" />&lt;/p>
&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
My Use Case
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;p>
I have a laptop that is mostly connected to a docking station driving an external display. The lid remains closed, and I don&amp;#39;t want the laptop display enabled. When no display is connected, I want the device to suspend. This is managed by logind.&lt;/p></description></item><item><title>Using LLMs in emacs</title><link>https://blog.aheymans.xyz/post/llm_in_emacs/</link><pubDate>Wed, 06 Nov 2024 08:34:52 +0100</pubDate><guid>https://blog.aheymans.xyz/post/llm_in_emacs/</guid><description>&lt;p>
This post will review 2 llm options in emacs how I set them up.&lt;/p>
&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
Ellama
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;video width=100% controls autoplay>
 &lt;source src="https://blog.aheymans.xyz/ellama.webm" type="video/webm">
 Your browser does not support the video tag.
&lt;/video>
&lt;p>
From &lt;a href="https://github.com/s-kostyaev/ellama">ellama&lt;/a>&lt;/p>
&lt;blockquote>
&lt;p>Ellama is a tool for interacting with large language models from Emacs. It allows you to ask questions and receive responses from the LLMs. Ellama can perform various tasks such as translation, code review, summarization, enhancing grammar/spelling or wording and more through the Emacs interface. Ellama natively supports streaming output, making it effortless to use with your preferred text editor.&lt;/p></description></item><item><title>rtimer: Writing a Timer with Aider</title><link>https://blog.aheymans.xyz/post/aider_timer/</link><pubDate>Mon, 21 Oct 2024 00:00:00 +0000</pubDate><guid>https://blog.aheymans.xyz/post/aider_timer/</guid><description>&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
Aider + Claude Sonnet 3.5
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;p>
This morning, I needed a timer to spend only 10 minutes reading a book. I searched for CLI tools but couldn&amp;#39;t find anything immediately that suited my needs due to laziness. So, I decided to write one myself with the help of AI.&lt;/p>
&lt;p>
Using Aider coupled with Claude Sonnet 3.5, I was able to get something working on the first try. Afterward, I added a few features:&lt;/p></description></item><item><title>A comparison between open source host firmware solutions and closed source UEFI</title><link>https://blog.aheymans.xyz/post/uefi-coreboot-comparison/</link><pubDate>Wed, 28 Feb 2024 13:14:08 +0100</pubDate><guid>https://blog.aheymans.xyz/post/uefi-coreboot-comparison/</guid><description>&lt;p>
This whitepaper makes the case that UEFI firmware and more specifically EDK2 based solutions, be it open or the more ubiquitous closed ones, hurt business by driving up cost and delaying time to market, while at the same time are the root cause of more and more security problems. This whitepaper will contrast this UEFI status quo with other existing solutions like LinuxBoot in combination with coreboot, which fully embrace open source development, are scoring better on all those metrics. This is both due to design decisions and the related development models.&lt;/p></description></item><item><title>Integrating rust in coreboot: baby steps</title><link>https://blog.aheymans.xyz/post/rust_coreboot/</link><pubDate>Tue, 01 Aug 2023 00:00:00 +0000</pubDate><guid>https://blog.aheymans.xyz/post/rust_coreboot/</guid><description>&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
Rust in coreboot?
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;figure>
&lt;p class="center no-border" width="70%" height="70%">
Rust is a programming language with emphasis on performance, type safety and concurrency.
It enforces memory safety at compile time. Unlike the C standard which is a 700+ page document,
with a &lt;strong>LOT&lt;/strong> of documented undefined behavior, rust has &lt;strong>no&lt;/strong> undefined behavior unless the unsafe
keyword is used. Zero cost abstractions make rust binaries very efficient in both size and
execution, in places where C will have a hard time to be optimized (e.g. function pointers in structs).&lt;/p></description></item><item><title>Coreboot on the ASRock E3C246D4I</title><link>https://blog.aheymans.xyz/post/asrock_e3c246d4i/</link><pubDate>Thu, 15 Jul 2021 00:00:00 +0000</pubDate><guid>https://blog.aheymans.xyz/post/asrock_e3c246d4i/</guid><description>&lt;img src="https://blog.aheymans.xyz/asrock_e3c246d4i.jpg" alt="/asrock_e3c246d4i.jpg" title="/asrock_e3c246d4i.jpg" class="center no-border" width="70%" height="70%"/>
&lt;p>
This blog enty first appeared on the 9esec &lt;a href="https://9esec.io/blog/coreboot-on-the-asrock-e3c246d4c/">blog&lt;/a>.&lt;/p>
&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
A new toy to play with OpenBMC
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;p>
I wanted to play around with OpenBMC on a physical board and this &lt;a href="https://www.phoronix.com/scan.php?page=news_item&amp;amp;px=Linux-5.13-ASRock-OpenBMC">article&lt;/a> led me
to the &lt;strong>ASRock E3C246D4I&lt;/strong>. It&amp;#39;s a not overly expensive Intel Coffee Lake board
featuring an Aspeed AST2500 BMC. So the first thing I did was to compile
OpenBMC. My computer was in for a quite a chore there. It needed to download 11G
of sources and compile those. Needless to say this takes a long time on a
notebook computer and is best done overnight. I flashed the image via the SPI
header next to the BMC flash. I used some mini crocodile clips to do this at
first.&lt;/p></description></item><item><title>Open source cache as ram with Intel Bootguard</title><link>https://blog.aheymans.xyz/post/no_fsp_t/</link><pubDate>Fri, 25 Jun 2021 00:00:00 +0000</pubDate><guid>https://blog.aheymans.xyz/post/no_fsp_t/</guid><description>&lt;img src="https://blog.aheymans.xyz/no_fsp_t.png" alt="/no_fsp_t.png" title="/no_fsp_t.png" class="center no-border" width="70%" height="70%"/>
&lt;p>
This blog enty first appeared on the 9esec &lt;a href="https://9esec.io/blog/open-source-cache-as-ram-with-intel-bootguard/">blog&lt;/a>.&lt;/p>
&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
FSP-T in open source projects
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;p>
X86 CPUs boot up in a very bare state. They execute the first instruction at the
top of memory mapped flash in 16 bit real mode. DRAM is not avaible (AMD Zen
CPUs are the exception) and the CPU typically has no memory addressable SRAM, a
feature which is common on ARM SOCs. This makes running C code quite hard
because you are required to have a stack. This was solved on x86 using a
technique called cache as ram or CAR. Intel calls this non eviction mode or NEM.
You can read more about this &lt;a href="https://blog.aheymans.xyz/about-car/">here&lt;/a>.&lt;/p></description></item><item><title>Hardware assisted root of trust mechanism and coreboot internals</title><link>https://blog.aheymans.xyz/post/rot_coreboot/</link><pubDate>Wed, 26 May 2021 00:00:00 +0000</pubDate><guid>https://blog.aheymans.xyz/post/rot_coreboot/</guid><description>&lt;p>
&lt;img src="https://blog.aheymans.xyz/roots.jpg" alt="/roots.jpg" title="/roots.jpg" />&lt;/p>
&lt;p>
This blog enty first appeared on the 9esec &lt;a href="https://9esec.io/blog/hardware-assisted-root-of-trust-mechanism-and-coreboot-internals">blog&lt;/a>.&lt;/p>
&lt;p>
I started working for 9elements in October 2020 and my first assignment was to get Intel CBnT working on the OCP Deltalake using coreboot firmware.
Intel Converged Bootguard and TXT is a hardware assisted method to set up a root of trust.
In this blog post I will discuss some of the changes needed in coreboot to get this working.
Setting CBnT up properly was definitely a challenge, but the work did not stop there.
So while Intel CBnT provides a method to verify or measure the initial start-up code, it is not enough.
You want to trust the code you run from start, the reset vector, to end, typically a bootloader.
CBnT only takes care of the start. You have to make sure that each software component trusts the assets it uses and the next program it loads.
This concept is called a chain of trust. Now in 2021 I have an assignment that involves supporting the older Intel Bootguard technology.
Since Bootguard is very similar to CBnT, I&amp;#39;ll also touch on that.&lt;/p></description></item><item><title>FSP1.1 Braswell TempRaminit problems</title><link>https://blog.aheymans.xyz/post/braswell_fsp/</link><pubDate>Sat, 23 Nov 2019 00:00:00 +0000</pubDate><guid>https://blog.aheymans.xyz/post/braswell_fsp/</guid><description>&lt;p>
Coreboot is migrating platforms from a romcc bootblock to &lt;code>C_ENVIRONMENT_BOOTBLOCK&lt;/code> in which Cache-as-Ram is set up in the bootblock.
When migrating Braswell, chromebooks featuring this SOC did not boot anymore while other boards did. Google uses a different FSP binary than the one present in the Intel Github FSP repository.&lt;/p>
&lt;p>
Previously the romcc bootblock set up caching of the ROM, located microcodes and performed the update before calling FSP TempRaminit.&lt;/p></description></item><item><title>A gentle introduction to Cache-as-Ram on X86</title><link>https://blog.aheymans.xyz/post/car/</link><pubDate>Wed, 23 Oct 2019 00:00:00 +0000</pubDate><guid>https://blog.aheymans.xyz/post/car/</guid><description>&lt;img src="https://blog.aheymans.xyz/Cachehierarchy-example.png" alt="/Cachehierarchy-example.png" title="/Cachehierarchy-example.png" class="center no-border"/>
&lt;p>
This explains a bit of history on CAR in coreboot and how it works.&lt;/p>
&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
Glossary
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;ul>
&lt;li>&lt;strong>CPU cache&lt;/strong>: CPU cache is a piece of fast memory used by the CPU to cache access to things accessed in the CPU&amp;#39;s linear memory space. This includes for DRAM, PCI BARs, the boot flash.&lt;/li>
&lt;li>&lt;strong>Cache-as-RAM/CAR&lt;/strong>: Using not memory mapped CPU cache as execution environment.&lt;/li>
&lt;li>&lt;strong>XIP&lt;/strong>: Execute in place on a memory mapped (read only) medium.&lt;/li>
&lt;li>&lt;strong>SRAM&lt;/strong>: Static Random Access Memory, here: memory mapped memory that needs no initialization.&lt;/li>
&lt;li>&lt;strong>ROMCC&lt;/strong>: A C compiler using only the CPU registers.&lt;/li>
&lt;/ul>
&lt;/div>
&lt;/div>
&lt;div id="outline-container-headline-2" class="outline-2">
&lt;h2 id="headline-2">
Cache-as-Ram, the basics
&lt;/h2>
&lt;div id="outline-text-headline-2" class="outline-text-2">
&lt;p>
When an X86 platforms boot, it starts in a pretty bare environment. The first instruction is fetched from the top of the boot medium, which on most x86 platforms is memory mapped below 4G (in 32bit protected mode). Not only do they start in 16bit &amp;#39;real&amp;#39; mode, most of the hardware starts uninitialized. This includes the dram controller. Another thing about X86 platforms is that they generally don&amp;#39;t feature SRAM, static RAM. SRAM for this purpose of this text is a small region of ram that is available without any initialization. Without RAM this leaves the system with just CPU registers and a memory mapped boot medium of which code can be executed in place (XIP) to initialize the hardware.&lt;/p></description></item><item><title>How to flash coreboot to the thinkpad x60 the proper way</title><link>https://blog.aheymans.xyz/post/x60flash/</link><pubDate>Sat, 01 Dec 2018 00:00:00 +0000</pubDate><guid>https://blog.aheymans.xyz/post/x60flash/</guid><description>&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
What is so special about the x60 when running vendor bios?
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;div id="outline-container-headline-2" class="outline-3">
&lt;h3 id="headline-2">
Vendor BIOS write protects its bootblock, which means the lowest 64K of the flash can’t be modified
&lt;/h3>
&lt;div id="outline-text-headline-2" class="outline-text-3">
&lt;p>
This is a problem since the first code that runs on the CPU comes from there and if we ever want to run coreboot the cpu must start with coreboot code. This write protection is set in the PBR (protect bios range) registers on the southbridge, there is currently no known way to change them back once they are locked by setting the SPI Configuration Lock-Down bit.&lt;/p></description></item><item><title>Hacking ath9k wifi device adventures</title><link>https://blog.aheymans.xyz/post/ath9k_hacking/</link><pubDate>Sat, 03 Nov 2018 00:00:00 +0000</pubDate><guid>https://blog.aheymans.xyz/post/ath9k_hacking/</guid><description>&lt;p>
So here is where it all started. I have this apple branded atheros AR5BXB92,
with an ar9280 chipset, which is supported by the ath9k Linux drivers.
This chipset is supposed to support both 5GHz and 2.4GHz frequencies,
but using the wavemon tool 5GHz SSID never show up even when I&amp;#39;m next
to a device that emits one.&lt;/p>
&lt;p>
&lt;code>iw list&lt;/code> shows the following:&lt;/p>
&lt;pre class="example">
Band 2:
 Capabilities: 0x11ce
 HT20/HT40
 SM Power Save disabled
 RX HT40 SGI
 TX STBC
 RX STBC 1-stream
 Max AMSDU length: 3839 bytes
 DSSS/CCK HT40
 Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
 Minimum RX AMPDU time spacing: 8 usec (0x06)
 HT TX/RX MCS rate indexes supported: 0-15
 Bitrates (non-HT):
 * 6.0 Mbps
 * 9.0 Mbps
 * 12.0 Mbps
 * 18.0 Mbps
 * 24.0 Mbps
 * 36.0 Mbps
 * 48.0 Mbps
 * 54.0 Mbps
 Frequencies:
 * 5180 MHz [36] (16.0 dBm) (no IR)
 * 5200 MHz [40] (16.0 dBm) (no IR)
 * 5220 MHz [44] (16.0 dBm) (no IR)
 * 5240 MHz [48] (16.0 dBm) (no IR)
 * 5260 MHz [52] (17.0 dBm) (no IR, radar detection)
 * 5280 MHz [56] (16.0 dBm) (no IR, radar detection)
 * 5300 MHz [60] (16.0 dBm) (no IR, radar detection)
 * 5320 MHz [64] (16.0 dBm) (no IR, radar detection)
 * 5500 MHz [100] (disabled)
 * 5520 MHz [104] (disabled)
 * 5540 MHz [108] (disabled)
 * 5560 MHz [112] (disabled)
 * 5580 MHz [116] (disabled)
 * 5600 MHz [120] (disabled)
 * 5620 MHz [124] (disabled)
 * 5640 MHz [128] (disabled)
 * 5660 MHz [132] (disabled)
 * 5680 MHz [136] (disabled)
 * 5700 MHz [140] (disabled)
 * 5745 MHz [149] (disabled)
 * 5765 MHz [153] (disabled)
 * 5785 MHz [157] (disabled)
 * 5805 MHz [161] (disabled)
 * 5825 MHz [165] (disabled)
&lt;/pre>
&lt;p>
So most of the 5GHz channels which are avaible in my country were disabled.
Changing the reg domain &lt;code>iw reg set BE&lt;/code> did not change this
On the web I found some articles about modifying the reg domain in the eeprom
that is present on that wifi card. One of these is the following &lt;a href="http://blog.asiantuntijakaveri.fi/2014/08/one-of-my-atheros-ar9280-minipcie-cards.html">guide&lt;/a>.
The link to the iwleeprom code is dead but can be found on the following &lt;a href="https://github.com/andyvand/AtherosROMKit">github&lt;/a> repo.
Doing so I found out that my region code is 0x65. I tried to modify that eeprom content
but that didn&amp;#39;t seem to work properly for some reason.
I knew that almost everything is done by the kernel driver so I looked for the possibilty
to override this regional setting an I found it! By changing the reg_rules for my 0x65 domain
device and recompiling the ath9k module I got those 5GHz appearing in wavemon and listed as
supported in iw list!&lt;/p></description></item><item><title>Porting the Intel DG41WV and Intel 4 series DDR3 raminit to coreboot</title><link>https://blog.aheymans.xyz/post/dg41wv/</link><pubDate>Sat, 03 Nov 2018 00:00:00 +0000</pubDate><guid>https://blog.aheymans.xyz/post/dg41wv/</guid><description>&lt;p>
This post will explain a bit how the Intel 4 series DDR3 raminit came to be and will introduce a new board that can make use of this code, namely the Intel DG41WV.&lt;/p>
&lt;div id="outline-container-headline-1" class="outline-2">
&lt;h2 id="headline-1">
DDR3 raminit
&lt;/h2>
&lt;div id="outline-text-headline-1" class="outline-text-2">
&lt;p>
In the past I have worked quite on a bit on the coreboot code that support the Intel 4 series desktop chipset (those chipsets go by the name of G41, G43, G45, Q43, Q45, P41, P43, P45, B43 with each having a somewhat different feature set). In the past I have made quite a few improvements to the coreboot code for this platform:&lt;/p></description></item></channel></rss>