Commit Graph

88844 Commits

Author SHA1 Message Date
Daniel Leung 86b7210dc7 soc: xtensa: dc233c: no need to include xtensa_mmu_priv.h
It does not use anything inside xtensa_mmu_priv.h so remove
the include.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung 43b0b48de7 xtensa: move files under core/include/ into include/
Header files under arch/xtensa/include are considered internal
to architecture. There is really no need for two places to
house architecture internal header files.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung d9b34c6108 xtensa: move irq management stuff into irq_manage.c...
... from xtensa_asm2.c. Other architectures have
z_irq_spurious() and *_irq_is_enabled() test in irq_manage.c.
So follow the trend here.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung 264391fe88 xtensa: refactor thread related stuff into its own file...
... from xtensa_asm2.c.

Everything has been stuffed inside xtensa_asm2.c where
they are all mangled together. So extract thread related
stuff into its own file.

Note that arch_float_*() may not be thread related but
most other architectures put them into thread.c. So we
also do it here.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung aa64b1f98e xtensa: move arch_spin_relax into smp.c
arch_spin_relax() does not really fit into the scheme of
xtensa_asm2.c as it is mainly about handling interrupts
and exceptions. So move it into smp.c, similar to other
architectures which arch_spin_relax() defined.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung 106061b307 xtensa: rename files with hyphens to underscores
Simply to provide some consistencies on file naming under
arch/xtensa.

These are all internally used files and are not public.
So there is no need to provide a deprecation path for
them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung 43990d1c0e xtensa: remove xtensa-asm2.h
xtensa-asm2.h only contains the function declaration of
xtensa_init_stack() which is only used in one file. So
make the actual implementation a static function in that
file. Also there is really no need to expose stack init
function as arch public API. So remove xtensa-asm2.h.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung 6694390ac8 xtensa: cleanup Kconfig file
* Wording on CONFIG_SIMULATOR_XTENSA
* Remove "default n" as default is no anyway.
* Remove some tabs as we almost never indent inside a if block
  in Zephyr.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung fc7ef47ed5 xtensa: remove CONFIG_XTENSA_NO_IPC
There is no in-tree user. Also, it is misleading as we use
SCOMPARE1 for spinlock too, not just IPC.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung d17524b86c xtensa: remove CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC from arch
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC should be defined at the SoC
or the board level since Xtensa cores are high configurable.
The default is just for ISS (Instruction Set Simulator). So
remove it from the arch level.

The xt-sim board is the only one in tree that is targeting
the ISS, so add it there.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Daniel Leung 3af390f6ed xtensa: doxygen: add groups for public and internal APIs
This adds two groups for Xtensa public and internal APIs.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-13 09:41:24 +01:00
Jonathan Rico 2dab5dd0a0 tests: Bluetooth: add babblesim connection stress test
This is supposed to stress the host buffer and metadata handling.

It is not really testing any particular thing, ie. the pass criteria is
just that each peripheral can send and receive a fixed number of GATT
notifications without any device crashing or locking up.

Original version by Ahmed Moheib (from cloud2ground).

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2023-12-12 21:43:45 +02:00
Anas Nashif 8e5c3ce616 arch: xtensa: check for xt-clang instead of xcc-clang
Check against new variant name. xcc-clang usage is deprecated.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-12 18:48:14 +00:00
Anas Nashif e29452da64 arch: arm: remove aarch32 from include header guards
We follow the path of the header to define the guard, aarch32 was
removed some time ago and the guards still had AARCH32 in them, just
remove it and keep the guard consistent and short.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-12 18:47:57 +00:00
Francois Ramu 82613c2e30 boards: arm: Add RTC clock source for az3166_iotdevkit
The `az3166_iotdevkit` board doesn't have its RTC node enabled,
and is failing the following test:
`tests/benchmarks/footprints/benchmark.kernel.footprints.pm`
Enabled RTC node for that platform.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-12-12 18:47:24 +00:00
Francois Ramu acf0fe82d4 boards: arm: Add RTC clock source for 96b_aerocore2
The `96b_aerocore2` board doesn't have its RTC node enabled,
and is failing the following test:
`tests/benchmarks/footprints/benchmark.kernel.footprints.pm`
Enabled RTC node and lsi clock source for that platform.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-12-12 18:47:24 +00:00
Daniel Leung c6773403b1 kernel: mm: fix some doxygen issues
Fix misplaced in,out in @param. If any parameters are output,
mark the others as input for clarity.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-12 18:46:21 +00:00
Daniel Leung fa561ccd59 kernel: mmu: no need to expose z_free_page_count
z_free_page_count is only used in one file, so there is
no need to expose it, even to other part of kernel.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-12 18:46:21 +00:00
Tomasz Bursztyka dc49dad7e0 tests/kernel: Exlude bogus platforms on cache test
Until these get fixed.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-12-12 19:11:13 +01:00
Tomasz Bursztyka a2be813d99 tests/kernel: Add qemu_x86/x86_64 to cache test and enable cache
How cache test could be ran without CONFIG_CACHE_MANAGEMENT?

Adding qemu_x86/x86_64 as cache related API in x86 has proven to be
very brittle against changes recently: no test was at least verifying
it builds properly, not to mention running it.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-12-12 19:11:13 +01:00
Tomasz Bursztyka 9be3b8490b boards/x86: Adding clflush CPU capability to qemu_x86
Without this, cache manipulation cannot work in x86.
clflush was introduced with SSE2 extension, but may be implemented
without this extension and it seems that qemu made this choice a
adding sse2 CPU capability does not include clflush. It enabled by
default in 64 bits, so let's take care of this capability only for
the 32bits version of the board.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-12-12 19:11:13 +01:00
Tomasz Bursztyka daf42fe77a arch/x86: CPUs expose an unimplemented feature
Instruction cache related functions (see include/zephyr/arch/cache.h)
are not implemented in x86, thus let's not set CONFIG_CPU_HAS_ICACHE
which may end up in build failure if one sets CONFIG_ICACHE.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-12-12 19:11:13 +01:00
Tomasz Bursztyka b1cc7312cf arch/x86: Fixing dcache enable/disable code
It did not build in x86_64 due to the fact that cr0 is a 64bits
register in such architecture, instead of being a 32bits one originaly
so the place holder has to follow that size. Such place holder must be
initialized to 0 to make sure no upper 32 bits ends up set which would
conclude in a general protection error.

Operand size specifier (l, q ...) is useless as well in this context.

Clearing up the masks by using proper macros.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2023-12-12 19:11:13 +01:00
Daniel Leung 6421c7a5fe os: timing: polish doxygen
() Moves the architecture specific timing measurement APIs
   under the timing measurement APIs group.
() Add SoC and board specific API groups.
() Document each SoC and board specific API so the doc shows up
   for them.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-12-12 19:10:33 +01:00
Xudong Zheng 545a3973a8 bluetooth: bas: remove select SENSOR
Bluetooth battery service does not use sensor.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2023-12-12 19:10:17 +01:00
Lucas Denefle b287db8fd3 samples: net: cellular_modem: polls cellular info
Adds an example of polling cellular info to the modem sample

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2023-12-12 19:09:33 +01:00
Lucas Denefle d1ba79a070 drivers: cellular: add signal and modem_info API
Implement modem info pulling using the init and periodic chat scripts

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2023-12-12 19:09:33 +01:00
Bjarki Arge Andreasen ad011695ab drivers: Add cellular API for network configuration
Adds two APIs which allow for configuring the cellular
network configuration of a cellular network device. like
a cellular modem. The first allows for configuring which
access technology to use, and optionally, which bands to
use. The second allows for getting all supported access
technologies are supported, and which bands for each tech
are supported.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-12-12 19:09:33 +01:00
Maciej Perkowski 2f7364fa0a twister: Refactor "skip to error" method
Use filter statuses instead of string matching in case of quarantine.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-12-12 19:09:01 +01:00
Maciej Perkowski 61dc683b71 twister: fix typo in filters.QUARANTINE
Fix typo filters.QUARENTINE to filters.QUARANTINE

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-12-12 19:09:01 +01:00
Joakim Andersson 2687376eff tfm: Enforce initial attestation with required key provisioned
Enforce that the initial attestation partition has the required
initial attestation key provisioned.

If the initial attestation key (IAK) is not present during boot of
TF-M the system will panic during initialization.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-12 19:08:46 +01:00
Joakim Andersson 25787e2df6 tfm: Harded build against TF-M built with unsecure keys
Introduce Kconfig option in zephyr build system that reflects the TF-M
cmake config variable with the same default value for dummy provisioning
and have it satisfy the IAK present requirement.
This configuration is not suitable for production, and by having this
in zephyr configuration we can have this as part of the hardened
configuration check.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-12 19:08:46 +01:00
Ricardo Rivera-Matos 16519a5b3c drivers: charger: Updates drivers to use charge_enable handler
Updates existing drivers to make use of the charge_enable handler.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-12-12 10:49:39 -06:00
Ricardo Rivera-Matos d4ed6bacf0 drivers: charger: Adds charge_enable handler
Adds a charge_enable handler to facilitate enabling and disabling
a charge cycle. This deprecates enabling and disable the charge
cycle via the CHARGER_PROP_STATUS property.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-12-12 10:49:39 -06:00
Steffen Jahnke a451db4981 boards: arm: Fix UART tx/rx pinctrl pan1780_evb/pan1770_evb
Changed the tx/rx pins in pinctrl *.dtsi files to match the
evaluation board circuit diagram for UART1.

Signed-off-by: Steffen Jahnke <steffen.jahnke@eu.panasonic.com>
2023-12-12 10:46:54 -06:00
Mateusz Holenko cb677febb1 dts: riscv: Fix a typo in riscv,isa for mpfs
The RISC-V ISA extension is called `Zifencei` instead of `Zfencei`.

Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
2023-12-12 16:26:17 +01:00
Sebastian Schlupp b504932ae9 drivers: can_sam0: added clock configuration for SAME5x devices
Added clock source configuration depending on SAM SoC series.

Signed-off-by: Sebastian Schlupp <sebastian.schlupp@gmail.com>
2023-12-12 16:25:46 +01:00
Sebastian Schlupp c2c05ff7e7 dts: arm: atmel: same5x: added CAN(0 and 1) peripheral description
Added default parameters for CAN peripherals according to the datasheet.

Signed-off-by: Sebastian Schlupp <sebastian.schlupp@gmail.com>
2023-12-12 16:25:46 +01:00
Sebastian Schlupp 0462cc060d soc: same51 and same54: added DFLL48 frequency information
Specified the value 48000000 for the DFLL48 clock source

Signed-off-by: Sebastian Schlupp <sebastian.schlupp@gmail.com>
2023-12-12 16:25:46 +01:00
Johann Fischer aad6a81a3b drivers: udc_nrf: submit resume event after RWUP is initiated
Submit resume event after remote wakeup (resume) signalling is
initiated. Handle it same way as in the usb_dc_nrfx driver.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2023-12-12 15:34:11 +01:00
Mariusz Skamra 874e724492 tests: Bluetooth: ascs: Add expect_bt_bap_stream_ops_released_called
This adds the expect_bt_bap_stream_ops_released_called function that
takes an array of streams to verify as an argument. It's more versatile
approach than having expect_bt_bap_stream_ops_released_called_twice
erc. functions, that scales bad.
The function ignores the arhument list order, so that the user does not
have to predict the exact order of function calls.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-12-12 15:33:13 +01:00
Mariusz Skamra cb6c856d76 tests: Bluetooth: ascs: Limit the default number of ASEs
This limits the default number of ASEs available to 1.
The value can be overwritten in test case specific parameters
in testcase.yaml file.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-12-12 15:33:13 +01:00
Mariusz Skamra 92d5cdec75 tests: Bluetooth: ascs: Remove duplicated config setting
This removes duplicated CONFIG_BT_ISO_MAX_CHAN config setting and leaves
the default value set to 1.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-12-12 15:33:13 +01:00
Mariusz Skamra 09e376068e Bluetooth: audio: bap_stream: Fix potential NULL pointer dereference
This fixes potential NULL stream pointer dereference.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-12-12 15:33:13 +01:00
Mariusz Skamra 025ba06c32 Bluetooth: ascs: Avoid possible unexpected assert
This avoids unexpected assert that may happen when the client tries to
QoS configure ASE that is in state which does not allow to be configured.
In such case the assert shall not be not be triggered, as it's not stack
fauly. The assert check has been moved after the state check, so the ASCS
implementation will just return an error code to the client.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-12-12 15:33:13 +01:00
Mariusz Skamra f58f74a091 tests: Bluetooth: ascs: Fix minor comment issue
This fixes opcode comment.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-12-12 15:33:13 +01:00
Mariusz Skamra e3e567ad82 tests: Bluetooth: ASCS: Add tests for invalid operations in Releasing state
This adds missing tests for invalid operations initiated by
locally or by client on ASE in Releasing state.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-12-12 15:33:13 +01:00
Mariusz Skamra c797f9b5f3 tests: Bluetooth: ascs: Remove redunadant tests
This removes 2 tests related to ASCS handling ACL disconnection.
c3c83c7049 modified the ACL disconection
behavior, so that ASE goes directly to idle state, not waiting in
releasing state for CIS disconnection. Thus the tests where state
machine waits for CIS disconnection can be removed now.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-12-12 15:33:13 +01:00
Mariusz Skamra ddf172c187 Bluetooth: gatt: Fix automatic resubscription causing CCC removal
This fixes CCC subscriptions that were removed if the automatic
resubscription was aborted by ACL disconnection.
As the client renews subscriptions, there is no point of removing those
if the link is disconnected unexpectedly.
The API user won't be notified about the failure, as the automatic
resubscriptions are implicit, and after reconnection the subscriptions
will be still valid.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-12-12 15:32:45 +01:00
Mariusz Skamra 3b4ce7f8e9 tests: bsim: gatt: ccc_store: Reproduce the subscription lost issue
Zephyr by default renews the characteristic value subscription on every
reconnection. If the ACL is disconnected in the middle of this
procedure, all the subscriptions waiting to be renewed are removed, even
if the device was successfully subscribed already.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-12-12 15:32:45 +01:00