Write Your Own X86 Bootloader

What if you want to make a very lean machine and do without any operating system? Or maybe you want to try to write your own OS, even just for the challenge or fun? Maybe you were reading up on a cool OS architecture and thought to yourself, “I can write that!”. Well, before diving into your code, you’d first have to write something called a bootloader.

A bootloader is code that runs early on in a PC’s, Mac’s, Raspberry Pi’s or microcontroller’s boot sequence, before anything like an operating system is up. Often its job is to set up minimal hardware, such as RAM, and then load the OS or your embedded code.

[Alex Parker] has written a three-part series of clear blog posts that make writing the bootloader part easy, at least for x86 machines. And the nice thing is that you don’t need an x86 to get started. He does it on a Mac using the QEMU processor emulator, though he also talks about doing it under Windows and Linux.

In the first part of the series, the bootloader leaves you in the x86’s real mode, with 16-bit instructions and access to one megabyte of memory — think pre-80286 days, or 1982 for those of us who were computing back then. To prove it works, he uses BIOS calls to display “Hello world!”. This also shows that through the BIOS, you have a set of peripherals you can work with.

In the second part, he shows how to set up 32-bit protected mode and a Global Descriptor Table, making access to a large amount of memory easier.

In the first two parts, the code is written in assembly, so in the third part he finishes the series by showing how to load C++ code into memory and execute it. That C++ code would of course be your application, which we’ll leave to your imagination.

It’s reasonably rare to write bootloader code for a desktop computer — much less so for microcontrollers. For instance, [Dmitry Grinberg] wrote his own bootloader so that he could have encrypted ROM images for his AVR on USB. And we’ve talked about [Lady Ada]’s guide to burning Arduino bootloaders. But if you want to get down to the bare metal on your x86, the bootloader is the place to start. And it’s not so bad.

Find Instructions Hidden In Your CPU


There was a time when owning a computer meant you probably knew most or all of the instructions it could execute. Your modern PC, though, has a lot of instructions, many of them meant for specialized operating system, encryption, or digital signal processing features.

There are known undocumented instructions in a lot of x86-class CPUs, too. What’s more, these days your x86 CPU might really be a virtual machine running on a different processor, or your CPU could have a defect or a bug. Maybe you want to run sandsifter–a program that searches for erroneous or undocumented instructions. Who knows what is lurking in your CPU?

Continue reading “Find Instructions Hidden In Your CPU”

First Thoughts On The New UP Core

I normally stay away from talking about x86 single-board computers because I don’t have a lot to say about them. They’re too expensive, and run too hot, to be interesting. Enter the new UP Core funding now on Kickstarter.

The UP Core is just 56.5 mm × 66 mm (2.2 in × 2.6 in) and powered by a 64-bit Quad Core Intel Atom clocked at either 1.44 GHz or 1.92 GHz. It will ship with either 2 GB or 4 GB of RAM, and either 32 GB or 64 GB of eMMC. The board has a USB 3 port, HDMI, DSI/eDP, and two MIPI-CSI ports supporting either a 2 MP or 8 MP camera. It has both WiFi 802.11 b/g/n and Bluetooth LE built-in.

In other words it’s powerful enough to serve as a desktop PC running Linux, Android, or a full Windows 10 installation. The cheapest UP Core configuration—with 1 GB memory and 16 GB eMMC—is €69, or around $75. Continue reading “First Thoughts On The New UP Core”

Very, Very Tiny X86 Systems

The most interesting market for Intel in recent years has been very, very small form factor PCs. ARM is eating them alive, of course, but there are still places where very small and very low power x86 boards make sense. The latest release from SolidRun is the smallest we’ve seen yet. The SolidPC Q4 is one of the smallest x86 implementation you can find. It’s based around the MicroSoM, a module even smaller than a Raspberry Pi, and built around a carrier board that has all the ports you could ever want from the tiniest PC ever.

The SolidPC Q4 is technically only a carrier board featuring a microSD slot, Displayport, HDMI 1.4B, two RJ45 ports with the option for PoE, three USB 3.0 Host ports, jacks for mic and stereo sound, and an M.2 2230 connector for a wireless module. The interesting part of this launch is the MicroSoM, a System on Module based on Intel’s Braswell architecture. Two models are offered, based on the quad-core Atom E8000 and the Pentium N3710. Both modules feature up to 8GB of DDR3L RAM and 4GB of eMMC Flash.

The interesting part of this launch is the MicroSoM, a System on Module based on Intel’s Braswell architecture. Two models are offered, based on the quad-core Atom E8000 and the Pentium N3710. Both modules feature up to 8GB of DDR3L RAM and 4GB of eMMC Flash. The size of these modules is 52.8mm by 40mm, or just a shade larger than the stick-of-gum-sized Raspberry Pi Zero.

The SolidPC isn’t intended to be a Raspberry Pi competitor. While those cheap ARM boards are finding a lot of great uses in industry, they’re no replacement for a small, x86 single board computer. The pricing for this module starts at $157 according to the product literature, with a topped out configuration running somewhere between $300 and $350, depending on options like a heatsink, enclosure, or power adapter. If you want a small single board computer with drivers for everything, there aren’t many other options: you certainly wouldn’t pick a no-name Allwinner board.

Intel Ups The Dev Board Ante With The Quark D2000

Intel have a developer board that is new to the market, based on their Quark (formerly “Mint Valley”) D2000 low-power x86 microcontroller. This is a micropower 32-bit processor running at 32MHz, and with 32kB of Flash and 8kB of RAM. It’s roughly equivalent to a Pentium-class processor without the x87 FPU, and it has the usual impressive array of built-in microcontroller peripherals and I/O choices.

The board has an Arduino-compatible shield footprint, an FTDI chip for USB connectivity, a compass, acceleration, and temperature sensor chip, and a coin cell holder with micropower switching regulator. Intel provide their own System Studio For Microcontrollers dev environment, based around the familiar Eclipse IDE.

Best of all is the price, under $15 from an assortment of the usual large electronics wholesalers.

This board joins a throng of others in the low-cost microcontroller development board space, each of which will have attributes that its manufacturers will hope make it stand out. Facing such competition the Intel board will have to be something rather special to achieve that aim, so why should it excite your interest? We would point to the low price, the x86 code if that is your flavour of choice, and the relatively tiny power consumption.

Stepping back from the dev board for a moment, consider this processor as an illustration of technological progress in semiconductor fabrication. Over twenty years ago this chip’s Pentium ancestor ran on 5 volts and got so hot you could fry an egg on it, here is a Pentium that can run on a few milliwatts from a coin cell. Fortunately you won’t be running Windows 95 on it though.

We’re sure we’ll see plenty of projects here in the future using the Quark. Intel’s previous effort in this space, the Edison, has made several appearances. We’ve covered its launch in 2014, looked at someone running Doom on it, and examined its use with audio effects.

Thanks [Nolan M] for the tip.

Variable Instruction Computing: What Is Old Is New Again

Every twenty to twenty-five years, trends and fads start reappearing. 2016 is shaping up to be a repeat of 1992; the X-files is back on the air, and a three-way presidential election is a possibility. Star Trek is coming back, again. Roll these observations back another twenty-five years, and you have The Outer LimitsStar Trek, and riots at the DNC convention in Chicago.

History repeating itself is not the exclusive domain of politics and popular culture. It happens with tech, too: the cloud is just an extension of thin clients which are an extension of time-sharing. Everything old is new again.

For the last few years, Soft Machines, a fabless semiconductor company running in stealth mode, released the first preview for an entirely new processor architecture. This new architecture, VISC, offers higher performance per Watt than anything available on the market. If you’ve been paying attention for the last decade or so, the future of computing isn’t 200-Watt space heaters that also double as powerful CPUs. The future is low power machines that are good enough to run Facebook or run some JavaScript. With servers, performance per Watt is possibly the most important metric. How will Soft Machines upend the semiconductor market with new processors and new architectures? If you know your history, it shouldn’t be a surprise.

Continue reading “Variable Instruction Computing: What Is Old Is New Again”

Windows 10 On A Tiny Board

Over the past few months, a number of companies and designers have started picking up the newest Intel SoCs. Intel has to kill ARM somehow, right? The latest of these single board x86 computers is the Lattepanda. It’s a tiny board that can run everything a 5-year-old desktop computer can run, including a full version of Windows 10.

This isn’t the first time we’ve seen a tiny x86 board in recent months. Last October, an x86 board that takes design cues from the Raspberry Pi 2 hit Kickstarter. These are proper PCs, with the ability to run Windows 10, Linux, and just about every other environment under the sun.

The specs for the Lattepanda include a quad-core Cherry Trail running at 1.8GHz. the RAM is either 2GB or 4GB depending on configuration, and 32GB of eMMC Flash. Peripherals include USB 3.0, Ethernet, WiFi, Bluetooth, and integrated graphics supporting either HDMI or a DSI connector.

But of course a computer is just a computer, and you can’t sell a machine that only runs Skype to the ‘maker’ market. The Lattepanda also includes an ATMega32u4 as a coprocessor, giving this board ‘Arduino functionality’. In my day we walked uphill both ways to get a parallel port, but I digress.

While these tiny x86 boards might not be available in a year’s time, and the companies behind them may fall off the face of the planet, the introduction of these devices portends a great war over the horizon. Intel wants the low-power SoC market, a space until now reserved entirely for ARM-based devices.