X86 Emulation (QEMU)¶
The X86 QEMU board configuration is used to emulate the X86 architecture. This board configuration provides support for an x86 Minute IA (Lakemont) CPU and the following devices:
- Advanced Programmable Interrupt Controller (APIC)
- NS16550 UART
This configuration supports the following hardware features:
|NS16550 UART||on-chip||serial port|
HPET System Clock Support¶
The configuration uses an HPET clock frequency of 25 MHz.
The board configuration uses a single serial communication channel that uses the NS16550 serial driver operating in polling mode. To override, enable the UART_INTERRUPT_DRIVEN Kconfig option, which allows the system to be interrupt-driven.
If SLIP networking is enabled (see below), an additional serial port will be used for it.
Known Problems or Limitations¶
The following platform features are unsupported:
- Isolated Memory Regions
- Serial port in Direct Memory Access (DMA) mode
- Serial Peripheral Interface (SPI) flash
- General-Purpose Input/Output (GPIO)
- Inter-Integrated Circuit (I2C)
- Supervisor Mode Execution Protection (SMEP)
Programming and Debugging¶
While this board is emulated and you can’t “flash” it, you can use this configuration to run basic Zephyr applications and kernel tests in the QEMU emulated environment. For example, with the Synchronization Sample:
cd $ZEPHYR_BASE/samples/synchronization mkdir build && cd build # Use cmake to configure a Ninja-based build system: cmake -GNinja -DBOARD=qemu_x86 .. # Now run ninja on the generated build system: ninja run
This will build an image with the synchronization sample app, boot it using QEMU, and display the following console output:
***** BOOTING ZEPHYR OS v1.8.99 - BUILD: Jun 27 2017 13:09:26 ***** threadA: Hello World from x86! threadB: Hello World from x86! threadA: Hello World from x86! threadB: Hello World from x86! threadA: Hello World from x86! threadB: Hello World from x86! threadA: Hello World from x86! threadB: Hello World from x86! threadA: Hello World from x86! threadB: Hello World from x86!