On 8/25/20 2:30 AM, Chris Johns wrote: >> Also is there any reason pcx86 BSP is not documented at all? > > We need someone to create and add the documentation for the PC BSP. It is not > hard but it is important. The README in the BSP could be filtered, updated and > moved into the doco.
Please review attached patch and let me know if this is good for the start or you need spelling/formatting changes. I'm especially not sure how best to format Runtime Options listing -- e.g. `--console` results in not so nice -console in output etc. Also I'm not able to verify PDF gen due to #4062. Thanks, Karel
>From a325efbd4257269f6e5d3aa99bfbf6263d8d64fc Mon Sep 17 00:00:00 2001 From: Karel Gardas <karel.gar...@centrum.cz> Date: Tue, 25 Aug 2020 10:28:19 +0000 Subject: [PATCH] user/pc386 BSP: first bits including testing on Qemu and BSP variants list --- user/bsps/bsps-i386.rst | 59 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/user/bsps/bsps-i386.rst b/user/bsps/bsps-i386.rst index a29edf6..f7852a1 100644 --- a/user/bsps/bsps-i386.rst +++ b/user/bsps/bsps-i386.rst @@ -8,4 +8,61 @@ i386 pc386 ===== -TODO. +The BSP offers several variants which differ only in the target CPU +optimization. The most general is `pc386` which is tuned for i386. The `pc486` +variant is tuned for i486, `pc585` is tuned for Pentium, `pc586-sse` is tuned +for Pentium processor supporting SSE instructions. Finaly `pc686` is tuned +for Pentium Pro processor, but generating only instructions for Pentium +and `pcp4` is tuned and generating instructions for Pentium4 processor +including SSE3 instructions. + +Build Configuration Options +--------------------------- +TODO + +Runtime Options +--------------- +The BSP supports several runtime options. They may be used by either setting +during boot by using target hardware bootloader facility or by using Qemu's +``-append`` command-line parameter. + +- `--console`: specifies console device. E.g. ``--console=/dev/com1`` +- `--printk`: specifies target device for printk/getk calls. +- `--video`: specifies required video mode. Choices are ``auto`` which selects + graphic mode automatically or ``none``/``off`` which disables initialization + of the graphic driver or direct specification of resolution and/or color depth + by ``<resX>x<resY>[-<bpp>]``. E.g. ``--video=none`` disables graphic driver. + + +Testing with QEMU +----------------- + +To test with QEMU, we need to: + +- Build / install QEMU (most distributions should have it available on the + package manager). + +Booting RTEMS in Qemu +^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: none + + $ qemu-system-i386 -m 128 -no-reboot -append "--video=off --console=/dev/com1" \ + -nographic -kernel ./hello.exe + +This command boots ``hello.exe`` application located in current directory and sets +Qemu to provide 128MB RAM and to switch both Qemu's and BSP's video off. + +Booting RTEMS in KVM accelerated Qemu +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +When the Qemu host hardware and OS support KVM, it is possible to use it +to accelerate BSP run by using ``-machine type=q35,accel=kvm`` Qemu option. +Depending on the Qemu host configuration you may or may not require administrator +priviledges to run the command. + +.. code-block:: none + + $ sudo qemu-system-i386 -machine type=q35,accel=kvm -m 128 -no-reboot \ + -append "--video=off --console=/dev/com1" -nographic -kernel ./dhrystone.exe + +This command boots ``dhrystone.exe`` application and sets Qemu to use KVM acceleration. -- 2.25.1
_______________________________________________ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users