Commit graph

50892 commits

Author SHA1 Message Date
Jaxson Han
318a1a1d38 soc: arm64: Define Armv8-R aarch64 default MPU regions
Add several default mpu regions(flash/sram/sram_text/sram_ro) for
the Armv8-R aarch64 based Soc.
These regions will be initialized as static region during system boot.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00
Jaxson Han
794656913b include: arm64: Add BSS align when MPU enabled
When MPU is enabled, the sections need to be 64 bytes aligned.
In the case of MMU, BSS section will be 4k aligned, because the first
variable in BSS section 'base_xlat_table' is explicitly aligned by
'__aligned(NUM_BASE_LEVEL_ENTRIES * sizeof(uint64_t))'.

However, with MPU, we do not have such a variable. So it's necessary
to fix the alignment of the BSS section in the linker.ld

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00
Jaxson Han
30ed92c218 arch: arm64: Armv8-R AArch64 MPU implementation
Armv8-R AArch64 MPU can support a maximum 16 memory regions, and the
actual region number can be retrieved from the system register(MPUIR)
during MPU initialization.
Current MPU driver only suppots EL1.

Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00
Jaxson Han
475374ce2f include: arm64: Add mpu data struct definition
According to Armv8-R64 Spec, MPU related meta data(region base/limit)
is 64 bits. So we need to re-define MPU related data structure here.

Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00
Jaxson Han
72287491df cmake: arm64: Add Cortex-R82 in toolchain option
Use -march=armv8.4-a to compile zephyr on cortex-R82.
Because Cortex-R82 has not been enabled in GCC 10.x currently.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00
Jaxson Han
8af11d40d0 cmake: emu: Add arm fvp emulator
Add arm fvp emulator in order to use ninja run or west build -t run.
Add armfvp in order to run twister.

Set env ARMFVP_BIN_PATH before using it,
e.g. export ARMFVP_BIN_PATH=<path/to/fvp/dir>
NOTE: ARMFVP_BIN_PATH is the dir path.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00
Jaxson Han
8f46bc97a3 dts: arm64: Add dtsi and dts binding for cortex-R82
Add armv8-r dtsi.
Add dts binding yaml file for cortex-R82.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00
Jaxson Han
ade060ed1f soc: arm64: Add FVP AEMv8R AArch64 soc
Add essential files to create a new soc.
Introduce a new type of soc series named fvp_aemv8r.
Add a new soc named fvp_aemv8r_aarch64.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00
Jaxson Han
36006ed1ba drivers: gicv3: GIC with single secure mode
The Cortex-R 64-bit processor only supports GIC with single
security mode

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00
Jaxson Han
ad1da08f4f arch: arm64: Add Cortex-R82 config
Add Cortex-R82 config to support the Cortex-R82 processor.
Introduce the new CPU_CORTEX_R_AARCH64 config for the Cortex-R 64-bit
processor.

Since the current CPU_CORTEX_R config has already been bound for
AArch32 in many test cases, we therefore add a new CPU_AARCH64_CORTEX_R
to distinguish from the Cortex-R 32-bit processor.
We do not use CPU_CORTEX_R64 because this name will lead to ambiguity
with processor name like Cortex-R82.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
2021-04-13 07:47:44 -04:00
Henry Wang
542cd9bdbb include: arm64: Fix compile with default MMU off
If default config ARM_MMU is set to n, samples/tests will have
compilation error. This is because the arch/arm/aarch64/arm_mmu.h
is always included.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2021-04-13 07:47:44 -04:00
Håkon Øye Amundsen
c5c55ee47e scripts: size_report: fix bug where key is used as a dict
When printing the unassigned values the 'sym' variable is
used as a dict from which we try to get the 'name' value.
However, 'symbols['unassigned']' gives a list of keys, so
we get an 'TypeError' when trying to access ['name'] of
a string (the key).

Fix this issue by iterating over the values from
the 'symbols['unassigned']' dict instead.

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2021-04-13 07:16:15 -04:00
Evgeniy Paltsev
d4081fd07f ARC: allow to configure the RGF_NUM_BANKS only if ARC_FIRQ is enabled
As of today we use second register bank only if fast interrupts are
enabled. So don't show the 'number of register bank' configuration
option if fast interrupts are disabled to avoid user confusion.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2021-04-13 06:59:20 -04:00
Morten Priess
cc46dee7d0 Bluetooth: controller: LLL refactoring of openisa for API changes
Update openisa LLL to match common LLL changes and make CI pass.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-04-13 12:15:12 +02:00
Morten Priess
772a77718e Bluetooth: controller: Framework for new feature BT_CTLR_JIT_SCHEDULING
This option enables BT_TICKER_SLOT_AGNOSTIC which eliminates
priorities and collision resolving in the ticker.

Event scheduling states are stored in the lll_hdr, and event priority
is passed from LLL implementation, and runtime priority calculated.

LLL implementation decides whether to program radio, start preemption
timer, and/or queue prepare in the prepare pipeline.

Event arbitration is made possible via the common LLL, but not yet
implemented in Nordic LLL.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-04-13 12:15:12 +02:00
Morten Priess
9aaa120abd Bluetooth: controller: Clean up LLL priority
Priority in the legacy stack has been unused and "work in progress" for
some time. With this commit, the priority passing/handling is cleaned
up, preparing for the new JIT scheduling priority handling.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-04-13 12:15:12 +02:00
Morten Priess
7dd5820920 Bluetooth: controller: Move common LLL from vendor file
Split lll_prepare and lll_resume from Nordic LLL to common file for
reuse by all vendors. The split also supports new JIT Scheduling by
defining a common place to calculate event prepare priority.

The module may also house other common parts of the LLL currently
re-implemented identically by vendors.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-04-13 12:15:12 +02:00
Morten Priess
385f232ae2 Bluetooth: controller: Propagate ticker force to ULL
The ticker 'force' flag is propagated via the ticker elapsed callback,
in order to provide necessary information for collision resolving in the
link layer.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-04-13 12:15:12 +02:00
Morten Priess
9f82034245 Bluetooth: controller: Introducing slot agnostic ticker
Added config BT_TICKER_SLOT_AGNOSTIC which configures the ticker in
a "slot agnostic" mode, in which no collision resolving or slot
reservation is possible or used. In this mode, the ticker acts as a
simple timer.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-04-13 12:15:12 +02:00
Morten Priess
4277af8f55 Bluetooth: controller: Rename BT_TICKER_COMPATIBILITY_MODE
Renamed to BT_TICKER_LOW_LAT in ticker, and changed selected
conditionally compiled code to use IS_DEFINED macro.

Signed-off-by: Morten Priess <mtpr@oticon.com>
2021-04-13 12:15:12 +02:00
Kumar Gala
365145aa97 drivers: gpio: mmio32: Make GPIO_MMIO32_INIT dt aware
Change the GPIO_MMIO32_INIT to take a devicetree node since we want
to use DEVICE_DT_DEFINE.  This makes it so that code using
GPIO_DT_SPEC_GET works correctly with GPIO controllers that utilize
GPIO MMIO32.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-13 00:25:35 -05:00
Jukka Rissanen
aaaef987a7 net: doc: Add info about net-capture.py script
Added net-capture.py script to net-tools project. The script
can be used to view and save the captured network traffic to
pcap file.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2021-04-12 22:15:02 -04:00
Nicolas Pitre
790794ce84 arm64: improve CONFIG_MAX_XLAT_TABLES default value
The typical number of needed translation tables depends on memory
domain usage and userspace support, but also on the virtual address
space width due to the number of translation levels involved.
Reflect that in the default value.

Also fix a related comment where values were off by 1.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-04-12 22:13:38 -04:00
Kim Bøndergaard
48f5e746c8 samples: display: Added support for sitronix_st7735r
Requires a ST7735R based LCD

Signed-off-by: Kim Bøndergaard <kim@fam-boendergaard.dk>
Signed-off-by: Kim Bøndergaard <kibo@prevas.dk>
2021-04-12 16:42:00 -04:00
Kim Bøndergaard
cc6f99dcb4 shields: display: Added support for ST7735r based LCD shields
This very first version supports the 160x128 pixels adafruit TFT display

Signed-off-by: Kim Bøndergaard <kim@fam-boendergaard.dk>
Signed-off-by: Kim Bøndergaard <kibo@prevas.dk>
2021-04-12 16:42:00 -04:00
Kim Bøndergaard
6adafaeb02 driver: display: Add support for st7735r based LCDs
First version of a driver for the st773r LCD controller.
Based on st7789v

Signed-off-by: Kim Bøndergaard <kim@fam-boendergaard.dk>
Signed-off-by: Kim Bøndergaard <kibo@prevas.dk>
2021-04-12 16:42:00 -04:00
Kumar Gala
77d2ed00ca boards: hexiwear_kw40z: Remove I2C pins and dts enablement
I2C isn't connected on the KW40Z to anything so configuring the pins
for at and having it enabled in the devicetree don't make any sense.

Additionally, the pins for I2C are currently conflicting with the UART
pins, which is another reason to remove the I2C config.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-12 14:47:09 -05:00
Kumar Gala
c7412bb0c4 drivers: uart: uart_cmsdk_apb: Fix compile warning.
If we are building the driver with CONFIG_UART_INTERRUPT_DRIVEN=n
we need to ifdef around the decleration of uart_cmsdk_apb_isr()
or we'll get a compiler warning.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-12 12:06:56 -05:00
Alberto Escolar Piedras
84cf9a2622 nrf52_bsim: Fix LOG_MODE_IMMEDIATE kconfig warning
The board _defconfig file was trying to set
LOG_MODE_IMMEDIATE unconditionally by default, which
caused a warning when LOG wasn't enabled.
Instead set it only when LOG is enabled.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
2021-04-12 18:12:03 +02:00
Ningx Zhao
05e5f4842b tests: mutex: fixed a testcase assert failure
Modify the testcase design to solve some threads
can't lock mutex. Using array index to detect the order
of threads getting mutex instead of delaying.

Fixed #34116

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
2021-04-12 11:55:04 -04:00
Nicolas Pitre
fc8c53ff0e arm64: a few alignment fixes
The structure for the arm64_cpu_init array has to carry the cache
alignment on the whole structure and not on some internal padding
to achieve the desired effect.

And align struct __esf to a 16-byte boundary which will also align
its size accordingly. This structure is allocated on the stack on
exception entry and the ABI prescribed 16-byte stack alignment
should be preserved.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2021-04-12 11:47:41 -04:00
Robert Lubos
1a69317eea shell: telnet: Make sure the delayed work becomes idle after canceling
Replace k_work_cancel_delayable() with k_work_cancel_delayable_sync()
to make sure that the submitted work becomes idle before accessing
sensitive data.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-04-12 11:47:24 -04:00
Robert Lubos
501c7d17b0 shell: telnet: Update to the new k_work API
Update the shell telnet backend to use the new k_work_delayable API.

Fixes #34100

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-04-12 11:47:24 -04:00
Emil Gydesen
2016509756 Bluetooth: Audio: Audio Input Control Service and client
This commit implements the secondary service
Audio Input Control Service (AICS) server and client.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-04-12 11:47:00 -04:00
Ievgenii Meshcheriakov
74a5ed7a23 doc: guides: porting: shields: fix Arduino header name
``arduino-header-r3`` was incorrectly referred to as
``arduino-r3-header``.

Signed-off-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@nordicsemi.no>
2021-04-12 11:46:33 -04:00
Francois Ramu
3d329870c1 west.yml: Update hal_stm32 with recent cube packages
STM32Cube updates:

    stm32cube: update stm32l5 to version V1.4.0
    stm32cube: update stm32l4 to version V1.17.0
    stm32cube: update stm32g4 to version V1.4.0
    stm32cube: update stm32f7 to version V1.16.1
    stm32cube: update stm32f4 to version V1.26.0
    stm32cube: update stm32g0 to version V1.4.1
    stm32cube: update stm32h7 to version V1.9.1
    stm32cube: update stm32mp1 to version V1.4.0

    update stm32cube/common_ll

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2021-04-12 11:46:12 -04:00
Eduardo Montoya
1d668d4b7c net: openthread: add microseconds timer API
Add OpenThread API to handle microseconds timer, to be used initially
by CSL receiver.

Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
2021-04-12 17:01:14 +03:00
Maciej Perkowski
22a82bc054 docs: twister: Add section about quarantine feature
Add section about quarantine feature

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2021-04-12 08:42:29 -04:00
Maciej Perkowski
9c6dfce0c0 twister: Add quarantine feature
Adds feature allowing to use yaml file with dictionaries defining
tests to be quarantined (extra arg "--quarantine-list FILENAME").
The dictionaries are validated according to the proper schema
and loaded.

A flat list is created containing quarantined configurations
(configuration = platform + scenario). Configurations under quarantine
are skipped and get "Quarantine" as a reason in the results reports.

A "comment" can be added to a quarantine entry in the quarantine yaml
with more details (e.g. issue #) and it will be also added to
the report.

The status of tests under quarantine can be verify if
`--quarantine-verify` is used in addition to
"--quarantine-list FILENAME". Using these args will make twister skip
all tests which are not on the quarantine list.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2021-04-12 08:42:29 -04:00
Krzysztof Chruscinski
8bee027ec4 arch: arm: Unconditionally compile IRQ_ZERO_LATENCY flag
Flag was present only when ZLI was enabled. That resulted in additional
ifdefs needed whenever code supports ZLI and non-ZLI mode.

Removed ifdefs, added build assert to irq connections to fail at
compile time if IRQ_ZERO_LATENCY is set but ZLI is disabled. Additional
clean up made which resulted from removing the ifdef.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-04-12 07:33:27 -04:00
Krishna Mohan Dani
2324617d4a boards/arm: nucleo_g474re: Updating the documentation.
This has been tested with flash sample application on
nucleo-g474re platform.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-04-12 07:33:05 -04:00
Krishna Mohan Dani
70b25ab698 boards/arm: nucleo_l152re: Enabling flash support in device tree.
Enabling flash support for nucleo-l152re in device tree.
This has been tested with flash sample application on
nucleo-l152re platform.
Documentation has been updated.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-04-12 07:33:05 -04:00
Krishna Mohan Dani
7b37c94e22 boards/arm: nucleo_g071rb: Enabling flash support in device tree.
Enabling flash support for nucleo-g071rb in device tree.
This has been tested with flash sample application on
nucleo-g071rb platform.
Documentation has been updated.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-04-12 07:33:05 -04:00
Krishna Mohan Dani
de2978d0f7 boards/arm: nucleo_f103rb: Enabling flash support in device tree.
Enabling flash support for nucleo-f103rb in device tree.
This has been tested with flash sample application on
nucleo-f103rb platform.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-04-12 07:33:05 -04:00
Kumar Gala
3b84b645db samples: flash_shell: Fix Coverity issue 220540
Fix possible Uninitialized 'ret' value.

Fixes #34001

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-04-12 07:32:39 -04:00
Flavio Ceolin
f6f951cc17 kernel: Fix 10.4 violations
Both operands of an operator in which the usual arithmetic
conversions are performed shall have the same essential
type category.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-10 09:59:37 -04:00
Flavio Ceolin
d0dac69fa9 logging: Fix 10.4 violations
Both operands of an operator in which the usual arithmetic
conversions are performed shall have the same essential
type category.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-10 09:59:37 -04:00
Flavio Ceolin
9285b4c6bf arch: nios2: Fix 10.4 violations
Both operands of an operator in which the usual arithmetic
conversions are performed shall have the same essential
type category.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-10 09:59:37 -04:00
Flavio Ceolin
b7d04487e1 arch: riscv: Fix 10.4 violations
Both operands of an operator in which the usual arithmetic
conversions are performed shall have the same essential
type category.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-10 09:59:37 -04:00
Flavio Ceolin
bfd9d0069b arch: sparc: Fix 10.4 violations
Both operands of an operator in which the usual arithmetic
conversions are performed shall have the same essential
type category.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2021-04-10 09:59:37 -04:00