boot-firmware-and-cpu-microcode.html 5.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /><meta name="keywords" content="GNU, Emacs, Libre Software, Hurd, Guile, Guix" /><meta name="description" content="GNUcode.me is a website focusing on libre software projects, especially the GNU project." /><link type="application/atom+xml" rel="alternate" title="GNUcode.me -- Feed" href="/feed.xml" /><a rel="me" href="https://fosstodon.org/@thegnuguy"></a><link type="text/css" href="css/footer.min.css" rel="stylesheet"></link><link type="text/css" href="css/header.min.css" rel="stylesheet"></link><link type="text/css" href="css/main.min.css" rel="stylesheet"></link><title>Boot Firmware and CPU Microcode — GNUcode.me</title></head><body><header><nav><ul><li><a href="index.html">GNUcode.me</a></li><li><a href="services.html">Services</a></li><li><a href="about.html">About</a></li><li><a href="business-ideas.html">Business-ideas</a></li></ul></nav></header><h1>Boot Firmware and CPU Microcode</h1><main><section class="basic-section-padding"><article><h3>by Joshua Branson — January 11, 2021</h3><div><p>My current laptop was a libreboot-ed Lenovo T400. It worked fairly well,
  2. except under huge load. For instance just using
  3. <a href="https://kdenlive.org/en/">kdenlive</a> for 5+ minutes is enough to stress the CPU,
  4. which causes some issues: namely Linux forcibly restarting my machine. My
  5. laptop also forcibly restarts randomly once a week or so, usually when watching
  6. lots of youtube videos. This has been the case for a few months.</p><p>I finally posted in the <code>#libreboot</code> irc channel about the issue, and
  7. <a href="https://libreboot.org/">libreboot</a> founder <a href="https://vimuser.org/">Leah Rowe</a>
  8. mentioned that the reason my computer was unstable was because it lacked the
  9. updated CPU microcode. Leah also mentioned that
  10. <a href="https://libreboot.org">libreboot.org</a> used the CPU microcode, because you don't
  11. want your server randomly crashing on your website under huge load.</p><p>Let's back up for a second and explain libreboot and CPU microcode.
  12. <a href="https://libreboot.org">Libreboot</a>, is a free boot firmware (BIOS replacement),
  13. which is the first thing that starts when you press the power button. Free
  14. software users do NOT like proprietary BIOSs, so we prefer libreboot (which
  15. works on <a href="https://en.wikipedia.org/wiki/ThinkPad_T_series">old laptops circa
  16. 2008</a>) [^1].</p><p>CPU microcode is software that runs at a very low level on your processor. It
  17. turns out that processors are complex beasts, and its easy to mess them up. To
  18. help fix this situation, CPU developers use CPU microcode. If the processor has
  19. a tiny bug or faulty issue, then Intel or AMD can ship updated microcode to fix
  20. the solution. For example, a fair amount of the CPU microcode updates attempt
  21. to address recent CPU vulnerabilities like <a href="https://heartbleed.com/">heartbleed</a>
  22. and <a href="https://meltdownattack.com/">meltdown and spectre</a>. At least that's what
  23. Intel and AMD says they do, but the issue for libre software developers is that
  24. CPU microcode source code is not released. Therefore it is proprietary. So we
  25. cannot verify what the updated source code does.</p><p>So the free software user can choose to live with unstable machines without
  26. updated microcode, or update the microcode and potentially avoid CPU
  27. vulnerabilities and potentially run
  28. <a href="https://www.gnu.org/proprietary/proprietary.en.html">malware</a>. I'm deciding
  29. that I prefer machines that won't crash on me randomly, which is why my T400 is
  30. now using <a href="https://retroboot.org">retroboot</a>, which is a fork of libreboot that
  31. optionally provides the updated CPU microcode.</p><p>Anyway, as I was chatting to libreboot developer Leah Rowe, Leah pointed me
  32. toward <a href="https://retroboot.org">retroboot</a>, which is a fork of libreboot that
  33. optionally provides CPU microcode updates. Leah mentioned that retroboot is
  34. Leah's new project. As I was chatting to Leah, Leah on the fly added T400
  35. support to retroboot project and provided me with a new rom to flash mine that
  36. included the updated CPU microcode.</p><p>First I needed to boot linux with <code>iomem=relaxed</code>, then I flashed my rom and
  37. rebooted. Now my laptop can actually use kdenlive and not crash!</p><p>Leah talked some more about retroboot, which is attempting to do some crazy boot
  38. things. Like minimize grub (actually removing modules <em>and code</em>), use a
  39. different build system, use linuxboot, including seabios and tianobios in the
  40. flash rom, multi-lingual grub, etc. Leah also plans on submitting updates to
  41. libreboot where appropriate. Fun times ahead.</p><p>[^1]: Libreboot powers old laptops. A modern alternative and powerful free BIOS
  42. powered machines include the <a href="https://www.raptorcs.com/TALOSII/">Talos II
  43. system</a>.</p></div></article></section></main><footer><p>© 2020 Joshua Branson. The text on this site is free culture under the Creative Commons Attribution Share-Alike 4.0 International license.</p><p>This website is build with Haunt, a static site generator written in Guile Scheme. Source code is <a href="https://notabug.org/jbranso/gnucode.me">available.</a></p><p>The color theme of this website is based off of the famous <a href="#3f3f3f" target="_blank">zenburn</a> theme.</p></footer></body>