Commit Graph

500 Commits

Author SHA1 Message Date
Andrei Emeltchenko 99ef25a5a9 doc: acrn: Fix indentation for RST
Fix indentation TAB - > Space so that the document looks readable in
text editors.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-10-05 19:26:18 -04:00
Enjia Mai db895f3241 docs: acrn: update the documentation of setting the ACRN hypervisor
Add some descriptions of hybrid scenario of ACRN hypervisor, and
completed the configurations that we are using to build ACRN. This
configuration change for ACRN hypervisor is necessary when our Zephyr
application is using over than one CPU for it.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2021-09-28 06:17:54 -04:00
Daniel Leung cd5357ca56 boards: qemu_x86: disable QEMU icount with shell and HPET timer
For some unknown reasons, using the new modified HPET timer would
render shell unresponsive under QEMU. So for now, disable QEMU
icount when shell is enabled.

Fixes #37672

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-09-15 08:07:35 -04:00
Torsten Rasmussen 3d82c7c828 linker: align _image_text_start/end/size linker symbols name
Cleanup and preparation commit for linker script generator.

Zephyr linker scripts provides start and end symbols for each larger
areas in the linker script.

The symbols _image_text_start and _image_text_end sometimes includes
linker/kobject-text.ld. This mean there must be both the regular
__text_start and __text_end symbols for the pure text section, as well
as <group>_start and <group>_end symbols.

The symbols describing the text region which covers more than just the
text section itself will thus be changed to:
_image_text_start -> __text_region_start
_image_text_end   -> __text_region_end

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-28 08:48:03 -04:00
Torsten Rasmussen c6aded2dcb linker: align _image_rodata and _image_rom start/end/size linker symbols
Cleanup and preparation commit for linker script generator.

Zephyr linker scripts provides start and end symbols for each larger
areas in the linker script.

The symbols _image_rom_start and _image_rom_end corresponds to the group
ROMABLE_REGION defined in the ld linker scripts.

The symbols _image_rodata_start and _image_rodata_end is not placed as
independent group but covers common-rom.ld, thread-local-storage.ld,
kobject-rom.ld and snippets-rodata.ld.

This commit align those names and prepares for generation of groups in
linker scripts.

The symbols describing the ROMABLE_REGION will be renamed to:
_image_rom_start -> __rom_region_start
_image_rom_end   -> __rom_region_end

The rodata will also use the group symbol notation as:
_image_rodata_start -> __rodata_region_start
_image_rodata_end   -> __rodata_region_end

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-28 08:48:03 -04:00
Daniel Leung 27f36bda51 boards: qemu_x86_tiny: enabled for general demand paging testing
This enables qemu_x86_tiny to be used for more general demand
paging testing where non-pinned code and data is not available
in physical memory at boot. This adds a custom linker script to
qemu_x86_tiny for pinning code and data. In the process, a new
kconfig CONFIG_BOARD_QEMU_X86_TINY has to be introduced to
distinguish from other qemu_x86* boards. This linker script
is based on the generic x86-32 one in
include/arch/x86/ia32/linker.ld, with additions to
put symbols into boot and pinned sections.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-08-26 21:16:22 -04:00
Chen Peng1 ce7ebb0821 tests: add a test to verify UEFI boot on x86_64 targets.
add a config CONFIG_QEMU_UEFI_BOOT to indicate whether
the qemu will use UEFI bootable method;
add a new test "sample.basic.helloworld.uefi" to verify
UEFT bootable method on qemu_x86_64 platform.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2021-08-11 11:46:13 +02:00
Andrei Emeltchenko eee22a6e9c doc: ehl_crb: Update EHL CRB documentation
Zephyr is now able to convert ELF binary to the EFI application for
launching directly from the EFI firmware. The bootloader is not needed
and the information about grub was removed.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-08-03 13:57:56 +02:00
Enjia Mai c2ac8fe7d7 acrn_ehl_crb: fix the incorrect configuration of timer IRQ priority
The default CONFIG_APIC_TIMER_IRQ_PRIORITY is 4, but it should be 1 for
ACRN. That's why the testcase failed due to no timer interrupt was
triggered.

And we also temporary adjust the testing IRQ for dynamic isr due to it
conflict with the IRQ of the APIC TSC deadline TIMER.

Fixes #36203.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2021-08-03 07:30:15 -04:00
Chen Peng1 85a2e67bb5 doc: update up_squared document to use UEFI bootable method.
for up_squared board, we already support to use UEFI bootable
method to run zephyr tests, so update the document to use
this UEFI method, rather than legacy BIOS stuff.

Signed-off-by: Chen Peng1 <peng1.chen@intel.com>
2021-08-03 07:29:33 -04:00
Johan Hedberg 602ad0023b boards: Revert "boards: acrn_ehl_crb: Add ibecc DTS node"
This reverts commit 445a23a167.

This change was made with the incorrect assumption that using IBECC in
an ACRN VM is a valid use case. Turns out that ACRN will always manage
the IBECC access itself and the Zephyr driver is only useful for running
natively on the hardware.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-07-27 07:18:26 -04:00
Johan Hedberg 445a23a167 boards: acrn_ehl_crb: Add ibecc DTS node
We need an ibecc DTS node so that the EDAC driver can be used.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-07-13 09:44:07 -04:00
Johan Hedberg 8f8c5055c7 boards: acrn_ehl_crb: Add PCIe to defconfig
A lot of basic functionality depends on PCIe, so enable it in the
defconfig.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-07-13 09:44:07 -04:00
Andy Ross 45bd3dee08 boards/x86/acrn: Use APIC_TSC_DEADLINE_TIMER
This board got forgotten when we migrated the older APIC_TIMER users.
Now the platform is SMP by default and the older driver refuses to
build.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-06-03 20:07:50 -05:00
Andy Ross 3da652f4cd boards/x86/acrn: Rework board documentation
ACRN build and configuration is non-trivially complicated, and so far
integration documentation has been mostly missing, and users have had
to get by via copying from existing integration efforts with minor
changes, leading to repeated mistakes and persistent confusion.  This
is an attempt to document the process from first principles, with an
eye toward informing integrators (not me!) who might come by later to
better automate things.  Some of the content is going to look remedial
to someone already familiar with e.g. ACRN configuration or EFI boot.

This simply replaces the pre-existing docs, which were for earlier
versions of ACRN where Zephyr was launched from the service OS instead
of the now-standard pre-launch VM mode.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-06-03 20:07:50 -05:00
Andy Ross c6f3887e84 boards/x86/acrn_ehl_crb: Enable SMP by default
SMP is working now, make a 2-cpu configuration default for this
device.

Note that this requires changes to the default ACRN build
configuration!  In hybrid.xml, you need to specify multiple physical
CPUs for the VM to uses, e.g.:

    <vm id="0">
        ...
        <cpu_affinity>
            <pcpu_id>0</pcpu_id>
            <pcpu_id>1</pcpu_id>
        </cpu_affinity>
    </vm>

Failing to build with this change will result in the system hanging at
boot trying to start up a CPU that won't run.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-06-03 20:07:50 -05:00
Andy Ross f479d5c7cc boards/x86/acrn: Add APIC IDs
The ACRN hypervisor uses 0, 2, 4, 6 as its local APIC IDs for
virtualized CPUs and not the 0, 1, 2, 3 defaults we have.

(I hate this feature, having to manually (!) probe and code these
things in C isn't scaling.  Zephyr needs to do the probing on its own
somehow, even if it's an offline tool in Linux or something.)

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-06-03 20:07:50 -05:00
Anas Nashif 100a0b8ea2 boards: acrn: do not run net/bt tests
Do not run those tests, the features are not enabled in ACRN.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-01 14:06:56 -05:00
Anas Nashif 11b8dd85b9 boards: minnowboard: remove untested and old board
Remove minnowboard configuration which is very basic and can be brought
back by just taking another X86 configuration. We have not tested this
board for a while and it is not being used actively, so remove it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-01 14:06:56 -05:00
Anas Nashif 86209aced7 boards: qemu_x86_coverage: remove board testing coverage
This board was added to test coverage feature when coverage was
introduced. This is now being testing with other boards and
configurations on a regular basis, so no need for this extra overhead in
CI.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-01 14:06:56 -05:00
Anas Nashif ec5e3017ac boards: up_squared: remove 32bit variant
This board was created for the transition to all 64bit, it is not needed
anymore.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-06-01 14:06:56 -05:00
Jennifer Williams 6ca36a7813 boards: acrn_ehl_crb_defconfig: remove unused configs
The board moved to using APIC TSC Deadline Timer driver, which
removes the need for these configurations associated with
the older Apic timer driver (CONFIG_APIC_TIMER).

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-05-11 06:36:14 -05:00
Daniel Leung 735fad2d1e boards: qemu_x86_virt: enable using boot and pinned sections
This enables the kconfig options so that the board would be
using boot and pinned linker sections.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-10 16:00:43 -05:00
Jennifer Williams 05c5ebd5bd boards: acrn_ehl_crb: Use the new APIC_TSC_DEADLINE timer driver
Update to use this driver as this CPU has the needed APIC support.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-05-07 16:48:58 -04:00
Andy Ross f35d02cef0 soc/x86: Clean up EHL kconfigs
Cleanup along the same lines as the last change to APL/up_squared.
Make sure all hardware configuration is at the board level where it
belongs and not in the soc, don't play games with defaulting timer
drivers.  Unify the configuration where possible and make it clearer
which setting goes with which driver.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-05-07 16:48:58 -04:00
Andy Ross 9d11e8f2bf arch/x86: APL/up_squared kconfig cleanup
The addition of a timer driver made a messy situation worse.  Move
board-level configuration like clock rates and dividers into the board
and don't try to default it in the soc.  Make it clear which kconfig
goes with which driver.  Likewise don't try to do driver selection in
the soc, the board (or app) is in a better position to choose.

Also clean up and better unify the up_squared 32/64 bit settings.
Really only CONFIG_BOARD_NAME needs to care about the difference
between these devices.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-05-07 16:48:58 -04:00
Andy Ross 9a22199ead boards/x86/up_squared: Use the new APIC_TSC_DEADLINE timer driver
Atom and Core CPUs want to be using this driver as they all have the
needed APIC support.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-05-07 16:48:58 -04:00
Daniel Leung 845bf6dbd7 boards: set CONFIG_KERNEL_VM_OFFSET=0 on qemu_x86_virt
Since CONFIG_KERNEL_VM_OFFSET no longer needs to be the same as
CONFIG_SRAM_OFFSET, set it to zero to reclaim the hole in
virtual address space.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-05-05 19:42:25 -04:00
Jennifer Williams 027ce3d458 boards: x86: acrn_ehl_crb: add APIC timer TSC M and N
The acrn_ehl_crb used the APIC timer but did not configure the TSC
M and N parameters, which are advised where available. This adds
the values consistent with native (ehl_crb) definition.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-05-04 10:12:33 -05:00
Johan Hedberg b253f2239d boards: up_squared: Add aliases for I2C
This makes it possible to build the I2C test applications.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-04-21 20:40:52 -04:00
Jennifer Williams 248aebbb70 boards: x86: acrn: doc: fix ACRN GSG link
The GSG link is no longer valid. This commit fixes the link to
use the site recommended by ACRN developers.

Fixes #34149

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-04-09 14:49:36 -04:00
Jennifer Williams 3c5636482c boards: x86: acrn_ehl_crb: fix config Apic timer IRQ value
The default APIC_TIMER_IRQ of 24 causes significant slowdown
in general tests and samples execution on this board. As the
value of ioapic RTEs increases, e.g. 48 in ACRN EHL CRB, the
APIC TIMER IRQ is stepped on. This commit tunes the config
for APIC_TIMER_IRQ to 48 for this board.

Fixes #33593

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2021-04-06 10:49:53 -04:00
Anas Nashif 50faeef6ad boards: x86: oneApi and LLVM objcopy do not support --gap-fill
Work around the fact that llvm objcopy does not support --gap-fill right
now. This should be done on the toolchain level at some point, it is
currently not possible however.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-03-25 08:54:10 -04:00
Daniel Leung 83b46ae9bb boards: qemu_x86_virt: remove ELF modifying script
The linker script has been updated to have correct load address
in the ELF file, so there is no need for the horrible hack.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-03-16 15:03:44 -04:00
Daniel Leung 273a5e670b x86: remove usage of CONFIG_KERNEL_LINK_IN_VIRT
There is no need to use this kconfig, as the phys-to-virt
offset is enough to figure out if the kernel is linked in
virtual address space in gen_mmu.py.

For code, use Z_VM_KERNEL instead.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-03-16 15:03:44 -04:00
Daniel Leung 7a1766d3b6 boards: x86: add qemu_x86_virt to test running in virtual space
This adds a new qemu_x86_virt board where code and data are
mapped in virtual address space and is actually executing within
virtual address space.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-03-03 20:10:22 -05:00
Daniel Leung d340afd456 x86: use CONFIG_SRAM_OFFSET instead of CONFIG_X86_KERNEL_OFFSET
This changes x86 to use CONFIG_SRAM_OFFSET instead of
arch-specific CONFIG_X86_KERNEL_OFFSET. This allows the common
MMU macro Z_BOOT_VIRT_TO_PHYS() and Z_BOOT_PHYS_TO_VIRT() to
function properly if we ever need to map the kernel into
virtual address space that does not have the same starting
physical address.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-22 14:55:28 -05:00
Daniel Leung d2602de329 board: x86: add new board qemu_x86_lakemont
This adds a new board qemu_x86_lakemont for testing
the Lakemont SoC configuration.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-19 18:51:04 -05:00
Daniel Leung cd703ae9cf boards: x86/qemu: enable CPU flags for MMX/SSE
Tells QEMU to enable CPU flags corresponding to MMX/SSE
kconfigs.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-19 18:51:04 -05:00
Laczen JMS 232272cff8 drivers: eeprom: EEPROM emulation in flash memory
This driver emulates a EEPROM device in flash.

Reworked implementation with modified flash layout.

The emulation represents the EEPROM in flash as a region that is a
direct map of the eeprom data followed by a region where changes to
the eeprom data is stored. Changes are written as address-data
combinations. The size of such a combination is determined by the
flash write block size and the size of the eeprom (required address
space), with a minimum of 4 byte.
The eeprom page needs to be a multiple of the flash page. Multiple
eeprom pages is also so supported and increases the number of writes
that can be performed.

The eeprom size, pagesize and the flash partition used for the eeprom
are defined in the dts. The flash partition should allow at least two
eeprom pages. For fast read access a rambuffer can be enabled for the
eeprom (by setting the option rambuf in the dts).

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2021-02-19 14:06:15 +01:00
Daniel Leung 9bd5860440 boards: qemu_x86: use correct memory size
All x86 QEMU boards have a hard-coded memory size of 9MB which
does not corresponding with what is defined in device tree.
So make use of CONFIG_SRAM_SIZE to provide correct memory size.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-16 19:08:55 -05:00
Daniel Leung 8ed9fecbba boards: x86: enable MULTIBOOT_MEMMAP
QEMU provides multiboot information by default so we can
use the provided memory map to mark reserved physical
memory. Note that 64-bit requires Multiboot2 which
currently both Zephyr and QEMU do not support, hence
it's not enabled for qemu_x86_64.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-16 19:08:55 -05:00
Daniel Leung e4d8619b87 boards: x86: fix KERNEL_VM_SIZE for QEMU if ACPI
The default KERNEL_VM_SIZE if ACPI=y is too large for QEMU targets
which results in page tables being too big to fit in available
memory. So limit the VM size to a more reasonable one.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-16 19:08:55 -05:00
Daniel Leung fbdf518c0e x86: qemu: add -no-acpi to QEMU if CONFIG_ACPI=n
Tell QEMU not to use ACPI if CONFIG_ACPI=n. This gives
us back 128K at the end of memory.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-02-16 19:08:55 -05:00
Tomasz Bursztyka a890790592 boards/x86: Give proper board compatible names
These compatible describe the vendor/board, not the cpu/model.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-02-15 09:43:30 -05:00
Andrei Emeltchenko b0f5a83735 boards: ehl_crb: Add coverage support for the board
Allow to include coverage support for ehl_crb board.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2021-02-15 08:13:48 -05:00
Tomasz Bursztyka fda94e79ca boards/x86: Removing explicit KERNEL_VM_SIZE on ehl and up_squared
These were removed in commit 6b58e2c0a3
but mistakenly reintroduced in
commit 51c34bb609

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2021-01-27 08:11:27 -05:00
Anas Nashif 51c34bb609 boards: x86: depend on CONFIG_BUILD_OUTPUT_EFI
Add a new Kconfig CONFIG_BUILD_OUTPUT_EFI and select that for boards
that want to generate an EFI application.
Make qemu_x86_64 also generate an EFI file, however do not enable this
by default yet.

Goal is to boot qemu using EFI to be able to test this path in the
future.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-26 21:41:14 -05:00
Andrew Boie 6b58e2c0a3 x86: use large VM size if ACPI
We've already enabled full RAM mapping if ACPI is enabled, also
set a large 3GB address space size, these systems are not RAM-
constrained (they are PC platforms) and they have large MMIO
config spaces for PCIe.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2021-01-26 16:21:50 -05:00
Kumar Gala ae4e4b78d6 x86: Fix zefi.py generation to use SDK toolchain
With SDK 0.12.2 we have support to generation EFI binaries in binutils
which is needed by the zefi.py script.  Now that is there we can utilize
the SDK objcopy instead of assuming the host objcopy can do this (which
would only be the case on x86 linux host systems).

Fixes #27047

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-01-25 13:17:02 -05:00