F EATURE
ARTICLE
by Alexander Pozhitkov (USA)
The NakedCPU (Part 1) Hardware Experiments and a Roadmap for Navigating Documentation The first part of this two-part series provides an overview of the NakedCPU. This platform is designed to provide full access to hardware and a CPU without any operating system restrictions while working in the protected mode.
E
February 2012 – Issue 259
lectronic projects involving microcontrollers are popular among design enthusiasts and professionals alike. Many interesting applications have been made with microcontrollers, and programming them can be a lot of fun. At the same time, the powerful central processing unit (CPU) found in the personal computer (PC)—which serves every electronics designer on a daily basis (including microcontroller programming)—is lacking such attention. Most experimentation with a PC is limited to developing high-level code software with the aid of numerous libraries and technologies hiding the hardware beneath layers and layers of code. Unlimited experimentation with PC hardware is rarely possible. However, you have to install drivers, enabling some access to hardware, because the operating system (OS) naturally does not permit us to do any low-level activities. The sad part is that such drivers are mysterious themselves. It is safe to say hardware programming was well known to many computer professionals and enthusiasts in the 1980s. Later, many people forgot about it, while the technology tremendously leapt ahead. In this article, I try to bridge the gap in time and revive interest in hardware programming based on state-of-the-art technologies and concepts. There is a Russian saying, “Everything new is actually well-forgotten old.”
24
NakedCPU, which provides full access to hardware and a CPU without any restrictions imposed by the OS. Importantly, the processor isn’t obscured by Linux, DOS, or Windows, and is operating in its most interesting and powerful mode—the protected mode. In this article, the users are referred to as inquirers, because the NakedCPU is made for researchers (i.e., devoted geeks) rather than regular users. My aim is to provide you inquirers with some help navigating hardware documentation, which is confusing and otherwise difficult to find. I won’t restate the documentation because many computer concepts and technologies quickly become obsolete. With this article, however, you’ll find it easier to follow the newer technologies and documentation.
PROCESSORS & PLATFORMS Think for a moment about one of the modern Intel CPU varieties: the Intel Core 2 Duo processor. This impressive
RS-232
WHAT IS THE NakedCPU? This article is a result of my interest in the Intel CPU, chipset, I/O controller, and other essential PC devices from the perspective of low-level hardware programming unobstructed by an OS and drivers. My motivation was to reach out to people with inquisitive minds who would appreciate the possibility to directly experiment with the CPU, chipset, and other hardware. Here I’ll present the
NakedCPU
Master
Figure 1—The NakedCPU and master computers are connected via a serial interface. The NakedCPU does not need a keyboard or a monitor. CIRCUIT CELLAR®
•
www.circuitcellar.com