Documentation: update x86_64 doc
Documentation: update x86_64 doc
This commit is contained in:
parent
0ca02775eb
commit
45c4350cf1
4 changed files with 187 additions and 93 deletions
|
@ -10,26 +10,10 @@ arch/x86_64/src/common/ Directory
|
||||||
|
|
||||||
This directory holds source files common to all x86_64 architectures.
|
This directory holds source files common to all x86_64 architectures.
|
||||||
|
|
||||||
Architecture-Specific Directories
|
arch/x86_64/src/cmake/ Directory
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
Architecture-specific directories hold common source files shared for by
|
This directory holds CMake support for x86_64 architecture.
|
||||||
implementations of specific x86_64 architectures.
|
|
||||||
|
|
||||||
``intel64``
|
|
||||||
This directory holds logic appropriate for any instantiation of the 64-bit
|
|
||||||
intel64 architecture.
|
|
||||||
|
|
||||||
Chip-Specific directories
|
|
||||||
=========================
|
|
||||||
|
|
||||||
The same x86 architecture may be realized in different chip implementations.
|
|
||||||
For SoC chips, in particular, on-chip devices and differing interrupt
|
|
||||||
structures may require special, chip-specific definitions in these chip-
|
|
||||||
specific directories.
|
|
||||||
|
|
||||||
``broadwell``
|
|
||||||
This is the implementation of NuttX on the Intel Broadwell processors.
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
|
@ -5,52 +5,7 @@ qemu-intel64
|
||||||
This page file describes the contents of the build configurations available
|
This page file describes the contents of the build configurations available
|
||||||
for the NuttX QEMU x86_64 port.
|
for the NuttX QEMU x86_64 port.
|
||||||
|
|
||||||
Creating a bootable disk
|
|
||||||
========================
|
|
||||||
|
|
||||||
This build supports multiboot2, which means that usual multiboot2 bootlaoders,
|
|
||||||
e.g. grub can be used. To create a bootable disk with grub2, create a directory
|
|
||||||
named ``iso`` with grub configuration file and the compiled ``nuttx.elf``.
|
|
||||||
|
|
||||||
Directory and file hierarchy::
|
|
||||||
|
|
||||||
- iso/
|
|
||||||
- boot/
|
|
||||||
- grub/
|
|
||||||
- grub.cfg
|
|
||||||
- nuttx.elf
|
|
||||||
|
|
||||||
The grub.cfg should contain the boot entry of NuttX::
|
|
||||||
|
|
||||||
set timeout=0
|
|
||||||
set default=0
|
|
||||||
menuentry "kernel" {
|
|
||||||
multiboot2 /boot/nuttx.elf
|
|
||||||
}
|
|
||||||
|
|
||||||
Making the disk
|
|
||||||
---------------
|
|
||||||
|
|
||||||
Use the following command to create the disk.
|
|
||||||
P.S. In some distros, ``grub-mkrescue`` is called ``grub2-mkrescue``::
|
|
||||||
|
|
||||||
grub-mkrescue -o boot.iso iso
|
|
||||||
|
|
||||||
Grub with UEFI
|
|
||||||
--------------
|
|
||||||
|
|
||||||
This flow is very similar except you need to have the BOOTX64.EFI file.
|
|
||||||
You can find this in most Linux distributions::
|
|
||||||
|
|
||||||
iso/
|
|
||||||
└── boot
|
|
||||||
├── efi
|
|
||||||
│ └── EFI
|
|
||||||
│ └── BOOT
|
|
||||||
│ └── BOOTX64.EFI
|
|
||||||
├── grub
|
|
||||||
│ └── grub.cfg
|
|
||||||
└── nuttx.elf
|
|
||||||
|
|
||||||
QEMU/KVM
|
QEMU/KVM
|
||||||
========
|
========
|
||||||
|
@ -75,10 +30,14 @@ frustrating. In such case, looks the next section and use bochs emulator instead
|
||||||
Running QEMU
|
Running QEMU
|
||||||
------------
|
------------
|
||||||
|
|
||||||
In the top-level NuttX directory::
|
When you created a bootable disk, use command::
|
||||||
|
|
||||||
qemu-system-x86_64 -cpu host -enable-kvm -m 2G -cdrom boot.iso -nographic -serial mon:stdio
|
qemu-system-x86_64 -cpu host -enable-kvm -m 2G -cdrom boot.iso -nographic -serial mon:stdio
|
||||||
|
|
||||||
|
or, when option ``CONFIG_ARCH_PVHBOOT`` is set, you can use ``-kernel`` argument instead::
|
||||||
|
|
||||||
|
qemu-system-x86_64 -cpu host -enable-kvm -m 2G -kernel nuttx.elf -nographic -serial mon:stdio
|
||||||
|
|
||||||
This multiplex the qemu console and COM1 to your console.
|
This multiplex the qemu console and COM1 to your console.
|
||||||
|
|
||||||
Use control-a 1 and 2 to switch between.
|
Use control-a 1 and 2 to switch between.
|
||||||
|
@ -140,12 +99,13 @@ COM port output will be in the com1.out file.
|
||||||
Real machine
|
Real machine
|
||||||
============
|
============
|
||||||
|
|
||||||
This port should work on real x86-64 machine with a proper CPU.
|
This port can work on real x86-64 machine with a proper CPU.
|
||||||
The mandatory CPU features are:
|
The mandatory CPU features are:
|
||||||
|
|
||||||
* TSC DEADLINE or APIC timer
|
* TSC DEADLINE or APIC timer or HPET
|
||||||
* PCID
|
* PCID
|
||||||
* X2APIC
|
* X2APIC
|
||||||
|
* legacy serial port support or PCI serial card (AX99100 only supported now)
|
||||||
|
|
||||||
WARNING: IF you use TSC DEADLINE, make sure that your CPU's TSC DEADLINE timer
|
WARNING: IF you use TSC DEADLINE, make sure that your CPU's TSC DEADLINE timer
|
||||||
is not buggy!
|
is not buggy!
|
||||||
|
@ -187,7 +147,46 @@ Common Configuration Notes
|
||||||
Configuration Sub-Directories
|
Configuration Sub-Directories
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
||||||
|
nsh
|
||||||
|
---
|
||||||
|
|
||||||
|
This configuration provides a basic NuttShell configuration (NSH) with
|
||||||
|
the default console on legacy UART0 port (base=0x3f8)
|
||||||
|
|
||||||
|
nsh_pci
|
||||||
|
-------
|
||||||
|
|
||||||
|
This configuration provides a basic NuttShell configuration (NSH) with
|
||||||
|
the default console on PCI serial port (AX99100 based card).
|
||||||
|
|
||||||
|
nsh_pci_smp
|
||||||
|
-----------
|
||||||
|
|
||||||
|
This is a configuration to run NuttX in SMP mode on hardware with
|
||||||
|
a PCI serial port card (AX99100).
|
||||||
|
|
||||||
ostest
|
ostest
|
||||||
------
|
------
|
||||||
|
|
||||||
The "standard" NuttX examples/ostest configuration.
|
The "standard" NuttX examples/ostest configuration with
|
||||||
|
the default console on legacy UART0 port (base=0x3f8)
|
||||||
|
|
||||||
|
jumbo
|
||||||
|
-----
|
||||||
|
|
||||||
|
This is a QEMU configuration that enables many NuttX features.
|
||||||
|
|
||||||
|
Basic command to run the image without additional PCI devices attached::
|
||||||
|
|
||||||
|
qemu-system-x86_64 -m 2G -cpu host -smp 4 -enable-kvm \
|
||||||
|
-kernel nuttx -nographic -serial mon:stdio
|
||||||
|
|
||||||
|
lvgl
|
||||||
|
----
|
||||||
|
|
||||||
|
LVGL demo example that demonstrates x86_64 framebufer feature.
|
||||||
|
|
||||||
|
fb
|
||||||
|
---
|
||||||
|
|
||||||
|
Configuration that enables NuttX framebuffer examples.
|
137
Documentation/platforms/x86_64/intel64/index.rst
Normal file
137
Documentation/platforms/x86_64/intel64/index.rst
Normal file
|
@ -0,0 +1,137 @@
|
||||||
|
=======
|
||||||
|
Intel64
|
||||||
|
=======
|
||||||
|
|
||||||
|
Architecture-Specific Directories
|
||||||
|
=================================
|
||||||
|
|
||||||
|
Architecture-specific directories hold common source files shared for by
|
||||||
|
implementations of specific x86_64 architectures.
|
||||||
|
|
||||||
|
``intel64``
|
||||||
|
This directory holds logic appropriate for any instantiation of the 64-bit
|
||||||
|
intel64 architecture.
|
||||||
|
|
||||||
|
Chip-Specific directories
|
||||||
|
=========================
|
||||||
|
|
||||||
|
The same x86 architecture may be realized in different chip implementations.
|
||||||
|
For SoC chips, in particular, on-chip devices and differing interrupt
|
||||||
|
structures may require special, chip-specific definitions in these chip-
|
||||||
|
specific directories.
|
||||||
|
|
||||||
|
``qemu``
|
||||||
|
This is the implementation of NuttX on the QEMU x86_64. It's empty for now.
|
||||||
|
|
||||||
|
Features
|
||||||
|
========
|
||||||
|
|
||||||
|
Hardware acceleration
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Configurable hardware acceleration: SSE, AVX2, AVX512 support.
|
||||||
|
|
||||||
|
FMA, AVX and AVX512 support requires ``XSAVE`` instructions support which is
|
||||||
|
controled with ``CONFIG_ARCH_X86_64_HAVE_XSAVE`` option.
|
||||||
|
|
||||||
|
IRQs
|
||||||
|
----
|
||||||
|
|
||||||
|
IRQs are managed by LAPIC(X2APIC) and IOAPIC.
|
||||||
|
|
||||||
|
Clock source
|
||||||
|
------------
|
||||||
|
|
||||||
|
TSC DEADLINE timer, APIC timer or HPET can be used as system clock.
|
||||||
|
|
||||||
|
SMP
|
||||||
|
---
|
||||||
|
|
||||||
|
SMP is supported up to 4 cores now (BSP + 3 AP), but can be easly extended.
|
||||||
|
|
||||||
|
HPET
|
||||||
|
----
|
||||||
|
|
||||||
|
High Precision Event Timer (HPET) is supported as oneshot timer.
|
||||||
|
|
||||||
|
RDRAND
|
||||||
|
------
|
||||||
|
|
||||||
|
The ``/dev/random`` device support with ``RDRAND`` instruction is enabled with
|
||||||
|
``CONFIG_ARCH_INTEL64_HAVE_RDRAND=y``
|
||||||
|
|
||||||
|
PCI bus
|
||||||
|
-------
|
||||||
|
|
||||||
|
PCI bus is supported with legacy interrupts, MSI and MSI-X.
|
||||||
|
|
||||||
|
Multiboot Framebufer
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Multiboot2 framebuffer is supported with ``CONFIG_MULTBOOT2_FB_TERM=y``.
|
||||||
|
|
||||||
|
It is very possible that the framebuffer is mapped in a memory region above 4GB,
|
||||||
|
so you may also need to set ``CONFIG_MM_PGALLOC=y``.
|
||||||
|
|
||||||
|
To enable framebuffer support in QEMU, ommit the ``-nographic`` argument
|
||||||
|
and use ``-cdrom boot.iso`` (multiboot2 framebuffer doesn't work with
|
||||||
|
``-kernel`` option).
|
||||||
|
|
||||||
|
Also, your GRUB configuration (``grub.cfg``) should insert the appropriate video
|
||||||
|
module, in many cases ``insmod all_video`` should be enough.
|
||||||
|
|
||||||
|
Creating a bootable disk
|
||||||
|
========================
|
||||||
|
|
||||||
|
This build supports multiboot2, which means that usual multiboot2 bootlaoders,
|
||||||
|
e.g. grub can be used. To create a bootable disk with grub2, create a directory
|
||||||
|
named ``iso`` with grub configuration file and the compiled ``nuttx.elf``.
|
||||||
|
|
||||||
|
Directory and file hierarchy::
|
||||||
|
|
||||||
|
- iso/
|
||||||
|
- boot/
|
||||||
|
- grub/
|
||||||
|
- grub.cfg
|
||||||
|
- nuttx.elf
|
||||||
|
|
||||||
|
The grub.cfg should contain the boot entry of NuttX::
|
||||||
|
|
||||||
|
set timeout=0
|
||||||
|
set default=0
|
||||||
|
menuentry "kernel" {
|
||||||
|
multiboot2 /boot/nuttx.elf
|
||||||
|
}
|
||||||
|
|
||||||
|
Making the disk
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Use the following command to create the disk.
|
||||||
|
P.S. In some distros, ``grub-mkrescue`` is called ``grub2-mkrescue``::
|
||||||
|
|
||||||
|
grub-mkrescue -o boot.iso iso
|
||||||
|
|
||||||
|
Grub with UEFI
|
||||||
|
--------------
|
||||||
|
|
||||||
|
This flow is very similar except you need to have the BOOTX64.EFI file.
|
||||||
|
You can find this in most Linux distributions::
|
||||||
|
|
||||||
|
iso/
|
||||||
|
└── boot
|
||||||
|
├── efi
|
||||||
|
│ └── EFI
|
||||||
|
│ └── BOOT
|
||||||
|
│ └── BOOTX64.EFI
|
||||||
|
├── grub
|
||||||
|
│ └── grub.cfg
|
||||||
|
└── nuttx.elf
|
||||||
|
|
||||||
|
Supported Boards
|
||||||
|
================
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:glob:
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
boards/*/*
|
|
@ -1,26 +0,0 @@
|
||||||
===========
|
|
||||||
QEMU x86_64
|
|
||||||
===========
|
|
||||||
|
|
||||||
**QEMU/Intel64** An x86_64 flat address port was ported in NuttX-9.0. It
|
|
||||||
consists of the following feautres:
|
|
||||||
|
|
||||||
- Runs in x86_64 long mode.
|
|
||||||
- Configurable SSE/AVX support.
|
|
||||||
- IRQs are managed by LAPIC(X2APIC) and IOAPIC.
|
|
||||||
- Used TSC_DEADLINE or APIC timer for systick.
|
|
||||||
- Pages are now maps the kernel at 4GB~, but changeable.
|
|
||||||
|
|
||||||
This kernel with ostest have been tested with
|
|
||||||
|
|
||||||
- Qemu/KVM on a Xeon 2630v4 machine.
|
|
||||||
- Bochs with broadwell_ult emulation.
|
|
||||||
|
|
||||||
Supported Boards
|
|
||||||
================
|
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:glob:
|
|
||||||
:maxdepth: 1
|
|
||||||
|
|
||||||
boards/*/*
|
|
Loading…
Reference in a new issue