Commit Graph

471 Commits

Author SHA1 Message Date
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
Andrew Boie c56b41f9b3 boards: x86: increase VM size on PC-like
These are all PC systems which have large amounts of memory
which needs to be mapped at runtime (most are 2GB).

Increase the address space size accordingly, adding an extra
8MB for mappings.

The ACRN target has 8MB, give it 16MB of VM.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2021-01-23 19:47:23 -05:00
Andrew Boie 4d6c20b9d7 qemu_x86_tiny: enable demand paging
This target is specifically for simulating x86 micro-
controllers with limited memory.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2021-01-23 19:47:23 -05:00
Andrew Boie b0b7756756 x86: pre-allocate address space
We no longer use a page pool to draw memory pages when doing
memory map operations. We now preallocate the entire virtual
address space so no allocations are ever necessary when mapping
memory.

We still need memory to clone page tables, but this is now
expressed by a new Kconfig X86_MAX_ADDITIONAL_MEM_DOMAINS
which has much clearer semantics than specifying the number
of pages in the pool.

The default address space size is now 8MB, but this can be
tuned by the application.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2021-01-23 19:47:23 -05:00
Andrew Boie ea10c98c08 qemu_x86_tiny: don't use first megabyte at all
Just tell the kernel that RAM starts 1MB in, period.
Better simulation of a low-memory microcontroller as
we're not managing a very large number of page frames
we'll never use.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2021-01-23 19:47:23 -05:00
Kumar Gala 895277f909 x86: Fix zefi.py creating valid images
When zefi.py was changed to pass compiler and objcopy the flag to
objcopy for the EFI target was dropped.  This is because the current
SDK (0.12.1) doesn't support that target type for objcopy.  However,
target is necessary for the images to be created correctly and boot.

Switch back to use the host objcopy as a stop gap fix, until the SDK
can support target for EFI.

Fixes: #31517

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-01-22 12:41:27 -05:00
Anas Nashif 2480b39b59 Revert "qemu_x86_tiny: don't use first megabyte at all"
This reverts commit d2b7261076.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-22 08:39:45 -05:00
Anas Nashif e980848ba7 Revert "x86: pre-allocate address space"
This reverts commit 64f05d443a.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-22 08:39:45 -05:00
Anas Nashif 1d24758f95 Revert "qemu_x86_tiny: enable demand paging"
This reverts commit cd0a50d5c9.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-01-22 08:39:45 -05:00
Andrew Boie cd0a50d5c9 qemu_x86_tiny: enable demand paging
This target is specifically for simulating x86 micro-
controllers with limited memory.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2021-01-21 16:47:00 -05:00
Andrew Boie 64f05d443a x86: pre-allocate address space
We no longer use a page pool to draw memory pages when doing
memory map operations. We now preallocate the entire virtual
address space so no allocations are ever necessary when mapping
memory.

We still need memory to clone page tables, but this is now
expressed by a new Kconfig X86_MAX_ADDITIONAL_MEM_DOMAINS
which has much clearer semantics than specifying the number
of pages in the pool.

The default address space size is now 8MB, but this can be
tuned by the application.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2021-01-21 16:47:00 -05:00
Andrew Boie d2b7261076 qemu_x86_tiny: don't use first megabyte at all
Just tell the kernel that RAM starts 1MB in, period.
Better simulation of a low-memory microcontroller as
we're not managing a very large number of page frames
we'll never use.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2021-01-21 16:47:00 -05:00
Spoorthy Priya Yerabolu 513b9f598f zefi.py: Use cross compiler while building zephyr
Currently, zefi.py takes host GCC OBJCOPY as
default. Fixing the script to use CMAKE_C_COMPILER
and CMAKE_OBJCOPY.

Fixes: #27047

Signed-off-by: Spoorthy Priya Yerabolu <spoorthy.priya.yerabolu@intel.com>
2021-01-20 16:38:12 -05:00
Johan Hedberg 0970e42334 boards: x86: ehl_crb: Add board variant for Slim Bootloader
When using Slim Bootloader the UART configuration isn't quite the same
as with the UEFI BIOS. In particular, UART2 is hidden in PCIe and is
instead accessible using a fixed MMIO address. Interrupts are also not
supported for this UART currently.

The simplest way to create builds against this special BIOS/bootloader
setup seems to be to create a new board variant/definition which lets
us provide a custom device tree overlay as well a dedicated Kconfig
default configuration.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-01-18 15:45:58 -05:00
Johan Hedberg 415271651c boards: x86: ehl_crb: Remove unnecessary Bluetooth references
The bt-uart, uart-pipe and bt-mon-uart DT chosen values are all
Bluetooth specific. Since Bluetooth isn't supported on the ehl_crb
board currently just remove these.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-01-18 15:45:58 -05:00
Aastha Grover b644432720 boards: x86: acrn : Add configurations for acrn_ehl_crb
Adding acrn configurations specific to the platform
on which acrn boots zephyr, Only the EHL specifc
configurations for now. Keeping the HW clock frequency to
1900Mhz for EHL and using the new APIc timer driver.

Signed-off-by: Aastha Grover <aastha.grover@intel.com>
2021-01-11 16:11:59 -05:00
Enjia Mai 8d5a22c3c1 tests: enable the code coverage report for qemu_x86_64
Enable the code coverage report for qemu_x86_64 platform.
See issue #17991 please.

Signed-off-by: Enjia Mai <enjiax.mai@intel.com>
2021-01-05 10:32:38 -08:00
Andy Ross c2c6bee036 drivers/timer: Remove legacy APIC driver
For a while now, we've had two APIC drivers.  The older was preserved
initially as the new (much smaller, "new style") code didn't have
support for Quark interrupt handling.  But that's long dead now.  Just
remove it.

Note that this migrates the one board using this driver (acrn) to
CONFIG_APIC_TIMER instead.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-12-27 18:19:17 +01:00
Daniel Leung 55df308025 Revert "boards/x86: Enable Intel VT-D for up_squared"
This reverts commit 7492841dd1.

Enabling CONFIG_INTEL_VTD_ICTL on UP Squared board results
in tests and apps hanging. So revert this for now.

Relates to #30574

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2020-12-14 23:21:41 -05:00
Jennifer Williams f080b223de boards: x86: Add basic documentation for Intel Elkhart Lake
Add initial documentation for the Elkhart Lake SoC and CRB board
definition.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
2020-12-12 14:16:23 +02:00
Johan Hedberg 7c70032d1f boards: x86: Add ehl_crb board definition
Add initial definition for the Elkhart Lake CRB board.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2020-12-12 14:16:23 +02:00
Tomasz Bursztyka 7492841dd1 boards/x86: Enable Intel VT-D for up_squared
Mainly for testing Intel VT-D for now.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2020-12-08 09:29:20 -05:00
Andrew Boie 4c87224818 x86: add qemu_x86_tiny
This build target has all the low-memory options enabled for
memory management: a 4MB address space, 32-bit paging mode,
no KPTI, an empty page pool, and common page tables for
memory domains.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-11-05 09:33:40 -05:00
Andrew Boie 0dae74e4a5 boards: x86: tune X86_MMU_PAGE_POOL_PAGES
These are set such that we have enough pages in the pool
for typical driver mappings and to instantiate two more
memory domains, which is what our tests require.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-11-05 09:33:40 -05:00
Lauren Murphy 39523f45c5 boards: Add qemu_x86_64_nokpti target
Adds a build target to run tests on qemu_x86_64 with KPTI disabled.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2020-11-05 09:33:40 -05:00
Lauren Murphy 67395d6f07 boards: Add qemu_x86_nokpti target
Adds a build target to run tests on qemu_x86 with KPTI disabled.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2020-11-05 09:33:40 -05:00
Anas Nashif 3219710c34 boards: qemu_x86: enable llvm toolchain
Make this board buildable with llvm.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-11-02 14:30:37 -05:00
Ioannis Glaropoulos 792bec2be8 boards: arm: remove non-existing doc link from partition definitions
In the flash partition definitions for ARM boards,
the link to the legacy partition macros does not
exist any more. The commit cleans up the partition
definition by removing this link.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-10-27 15:01:19 -04:00
Maximilian Bachmann 583af994d0 boards: x86: disable werror for grub build
There is a warning because of some pointer arithmetics in Grub,
that makes the build fail. The build works after disabling -Werror.

Signed-off-by: Maximilian Bachmann <m.bachmann@acontis.com>
2020-10-21 06:19:51 -05:00
Andrew Boie 55914da0e5 boards: add qemu_x86_nopae target
We added support for 32-bit page tables, without PAE.
Add a build target to ensure it doesn't bit-rot.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-08-25 15:49:59 -04:00