LWN: Comments on "Using Python to investigate EFI and ACPI" https://lwn.net/Articles/655992/ This is a special feed containing comments posted to the individual LWN article titled "Using Python to investigate EFI and ACPI". en-us Wed, 17 Sep 2025 16:50:03 +0000 Wed, 17 Sep 2025 16:50:03 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Using Python to investigate EFI and ACPI https://lwn.net/Articles/657611/ https://lwn.net/Articles/657611/ voltagex <div class="FormattedComment"> How difficult would it be to turn BITS into a bootloader? e.g. Python hits a web service, retreives a kernel image and boots it. I can think of various cool uses for this - watch out iPXE!<br> </div> Thu, 17 Sep 2015 03:14:46 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656666/ https://lwn.net/Articles/656666/ job <div class="FormattedComment"> <font class="QuotedText">&gt; If the BIOS did not know about the hardware, the system couldn't talk to it.</font><br> <p> That's a little strange statement. A lot of hardware was accessed directly at the time, and it didn't matter if BIOS knew about it. The rest were mostly ROM.<br> </div> Fri, 04 Sep 2015 17:57:56 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656654/ https://lwn.net/Articles/656654/ josh <div class="FormattedComment"> Unfortunately no; LinuxCon and Plumbers don't currently record their sessions.<br> <p> There aren't many basic questions about EFI and ACPI. :) And I really don't mind answering basic questions. But if you don't want to post them here, feel free to ask via private email.<br> </div> Fri, 04 Sep 2015 14:21:52 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656609/ https://lwn.net/Articles/656609/ rbrito <div class="FormattedComment"> Were the presentations recorded?<br> <p> I'd love to see this after having seen your PyCon video, Josh. I also have some questions, but they are so basic that I would be embarrassed to list them publicly. :)<br> <p> Thanks. :)<br> <p> </div> Fri, 04 Sep 2015 12:57:11 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656577/ https://lwn.net/Articles/656577/ josh <div class="FormattedComment"> True; I was trying not to nitpick that. :)<br> <p> COM1 is what it happened to be called on this version of the qemu firmware; in past versions I've seen it called UAR1 (for a UART). The PNP ID or magic number in the _HID is what says "I'm a plug-and-play serial port".<br> </div> Thu, 03 Sep 2015 20:48:18 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656575/ https://lwn.net/Articles/656575/ pbonzini <div class="FormattedComment"> Great summary indeed! Just one nit: COM1 is not the magic name that the OS looks for. Instead, COM1 has a "_HID" method that is "PNP0501", and that is what the OS looks for. When it finds "PNP0501", it knows it's a 8250-like serial port.<br> </div> Thu, 03 Sep 2015 20:41:16 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656561/ https://lwn.net/Articles/656561/ josh <div class="FormattedComment"> <font class="QuotedText">&gt; More worrying from a "bare-metal" perspective is Josh's comment about background tasks in EFI, I did not expect that.</font><br> <p> EFI has some interrupt processing, including timers. It uses that for things like USB keyboards and drives, or networking support. Also take a look at the calls related to Task Priority Level (TPL).<br> <p> In theory, all of those should stop when you ExitBootServices(); theoretically EFI drivers could keep doing things as part of runtime services, but they shouldn't, and I haven't seen that in practice.<br> </div> Thu, 03 Sep 2015 18:36:25 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656547/ https://lwn.net/Articles/656547/ marcH <div class="FormattedComment"> <font class="QuotedText">&gt; except for very simple cases you want something multithreaded or at least reacting to several different events.</font><br> <p> "Very simple cases" is all I had in mind. Hardware has become so cheap that dealing with the complexity and unpredictability of a scheduler and preemption is not always worth it. See Arduino as a good and successful example.<br> <p> For reacting to different events something like select()/poll() / or any kind of non-blocking event loop does the job. Even Java can do stuff like this (not for real-time but for scalability)<br> <p> This reminds me of this (also successful) product I used to work on. It permanently hogs/hogged (some) CPU cores thanks to Linux' SCHED_FIFO and implements its own event loop with incredibly good real-time properties. This worked surprisingly well considering the kernel was not designed for this and caused almost no problem. I found only this one at the time: <a href="https://bugzilla.kernel.org/show_bug.cgi?id=16011">https://bugzilla.kernel.org/show_bug.cgi?id=16011</a><br> <p> More worrying from a "bare-metal" perspective is Josh's comment about background tasks in EFI, I did not expect that.<br> <p> </div> Thu, 03 Sep 2015 17:13:44 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656531/ https://lwn.net/Articles/656531/ josh <div class="FormattedComment"> Responded in that thread; using BITS to test QEMU would be awesome. Seems only fair; we often use QEMU to test BITS.<br> </div> Thu, 03 Sep 2015 15:04:25 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656479/ https://lwn.net/Articles/656479/ lacos <div class="FormattedComment"> This sounds very exciting. I posted an email with some virtualization background and some questions.<br> <p> <a href="http://thread.gmane.org/gmane.comp.emulators.qemu/358997">http://thread.gmane.org/gmane.comp.emulators.qemu/358997</a><br> <p> Thank you!<br> </div> Thu, 03 Sep 2015 09:18:46 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656476/ https://lwn.net/Articles/656476/ aleXXX <div class="FormattedComment"> Being on the bare metal does not automatically make your application "hard real-time".<br> It removes sources of latency coming from the OS, but since there is no RTOS supporting the application, you still have no real-time guarantees.... I mean, except for very simple cases you want something multithreaded or at least reacting to several different events.<br> E.g. a main loop checking flags triggered from interrupts is not hard-real time.<br> <p> <p> </div> Thu, 03 Sep 2015 08:18:04 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656466/ https://lwn.net/Articles/656466/ josh <div class="FormattedComment"> <font class="QuotedText">&gt; Games! Any last remaining doubt about EFI implementations being OSes is now cleared. DOS was considered an OS after all.</font><br> <p> Absolutely. EFI has *significantly* more functionality than DOS ever did.<br> <p> <font class="QuotedText">&gt; "Hard real-time" applications could be another interesting use case for EFI?</font><br> <p> The line between "EFI application" and "bare-metal operating system" is quite thin. The main distinction between the two seems to lie in if you call EFI services or implement your own drivers. So sure, you could implement a minimal OS that relied on EFI for some of its core drivers.<br> <p> However, EFI does have some background processing that can interrupt you, above and beyond the possibility of SMI. You'd want to ExitBootServices() at a minimum, at which point you have to take over a few things.<br> </div> Thu, 03 Sep 2015 05:38:42 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656465/ https://lwn.net/Articles/656465/ josh <div class="FormattedComment"> <font class="QuotedText">&gt; Nearly all the non disk related stuff is somewhere else, typically in ROM.</font><br> <p> Or, increasingly towards the end of DOS's useful lifespan, in the application. DOS applications shipped graphics drivers, sound drivers, network stacks...<br> </div> Thu, 03 Sep 2015 05:33:05 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656464/ https://lwn.net/Articles/656464/ butlerm <div class="FormattedComment"> I wouldn't quite consider MS-DOS a computer operating system, but rather a disk operating system. The letter 'D' is in there for a reason, as with Apple DOS before it. Nearly all the non disk related stuff is somewhere else, typically in ROM.<br> </div> Thu, 03 Sep 2015 05:10:01 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656463/ https://lwn.net/Articles/656463/ marcH <div class="FormattedComment"> Games! Any last remaining doubt about EFI implementations being OSes is now cleared. DOS was considered an OS after all.<br> <p> "Hard real-time" applications could be another interesting use case for EFI?<br> <p> </div> Thu, 03 Sep 2015 04:14:31 +0000 Using Python to investigate EFI and ACPI https://lwn.net/Articles/656459/ https://lwn.net/Articles/656459/ josh <div class="FormattedComment"> Thanks for a great summary, Jake!<br> </div> Thu, 03 Sep 2015 03:35:01 +0000