Compare commits

..

196 Commits

Author SHA1 Message Date
Anas Nashif
c90440924f release: Zephyr v1.7.1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-11 10:14:03 -04:00
Anas Nashif
8d6486a031 release: Prepare for 1.7.1
Change-Id: Ie6947833f3488d0fa7992168598ba56100c9b1a6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-27 16:02:08 +00:00
Kumar Gala
8e3ce970fa ext: lib: mbedtls: Upgrading mbedTLS library
Upgrading mbedTLS to version 2.4.2 from 2.4

Origin: https://tls.mbed.org/download/start/mbedtls-2.4.2-apache.tgz

Jira: ZEP-1800

Change-Id: If9341a4310ee7c9f42e4cb0a2a34cf27aeb89d09
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-20 12:22:29 +00:00
Flavio Santes
9336f2311b ext/lib/crypto: Update TinyCrypt to version 0.2.6
Update TinyCrypt to version 0.2.6.

Origin: https://github.com/01org/tinycrypt/releases/tag/v0.2.6

Jira: ZEP-749

Change-Id: I62be0c134236d4a5dcae14bee86692c0fd6dc381
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-20 12:22:29 +00:00
Kumar Gala
85bdca3bd7 ext: lib: mbedtls: Upgrading mbedTLS library
Upgrading mbedTLS to version 2.4.2 from 2.4

Origin: https://tls.mbed.org/download/start/mbedtls-2.4.2-apache.tgz

Jira: ZEP-1800

Change-Id: I16a7eaeb4c2e47d11f0594fe1bd865be3eef37b6
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
(cherry picked from commit a20b249549)
2017-03-30 13:01:29 +00:00
Vinayak Chettimada
7e89af53da Bluetooth: controller: Fix race waiting for ticker job to complt
Same volatile status variable as return and being updated
in ISR would modify the variable in two context which
caused the variable to be set to a stale value.

This commit uses two different variables, one for return
value and the other to be updated by ISR.

Jira: ZEP-1941

Change-id: I19e3bdc85e15bda7891395f3f1f64c2ddbeee0c6
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-27 12:31:06 +02:00
Vinayak Chettimada
2da4429168 Bluetooth: controller: Fix mayfly caller id for thread call path
role_disable initiated through HCI commands are initiated
in thread context and controller code was using the job
mayfly caller id instead of using the correct app caller
id.

Also the XTAL retain calls being called from two different
call context used the same worker caller id and same mayfly
instead of using the correct caller ids and independent
mayfly for each caller.

This potentially could cause mayfly enqueued list to be
corrupted and enqueued mayfly could be lost.

Change-id: Ia356419462d1fb4e38f4a20c720974143f12fdb6
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-27 12:28:41 +02:00
Florian Vaussard
00fa999e8e kernel: arm: Increase idle stack size to fix corruption by FP_SHARING
When enabling CONFIG_FP_SHARING on ARM, 64 extra bytes are necessary
on the stack of each task in order to save FPU registers S16 to S31.

In the case of the idle stack, the default value of 256 bytes is too
small. As described in ZEP-1470, when the idle task is scheduled out,
floating point registers are saved, which corrupts the stack frame
(especially the saved PC value). When scheduling the idle task, the
restored PC will jump to nowhere, leading to a Usage Fault.

Increase the size of the idle stack by 64 bytes to fix this issue.

JIRA: ZEP-1470

Change-Id: Ib800cd51e5189dda8bf59332db661c21399db3e3
Signed-off-by: Florian Vaussard <florian.vaussard@heig-vd.ch>
(cherry picked from commit 5b0671d0d4c8862ff78b41b006a1c05928e32d2a)
2017-03-15 13:23:07 +00:00
Anas Nashif
bdc3107d5c Zephyr 1.7.0
Change-Id: I0841f3b768ffdf98c8c4acf2a8f5f85ba0370bb3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-11 02:11:07 -08:00
Anas Nashif
42925576c1 sanitycheck: update test data
Change-Id: I8eec6722664231ba4abf443514a48d1ef70e89ee
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-11 02:10:21 -08:00
David B. Kinder
09dc926151 release-notes: add straggler jira items, spelling
Added a few last Jira items fixed today for the 1.7 release and
fixed spelling errors found in Jira titles. Added links to
samples/boards from reviewer comment.  Fixed typo in 1.6 release
notes section.

Change-Id: Ibb97f99592db6f7739a2a0148f5e898674fe5d01
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-03-11 09:03:14 +00:00
Anas Nashif
e1ed632096 samples: mqtt_publisher: wait for the ethernet device to come up
A workaround to allow the network device to come up and settle before
connecting the network.

Fixed a typo on the way and added a boot banner.

Change-Id: I8a8391261610dc00f5168e8abf167c8c65778eae
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-11 07:47:03 +01:00
Anas Nashif
89fc39329a samples: http_client: wait for network device to settle
Workaround to allow networking device to come up and configure an
IP address.

Change-Id: I5475ab2956553712e324b7ffa494aa489a18e3ee
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-11 07:47:03 +01:00
Marcus Shawcroft
705d21ab03 eth/mcux: Turn down the PHY debug verbosity.
The PHY debug code is useful while working specifically with the PHY
state machine, but in general the frequent, periodic nature of the
output is a hinderance.  Turn down the verbosity, leave a local define
available for anyone who specifically needs to see the PHY state
machine debug.

Change-Id: I40e59b6df5c29702813d3a554ea9e795a3761c65
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-03-11 07:47:02 +01:00
Anas Nashif
fd96574ed5 Revert "net: context: Check if conn_handler exists when binding"
This reverts commit da5c7b687f.

This patch has been causing issues with tcp clients, especially

ZEP-1894

Change-Id: I46ceb71ef81a69cc4ffbbfe60e5dd54c0f59f43c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-11 07:43:20 +01:00
Juan Manuel Cruz Alcaraz
f2a60a4582 sample: net: mbedtls ssl: SSL client sample is adapted to TCP API
Jira: ZEP-1798

Change-Id: I790cd49cb7cc5ed207141ca6634999d77d6a19bb
Signed-off-by: Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
(cherry picked from commit c200676d9f7090b22580286b5413ff07473fa4fe)
2017-03-10 23:17:03 +00:00
Sergio Rodriguez
41de428817 drivers: dma_qmsi: Wait few cycles to allow DMA controller changes
Add few nop instructions to allow the DMA controller settle,
It takes time after starting the transfer to access the DMA
controller registers, so a few cycles are added, the minimal number
of cycles needed has been calculated using tests results on c1000
development board.

Jira: ZEP-1803

Change-Id: I1f8e8478f0350e1b6e4dd596b783dc4babc2d02b
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
(cherry picked from commit 381df63fe8)
2017-03-10 23:14:25 +00:00
Jukka Rissanen
22099d167c samples: net: dtls_client: Fix mem leak in error path
We need to unref the net_buf in error path in RX and TX.

Jira: ZEP-1169

Change-Id: Icb6d43cb6b7411a5135ea09c6ae96742566fafc4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
(cherry picked from commit 22ddc4419c6d7823cd530a5d5fcd1d508add4a50)
2017-03-10 23:14:09 +00:00
Jukka Rissanen
e180b7ac2a samples: net: dtls_client: Fix memory leak in RX path
If we have not yet handled the previous RX buf, then we need
to drop the latest received one, otherwise the earlier net_buf
is leaked.

Jira: ZEP-1169

Change-Id: I1b69e07e8b3a3b87c76d923c847dc8316c128e76
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
(cherry picked from commit 9527d4cdcbbf199d7d596ed18f4edb435cca4130)
2017-03-10 23:14:04 +00:00
David B. Kinder
3f0e37d35a release-notes: added JIRA item
Used a jira query provided by Mark (included in the comments)
to create the un-editied list of items marked as closed/fixed
for v1.7.0, and formatted for inclusion in the release notes.

Updated jira list as of 1:30PM Mar 10

Change-Id: Ib47393bec95ba1ca233bbe64b9bcfbd8740aa413
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-03-10 22:46:03 +00:00
Flavio Santes
6b94e8924a samples/net: Fix format warning in the HTTP client sample app
Fix a printk format warning found at the HTTP client sample app.

Jira: ZEP-1872
Change-Id: I9665e3e59595b383d6e809af51fe4cf3cd8f8bd8
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
(cherry picked from commit 2b66787a9344c41fb807b4b680a57a7f2edf6689)
2017-03-10 22:33:53 +00:00
Flavio Santes
79bd1068b8 samples/net/http_client: Cast size_t to int to avoid compiler warnings
Cast size_t to int in the http_client_cb code.

Jira:  ZEP-1872
Change-Id: I36133da953669ec133421b5e7fb21bec9807fd06
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
(cherry picked from commit 4b92c9014e931680aa074d0eeaea9ffca4493d3b)
2017-03-10 22:32:55 +00:00
David B. Kinder
75d045c7c7 doc: Update getting started with Windows material
Update documentation on using a Windows host for doing Zephyr development
using ISSM toolchain and console commands in a mingw environment

Jira: ZEP-1177

Change-Id: I3e4edec26a430f424427734dfe407a185ace8434
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-03-10 16:22:10 +01:00
David B. Kinder
f52cbff681 doc: fix more spelling errors throughout docs
Change-Id: Ie76b51a3d0729159fa30c1fc9160b279d9f70b6c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-03-10 16:22:10 +01:00
Jukka Rissanen
d031cd35c4 net: tests: nbuf: Fix compiler warnings
LLVM/icx compiler gives warnings for uint16_t vs. size_t
values.

Jira: ZEP-1886

Change-Id: I63c5deea672568946d91421a873c470af3cec6df
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
(cherry picked from commit 22b370c19980c605b778355bb61823f1ea7448c3)
2017-03-10 10:10:21 +00:00
Jukka Rissanen
9be5966dc9 samples: net: zperf: Fix compiler warnings
LLVM/icx compiler gives some warnings for signed vs unsigned
pointers.

Jira: ZEP-1884

Change-Id: Ide57be898ebd1bff49c8a27aac392fa58dcae726
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
(cherry picked from commit 1b2adfa141be23e8691ebbffb59d1ed569fbb628)
2017-03-10 10:10:04 +00:00
Jukka Rissanen
b64d567d7f net: utils: Byte to hex converter had wrong prototype
The net_byte_to_hex() prototype first parameter was uint8_t *,
but it should have been char *.

Jira: ZEP-1885

Change-Id: I6132a67bb9e8199de88451fb4e446081f401e8f6
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
(cherry picked from commit 9a62689cc530b8f015935fa3af690150d975946c)
2017-03-10 09:26:39 +00:00
Luiz Augusto von Dentz
79a1654fab net: bt: Fix memory corruption
Patch 235118245864491a592245f57e5244bf61711943 did not set the ll
addresses in the right buffer which causes 6lo to unref buffers
causing a double unref latter.

Jira: ZEP-1890

Change-Id: Id7591ef3c20c7ab62dcb04576406d70602baa129
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-03-10 09:07:29 +00:00
Tomasz Bursztyka
1e27642ee1 net: Mark struct net_nbuf related API as non-final yet
Make sure nbuf API users might expect changes.

Change-Id: I36e874f9d6f7a53a1b0c20f237724dc7372eccde
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-03-09 12:07:05 +01:00
Andrew Boie
f7a670b23f samples/logger-hook: fix usage of ring buffer
- Ring buffers provide no concurrency control. Since the ring buffer
is being installed as the system log hook, multiple contexts may try
to write to it simultaneously. Lock interrupts to prevent corruption
of the ring buffer.

- NULL pointers were being passed into sys_ring_buf_get() for the
'type' and 'value' parameters, causing undesirable behavior when they
are dereferenced.

- The 'size32' parameter of sys_ring_buf_put() was being passed the
number of bytes, not the number of 32-bit words.

- The 'size32' parameter of sys_ring_buf_get() was not bring correctly
initialized the size of the destination buffer in terms of 32-bit
words. This has been fixed. There is no longer a need to query the
API twice.

Issue: ZEP-1789
Change-Id: I96f9cc74f3711297727b4c5114b6c93510f4a8c1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-03-09 10:49:16 +00:00
Anas Nashif
0edd41a4c7 quark_se: do not enable x86 SPI on ARC
Change-Id: I0583a181fc59ec14f8dbad62722f58a3c7d03390
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit b08d655286)
2017-03-09 10:05:47 +00:00
Kumar Gala
9d405d324f Revert "build: Fix qemugdb target"
This reverts commit 370571b563 which
breaks the build in weird ways since we end up some times include
Makefile bits multiple times and getting unexpected behavior.  Its also
not clear if this actually fixes the issue with make qemugdb target work
again.

Change-Id: I1a04881daabc0a37651906a42b1bf1fb27f9411f
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
(cherry picked from commit 945517205f)
2017-03-09 09:23:25 +00:00
Anas Nashif
3d2893cf85 Zephyr 1.7-rc4
Change-Id: I7c28a093ab4627032f77ae5172dd4d7ad87d0811
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-08 16:54:42 +01:00
Vinayak Chettimada
85922c0445 Bluetooth: Controller: mayfly enable to supercede over disable
If mayfly enable is called before mayfly could be disabled,
then enable shall supercede disabling, the mayfly will
remain enabled. Any new mayfly enqueued by the caller that
tried to disable mayfly will be chain for deferred
executon under this condition.

The BLE Controller's connection update procedure broke when
mayfly implementation was updated to defer disabling until
all queued mayfly where completed. Mayfly is disabled
between ticker_stop and ticker_start calls to chain them
so that ticker does not power off counter h/w if the ticker
being stopped is last one.

This commit fixes the connection update procedure which
used the mayfly enable before mayfly disable could
complete.

Jira: ZEP-1839

Change-id: I07d34c90d193b5eca9762acd8b7272e8d7a78474
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-08 15:51:18 +00:00
Vinayak Chettimada
1408adeae1 Bluetooth: Controller: Fix assert on role stop/abort
Call to ticker_stop/update can fail under the condition
where in a role is being stopped but at the same time it is
preempted by the role event that also uses ticker_stop/
update.

Also if a role closes graceful while it is being stopped,
the radio ISR will process the stop state with no active
role at that instance in time. In this case just reset the
state to none, the role has already been gracefully closed
before this ISR execution. The above applies to aborting a
role event too.

This commit adds code to detect these conditions and
deterministically recover from it.

This commit fixes the assert observed while stopping
advertiser in the Bluetooth sample scan_adv.

Jira: ZEP-1852

Change-id: I51c8d6e212ef43e3526a199cf7b666a79729c732
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-08 15:51:18 +00:00
Anas Nashif
d043cf9ef3 release-notes: Update with more entries
Change-Id: Ibec63e2c5ff9bc938d914972a74a2ed777bafc63
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-08 15:35:13 +00:00
Paul Sokolovsky
3c6d43f47a include/zephyr.h: Define __ZEPHYR__ if not already.
__ZEPHYR__ preprocessor macro is a way for a (cross-platform)
application to test if it's built for Zephyr. Currently it's defined
by Makefile, so if an app uses it's own build system, it won't be
available. So, define it in the standard header too to cover such
a case.

Change-Id: Id708d1f20fe3b415968ad8475da449f54ad3c3fb
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-03-08 13:34:17 +00:00
David B. Kinder
5454df808e release-notes: added documentaion release notes
Added documentation section for release notes along with
a draft intro section.

Change-Id: I912e49565e250d5ff63fb9a9312a2a53eb78d447
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-03-08 13:04:16 +00:00
Anas Nashif
9507793a40 doc: board porting guide
Jira: ZEP-248

Change-Id: Iba83fceedc4fefe9d5319119f23cb392aca4c46a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit c76c050bbd)
2017-03-08 10:35:10 +00:00
Andrei Emeltchenko
c5eac4e967 quark_se: Fix Bluetooth settings for NBLE
Enable UART_QMSI_0 whenever NBLE is enabled the same way as it is done
for BLUETOOTH_H4.

Change-Id: Ib2f76f7e5e95620d40320891fec1b86509d1856e
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2017-03-08 08:59:19 +00:00
Andy Ross
95b955a5a3 quark_se: Fix bluetooth UART dependency
Fix c6e27a05 was too aggressive.  It turns out that bluetooth on the
Quark SE boards won't enable it's own UART, because it had always been
enabled.  Apps that don't do it already will be broken.

Enable UART_QMSI_0 whenever BLUETOOTH_H4 is pulled in on this
platform.

Change-Id: I5e21c6004714adba8fb0fafa056dc2d62698a3d1
Issue: ZEP-1788
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-03-08 08:59:18 +00:00
Andy Ross
e3dc3570e6 quark_se: Don't enable UART 0 always
The defconfigs would always create a device for UART 0, which is
problematic in circumstances where both the x86 and ARC cores are
alive and one wants to use it in a non-default configuration.

Specifically: on Arduino 101 this is the bluetooth device and it
operates at 1MBps instead of of 115200kbps.  If an x86 app sets this
up correctly, but then starts the ARC core running an app which
doesn't reference this UART at all, the device will still exist and
set up the (wrong!) configuration, clobbering the correct settings.

Just remove the "def-bool y" bits from the defconfig.  There's no
need, users of these devices (e.g. the console) will enable them
anyway.  There's no value to compiling it in without a configured
user.

Issue: ZEP-1677
Change-Id: I4a0e944f23705495433e9f3d0459065f131579cb
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-03-08 08:59:18 +00:00
Luiz Augusto von Dentz
aec071ef51 Bluetooth: L2CAP: Add TX queueing for LE CoC
This allows to queue buffer to sent later in case it runs out of
credits so it no longer blocks the caller thread.

Jira: ZEP-1776

Change-Id: Ifa9b412f98889b50c0b889655d910520d11a4718
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-03-08 08:44:21 +00:00
Luiz Augusto von Dentz
d111394b93 Bluetooth: L2CAP: Move functions in preparation for queuing
This moves necessary functions that will be needed for queuing packets
while waiting for more credits.

Jira: ZEP-1776

Change-Id: I030c696d432ec5be1b8e6b649e953da145929777
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-03-08 08:44:21 +00:00
Jithu Joseph
cc39120392 boards: arduino_101: enable GPIO by default
Though the SPI_CS_GPIO Kconfig entry (in drivers/spi/Kconfig) has
"select GPIO" specified, we are observing that merely adding
the symbol(SPI_CS_GPIO) in the
defconfig  (boards/x86/arduino_101/Kconfig.defconfig)
is triggering unmet direct dependency warnings
(though the build goes through).

Since the defconfig entry(SPI_CS_GPIO) is not selecting
the aforementioned 'select' rule, we add it  manually here.

Jira: ZEP-1668

Change-Id: Ida6a0c851462d747e6559bd0c78fa52e1d0f24b5
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
(cherry picked from commit 6754f8eaaf)
2017-03-08 08:10:08 +00:00
Qiu Peiyang
02c1608295 tests: add zephyr SPI driver api test case
This commit verifies the below SPI driver apis:
	spi_configure()
	spi_slave_select()
	spi_write()
	spi_transceive()

Verify SPI work in SPI_MODE_CPOL, SPI_MODE_CPHA,
and SPI_MODE_CPOL | SPI_MODE_CPHA.

Jira: ZEP-1626

Change-Id: I1985ac6ff8269ac908817644a844720f2d7a125c
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
(cherry picked from commit 1124da16de)
2017-03-08 07:03:42 +00:00
Jesus Sanchez-Palencia
c7d05f4313 ext qmsi: Update QMSI to 1.4 RC4
No major fixes since RC3 were made, and mostly the security fixes
for the Quark Bootloader were the main driver behind this new QMSI
Release Candidate.

There are no changes to shim drivers at this moment.

JIRA: ZEP-1572

Change-Id: I68d2b0ee90863d3def909de556314bd86712a059
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2017-03-08 07:03:13 +00:00
Leandro Pereira
bc21d8f930 samples: net/nats: Fix parsing of MSG messages
This addresses the issues found by QA in ZEP-1012 and clarify the
documentated behavior as described in ZEP-1859.

Change-Id: I602e5749db7f6f44cf5be449b8e6f0d2ba66b69b
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-07 23:20:19 +00:00
Jithu Joseph
5eee2489e1 tests: drivers: uart: fix variable type mismatches
These were flagged by icx build.

Jira: ZEP-1864

Change-Id: I5b8fce64d9e20d768fabf02e2a799e9390e3679a
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
(cherry picked from commit fbde97d44a)
2017-03-07 22:50:21 +00:00
Vinicius Costa Gomes
09b1994b69 build: Fix qemugdb target
Even deprecated, this target should still work, the issue was
introduced by commit 2bc9d69981.

The problem is that for both of those targets the board's specific
Makefiles should be include'd, it was done only for the non-deprecated
target ('debugserver').

As a note: that is the recommended way of doing a logical OR operation
in Makefiles.

Change-Id: I3ae8f5201c47e65b33a62cea45e25dc2226de489
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
(cherry picked from commit 370571b563)
2017-03-07 12:46:21 +00:00
Vinayak Chettimada
8c569edfaa Bluetooth: Controller: Run all enqueued mayfly before disable
Controller asserted in preparation of a role event due to
the previous (same or another) role event preparation being
not complete.

Mayfly callee was disabled in the previous event due to the
preparation time being short and previous start running
(higher natural priority) before all previous preparation
mayfly completed. The previous start disabled mayfly to
avoid Radio ISR latencies.

The current role event that asserted, preempted the
previous role (observer role with continuous scanning
window) which runs until preemption to maximise the Radio
h/w use (observer scanning until next interval). The
previous preparation mayfly is still disabled when the
current role preparation tries to use same mayfly instance
which should be free for a new enqueue.

This commit updates mayfly implementation so that mayfly
callee is disabled only after all enqueued mayfly instances
are run to completion.

Jira: ZEP-1839

Change-id: I3e0d31422db8e47b819189110b11ebd07dd09a7c
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-03-07 11:16:39 +00:00
Ricardo Salveti
364087f3e9 nrf_rtc_timer: clear events and counter when disabling sys_clock
Clear pending IRQ when starting and restore back the RTC1 state when
disabling sys_clock, to avoid issues when soft rebooting the device or
chainloading another Zephyr image (e.g. mcuboot).

Change-Id: I693d9168196ad2cfb8475ecfa2051eac043b1fbd
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
(cherry picked from commit 6713088cfc813f14e442e4acc01c4c85959dd8df)
2017-03-07 09:36:53 +00:00
Vinicius Costa Gomes
6e135d0006 samples/coaps_server: Don't error if the packet doesn't have payload
GET and DEL requests may not have payloads, so it's not correct to
return with an error in those cases.

This was only noticed now that zoap_packet_get_payload() returns the
correct value for all situations.

Jira: ZEP-1754

Change-Id: Ie533041aa7a66855582ff4c5c937d943304bad84
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
(cherry picked from commit 18eaed8e81f4f9d6388882d418f8f29fa04981f8)
2017-03-04 01:39:39 +00:00
Luiz Augusto von Dentz
65a5d8f1a7 net: bt: Place ll address type together with other assignments
Change-Id: I15867c9457daf7857ef8dfccbd38419ab8292e8d
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit d194bb02b8a0694d92c68ccf7eafa2786c23a442)
2017-03-03 20:36:11 +00:00
Luiz Augusto von Dentz
28b8276378 net: bt: Fix setting ll addresses to possible invalid pointers
net_nbuf_ll_src(buf)->addr and net_nbuf_ll_dst(buf)->addr should be
pointing to ctxt area not actual net_nbuf_ll region since the payload
over Bluetooth does not carry any ll addresses.

Change-Id: I87828d74abf2402fdf2a5e34aa8db93aa7c50d08
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
(cherry picked from commit d3fc638398bcf3e6688aca66a39b119926994436)
2017-03-03 20:36:03 +00:00
Jithu Joseph
72ac3fd28d net: ip: Address type mismatch warnings
These were flagged by icx compiler.

Jira: ZEP-1811 , ZEP-1809

Change-Id: I0dff800ce2bb440b39dceb08b145e085be4c8caf
CI-Revision: phases 22/11922/2
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
(cherry picked from commit 8a262174123459a0d819e6ec6ccc3ac9186bcb2a)
2017-03-03 18:10:38 +00:00
Jukka Rissanen
3cd73f3659 release-notes: Add information about networking
Change-Id: I61b0ba625143022ba86cc83243a16ba3b56f24d4
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-03-03 15:37:45 +00:00
Andrew Boie
299886c217 samples: grove: add missing testcase.ini
These were simply copied from the 'lcd' test case.

Issue: ZEP-1768
Change-Id: Ie5d561c3131b04df2952523cc8dfd5a004dc1960
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-03-03 14:26:27 +00:00
Andrew Boie
d56fe4e0b8 xt-sim: set default stack size for IPM console receiver
The default of 512 is insufficient.

Change-Id: I7dd1cca89d1f289ceb87aee8e8a80719846d139c
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-03-03 14:26:26 +00:00
Andrew Boie
db55abddd2 ipm_console: add Kconfig for receiver stack size
Change-Id: I27c1189e3bf87b4ea3dc06d38f63cab21663697b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-03-03 14:26:26 +00:00
Leandro Pereira
0c08b44b75 libc: Add isalnum() to ctype.h
The isalnum() primitive is used by the NATS protocol implementation to
vaildate some of the inputs.

This uses primitives that were already in place.

Change-Id: Ib53eeb7ae002a42f5b6aa8d4fc61baca029a042d
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-03 07:54:33 -05:00
Johan Hedberg
ed02201299 release-notes: Add Bluetooth and Network Buffer items
Add Bluetooth and Network Buffer related changes since 1.6.

Change-Id: I4cd81fd0d6f2057980789a833c3470e83f178cc9
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2017-03-03 08:27:38 +02:00
Maureen Helm
fdd8dc0695 release-notes: Add ARM, libraries, and HAL sections for 1.7
Change-Id: I1f5448a8f823153add01cf01a9a21cd524d567e5
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-03-02 20:29:12 -06:00
Inaky Perez-Gonzalez
732434fac6 filter-known-issues: fix missing variable printing
This is a corner case that barely hits and thus we had not seen it
before.

Change-Id: Ie1420a4c866834e5a233985c6b8a19643426a1f5
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
(cherry picked from commit 5907a56264)
2017-03-02 18:17:42 +00:00
Paul Sokolovsky
da5c7b687f net: context: Check if conn_handler exists when binding
If a UDP context had net_context_recv() called before
net_context_bind(), then it will have a stale connection handle
associated with initial (random) port number, while will be "bound"
to a new port as specified in net_context_bind(). So, it silently
won't behave as a user expects. net_context_bind() should really
update (or destroy/recreate) conn_handle in this case, but until
it's implemented, apply stopgap measure of at lease reporting error
back to user in this case.

Jira: ZEP-1644

Change-Id: I22ad55f94eaac487a4d5091ccbb24f973ec71553
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
(cherry picked from commit 1784ae185d6af9bc54d51dfe0d23214b06d84124)
2017-03-02 17:18:39 +00:00
Anas Nashif
950b079bd5 kernel: use k_cycle_get_32 instead of sys_cycle_get_32
Jira: ZEP-1787
Change-Id: I948100e75697dc106a4ba12ce51401673d79fe68
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-02 10:49:38 -05:00
Anas Nashif
8d22d84b51 Zephyr 1.7.0 rc3
Change-Id: If3490fb519f1670c06f04138f765027da6f64247
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-01 22:00:13 -05:00
Leandro Pereira
b2a06f092b samples: net: NATS protocol sample
NATS is a publisher/subscriber protocol implemented on top of TCP. It
is specified in [1], and this is a sample implementation for Zephyr
using the new IP stack.  The API is loosely based off of [2].

With this sample, it's possible to subscribe/unsubscribe to a given
subject, and be notified of changes asynchronously.  In order to
conserve resources, the implementation does not keep its own track of
subscribed subjects; that must be performed by the application itself,
so it ignore unknown/undesired subjects.

TLS is not supported yet, although basic auth is.  The client will
indicate if it supports username/password if a certain callback is set
in the struct nats.  This callback will then be called, and the user
must copy the username/password to the supplied user/pass buffers.

Content might be also published for a given subject.

The sample application lets one observe the subject "led0", and turn it
"on", "off", or "toggle" its value.  Changing the value will, if
supported, act on a status LED on the development board.  The new
status will be published.

Also worth noting is that most of the networking and GPIO boilerplate
has been shamelessly copied from the IRC bot example.  (Curiously, both
protocols are similar.)

[1] http://nats.io/documentation/internals/nats-protocol/
[2] https://github.com/nats-io/go-nats

Jira: ZEP-1012

Change-Id: I204adc61c4c533661eacfb8c28c1c08870debd91
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-02 02:58:44 +00:00
Leandro Pereira
04f142c4b5 lib: Add minimal JSON library
This is a minimal JSON parser (and string encoder helper).  This has
been originally written for the NATS client sample project, but since
it's a generic bit of code, it's also being provided as a library
outside the NATS application source.

It's limited (no support for arrays, nested objects, only integer
numbers, etc), but it is sufficient for the NATS protocol to work.

Jira: ZEP-1012

Change-Id: Ibfe64aa1884e8763576ec5862f77e81b4fd54b69
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-03-02 02:58:35 +00:00
Qiu Peiyang
6352fc9974 tests: add zephyr uart driver api test case
This commit verifies the following uart driver apis:
	uart_irq_callback_set()
	uart_irq_rx_enable()
	uart_irq_rx_disable()
	uart_irq_rx_ready()
	uart_irq_tx_enable()
	uart_irq_tx_disable()
	uart_irq_tx_ready()
	uart_fifo_fill()
	uart_fifo_read()
	uart_irq_update()
	uart_poll_in()
	uart_poll_out()

Change-Id: I9be9341aee4357f86a2bc49f19733fb84273e89c
Signed-off-by: Qiu Peiyang <peiyangx.qiu@intel.com>
2017-03-01 19:08:52 -05:00
Anas Nashif
e7693770d7 release notes: add table of contents for 1.7
Change-Id: I822cf35f24a29d63538bb66e65112835cc0e941d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-03-02 00:08:14 +00:00
Kuo-Lang Tseng
11ef22e5d1 samples: drivers: rtc: change hard-coded device name
Change to use the device config name defined by driver's Kconfig
for device binding, instead of hard-coding it which is not
portable.

Jira: ZEP-1764

Change-Id: I7af234ada73302eb062340740df2fc7a8539150d
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
(cherry picked from commit 1980325392)
2017-03-02 00:07:55 +00:00
Kuo-Lang Tseng
985f842e62 samples: drivers: change hard-coded device name
Change to use the device name defined by driver's Kconfig for
device binding, instead of hard-coding it which is not portable.

Jira: ZEP-1764

Change-Id: I0dc9aa2cdf426af71f1ed6dcef1ec7cec19f4c3e
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
(cherry picked from commit e90aa43eaa)
2017-03-02 00:07:47 +00:00
Vinicius Costa Gomes
c5940832ef lib/zoap: Fix warning about signedness conversion
'query->value' is a 'const uint8_t *' so it should be casted to a
char (signed) array before it is used in places where a 'char *'
is expected, strncmp() is an example.

Jira: ZEP-1810

Change-Id: I94cf780a40ad5fed29607d2302dc7a10387bb86f
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
(cherry picked from commit 98b35a72a162cf3f72f16c485cf9fe02f35ed4ab)
2017-03-02 00:07:09 +00:00
Evan Couzens
746706d241 doc: Update Linux environment setup and supported OSes
Updated supported OSes to Fedora 25 and Ubuntu 16.04 LTS
Updated Zephyr SDK package name to reflect actual name
ZEP-1480

Change-Id: If7d79785009db8eb50028ff664ac7fc26eff79b5
Signed-off-by: Evan Couzens <evanx.couzens@intel.com>
(cherry picked from commit cc76bdff29)
2017-03-02 00:06:21 +00:00
Jon Medhurst
d626dc989e api: dma: Fix comments for struct dma_config
The comments refered to 'config' and 'config_size' as though they
were named members of the struct, which they are not, and so is a little
confusing. Delete these comments and also correctly align the text for
size and burst members.

Change-Id: Iae14c76940268b8e7d72b117c8aea5a204b3da34
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2017-03-02 00:05:55 +00:00
Jon Medhurst
06a36923c6 tests: dma: Initialise callback enable flags
The test failed to initilise these to known states, so fix this by
asking for end of transfer and error callbacks.

Change-Id: I523168381329062ec0c17aa41cb4033b78d8ed99
Signed-off-by: Jon Medhurst <tixy@linaro.org>
2017-03-02 00:05:48 +00:00
Jithu Joseph
4957db11fc subsys: gdb_server: Fix type mismatch
This was flagged by ISSM icx compiler.

JIRA: ZEP-1806

Change-Id: Iebd04febbdce9b92a4d0cae986ca7f84f4da58a0
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
(cherry picked from commit fce0d9a865)
2017-03-01 16:39:38 +00:00
Punit Vara
e0ff3a5f27 boards: arduino_due: Add make flash support
This patch automates flashing process for arduino_due board. Just make flash will able
to flash binary file on the board.

Bossa tool(http://www.shumatech.com/web/products/bossa) manual flashing process is
automated through shell script and currently this binary is only available for
x86_64 architecture.

JIRA : ZEP-145

Change-Id: Ib7b525466239d0437e449c56827f8a9b3e5a96a1
Signed-off-by: Punit Vara <punit.vara@intel.com>
2017-03-01 15:16:52 +00:00
Benjamin Walsh
fc65d6d55e MAINTAINERS: remove inactive maintainer from x86 and kernel core
Change-Id: Ib95b4707db38ea3c38de5286caa57c541d5bf681
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
(cherry picked from commit d23d8062a5)
2017-03-01 14:24:35 +00:00
Ricardo Salveti
63c630d5c5 boards: add 96b_nitrogen board documentation
This patch adds documentation for 96b_nitrogen board.

Change-Id: I3e50d61cb9dd3e3a1afd242e53c74aae969ffdf0
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
(cherry picked from commit f8da1e3b8692aa4a8f63130df12e07ff2aecb5fc)
2017-03-01 14:01:41 +00:00
Piotr Mienkowski
3a122f5de9 doc: Add Atmel SMART SAM E70 Xplained board documentation
Jira: ZEP-978
Change-Id: I0ad0520df12e084a7a3d16d2352ccf96074dadd4
Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2017-03-01 13:38:52 +00:00
Ricardo Salveti
44328f2cc4 boards: add 96b_carbon board documentation
This patch adds documentation for 96b_carbon board.

Change-Id: I2ffa8dc0dab579306474887023275d85d9a168da
Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
(cherry picked from commit 3f691f938ab3f29e6daa2f33a5ff66f85cdde3ae)
2017-02-28 23:32:30 +00:00
Kuo-Lang Tseng
6102147980 samples: i2c_fujitsu: change hard-coded device name
Change to use the device config name defined by driver's Kconfig
for device binding, instead of hard-coding it which is not
portable.

Jira: ZEP-1764

Change-Id: I61ed7cfd97e20faad8f1e98dacef9384e8fefc73
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
(cherry picked from commit 4a363ff5bf)
2017-02-28 14:20:18 +00:00
David B. Kinder
5ea4f57f5e doc: allow table head and content to wrap
rtd theme prevents table headings and content from wrapping and can
cause tables to display to wide.  This patch overrides that CSS.

Change-Id: I4885b959a0dd075ff4c8edb9cfb4b17a611e6775
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-02-28 13:42:58 +00:00
Anas Nashif
b12d8d4783 Revert "boards: panther: Use 115200 baudrate for BLE UART"
This reverts commit b3a2fc287b.

The firmware on production board will have a faster Baudrate.

Change-Id: Ifa1abd4c2f882b8ef6e7d9762fc592524177dc48
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-28 13:29:42 +00:00
Juan Manuel Cruz
df590c2fda flash: Fixes wrong SPI device for flash memory in arduino 101 sss
The flash memory in arduino 101 pĺatform is connected to the
SPI MST 0 device and the CS is connected to the GPIO 0.

The arduino 101 sensor sub-system core maps the SPI MST 0 device
to the "SPI_2" name and the SPI SS 0 device to the "SPI_0" name.
In the same manner the GPIO 0 is mapped to the "GPIO_2" name and
the GPIO SS 0 is mapped to the "GPIO_0" name.

This commit fixes the SPI device name and the GPIO name used by
the W25QXXDV flash memory.

Jira: ZEP-1672

Change-Id: Ifdd5b664498d0eaa6ad073853b811951fe19ab09
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
(cherry picked from commit 0212457c48)
2017-02-28 13:29:33 +00:00
Inaky Perez-Gonzalez
c370a0d20a doc: update link to 0.9 SDK
Don't need to have the user guess the URL.

Change-Id: Ifdad9c4d1034dc541b4a84999a12b4070a9130c0
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
(cherry picked from commit b2a20c366d)
2017-02-28 13:24:54 +00:00
Szymon Janc
eb4a193a16 Bluetooth: Fix connection object leak
When canceling outgoing connection initial reference was not dropped.

btshell> connect 11:22:33:44:55:66 public
[bt] [DBG] bt_conn_set_state: (0x0011a1ac) disconnected -> connect-scan
[bt] [DBG] bt_conn_ref: (0x0011a1ac) handle 0 ref 2
[bt] [DBG] bt_conn_ref: (0x0011a1ac) handle 0 ref 3
[bt] [DBG] bt_conn_unref: (0x0011a1ac) handle 0 ref 2
[bt] [DBG] bt_conn_prepare_events: (0x0011b3a0)
[bt] [DBG] bt_conn_prepare_events: (0x0011b3a0)
[bt] [DBG] bt_conn_prepare_events: (0x0011b3a0)
Connection pending
[bt] [DBG] bt_conn_unref: (0x0011a1ac) handle 0 ref 1
btshell>
btshell> disconnect 11:22:33:44:55:66 public
[bt] [DBG] bt_conn_ref: (0x0011a1ac) handle 0 ref 2
[bt] [DBG] bt_conn_ref: (0x0011a1ac) handle 0 ref 3
[bt] [DBG] bt_conn_unref: (0x0011a1ac) handle 0 ref 2
[bt] [DBG] bt_conn_set_state: (0x0011a1ac) connect-scan -> disconnected
[bt] [DBG] bt_conn_prepare_events: (0x0011b3a0)
[bt] [DBG] bt_conn_unref: (0x0011a1ac) handle 0 ref 1
btshell>
btshell> connect 11:22:33:44:55:66 public
[bt] [DBG] bt_conn_ref: (0x0011a1ac) handle 0 ref 2
[bt] [DBG] bt_conn_unref: (0x0011a1ac) handle 0 ref 1
Connection failed
btshell>

Change-Id: I0c38bbed8d1712d07a579275355e7dcd8d6b0b38
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2017-02-28 07:07:51 -05:00
Szymon Janc
c3c5ae1279 Bluetooth: shell: Don't echo LE CoC data
Don't echo data from received callback as this can cause
deadlock. Just dump incoming data instead.

Change-Id: Iedbbafd0406ad46ba2c9d26fd8a70fff59de8143
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2017-02-28 07:07:51 -05:00
Szymon Janc
8c4d0a5ee1 Bluetooth: SMP: Fix passkey entry for legacy pairing
This fix legacy pairing with passkey entry model when passkey
is fisr entered on local side. Replying with error in that case
is bogus as we should just wait for remote confirm.

Change-Id: I75480802928fd29d21617aa9250f90df647eb9a2
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2017-02-28 07:07:51 -05:00
Szymon Janc
db533538d5 Bluetooth: shell: Fix accessing invalid memory
argc needs to be check before accessing argv.

Change-Id: I9cb70906a388b96df4e192dd4f31eafdab25127f
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2017-02-28 07:07:51 -05:00
Vinayak Chettimada
781ee1a07b Bluetooth: Controller: Fix LE Ping PDU dispatch
It was observed that due to possible CRC errors, one
connection interval was not sufficient by the peer to
respond to LE Ping PDU which caused the Controller to
generate the Authenticated Payload Timeout event to host.

This fix advanced the dispatch of LE Ping PDU by 6
connection intervals that the peer would listen to before
the 30s timeout.

Change-id: I6c292c623047a05b4e771e70093d87228db62cce
Signed-off-by: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
2017-02-28 07:07:51 -05:00
Szymon Janc
b7831efb1d Bluetooth: GATT: Fix subscriptions removal
This fix not removing subscription if it was first element on the list.
In that case prev was NULL resulting in passing garbage node to
sys_slist_remove.

Change-Id: I9452af08409692f9a331afd514fbac8cc727d289
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2017-02-28 07:07:51 -05:00
Szymon Janc
0e96819e5d Bluetooth: shell: Fix GATT long write support
Parameters and data must be permament for time of the operation.

Change-Id: Idd4eee948e62c2c80648116a339558042059f801
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2017-02-28 07:07:51 -05:00
Flavio Santes
fb9409a613 net/dns: Improve unaligned memory access
Improve unaligned memory access in some inline routines.

Change-Id: I8065b4ac399a5f9f03997b43d8f8f8d320778ec3
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-28 12:00:02 +00:00
Marcus Shawcroft
385e98021c net/l2/ieeee802154: Fix typo in ieee802154_reserve name
Change-Id: I64112dfc04872d07b5dc4394d98b0ebd04222f53
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-28 12:00:01 +00:00
Marti Bolivar
17b5860cb9 net/buf.h: fix copy-paste Doxygen error
Fix Doxygen for net_buf_simple_push_be16().

Change-Id: Ief834565658f5b4b919dcc77b6fd9350c5e2835a
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-02-28 12:00:01 +00:00
Jukka Rissanen
36e5f2c27b net: ipv6: Do not try to unref null pointer
If the DAD timeouts, then the pending pointer will be null
when we remove the neighbor. Fortunately this only prints
this error message and does not cause any issues in the code.

[net/nbuf] [DBG] net_nbuf_unref_debug: (0x00118350): *** ERROR *** \
  buf 0x00000000 (nbr_clear_ns_pending():175)

Change-Id: I3e11d4aa1d90f205df591b5d5cdcf2ee7bde6c01
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-28 12:00:00 +00:00
Marcus Shawcroft
b0b9843528 eth/eth_mcux: Provide start and stop operations on the PHY driver.
Refactor the PHY state machine and add support for explicit start and
stop.

The stop implementation remains partial, the state machine will enter
a disabled state but will not actual attempt to power down the PHY.
This is deliberate, while implementing this it has become apparent
that issuing a PHY power down command is an effective way of bricking
frdm-k64f boards, hence explicit power down deliberately disabled
until the issue is properly understood.

Change-Id: I846a51b0ac48feed35d260cf20b50f4f1ac59298
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-28 12:00:00 +00:00
Marcus Shawcroft
a80b619e43 eth/eth_mcux: Provide phy state name printing in debug
Change-Id: I07cb7d9958b00b94ed7e7801d6b8c0eb421ce4bf
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-28 11:59:59 +00:00
Marcus Shawcroft
c663bccbe8 net/if: Fix documentation comment marker.
Documentation comments should begin with /**

Change-Id: I59867e8aad340dac4d66f86e09f4f8ae9d3d75fb
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-28 11:59:59 +00:00
Marcus Shawcroft
fc5bd4a148 net/nbuf: Fix spelling.
Change-Id: I821c796b2d5c9d6424be2d26509ad5f72dfe110b
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
2017-02-28 11:59:58 +00:00
Flavio Santes
79d30afa0c samples/net/mqtt: Don't break lines after the "static" keyword
Fix some style issues found at the src/main.c file.

Change-Id: I2023deb5ac4f31b2cf5d14d8313bbcfc03647898
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-28 11:59:58 +00:00
Flavio Santes
78d4ef8588 samples/net/mqtt: Move conf parameters to config.h
Move the client id define to config.h. Update the README file.

Change-Id: I1900c5e4f8c449e14279660d425501e86e07d409
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-28 11:59:57 +00:00
Flavio Santes
2f3c55df90 samples/net/mqtt: Improve inline doc
Remove the brief keyword for the mqtt_client_ctx structure's
inline documentation.

Change-Id: Ia3999bbb7e3246495fd1cab0ca828d95f5896835
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-28 11:59:57 +00:00
Flavio Santes
6047e65888 samples/net/mqtt: Simplify MQTT publisher
Remove the global bluemix flag and use a #define to set the
MQTT publisher topic and its parameters at compile time.

This change will save a few bytes and speed up computations.

Change-Id: I27bfc6b38c73d32c6105f1d506e147e9a5583097
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-28 11:59:56 +00:00
Jukka Rissanen
2a2a05d071 net: ipv6: Bluetooth address fix
If IPv6 address is generated from Bluetooth MAC address,
then the Universal/Local bit must not be toggled or touched
at all. See RFC 7668 ch 3.2.2 for details.

Because this change is not compatible with older Linux kernel
BT IPSP support, the old behavior can be enabled by setting
CONFIG_NET_L2_BLUETOOTH_ZEP1656 option.

Change-Id: I05d48723b70f1eb60fbd46107ef6a2a4e8f9154a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-28 11:59:56 +00:00
Vinicius Costa Gomes
9c04bde3cb samples/zoap_client: Fix using the wrong timeout for retransmissions
It was assumed that the unit was microseconds, it is in miliseconds,
the same unit that is stored in the timeout field of the pending
transmission.

Change-Id: Ia99f363c7de4ec76a7ed229cb94a9964bcf609aa
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-28 11:59:55 +00:00
Vinicius Costa Gomes
5908d92933 samples/zoap_server: Add retransmissions for CON messages
This adds retransmission support for confirmable responses sent by the
server.

Jira: ZEP-1732

Change-Id: I77c0c6375fa666e4cfdda4016ad1e0e90caf4ac9
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-28 11:59:55 +00:00
Vinicius Costa Gomes
f2522c21e0 iot/zoap: Fix requiring that the buffer is unchanged for retransmit
It is possible that the buffer waiting for retransmission is modified
after it is sent, for example, it can be compacted by 6lo, and our
assumption of where is the message ID is located in the buffer is no
longer valid.

As the message ID is the only information that is necessary for
keeping track of retransmissions, we keep a copy of it in the pending
struct, as well as the destination address of the retransmission.

Change-Id: Id33d54353404628673541225a1a05e27ee08765f
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-28 11:59:54 +00:00
Vinicius Costa Gomes
4af670bfe6 tests/zoap: Adds test for the length of payload on the RX side
This unit test verifies that zoap_packet_get_payload() returns the
expected size for received packets.

Jira: ZEP-1662

Change-Id: Ibe011959f4d6593f4f20f0f5901c9033c76c9518
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-28 11:59:54 +00:00
Vinicius Costa Gomes
5d8c87ec34 samples/zoap_server: Adds example for the link-format feature
This implements the /.well-known/core resouce and two children
resources (/core1 and /core2) so the link-format feature is better
explained.

Change-Id: I9dd8c69040c952c5d12a9987c1966a71b0257ef2
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-28 11:59:53 +00:00
Vinicius Costa Gomes
2fb42abdfb samples/zoap_server: Add a test case for the observer feature
This adds the resource necessary for the TD_COAP_OBS group of tests.

Change-Id: I33bd09910f74db90ad0d713e4479ab2e3ec343a5
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-28 11:59:53 +00:00
Vinicius Costa Gomes
3a75363feb samples/zoap_server: Add more validation tests for block-wise
Add the resource for the TD_COAP_BLOCK_04 ETSI testcase.

Change-Id: Ied901db34ce79d3e1f7f8c7fd55bc398b1f88640
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-28 11:59:52 +00:00
Vinicius Costa Gomes
01b122edb8 samples/zoap_server: Remove useless return statements
The functions that retrieve net_buf will wait forever until a buffer
is available.

Change-Id: I03ddd1239f50fe4467e86e31c8fbfc9b05c8b190
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
2017-02-28 11:59:51 +00:00
Jukka Rissanen
24a8b683d0 net: if: Remove local address from IPv6 neighbor cache
When we do DAD (Duplicate Address Detection), the local IPv6
address gets added to the neighbor cache. This is useless so
remove it after DAD has finished.

Change-Id: I9625d367e96d8108a7d3d1d8b2e95f3c4ea11c45
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-28 11:59:51 +00:00
Jukka Rissanen
30d44396af net: ipv6: Add util to remove neighbor from cache
Add net_ipv6_nbr_rm() utility function that can be used to
remove an IPv6 neighbor from the cache.

Change-Id: I9794856a4f65c5e943656970648e5c5762b0338c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-28 11:59:50 +00:00
Jukka Rissanen
283807fa58 net: shell: Print IPv6 neighbor information
Add "net nbr" command which prints IPv6 neighbor cache
contents.

Change-Id: I7c26ecb117e8b77e64e3be3c0164a94f0d1775bf
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-28 11:59:50 +00:00
Jukka Rissanen
afa1e1f901 net: ipv6: Add util to traverse neighbor cache entries
Add utility function to go through all the stored neighbors
in the IPv6 neighbor cache.

Change-Id: I42fe0ec48c000215403aef63629d0763189ebdbb
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-28 11:59:50 +00:00
Jukka Rissanen
7202b6a360 net: icmpv6: Echo-Reply seq and id fix
The sequence and identifier fields are 16-bit instead of 32-bit
long. This did not cause any issue in Echo-Reply but those two
fields should be set properly.

Change-Id: I5e4878f53d6bb37660d46d173159d27bbe0e94dc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-28 11:59:49 +00:00
Jukka Rissanen
b718528c04 net: icmpv6: Add TCP header when sending ICMPv6 error
TCP header was not sent back to originator when ICMPv6
error message was prepared to be sent.

Change-Id: I171bd724c4260b83d7d1c37e0894f9ed8cddd2c9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-28 11:59:48 +00:00
Wojciech Bober
eb22a4066f drivers/ieee802154: Add missing parameter to net_if_set_link_addr()
Add the link type to net_if_set_link_addr() call. This fixes the
driver after changes introduced in
4eb2020055.

Change-Id: I72475a055ac805524b4b0f0c2380513e8f041368
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-02-28 11:59:48 +00:00
Tomasz Bursztyka
61b47ca838 samples/ieee802154: Update qemu based samples
- Let's build it with the various shell modules
- Make use of Kconfig.samples options

Thus: adding prj_server.conf and prj_client.conf to differentiate 2
instances of the app by their IPv6.

Then let's use samples/net/common/Makefile.ipstack

In the end, it is possible to build 2 times the samples this way:
make PCAP=154.pcap CONF_FILE=prj_server.conf server
and
make pristine
make CONF_FILE=prj_client.conf client

On client, or server, or both, shell commands can be used to ping each
other, check the statistics etc...

Once done, the given pcap file (154.pcap for instance) will have
recorded the traffic which can be parsed through:

wireshard 154.pcap

(Note: the "Malformed packet" warnings are not relevant, as the 15.4
frame FCS is a dummy one, it seems to make wireshark a bit lost)

Jira: ZEP-1774

Change-Id: I5590971660ecbfaac75af709124d59e1f98206fe
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-02-28 11:59:47 +00:00
Jukka Rissanen
0372e102ee samples: net: Fix the 802.15.4 monitor pcap saving
By default the net-tools package is expected to be located in
${ZEPHYR_BASE}/../net-tools directory. User can also specify
the directory using NET_TOOLS variable when running the make.

The net-tools package is located in this repository
https://gerrit.zephyrproject.org/r/net-tools

Change-Id: Ibccd7cabd567a630020fb9efbe1ec9e27b653b46
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-28 11:59:47 +00:00
Jukka Rissanen
5b0e0785dc net: doc: Invalid config option for TCP
The qemu doc uses wrong config option for TCP support.

Change-Id: I87344b5af5ce687302e3a3305dd9b3297e171b0e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-28 11:59:46 +00:00
Jukka Rissanen
2ac1921a74 net: doc: Fix incorrect netcat note for qemu setup
If netcat is used with UDP, then one cannot press CTRL-c
as netcat returns immediately to the caller. For TCP the
CTRL-c is needed so move the note to TCP section of this
document.

Change-Id: I936a89e7a7ce8318602c3deae8513007a4620c80
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-28 11:59:46 +00:00
Andrew Boie
b763cdf85e cortex_m_systick: fix _timer_cycle_get_32() race
We need to account for the interrupt happening in the middle
of the calculation.

Issue: ZEP-1546
Change-Id: I193534856d7521cac7ca354d3e5b65e93b984bb1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-28 11:57:42 +00:00
Andrew Boie
024c310002 tests: add timer monotonic test
k_cycle_get_32() needs to return a monotonically increasing value,
except in cases of 32-bit integer overflow. Enforce this with a
test case.

We also check that the number of cycles elapsed after sleeping for 1
second is at the expected value. This can help catch errors on platforms
that use different timer sources for the system clock and timestamps.

This test case adapted from some code provided by Sergey Arkhipov
when troubleshooting ZEP-1546.

Issue: ZEP-1546
Change-Id: If27fff026ea6de659f7b41b60ff26f4962b734d4
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-28 11:57:42 +00:00
Andrew Boie
2ad927c4db x86: loapic_timer: use TSC for k_cycle_get_32()
The LOAPIC driver was doing this in a way susceptible to a very
nasty race condition: the CCR register could reset and be readable
before the associated interrupt could be delivered.

This resulted in a small window of time where CCR was reset, but
accumulated_cycle_count not updated, causing some calls to
k_cycle_get_32() to appear to jump backwards in time.

Just use the x86 TSC for these cycle timestamps. A divisor may be
provided in cases where the CPU clock speed is some multiple of
the bus speed. Modern x86 CPUs do not change their TSC rate even
when adjusting cpu frequency, so this should be a reliable timing
source.

Issue: ZEP-1546
Change-Id: I441bd8e32af866587a91f306e89e3fa0ece512b5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-28 11:57:41 +00:00
Andrew Boie
b2fa495bf2 arcv2_timer: fix cycle count race
It's possible the timer interrupt could occur when performing the
computation, resulting in incorrect values returned.

It's still possible for bad values to be returned if the function is
called with interrupts locked, but that is only fixable with a second
timer source.

Issue: ZEP-1546
Change-Id: I16d5b04c3e32377f7249eb4fb1bf2f7c22bd0836
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-28 11:57:40 +00:00
Andrew Boie
19ccf83006 kernel: add flexibility to k_cycle_get_32() definition
Some arches may want to define this as an inline function, or
define in core arch code instead of timer driver code.
Unfortunately, this means we need to remove from the footprint
tests, but this is not typically a large function.

Issue: ZEP-1546
Change-Id: Ic0d7a33507da855995838f4703d872cd613a2ca2
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-28 11:57:40 +00:00
Andrew Boie
c1acfd049b altera_avalon_timer: disable high-resolution timestamps
On Nios II the same timer peripheral IP block can't function
as a periodic system timer and a high-resolution timestamp source.
A second timer instance with different configuration is required.
Until that is implemented, just return the accumulated cycle count.

Issue: ZEP-1546
Change-Id: If3dcebdc60334bf3aa0ab45ccd82f1b2531b6bc1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-28 11:57:39 +00:00
Andrew Boie
bce0eb9d98 riscv_machine_timer: fix k_cycle_get_32()
There are race conditions trying to coordinate the value between
the accumulated_cycle_count (updated at interrupt time) and
trying to compute the delta from the last interrupt using the
mtime registers. An unlucky call could result in the timestamp
appearing to move backwards in time.

the 'mtime' register isn't reset at every interrupt. Since we just
want a cycle counter, report its raw value.

Issue: ZEP-1546
Change-Id: I9f404b33214d6502fea47374fcf0ecbf84ef8136
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-02-28 11:57:38 +00:00
Paul Sokolovsky
48cea0e9c1 gpio: mcux: Revert to older GPIO device names as were used for Kinetis.
These are more consistent with naming used by other ports (uppercase,
short), and some existing software relies on them to be exactly those.
This change is a follow up to the discussion on the Zephyr mailing
list, calling to establish consistent naming conventions for Zephyr
devices, and is a small step in that direction.

Change-Id: I013b0505b579c6337aeb6fbef2423216ca6cf046
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
2017-02-28 03:20:14 +00:00
David B. Kinder
612b9efb17 doc: fix spelling errors in doc/kernel documents
Change-Id: I879142a6c2da9d8ebd00c37ee57f1bf0f699dc78
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
(cherry picked from commit 23b54005e0)
2017-02-27 21:01:22 +00:00
Adithya Baglody
b6035cbc57 Disabled BOOT_BANNER for boot time benchmarks.
Change-Id: Ife23cd784e684d667bf78b616c478c891860e6e2
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
(cherry picked from commit 979f75053c)
2017-02-27 14:17:57 +00:00
Benjamin Walsh
e79f9a1c4a doc: fix glaring typo in polling doc
Change-Id: I5e281d57cf8a9a7c9bf784f96b91d12988898a5f
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
(cherry picked from commit 97f4a48182)
2017-02-26 12:02:22 +00:00
Anas Nashif
46a38ee460 Zephyr 1.7.0-rc2
Change-Id: I0e8fbf949a7852e810865a7d970337ab2283dcc6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-23 07:40:46 -08:00
Anas Nashif
25281db44c Revert "tests/crypto: Update testcase.ini to build on more platforms"
This reverts commit f20dc053b5.

Test breaks on many boards.

Change-Id: I6180146f007c123e5a51aceb8acabdf2b7ee376c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-23 07:12:00 -08:00
Flavio Santes
f20dc053b5 tests/crypto: Update testcase.ini to build on more platforms
This patch excludes qemu riscv32 due to the following msg:

qemu-system-riscv32: cannot set up guest memory
'riscv_sifive_board.ram': Cannot allocate memory

Jira: ZEP-1721

Change-Id: Ib1784fa57ad1e3d69871d4e216af1ad5dbe55a76
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
(cherry picked from commit 7b652b1f84)
2017-02-23 14:41:44 +00:00
Andrew Boie
4791c83864 samples: add some missing testcase.ini
Issue: ZEP-1768
Change-Id: Ia59e02bdaf9302b991f0423ef5eba7b0102877b0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
(cherry picked from commit 138579a3ad)
2017-02-23 14:41:33 +00:00
Kuo-Lang Tseng
03dc412517 aon_counter test: fix misspelling in the header include guard
The include guard has a misspelling.

Jira: ZEP-1746

Change-Id: I4d8000ef5c8e037f80acbf2491d0b9466670816a
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
(cherry picked from commit 4533734dc6)
2017-02-23 14:41:26 +00:00
Sergio Rodriguez
ec8c508153 tests: watchdog: Interrupt reset mode modifications
In order for interrupt reset mode to work (reset the processor
after and interrupt) the interrupt does not has to be cleared,
and the qmsi hal layer clears the interrupt after the callback
has been invoked, the callback does not return and the processor
should reset.

Jira: ZEP-1566

Change-Id: Ic951a0f15fe95fb0ef5d752b831c62e6fa3ceea0
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
(cherry picked from commit b6cf56e5cc)
2017-02-23 14:41:16 +00:00
Andre Guedes
9b9f679b90 tests/power/multicorei/lmt: Fix RTC configuration
After QMSI 1.4 update, the alarm callback is not saved when
'alarm_en' is set to zero during RTC configuration. So this
patch fixes tests/power/multicore/lmt application according.

ZEP-1778

Change-Id: Ie1468458bc23a6394484aef2aeee97745d5d23b8
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
(cherry picked from commit c7f01dc90d)
2017-02-23 14:41:08 +00:00
Anas Nashif
6b0903bcf9 quark_se: arc: do not enable second I2C by default
Change-Id: Ib76edbcfd050cbf04f60aa48125117550b460195
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
(cherry picked from commit ac27101f64)
2017-02-23 14:40:59 +00:00
Kuo-Lang Tseng
3a8753d0fe samples: driver: led_apa102c: change hard-coded device name
Use the config name defined by the driver Kconfig in device
binding calls as that is safer because device name can change and
the app does not need to change.

Jira: ZEP-1764

Change-Id: I5a3e16e10f7700ec12edbd07603808cd32f15755
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-23 14:40:44 +00:00
Kuo-Lang Tseng
dba515fd61 samples: fade_led: change hard-coded device name
Use the config name defined by the driver Kconfig in device
binding calls as that is more portable and safer because device
name can change and the app does not need to change.

Jira: ZEP-1764

Change-Id: I3287da5c5a9df24507efa84bbf7bbb051726bc2c
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-23 14:40:43 +00:00
Kuo-Lang Tseng
655b2bf361 samples: blink_led: change hard-coded device name
Use the config name defined by the driver Kconfig in device
binding calls as that is more portable and safer because device
name can change and the app does not need to change.

Jira: ZEP-1764

Change-Id: If8c14dd4eb186bace863432d454c9122461f2f9c
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
2017-02-23 14:40:43 +00:00
Erwan Gouriou
460ffe7601 clock_control: fix to get PLL2 source for PREDV1 working
Some fixes where needed to get PLL2 source of PREVI1 functional.
Compiled ok with following configuration:
CONFIG_CLOCK_STM32F10X_CONN_LINE_PREDIV1_SRC_PLL2CLK=y
CONFIG_CLOCK_STM32F10X_CONN_LINE_PREDIV2=0
CONFIG_CLOCK_STM32F10X_CONN_LINE_PLL2_MULTIPLIER=8

Jira: ZEP-1758

Change-Id: I5ddfaef1b44c4c4e5e6adedc158a1c9092bc8df5
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-02-23 13:13:29 +00:00
Erwan Gouriou
d17f16d8d7 gpio: enable ports F G (and H) for stm32f1xx (stm32f4xx)
Some GPIO ports activation where missing since not used
on available soc/boards.
Since stm32 family increases, activation of these ports
should be made available.

Jira: ZEP-1551

Change-Id: I612d135b28ef255bc771599e33796671ff81d0ac
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-02-23 13:13:28 +00:00
Jukka Rissanen
1d32ad0dc3 drivers/ieee802154/pipe: Use net_nbuf_unref to release net_buf
Using net_nbuf_unref to release the net_buf so that we can
debug the allocations more easily. It is ok to use the original
net_buf_unref() too, we just miss some important net_buf
housekeeping information if done like that.

Change-Id: Ieb7b39ed525bfc46eb5c07a01f2a3a75fdbeb9fd
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-22 08:47:39 -08:00
Jukka Rissanen
7635965b1a net: buf: net_buf_frag_del() had insufficient debugging
In order to see who is freeing the fragment, add function
and line information to net_buf_frag_del() when net_buf
debugging is activated.

Change-Id: I732f579fab2390cb16804cb35b83f46e65fca342
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-22 08:47:39 -08:00
Ravi kumar Veeramally
781e6c388a net: tcp: Retransmit buffers are not freed on tcp_release
TCP maintains 'sent_list' for retransmission if it doesn't get ACK for it.
Same list is not freed on net_tcp_release() call. This causes memory leak.

Change-Id: I2b2def1ea19487cc48ea4fbb6343ef0c773f288f
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-22 08:47:39 -08:00
Michael Scott
9be5f9ebfd net: context: let tcp_established() handle more TCP states
Due to commit fece856959 ("net: tcp: Clean up FIN handling") the
tcp_established() callback now handles TCP connections which are
in various ending/closing states other than TCP_ESTABLISHED.

Currently, these states are generating the following error and not
being processed:
Context 0x123456778 in wrong state 6.
(Shown when TCP is in LAST_ACK state).

This commit also fixes a memory leak issue discribed in
Jira: ZEP-1658

Analysis of the memory leak issue is here:
When TCP connection is established, tcp context is in
NET_TCP_ESTABLISHED state. Once it receives FIN message from client
it goes to NET_TCP_CLOSE_WAIT and then it turns to NET_TCP_LAST_ACK
after connection closing request from server. Now server gets final
ack from client, but tcp_established() will reject it because current
state is not in NET_TCP_ESTABLISHED. Even if server receives proper
ack, it is not handled by server. Hence 'sent_list' is not freed.

Change-Id: I41c8af2e6851809f87a02c271a4290cf3d823ebb
Signed-off-by: Michael Scott <michael.scott@linaro.org>
2017-02-22 08:47:39 -08:00
Ravi kumar Veeramally
a976b8db67 drivers: slip: Skip buffer allocation for incomplete packet
If slip_input_byte fails to get buffer for the first byte then no point
of saving later bytes and send it to upper layers. Final packet will be
incomplete and upper layers will discard it. Consider incoming bytes
only after successful buffer allocation on first byte, otherwise silently
ignore it.

Change-Id: Ie16d0df0c608d1644d39f66900252a340051c012
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-22 08:47:38 -08:00
Ravi kumar Veeramally
26464f8caa drivers: slip: Add more comments for slip write scenario
No functionality changes. Added more comments and used switch cases
for more readability.

Change-Id: I9396270d7368d9b0c923a88f90b44129a1d69cbc
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-22 08:47:38 -08:00
Ravi kumar Veeramally
177ab6e27e drivers: slip: Remove unused variables
Change-Id: Ib3aae91a1f40066f8902e9b2e709b13d1b57a2cb
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-22 08:47:38 -08:00
Ravi kumar Veeramally
8c7f5cca69 net: context: Fix invalid order of statements
NET_ASSERT(net_nbuf_iface(buf)) should be called before setting
it on context [net_context_set_iface(context, net_nbuf_iface(buf))].

Change-Id: I9a1da1214857e96e03784bc98a9aae5cf59ef0fc
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
2017-02-22 08:47:38 -08:00
Tomasz Bursztyka
ad6aa86df1 net/utils: Fix parameters type
Using char or uint8_t relevantly.

Jira: ZEP-1723

Change-Id: I512cb6ff4800cd23f6539e7a47c7f3c72dc94183
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-02-22 08:47:38 -08:00
Tomasz Bursztyka
fea5778664 net: Fix stack type
s/unsigned char/char

Jira: ZEP-1723

Change-Id: I07b23b28fdb4d2f0f78dcdd314faaebec06471db
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-02-22 08:47:38 -08:00
Jukka Rissanen
c8c6bee8a2 net: ipv6: IEEE 802.15.4 short address fix
If IPv6 address is generated from IEEE 802.15.4 short address,
then the Universal/Local bit must be set to 0.

See RFC 6282 chapter 3.2.2 for details.

Change-Id: Ied38f40e807bdcd792570b331f6b99a6fcc7db1b
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-22 08:47:38 -08:00
Jukka Rissanen
37e830a1da net: nbuf: Set the link address type in nbuf
When we know the network interface where the packet is about
to be sent, then set the link address type too.

The link address type is used when working with IPv6 link
local and auto configured addresses.

Change-Id: If086c3c413c025809cffa64311f973bc7bdac7db
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-22 08:47:38 -08:00
Jukka Rissanen
0d1db8fccd net: Set the network link address type when setting link address
The interface L2 address type is set at the same time as the
L2 address is set to the network interface. This is most
convinient place to set the address type.

Change-Id: I712d7357d075959eb79df3463141cfbc6d163a74
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-22 08:47:37 -08:00
Jukka Rissanen
47c83debea net: Add network link technology type to linkaddr
In order to know what kind of address the L2 link address is,
add a type of the address into struct net_linkaddr.

Change-Id: Icd4cb0374219583689cf9ee204c0840cad8559e9
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-02-22 08:47:37 -08:00
Wojciech Bober
91568e0137 samples/net/ieee802154: Update example with nrf5 802.15.4
This commit updates the 802.15.4 example to work with the
nrf5 802.15.4 radio driver.

Change-Id: I8a4c80a21ebe29ce2616836b764c454979ebb2e9
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-02-22 08:47:37 -08:00
Wojciech Bober
1db37bb98b samples/net: ieee802154: Add configuration for nrf5
This commit addes new configuration for examples which use
nrf5 802.15.4 radio.

Change-Id: I0c57334d071fb58bc2282feb3f4e6b949ce5d472
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-02-22 08:47:37 -08:00
Wojciech Bober
1f7e43569b drivers/net/ieee802154: nRF5 802.15.4 radio driver
This commit adds a driver for nRF5 802.15.4 radio. This driver
is a wrapper for the driver provided by ext/hal/nordic/drivers.

Change-Id: I20ee4aff3d1b994c621ba8eaab208d15d85e4c01
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-02-22 08:47:37 -08:00
Wojciech Bober
217049d42f ext: Integrate Nordic's 802.15.4 radio driver into Zephyr
This patch includes the new files in the build and refactors the
Kconfig and Kbuild files in ext/hal/nordic to acommodate for the presence of
the radio driver.

Change-Id: Ifeda1f6d51916c7096be3c09ef7db6ca59c87728
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-02-22 08:47:37 -08:00
Wojciech Bober
171b25f1cb ext: Import Nordic 802.15.4 radio driver
Origin: OpenThread (commit 0dec46315)
URL: https://github.com/openthread/openthread
License: 3-clause BSD
Maintained-by: External

Change-Id: Ia5f26d93d7cb4584cdb3343f7a80c500c4e3ebc8
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
2017-02-22 08:47:37 -08:00
Flavio Santes
009105706f tests/mqtt: Fix compiler warnings in MQTT Packet test case
Cast to uint8_t * some char * values to avoid compiler warnings.

Jira: ZEP-1179

Change-Id: I9973eecbed357a2fc44958cad22f812d166f6756
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-02-22 08:47:37 -08:00
Johann Fischer
62ddee16e6 drivers: mcr20a: cleanup and refactor interrupt processing
The interrupt processing of MCR20A was flawed and complicated.
This patch simplifies the handling of interrupts and reduces
the number of necessary SPI transfers.

Minor fixes:
 - use mutex for the PHY access control
 - remove unnecessary mcr20a_mask_irqb calls
 - do not read RX_FRM_LEN twice
 - increase timeout for sequence synchronization semaphore
   if the log level greater than 1
 - enable only the Sequence-end (SEQIRQ) interrupt
 - fix magic in NET_DEVICE_INIT
 - make the timeout values dependent on the log level

Change-Id: Ib3f64a092ffba91c80ff6e1d5cec995ab9d40bfb
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
2017-02-22 08:47:37 -08:00
Øyvind Hovdsveen
e72156fa17 drivers/timer: Fixing issue in nRF RTC driver when RTC handler is blocked.
Fixes an unlikely issue that could arise if the RTC handler in the nRF RTC
driver was blocked for more than one sys tick interval. This could lead to
_sys_clock_tick_announce() being called with more than one sys tick when the
kernel did not expect it.

Jira: ZEP-1763

Change-ID: I5608fca6f0ac97a17c1ce452c1c5c67696a49a9a
Signed-off-by: Øyvind Hovdsveen <oyvind.hovdsveen@nordicsemi.no>
2017-02-22 07:25:19 -08:00
Jesus Sanchez-Palencia
cb3569d412 ext qmsi: Update QMSI to 1.4 RC3
No major fixes since RC2 were made, but some clean up was done.
There are no changes to shim drivers at this moment.

JIRA: ZEP-1572

Change-Id: I2436f91bfa3aae186c778b5ff4129bb0e6b7db1f
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
2017-02-21 16:43:26 -08:00
Wojciech Bober
f768b3e968 drivers/timer: Rework the nRF RTC driver.
This is a reworked version of the previous RTC driver. The main
changed is related to the handling _timer_idle_exit() on non-RTC
wake-ups. The previous version didn't announce the elapsed time
to the kernel in _timer_idle_exit(). Additionally, the driver now
makes sure never to announce more idle ticks than the kernel asked
for, since the kernel does not handle negative deltas in its timeout
queues.

Change-Id: I312a357a7ce8f0c22adf5153731064b92870e47e
Signed-off-by: Wojciech Bober <wojciech.bober@nordicsemi.no>
Signed-off-by: Øyvind Hovdsveen <oyvind.hovdsveen@nordicsemi.no>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
(cherry picked from commit 923560a959)
2017-02-20 16:42:56 +00:00
Kumar Gala
6bbd662ac0 boards: Add panther & panther_ss to sanity
Change-Id: I08345fb1063a4ba38095fca6512c5b7eb3e96da8
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
(cherry picked from commit d3d2fab1ba)
2017-02-20 16:42:45 +00:00
Benjamin Walsh
4bbeabb359 doc: add polling API to the kernel primer
Change-Id: I17578f8350f1a26d2ecf8c0886c8e93078a2cdca
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-20 10:39:51 -05:00
Benjamin Walsh
63a9b84322 doc: reorder sections in kernel/other
Put them in order where they are most likely to be useful.

Change-Id: Ia9c358a096556a9838b2b69311e10aba3b9ca587
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
(cherry picked from commit e3f927bc11)
2017-02-20 15:35:59 +00:00
Daniel Thompson
1d69c0cb67 doc: Restore documentation for 'make outputexports'
Commit 7cb8a16c86 ("doc: restructure application primer") removed
the section documenting the build system support for third party
libraries. Restore this section making a few editorial changes to
ensure the text sits well in its surroundings.

Jira: ZEP-1733
Change-Id: Ie62b956732f36fac70b392eeee880acebaef6cf9
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
(cherry picked from commit 4d096a44a1)
2017-02-19 10:29:56 +00:00
David B. Kinder
d5318e79ca doc: update glossary, remove from wiki
Promote a glossary.rst up into the doc/ folder, merge wiki
glossary entries (and remove from the wiki), and format use
the .. glossary directive to allow references by using the
:term: role (using :term:`ISR` will make a link to the
glossary entry for ISR)

Jira: ZEP-1321

Change-Id: Ie1461037ab456371604594488f01df9f21284561
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
(cherry picked from commit d73d3aa901)
2017-02-18 15:17:47 +00:00
Andy Gross
9088de298d dts: arm: Kinetis: Add bluetooth ports
This patch adds the UART ports required by for Bluetooth.  Baud rate
was moved from the Kinetis dtsi file to the relevant board files.

Jira: ZEP-1745

Change-Id: Iac4f748fd82217662800dbf48baea087e5d3a1df
Signed-off-by: Andy Gross <andy.gross@linaro.org>
2017-02-18 01:29:23 +00:00
Chuck Jordan
33cbbd95c4 test: repair test_tickless for ARC because _tsc_read is now present
A _tsc_read has been added for ARC targets.
This test can use that when ARC.

See ZEP-1413

Change-Id: Ib63aecbe9f3eb2b97ad1086fc79b57e8f0774fca
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
2017-02-17 17:16:11 -05:00
Benjamin Walsh
1a9c57a493 kernel/sem: fix coding conventions
Some inconsistent spacing and private types starting with '_'.

Change-Id: I3354b69cc3934717d3b8097cdda98474339c1f32
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:11 -05:00
Benjamin Walsh
bf82f14d25 kernel/sem: fix issue with expired timeouts on group operations
The loop was not tracking the correct next node in the list correctly.

However, it happened that the fix is way more involved than just fixing
that small issue, due to the way that semaphore group timeouts work.

Instead of handling timeouts one-by-one, we have to handle all timeouts
in a semaphore group as one. To do that, we use the fact that the
timeout of the real thread is always found first in the kernel's
timeout_q, and if it has expired, we do not even look at the timeouts of
the dummy threads.

Change-Id: Iadcfd06f33c6b335efa2592b2c01eeb5ca67afde
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:11 -05:00
Benjamin Walsh
eba6eef71b tests/kernel/common: add test to verify same tick timeout expiry order
Timeouts, when expiring on the same tick, should be handled in the same
order they were queued.

Change-Id: I23a8e971a47ca056b32b8b48fe179d481bae27c0
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:11 -05:00
Benjamin Walsh
9b4afd36fc kernel/timeout: fix handling expired timeouts in reverve queuing order
Queuing in the timeout_q of timeouts expiring on the same tick queue
them in reverse order: as soon as the new timeout finds a timeout
expiring on the same tick or later, it get prepended to that timeout:
this allows exiting the traversal of the timeout as soon as possible,
which is done with interrupts locked, thus reducing interrupt latency.
However, this has the side-effect of handling the timeouts expiring on
the same tick in the reverse order that they are queued.

For example:

    thread_c, prio 4:

        uint32_t uptime = k_uptime_get_32();

        while(uptime == k_uptime_get_32()); /* align on tick */

        k_timer_start(&timer_a, 5, 0);
        k_timer_start(&timer_b, 5, 0);

    thread_a, prio 5:

        k_timer_status_sync(&timer_a);
        printk("thread_a got timer_a\n");

    thread_b, prio 5:

        k_timer_status_sync(&timer_b);
        printk("thread_b got timer_b\n");

One could "reasonably" expect thread_a to run first, since both threads
have the same prio, and timer_a was started before timer_b, thus
inserted first in the timeout_q first (time-wise). However, thread_b
will run before thread_a, since timer_b's timeout is prepended to
timer_a's.

This patch keeps the reversing of the order when adding timeouts in the
timeout_q, thus preserving the same interrupt latency; however, when
dequeuing them and adding them to the expired queue, we now reverse that
order _again_, causing the timeouts to be handled in the expected order.

Change-Id: Id83045f63e2be88809d6089b8ae62034e4e3facb
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:11 -05:00
Benjamin Walsh
10561731df kernel/timeouts: add description of timeouts queued on the same tick
Change-Id: I24ba889e3174b903ccea5309ad45e2b4d1755fe1
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:11 -05:00
Benjamin Walsh
cc8354a359 kernel/sched: refactor _get_first_thread_to_unpend()
Modify _get_first_thread_to_unpend() so that it does not remove the
thread from the wait queue. Rename it to _find_first_thread_to_unpend()
to match the new behaviour.

This will be needed to fix a semaphore group bug.

Change-Id: I1b7531c3beecf3b6a86ecf88a93a02449edd0767
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:10 -05:00
Benjamin Walsh
a4951b6b29 kernel/sched: add _is_thread_dummy()
Rather than explicitely checking the thread state bit.

Change-Id: Ic78427d9847e627a0e91d0147d3b6164450597f6
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:10 -05:00
Benjamin Walsh
ab2159f52f tests: add tests for SYS_DLIST/SLIST_ITERATE_FROM()
Change-Id: I52dc6fa081be588f627670543ca9e2022d74bc37
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:10 -05:00
Benjamin Walsh
7ef1c66593 slist: add SYS_SLIST_ITERATE_FROM_NODE()
To be API-equivalent with doubly-linked lists.

Change-Id: I98b781f4c649e248abb04f660f686ad76d6b39de
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:10 -05:00
Benjamin Walsh
1d66fab0c4 dlist: add SYS_DLIST_ITERATE_FROM_NODE()
Like SYS_DLIST_FOR_EACH_NODE(), but __dn contains a node where to fetch
the next node from, NULL to start at the head.

Note that the function does not iterate from @a node, but from
node->next. This allows the following:

sys_dnode_t *funcA(sys_dlist_t *list, sys_dnode_t *node)
{
	SYS_DLIST_ITERATE_FROM_NODE(list, node) {
		if (node == <some condition>) {
			return node;
		}
	}
	return NULL;
}

sys_dlist_t list = &<some list>;
sys_dnode_t *node = NULL;

do {
	node = funcA(list, node)
	if (node == <some other condition>) {
		goto found;
	}
} while(node);

<handle error>

found:
<do stuff with node>

Change-Id: I17a5787594a0ed1a4745bd2e1557dd54895105ca
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:10 -05:00
Benjamin Walsh
9fc3173c96 kernel: fix typo
Change-Id: Ic675015b8830c75d976e21c711dd2a872b5de283
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:10 -05:00
Benjamin Walsh
920f335d9f kernel/sched: protect thread sched_lock with compiler barriers
This has not bitten us yet, but it was a ticking timebomb.

This is similar to the issue that was found with irq_lock/irq_unlock
implementations on several architectures. Having a volatile variable is
not the way to force the sched_lock variable to be
incremented/decremented around the accesses to data it protects.
Instead, a compiler barrier must prevent the compiler from reordering
the memory accesses around setting of sched_lock. Needed in the inline
implementations _sched_lock()/_sched_unlock_no_reschedule(), which
resolve to simple decrement/increment of the per-thread sched_lock
variable.

Change-Id: I06f5b3524889f193efe69caa947118404b1be0b5
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:10 -05:00
Benjamin Walsh
0c0ec4a0e2 gcc: add compiler_barrier() macro
Prevent compiler from reordering memory access instructions across
critical points.

Change-Id: Id776fe59f51315c8bd2353ea3149cf4aad52e6ba
Signed-off-by: Benjamin Walsh <walsh.benj@gmail.com>
2017-02-17 17:16:10 -05:00
Anas Nashif
cd98edf028 Zephyr 1.7.0-rc1
Change-Id: I72d1bce15dcd96db12f7c53042c026d06aa2fa72
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-02-15 04:16:06 -08:00
34219 changed files with 3068135 additions and 3509721 deletions

View File

@@ -1,9 +1,10 @@
--mailback
--no-tree
--emacs
--summary-file
--show-types
--max-line-length=100
--max-line-length=80
--min-conf-desc-length=1
--typedefsfile=scripts/checkpatch/typedefsfile
--ignore BRACES
--ignore PRINTK_WITHOUT_KERN_LEVEL
@@ -11,21 +12,10 @@
--ignore VOLATILE
--ignore CONFIG_EXPERIMENTAL
--ignore PREFER_KERNEL_TYPES
--ignore PREFER_SECTION
--ignore AVOID_EXTERNS
--ignore NETWORKING_BLOCK_COMMENT_STYLE
--ignore DATE_TIME
--ignore MINMAX
--ignore CONST_STRUCT
--ignore FILE_PATH_CHANGES
--ignore SPDX_LICENSE_TAG
--ignore C99_COMMENT_TOLERANCE
--ignore REPEATED_WORD
--ignore UNDOCUMENTED_DT_STRING
--ignore DT_SPLIT_BINDING_PATCH
--ignore DT_SCHEMA_BINDING_PATCH
--ignore TRAILING_SEMICOLON
--ignore COMPLEX_MACRO
--ignore MULTISTATEMENT_MACRO_USE_DO_WHILE
--ignore ENOSYS
--ignore IS_ENABLED_CONFIG
--exclude ext

View File

@@ -1,91 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
#
# Note: The list of ForEachMacros can be obtained using:
#
# git grep -h '^#define [^[:space:]]*FOR_EACH[^[:space:]]*(' include/ \
# | sed "s,^#define \([^[:space:]]*FOR_EACH[^[:space:]]*\)(.*$, - '\1'," \
# | sort | uniq
#
# References:
# - https://clang.llvm.org/docs/ClangFormatStyleOptions.html
---
BasedOnStyle: LLVM
AlignConsecutiveMacros: AcrossComments
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AttributeMacros:
- __aligned
- __deprecated
- __packed
- __printf_like
- __syscall
- __syscall_always_inline
- __subsystem
BitFieldColonSpacing: After
BreakBeforeBraces: Linux
ColumnLimit: 100
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
ForEachMacros:
- 'FOR_EACH'
- 'FOR_EACH_FIXED_ARG'
- 'FOR_EACH_IDX'
- 'FOR_EACH_IDX_FIXED_ARG'
- 'FOR_EACH_NONEMPTY_TERM'
- 'RB_FOR_EACH'
- 'RB_FOR_EACH_CONTAINER'
- 'SYS_DLIST_FOR_EACH_CONTAINER'
- 'SYS_DLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_DLIST_FOR_EACH_NODE'
- 'SYS_DLIST_FOR_EACH_NODE_SAFE'
- 'SYS_SFLIST_FOR_EACH_CONTAINER'
- 'SYS_SFLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_SFLIST_FOR_EACH_NODE'
- 'SYS_SFLIST_FOR_EACH_NODE_SAFE'
- 'SYS_SLIST_FOR_EACH_CONTAINER'
- 'SYS_SLIST_FOR_EACH_CONTAINER_SAFE'
- 'SYS_SLIST_FOR_EACH_NODE'
- 'SYS_SLIST_FOR_EACH_NODE_SAFE'
- '_WAIT_Q_FOR_EACH'
- 'Z_FOR_EACH'
- 'Z_FOR_EACH_ENGINE'
- 'Z_FOR_EACH_EXEC'
- 'Z_FOR_EACH_FIXED_ARG'
- 'Z_FOR_EACH_FIXED_ARG_EXEC'
- 'Z_FOR_EACH_IDX'
- 'Z_FOR_EACH_IDX_EXEC'
- 'Z_FOR_EACH_IDX_FIXED_ARG'
- 'Z_FOR_EACH_IDX_FIXED_ARG_EXEC'
- 'Z_GENLIST_FOR_EACH_CONTAINER'
- 'Z_GENLIST_FOR_EACH_CONTAINER_SAFE'
- 'Z_GENLIST_FOR_EACH_NODE'
- 'Z_GENLIST_FOR_EACH_NODE_SAFE'
- 'STRUCT_SECTION_FOREACH'
- 'TYPE_SECTION_FOREACH'
IfMacros:
- 'CHECKIF'
# Disabled for now, see bug https://github.com/zephyrproject-rtos/zephyr/issues/48520
#IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^".*\.h"$'
Priority: 0
- Regex: '^<(assert|complex|ctype|errno|fenv|float|inttypes|limits|locale|math|setjmp|signal|stdarg|stdbool|stddef|stdint|stdio|stdlib|string|tgmath|time|wchar|wctype)\.h>$'
Priority: 1
- Regex: '^\<zephyr/.*\.h\>$'
Priority: 2
- Regex: '.*'
Priority: 3
IndentCaseLabels: false
IndentWidth: 8
InsertBraces: true
SpaceBeforeParens: ControlStatementsExceptControlMacros
SortIncludes: Never
UseTab: ForContinuationAndIndentation
WhitespaceSensitiveMacros:
- STRINGIFY
- Z_STRINGIFY

View File

@@ -1,31 +0,0 @@
codecov:
notify:
require_ci_to_pass: yes
coverage:
precision: 2
round: down
range: "70...100"
status:
project: yes
patch: yes
changes: no
# ignore:
# - "tests/**/*"
# - "samples/**/*"
# - "ext/hal/**/*"
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
comment:
layout: "reach, diff, flags, files, footer"
behavior: default
require_changes: no

View File

@@ -1,92 +0,0 @@
# EditorConfig: https://editorconfig.org/
# top-most EditorConfig file
root = true
# All (Defaults)
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 100
# Assembly
[*.S]
indent_style = tab
indent_size = 8
# C
[*.{c,h}]
indent_style = tab
indent_size = 8
# C++
[*.{cpp,hpp}]
indent_style = tab
indent_size = 8
# Linker Script
[*.ld]
indent_style = tab
indent_size = 8
# Python
[*.py]
indent_style = space
indent_size = 4
# Perl
[*.pl]
indent_style = tab
indent_size = 8
# reStructuredText
[*.rst]
indent_style = space
indent_size = 3
# YAML
[*.{yml,yaml}]
indent_style = space
indent_size = 2
# Shell Script
[*.sh]
indent_style = space
indent_size = 4
# Windows Command Script
[*.cmd]
end_of_line = crlf
indent_style = tab
indent_size = 8
# Valgrind Suppression File
[*.supp]
indent_style = space
indent_size = 3
# CMake
[{CMakeLists.txt,*.cmake}]
indent_style = space
indent_size = 2
# Makefile
[Makefile]
indent_style = tab
indent_size = 8
# Device tree
[*.{dts,dtsi,overlay}]
indent_style = tab
indent_size = 8
# Git commit messages
[COMMIT_EDITMSG]
max_line_length = 75
# Kconfig
[Kconfig*]
indent_style = tab
indent_size = 8

8
.gitattributes vendored
View File

@@ -3,11 +3,3 @@
.gitattributes export-ignore
.gitignore export-ignore
.mailmap export-ignore
# Tell git to not diff certain files
*.svg -diff
# Tell linguist that generated test pattern files should not be included in the
# language statistics.
*.pat linguist-generated
*.svg linguist-generated

View File

@@ -1,57 +0,0 @@
---
name: Bug report
about: Create a report to help us improve Zephyr
title: ''
labels: bug
assignees: ''
---
**Notes (delete this)**
Github Discussions (https://github.com/zephyrproject-rtos/zephyr/discussions)
are available to first verify that the issue is a genuine Zephyr bug and not a
consequence of Zephyr services misuse.
This issue list is only for bugs in the main Zephyr code base
(https://github.com/zephyrproject-rtos/zephyr/). If the bug is for a project
fork (such as NCS) specific feature, please open an issue in the fork project
instead.
**Describe the bug**
A clear and concise description of what the bug is.
Please also mention any information which could help others to understand
the problem you're facing:
- What target platform are you using?
- What have you tried to diagnose or workaround this issue?
- Is this a regression? If yes, have you been able to "git bisect" it to a
specific commit?
- ...
**To Reproduce**
Steps to reproduce the behavior:
1. mkdir build; cd build
2. cmake -DBOARD=board\_xyz
3. make
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Impact**
What impact does this issue have on your progress (e.g., annoyance, showstopper)
**Logs and console output**
If applicable, add console logs or other types of debug information
e.g Wireshark capture or Logic analyzer capture (upload in zip archive).
copy-and-paste text and put a code fence (\`\`\`) before and after, to help
explain the issue. (if unable to obtain text log, add a screenshot)
**Environment (please complete the following information):**
- OS: (e.g. Linux, MacOS, Windows)
- Toolchain (e.g Zephyr SDK, ...)
- Commit SHA or Version used
**Additional context**
Add any other context that could be relevant to your issue, such as pin setting,
target configuration, ...

View File

@@ -1,20 +0,0 @@
---
name: Enhancement
about: Suggest enhancements to existing features
title: ''
labels: Enhancement
assignees: ''
---
**Is your enhancement proposal related to a problem? Please describe.**
A clear and concise description of what the problem is.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or graphics (drag-and-drop an image) about the feature request here.

View File

@@ -1,51 +0,0 @@
---
name: RFC / Proposal
about: Submit an RFC / Proposal
title: ''
labels: RFC
assignees: ''
---
## Introduction
This section targets end users, TSC members, maintainers and anyone else that might
need a quick explanation of your proposed change.
### Problem description
Why do we want this change and what problem are we trying to address?
### Proposed change
A brief summary of the proposed change - the 10,000 ft view on what it will
change once this change is implemented.
## Detailed RFC
In this section of the document the target audience is the dev team. Upon
reading this section each engineer should have a rather clear picture of what
needs to be done in order to implement the described feature.
### Proposed change (Detailed)
This section is freeform - you should describe your change in as much detail
as possible. Please also ensure to include any context or background info here.
For example, do we have existing components which can be reused or altered.
By reading this section, each team member should be able to know what exactly
you're planning to change and how.
### Dependencies
Highlight how the change may affect the rest of the project (new components,
modifications in other areas), or other teams/projects.
### Concerns and Unresolved Questions
List any concerns, unknowns, and generally unresolved questions etc.
## Alternatives
List any alternatives considered, and the reasons for choosing this option
over them.

View File

@@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: Feature Request
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or graphics (drag-and-drop an image) about the feature request here.

View File

@@ -1,42 +0,0 @@
---
name: Contributor Nomination
about: Nominate a GitHub user for additional rights on the Zephyr Project
title: ''
labels: Role Nomination
assignees: ''
---
# Background
The [TSC Project Roles] defines the main roles for the Zephyr Project, including
Maintainer, Collaborator, and Contributor.
By default anyone that contributes code or documentation is a Contributor, but
with the lowest [GitHub Permission Level] of Read. For example, Contributors
with Read permission do not have the permission to add reviewers to a pull
request.
Use this template to nominate a GitHub user for the Contributor role with
Triage permission level, which allows the user to add reviewers to a pull
request and be added as a reviewer by other users.
# Nomination
## GitHub User
Provide the following information about the GitHub user:
1. Full Name
1. GitHub username
1. Organization (optional)
## Supporting Documents
Add links to 3-5 GitHub pull requests, in the Zephyr project, authored or
reviewed by the GitHub user that demonstrate the user's dedication to the
Zephyr project.
[TSC Project Roles]: <https://docs.zephyrproject.org/latest/project/project_roles.html>
[GitHub Permission Level]: <https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization>

View File

@@ -1,68 +0,0 @@
---
name: External Source Code
about: Submit a proposal to integrate external source code
title: ''
labels: TSC
assignees: ''
---
## Origin
Name of project hosting the original open source code
Provide a link to the source
## Purpose
Brief description of what this software does
## Mode of integration
Describe whether you'd like to integrate this external component in the main tree
or as a module, and why. If the mode of integration is a module, suggest a
repository name for the module
## Maintainership
List the person(s) that will be maintaining the integration of this external code
for the foreseeable future. Please use GitHub IDs to identify them. You can
choose to identify a single maintainer only or add collaborators as well
## Pull Request
Pull request (if any) with the actual implementation of the integration, be it
in the main tree or as a module (pointing to your own fork for now). Make sure
the PR is correctly labeled as "DNM"
## Description
Long description that will help reviewers discuss suitability of the
component to solve the problem at hand (there may be a better options
available.)
What is its primary functionality (e.g., SQLLite is a lightweight
database)?
What problem are you trying to solve? (e.g., a state store is
required to maintain ...)
Why is this the right component to solve it (e.g., SQLite is small,
easy to use, and has a very liberal license.)
## Dependencies
What other components does this package depend on?
Will the Zephyr project have a direct dependency on the component, or
will it be included via an abstraction layer with this component as a
replaceable implementation?
## Revision
Version or SHA you would like to integrate initially
## License
Please use an SPDX identifier (https://spdx.org/licenses/), such as
``BSD-3-Clause``

View File

@@ -1,41 +0,0 @@
---
name: Binary blobs
about: Submit a proposal to integrate binary blob(s)
title: ''
labels: TSC
assignees: ''
---
## Origin
Describe where the binary blob(s) originate from
## Type
- [ ] Precompiled library
- [ ] Firmware image
## Module
The Zephyr module that this blob(s) will be referenced from
## Purpose
Brief description of what the blob(s) do. It is especially important to describe
the functionality that the blob(s) provide, to the largest extent possible
## Pull Request
Link to the Pull request with the actual implementation of the integration. If
you are submitting this as part of a new module you may link to the same Pull
Request that introduced the new module.
## Dependencies
What other components do the blob(s) depend on, if any?
## License
Document the license the blob(s) are distributed under

22
.github/SECURITY.md vendored
View File

@@ -1,22 +0,0 @@
# Security Policy
## Supported versions
The Zephyr project supports the following versions with security
updates:
- The most recent release, and the release prior to that.
- Active LTS releases.
At this time, with the latest release of v3.3, the supported
versions are:
- v2.7: Current LTS
- v3.2: Prior release
- v3.3: Current release
## Reporting process
Please see our [Security Vulnerability
Reporting](https://docs.zephyrproject.org/latest/security/reporting.html)
page for details on the process.

View File

@@ -1,16 +0,0 @@
license:
main: apache-2.0
report_missing: true
category: Permissive
copyright:
check: true
exclude:
extensions:
- yml
- yaml
- html
- rst
- conf
- cfg
langs:
- HTML

View File

@@ -1,51 +0,0 @@
name: Pull Request Assigner
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
- ready_for_review
branches:
- main
- v*-branch
issues:
types:
- labeled
jobs:
assignment:
name: Pull Request Assignment
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- name: Install Python dependencies
run: |
sudo pip3 install -U setuptools wheel pip
pip3 install -U PyGithub>=1.55 west
- name: Check out source code
uses: actions/checkout@v3
- name: Run assignment script
env:
GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }}
run: |
FLAGS="-v"
FLAGS+=" -o ${{ github.event.repository.owner.login }}"
FLAGS+=" -r ${{ github.event.repository.name }}"
FLAGS+=" -M MAINTAINERS.yml"
if [ "${{ github.event_name }}" = "pull_request_target" ]; then
FLAGS+=" -P ${{ github.event.pull_request.number }}"
elif [ "${{ github.event_name }}" = "issues" ]; then
FLAGS+=" -I ${{ github.event.issue.number }}"
elif [ "${{ github.event_name }}" = "schedule" ]; then
FLAGS+=" --modules"
else
echo "Unknown event: ${{ github.event_name }}"
exit 1
fi
python3 scripts/set_assignees.py $FLAGS

View File

@@ -1,31 +0,0 @@
name: Backport
on:
pull_request_target:
types:
- closed
- labeled
branches:
- main
jobs:
backport:
name: Backport
runs-on: ubuntu-22.04
# Only react to merged PRs for security reasons.
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
if: >
github.event.pull_request.merged &&
(
github.event.action == 'closed' ||
(
github.event.action == 'labeled' &&
contains(github.event.label.name, 'backport')
)
)
steps:
- name: Backport
uses: zephyrproject-rtos/action-backport@v2.0.3-3
with:
github_token: ${{ secrets.ZB_GITHUB_TOKEN }}
issue_labels: Backport
labels_template: '["Backport"]'

View File

@@ -1,31 +0,0 @@
name: Backport Issue Check
on:
pull_request_target:
branches:
- v*-branch
jobs:
backport:
name: Backport Issue Check
runs-on: ubuntu-22.04
if: github.repository == 'zephyrproject-rtos/zephyr'
steps:
- name: Check out source code
uses: actions/checkout@v3
- name: Install Python dependencies
run: |
sudo pip3 install -U setuptools wheel pip
pip3 install -U pygithub
- name: Run backport issue checker
env:
GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }}
run: |
./scripts/release/list_backports.py \
-o ${{ github.event.repository.owner.login }} \
-r ${{ github.event.repository.name }} \
-b ${{ github.event.pull_request.base.ref }} \
-p ${{ github.event.pull_request.number }}

View File

@@ -1,99 +0,0 @@
# Copyright (c) 2023 Intel Corporation.
# SPDX-License-Identifier: Apache-2.0
name: Twister BlackBox TestSuite
on:
push:
branches:
- main
paths:
- 'scripts/pylib/twister/**'
- 'scripts/twister'
- 'scripts/tests/twister_blackbox/**'
- '.github/workflows/blackbox_tests.yml'
pull_request:
branches:
- main
paths:
- 'scripts/pylib/twister/**'
- 'scripts/twister'
- 'scripts/tests/twister_blackbox/**'
- '.github/workflows/blackbox_tests.yml'
jobs:
twister-tests:
name: Twister Black Box Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9, '3.10']
os: [ubuntu-22.04]
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.4
env:
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.1
steps:
- name: Apply Container Owner Mismatch Workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Checkout
uses: actions/checkout@v3
- name: Environment Setup
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
west init -l . || true
west config --global update.narrow true
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
west forall -c 'git reset --hard HEAD'
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Go Into Venv
shell: bash
run: |
python3 -m pip install --user virtualenv
python3 -m venv env
source env/bin/activate
echo "$(which python)"
- name: Install Packages
run: |
python3 -m pip install -U -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt -r scripts/requirements-run-test.txt
- name: Run Pytest For Twister Black Box Tests
shell: bash
env:
ZEPHYR_BASE: ./
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
run: |
echo "Run twister tests"
source zephyr-env.sh
PYTHONPATH="./scripts/tests" pytest ./scripts/tests/twister_blackbox
- name: Upload Unit Test Results
if: success() || failure()
uses: actions/upload-artifact@v2
with:
name: Black Box Test Results (Python ${{ matrix.python-version }})
path: |
twister-out*/twister.log
twister-out*/twister.json
twister-out*/testplan.log
retention-days: 14
- name: Clear Workspace
if: success() || failure()
run: |
rm -rf twister-out*/

View File

@@ -1,28 +0,0 @@
name: Publish BabbleSim Tests Results
on:
workflow_run:
workflows: ["BabbleSim Tests"]
types:
- completed
jobs:
bsim-test-results:
name: "Publish BabbleSim Test Results"
runs-on: ubuntu-22.04
if: github.event.workflow_run.conclusion != 'skipped'
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v2
with:
run_id: ${{ github.event.workflow_run.id }}
- name: Publish BabbleSim Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: BabbleSim Test Results
comment_mode: off
commit: ${{ github.event.workflow_run.head_sha }}
event_file: event/event.json
event_name: ${{ github.event.workflow_run.event }}
files: "bsim-test-results/**/bsim_results.xml"

View File

@@ -1,165 +0,0 @@
name: BabbleSim Tests
on:
pull_request:
paths:
- ".github/workflows/bsim-tests.yaml"
- ".github/workflows/bsim-tests-publish.yaml"
- "west.yml"
- "subsys/bluetooth/**"
- "tests/bsim/**"
- "samples/bluetooth/**"
- "boards/posix/**"
- "soc/posix/**"
- "arch/posix/**"
- "include/zephyr/arch/posix/**"
- "scripts/native_simulator/**"
- "samples/net/sockets/echo_*/**"
- "modules/openthread/**"
- "subsys/net/l2/openthread/**"
- "include/zephyr/net/openthread.h"
- "drivers/ieee802154/**"
- "include/zephyr/net/ieee802154*"
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
bsim-test:
if: github.repository_owner == 'zephyrproject-rtos'
runs-on: zephyr-runner-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.4
options: '--entrypoint /bin/bash'
volumes:
- /repo-cache/zephyrproject:/github/cache/zephyrproject
env:
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.1
BSIM_OUT_PATH: /opt/bsim/
BSIM_COMPONENTS_PATH: /opt/bsim/components
EDTT_PATH: ../tools/edtt
bsim_bluetooth_test_results_file: ./bsim_bluetooth/bsim_results.xml
bsim_networking_test_results_file: ./bsim_net/bsim_results.xml
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Clone cached Zephyr repository
continue-on-error: true
run: |
git clone --shared /github/cache/zephyrproject/zephyr .
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Environment Setup
env:
BASE_REF: ${{ github.base_ref }}
run: |
git config --global user.email "bot@zephyrproject.org"
git config --global user.name "Zephyr Bot"
rm -fr ".git/rebase-apply"
git rebase origin/${BASE_REF}
git log --pretty=oneline | head -n 10
west init -l . || true
west config manifest.group-filter -- +ci
west config --global update.narrow true
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
west forall -c 'git reset --hard HEAD'
- name: Check common triggering files
uses: tj-actions/changed-files@v35
id: check-common-files
with:
files: |
.github/workflows/bsim-tests.yaml
.github/workflows/bsim-tests-publish.yaml
west.yml
boards/posix/**
soc/posix/**
arch/posix/**
include/zephyr/arch/posix/**
scripts/native_simulator/**
tests/bsim/*
- name: Check if Bluethooth files changed
uses: tj-actions/changed-files@v35
id: check-bluetooth-files
with:
files: |
tests/bsim/bluetooth/**
samples/bluetooth/**
subsys/bluetooth/**
- name: Check if Networking files changed
uses: tj-actions/changed-files@v35
id: check-networking-files
with:
files: |
tests/bsim/net/**
samples/net/sockets/echo_*/**
modules/openthread/**
subsys/net/l2/openthread/**
include/zephyr/net/openthread.h
drivers/ieee802154/**
include/zephyr/net/ieee802154*
- name: Update BabbleSim to manifest revision
if: >
steps.check-bluetooth-files.outputs.any_changed == 'true'
|| steps.check-networking-files.outputs.any_changed == 'true'
|| steps.check-common-files.outputs.any_changed == 'true'
run: |
export BSIM_VERSION=$( west list bsim -f {revision} )
echo "Manifest points to bsim sha $BSIM_VERSION"
cd /opt/bsim_west/bsim
git fetch -n origin ${BSIM_VERSION}
git config --global advice.detachedHead false
git checkout ${BSIM_VERSION}
west update
make everything -s -j 8
- name: Run Bluetooth Tests with BSIM
if: steps.check-bluetooth-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
run: |
export ZEPHYR_BASE=${PWD}
WORK_DIR=${ZEPHYR_BASE}/bsim_bluetooth nice tests/bsim/bluetooth/compile.sh
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bluetooth_test_results_file} \
SEARCH_PATH=tests/bsim/bluetooth/ tests/bsim/run_parallel.sh
- name: Run Networking Tests with BSIM
if: steps.check-networking-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
run: |
export ZEPHYR_BASE=${PWD}
WORK_DIR=${ZEPHYR_BASE}/bsim_net nice tests/bsim/net/compile.sh
RESULTS_FILE=${ZEPHYR_BASE}/${bsim_networking_test_results_file} \
SEARCH_PATH=tests/bsim/net/ tests/bsim/run_parallel.sh
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: bsim-test-results
path: |
./bsim_bluetooth/bsim_results.xml
./bsim_net/bsim_results.xml
${{ github.event_path }}
if-no-files-found: warn
- name: Upload Event Details
if: always()
uses: actions/upload-artifact@v3
with:
name: event
path: |
${{ github.event_path }}

View File

@@ -1,67 +0,0 @@
# Copyright (c) 2021, 2022 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
# Make a snapshot of open bugs as a python pickle file, compressed
# using xz. Upload the xz file to Amazon S3.
name: Bug Snapshot
on:
workflow_dispatch:
branches: [main]
schedule:
# Run daily at 14:05
- cron: '5 14 * * *'
jobs:
make_bugs_pickle:
name: Make bugs pickle
runs-on: ubuntu-22.04
if: github.repository_owner == 'zephyrproject-rtos'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python dependencies
run: |
sudo pip3 install -U setuptools wheel pip
pip3 install -U pygithub
- name: Snapshot bugs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BUGS_PICKLE_FILENAME="zephyr-bugs-$(date -I).pickle.xz"
BUGS_PICKLE_PATH="${RUNNER_TEMP}/${BUGS_PICKLE_FILENAME}"
set -euo pipefail
python3 scripts/make_bugs_pickle.py | xz > ${BUGS_PICKLE_PATH}
echo "BUGS_PICKLE_FILENAME=${BUGS_PICKLE_FILENAME}" >> ${GITHUB_ENV}
echo "BUGS_PICKLE_PATH=${BUGS_PICKLE_PATH}" >> ${GITHUB_ENV}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ vars.AWS_BUILDS_ZEPHYR_BUG_SNAPSHOT_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_BUILDS_ZEPHYR_BUG_SNAPSHOT_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload to AWS S3
run: |
REPOSITORY_NAME="${GITHUB_REPOSITORY#*/}"
PUBLISH_BUCKET="builds.zephyrproject.org"
PUBLISH_DOMAIN="builds.zephyrproject.io"
if [ "${{github.event_name}}" = "schedule" ]; then
PUBLISH_ROOT="${REPOSITORY_NAME}/bug-snapshot/daily"
else
PUBLISH_ROOT="${REPOSITORY_NAME}/bug-snapshot"
fi
PUBLISH_UPLOAD_URI="s3://${PUBLISH_BUCKET}/${PUBLISH_ROOT}/${BUGS_PICKLE_FILENAME}"
PUBLISH_DOWNLOAD_URI="https://${PUBLISH_DOMAIN}/${PUBLISH_ROOT}/${BUGS_PICKLE_FILENAME}"
aws s3 cp --quiet ${BUGS_PICKLE_PATH} ${PUBLISH_UPLOAD_URI}
echo "Bug pickle is available at: ${PUBLISH_DOWNLOAD_URI}" >> ${GITHUB_STEP_SUMMARY}

View File

@@ -1,163 +0,0 @@
name: Build with Clang/LLVM
on: pull_request_target
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
clang-build:
if: github.repository_owner == 'zephyrproject-rtos'
runs-on: zephyr-runner-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.4
options: '--entrypoint /bin/bash'
volumes:
- /repo-cache/zephyrproject:/github/cache/zephyrproject
strategy:
fail-fast: false
matrix:
platform: ["native_posix"]
env:
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.1
LLVM_TOOLCHAIN_PATH: /usr/lib/llvm-16
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
BASE_REF: ${{ github.base_ref }}
outputs:
report_needed: ${{ steps.twister.outputs.report_needed }}
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Clone cached Zephyr repository
continue-on-error: true
run: |
git clone --shared /github/cache/zephyrproject/zephyr .
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: Environment Setup
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
git config --global user.email "bot@zephyrproject.org"
git config --global user.name "Zephyr Bot"
rm -fr ".git/rebase-apply"
git rebase origin/${BASE_REF}
git log --pretty=oneline | head -n 10
west init -l . || true
west config --global update.narrow true
# In some cases modules are left in a state where they can't be
# updated (i.e. when we cancel a job and the builder is killed),
# So first retry to update, if that does not work, remove all modules
# and start over. (Workaround until we implement more robust module
# west caching).
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west2.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
- name: Check Environment
run: |
cmake --version
${LLVM_TOOLCHAIN_PATH}/bin/clang --version
gcc --version
ls -la
- name: Prepare ccache timestamp/data
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
string(REPLACE "/" "_" repo ${{github.repository}})
string(REPLACE "-" "_" repo2 ${repo})
file(APPEND $ENV{GITHUB_OUTPUT} "repo=${repo2}\n")
- name: use cache
id: cache-ccache
uses: zephyrproject-rtos/action-s3-cache@v1.2.0
with:
key: ${{ steps.ccache_cache_timestamp.outputs.repo }}-${{ github.ref_name }}-clang-${{ matrix.platform }}-ccache
path: /github/home/.cache/ccache
aws-s3-bucket: ccache.zephyrproject.org
aws-access-key-id: ${{ vars.AWS_CCACHE_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_CCACHE_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: ccache stats initial
run: |
mkdir -p /github/home/.cache
test -d github/home/.cache/ccache && rm -rf /github/home/.cache/ccache && mv github/home/.cache/ccache /github/home/.cache/ccache
ccache -M 10G -s
- name: Run Tests with Twister
id: twister
run: |
export ZEPHYR_BASE=${PWD}
export ZEPHYR_TOOLCHAIN_VARIANT=llvm
# check if we need to run a full twister or not based on files changed
python3 ./scripts/ci/test_plan.py --platform ${{ matrix.platform }} -c origin/${BASE_REF}..
# We can limit scope to just what has changed
if [ -s testplan.json ]; then
echo "report_needed=1" >> $GITHUB_OUTPUT
# Full twister but with options based on changes
./scripts/twister --force-color --inline-logs -M -N -v --load-tests testplan.json --retry-failed 2
else
# if nothing is run, skip reporting step
echo "report_needed=0" >> $GITHUB_OUTPUT
fi
- name: ccache stats post
run: |
ccache -s
ccache -p
- name: Upload Unit Test Results
if: always() && steps.twister.outputs.report_needed != 0
uses: actions/upload-artifact@v3
with:
name: Unit Test Results (Subset ${{ matrix.platform }})
path: twister-out/twister.xml
clang-build-results:
name: "Publish Unit Tests Results"
needs: clang-build
runs-on: ubuntu-22.04
if: (success() || failure() ) && needs.clang-build.outputs.report_needed != 0
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Merge Test Results
run: |
pip3 install junitparser junit2html
junitparser merge artifacts/*/twister.xml junit.xml
junit2html junit.xml junit-clang.html
- name: Upload Unit Test Results in HTML
if: always()
uses: actions/upload-artifact@v3
with:
name: HTML Unit Test Results
if-no-files-found: ignore
path: |
junit-clang.html
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: Unit Test Results
files: "**/twister.xml"
comment_mode: off

View File

@@ -1,176 +0,0 @@
name: Code Coverage with codecov
on:
schedule:
- cron: '25 */3 * * 1-5'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
codecov:
if: github.repository == 'zephyrproject-rtos/zephyr'
runs-on: zephyr-runner-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.4
options: '--entrypoint /bin/bash'
volumes:
- /repo-cache/zephyrproject:/github/cache/zephyrproject
strategy:
fail-fast: false
matrix:
platform: ["native_posix", "qemu_x86", "unit_testing"]
env:
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.1
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Update PATH for west
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Clone cached Zephyr repository
continue-on-error: true
run: |
git clone --shared /github/cache/zephyrproject/zephyr .
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: west setup
run: |
west init -l . || true
west update 1> west.update.log || west update 1> west.update-2.log
- name: Check Environment
run: |
cmake --version
gcc --version
ls -la
- name: Prepare ccache keys
id: ccache_cache_prop
shell: cmake -P {0}
run: |
string(REPLACE "/" "_" repo ${{github.repository}})
string(REPLACE "-" "_" repo2 ${repo})
file(APPEND $ENV{GITHUB_OUTPUT} "repo=${repo2}\n")
- name: use cache
id: cache-ccache
uses: zephyrproject-rtos/action-s3-cache@v1.2.0
with:
key: ${{ steps.ccache_cache_prop.outputs.repo }}-${{github.event_name}}-${{matrix.platform}}-codecov-ccache
path: /github/home/.cache/ccache
aws-s3-bucket: ccache.zephyrproject.org
aws-access-key-id: ${{ vars.AWS_CCACHE_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_CCACHE_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: ccache stats initial
run: |
mkdir -p /github/home/.cache
test -d github/home/.cache/ccache && mv github/home/.cache/ccache /github/home/.cache/ccache
ccache -M 10G -s
- name: Run Tests with Twister (Push)
continue-on-error: true
run: |
export ZEPHYR_BASE=${PWD}
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
mkdir -p coverage/reports
./scripts/twister --force-color -N -v --filter runnable -p ${{ matrix.platform }} --coverage -T tests
- name: Generate Coverage Report
run: |
mv twister-out/coverage.info lcov.pre.info
lcov -q --remove lcov.pre.info mylib.c --remove lcov.pre.info tests/\* \
--remove lcov.pre.info samples/\* --remove lcov.pre.info ext/\* \
--remove lcov.pre.info *generated* \
-o coverage/reports/${{ matrix.platform }}.info --rc lcov_branch_coverage=1
- name: ccache stats post
run: |
ccache -s
ccache -p
- name: Upload Coverage Results
if: always()
uses: actions/upload-artifact@v3
with:
name: Coverage Data (Subset ${{ matrix.platform }})
path: coverage/reports/${{ matrix.platform }}.info
codecov-results:
name: "Publish Coverage Results"
needs: codecov
runs-on: ubuntu-22.04
# the codecov job might be skipped, we don't need to run this job then
if: success() || failure()
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: coverage/reports
- name: Move coverage files
run: |
mv ./coverage/reports/*/*.info ./coverage/reports
ls -la ./coverage/reports
- name: Generate list of coverage files
id: get-coverage-files
shell: cmake -P {0}
run: |
file(GLOB INPUT_FILES_LIST "coverage/reports/*.info")
set(MERGELIST "")
set(FILELIST "")
foreach(ITEM ${INPUT_FILES_LIST})
get_filename_component(f ${ITEM} NAME)
if(FILELIST STREQUAL "")
set(FILELIST "${f}")
else()
set(FILELIST "${FILELIST},${f}")
endif()
endforeach()
foreach(ITEM ${INPUT_FILES_LIST})
get_filename_component(f ${ITEM} NAME)
if(MERGELIST STREQUAL "")
set(MERGELIST "-a ${f}")
else()
set(MERGELIST "${MERGELIST} -a ${f}")
endif()
endforeach()
file(APPEND $ENV{GITHUB_OUTPUT} "mergefiles=${MERGELIST}\n")
file(APPEND $ENV{GITHUB_OUTPUT} "covfiles=${FILELIST}\n")
- name: Merge coverage files
run: |
sudo apt-get update
sudo apt-get install -y lcov
cd ./coverage/reports
lcov ${{ steps.get-coverage-files.outputs.mergefiles }} -o merged.info --rc lcov_branch_coverage=1
- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v3
with:
directory: ./coverage/reports
env_vars: OS,PYTHON
fail_ci_if_error: false
verbose: true
files: merged.info

View File

@@ -1,59 +0,0 @@
name: Coding Guidelines
on: pull_request
jobs:
compliance_job:
runs-on: ubuntu-22.04
name: Run coding guidelines checks on patch series (PR)
steps:
- name: Checkout the code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-doc-pip
- name: Install python dependencies
run: |
pip3 install unidiff
pip3 install wheel
pip3 install sh
- name: Install Packages
run: |
sudo apt-get update
sudo apt-get install coccinelle
- name: Run Coding Guildeines Checks
continue-on-error: true
id: coding_guidelines
env:
BASE_REF: ${{ github.base_ref }}
run: |
export ZEPHYR_BASE=$PWD
git config --global user.email "actions@zephyrproject.org"
git config --global user.name "Github Actions"
git remote -v
git rebase origin/${BASE_REF}
source zephyr-env.sh
# debug
ls -la
git log --pretty=oneline | head -n 10
./scripts/ci/guideline_check.py --output output.txt -c origin/${BASE_REF}..
- name: check-warns
run: |
if [[ -s "output.txt" ]]; then
errors=$(cat output.txt)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=output.txt::$errors"
exit 1;
fi

View File

@@ -1,90 +0,0 @@
name: Compliance Checks
on: pull_request
jobs:
check_compliance:
runs-on: ubuntu-22.04
name: Run compliance checks on patch series (PR)
steps:
- name: Update PATH for west
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Checkout the code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-doc-pip
- name: Install python dependencies
run: |
pip3 install setuptools
pip3 install wheel
pip3 install python-magic lxml junitparser gitlint pylint pykwalify yamllint
pip3 install west
- name: west setup
env:
BASE_REF: ${{ github.base_ref }}
run: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git remote -v
# Ensure there's no merge commits in the PR
[[ "$(git rev-list --merges --count origin/${BASE_REF}..)" == "0" ]] || \
(echo "::error ::Merge commits not allowed, rebase instead";false)
git rebase origin/${BASE_REF}
# debug
git log --pretty=oneline | head -n 10
west init -l . || true
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update2.log
- name: Run Compliance Tests
continue-on-error: true
id: compliance
env:
BASE_REF: ${{ github.base_ref }}
run: |
export ZEPHYR_BASE=$PWD
# debug
ls -la
git log --pretty=oneline | head -n 10
./scripts/ci/check_compliance.py --annotate -e KconfigBasic \
-c origin/${BASE_REF}..
- name: upload-results
uses: actions/upload-artifact@v3
continue-on-error: true
with:
name: compliance.xml
path: compliance.xml
- name: check-warns
run: |
if [[ ! -s "compliance.xml" ]]; then
exit 1;
fi
files=($(./scripts/ci/check_compliance.py -l))
for file in "${files[@]}"; do
f="${file}.txt"
if [[ -s $f ]]; then
errors=$(cat $f)
errors="${errors//'%'/'%25'}"
errors="${errors//$'\n'/'%0A'}"
errors="${errors//$'\r'/'%0D'}"
echo "::error file=${f}::$errors"
exit=1
fi
done
if [ "${exit}" == "1" ]; then
exit 1;
fi

View File

@@ -1,38 +0,0 @@
# Copyright (c) 2020 Intel Corp.
# SPDX-License-Identifier: Apache-2.0
name: Publish commit for daily testing
on:
schedule:
- cron: '50 22 * * *'
push:
branches:
- refs/tags/*
jobs:
get_version:
runs-on: ubuntu-22.04
if: github.repository == 'zephyrproject-rtos/zephyr'
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ vars.AWS_TESTING_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TESTING_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: install-pip
run: |
pip3 install gitpython
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Upload to AWS S3
run: |
python3 scripts/ci/version_mgr.py --update .
aws s3 cp versions.json s3://testing.zephyrproject.org/daily_tests/versions.json

View File

@@ -1,75 +0,0 @@
# Copyright (c) 2020 Linaro Limited.
# Copyright (c) 2020 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
name: Devicetree script tests
on:
push:
branches:
- main
- v*-branch
paths:
- 'scripts/dts/**'
- '.github/workflows/devicetree_checks.yml'
pull_request:
branches:
- main
- v*-branch
paths:
- 'scripts/dts/**'
- '.github/workflows/devicetree_checks.yml'
jobs:
devicetree-checks:
name: Devicetree script tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9, '3.10']
os: [ubuntu-22.04, macos-11, windows-2022]
exclude:
- os: macos-11
python-version: 3.6
- os: windows-2022
python-version: 3.6
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: cache-pip-linux
if: startsWith(runner.os, 'Linux')
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: cache-pip-mac
if: startsWith(runner.os, 'macOS')
uses: actions/cache@v3
with:
path: ~/Library/Caches/pip
# Trailing '-' was just to get a different cache name
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: cache-pip-win
if: startsWith(runner.os, 'Windows')
uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: install python dependencies
run: |
pip3 install wheel
pip3 install pytest pyyaml tox
- name: run tox
working-directory: scripts/dts/python-devicetree
run: |
tox

View File

@@ -1,18 +0,0 @@
name: Do Not Merge
on:
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled]
jobs:
do-not-merge:
if: ${{ contains(github.event.*.labels.*.name, 'DNM') ||
contains(github.event.*.labels.*.name, 'TSC') }}
name: Prevent Merging
runs-on: ubuntu-22.04
steps:
- name: Check for label
run: |
echo "Pull request is labeled as 'DNM' or 'TSC'"
echo "This workflow fails so that the pull request cannot be merged"
exit 1

View File

@@ -1,179 +0,0 @@
# Copyright (c) 2020 Linaro Limited.
# SPDX-License-Identifier: Apache-2.0
name: Documentation Build
on:
schedule:
- cron: '0 */3 * * *'
push:
tags:
- v*
pull_request:
paths:
- 'doc/**'
- '**.rst'
- 'include/**'
- 'kernel/include/kernel_arch_interface.h'
- 'lib/libc/**'
- 'subsys/testsuite/ztest/include/**'
- 'tests/**'
- '**/Kconfig*'
- 'west.yml'
- '.github/workflows/doc-build.yml'
- 'scripts/dts/**'
- 'doc/requirements.txt'
env:
# NOTE: west docstrings will be extracted from the version listed here
WEST_VERSION: 1.0.0
# The latest CMake available directly with apt is 3.18, but we need >=3.20
# so we fetch that through pip.
CMAKE_VERSION: 3.20.5
DOXYGEN_VERSION: 1.9.6
jobs:
doc-build-html:
name: "Documentation Build (HTML)"
runs-on: zephyr-runner-linux-x64-4xlarge
timeout-minutes: 45
concurrency:
group: doc-build-html-${{ github.ref }}
cancel-in-progress: true
steps:
- name: checkout
uses: actions/checkout@v3
- name: install-pkgs
run: |
sudo apt-get update
sudo apt-get install -y ninja-build graphviz
wget --no-verbose "https://github.com/doxygen/doxygen/releases/download/Release_${DOXYGEN_VERSION//./_}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz"
tar xf doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz
echo "${PWD}/doxygen-${DOXYGEN_VERSION}/bin" >> $GITHUB_PATH
- name: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('doc/requirements.txt') }}
- name: install-pip
run: |
sudo pip3 install -U setuptools wheel pip
pip3 install -r doc/requirements.txt
pip3 install west==${WEST_VERSION}
pip3 install cmake==${CMAKE_VERSION}
- name: west setup
run: |
west init -l .
- name: build-docs
shell: bash
run: |
if [[ "$GITHUB_REF" =~ "refs/tags/v" ]]; then
DOC_TAG="release"
else
DOC_TAG="development"
fi
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
DOC_TARGET="html-fast"
else
DOC_TARGET="html"
fi
DOC_TAG=${DOC_TAG} SPHINXOPTS_EXTRA="-q -t publish" make -C doc ${DOC_TARGET}
- name: compress-docs
run: |
tar cfJ html-output.tar.xz --directory=doc/_build html
- name: upload-build
uses: actions/upload-artifact@v3
with:
name: html-output
path: html-output.tar.xz
- name: process-pr
if: github.event_name == 'pull_request'
run: |
REPO_NAME="${{ github.event.repository.name }}"
PR_NUM="${{ github.event.pull_request.number }}"
DOC_URL="https://builds.zephyrproject.io/${REPO_NAME}/pr/${PR_NUM}/docs/"
echo "${PR_NUM}" > pr_num
echo "Documentation will be available shortly at: ${DOC_URL}" >> $GITHUB_STEP_SUMMARY
- name: upload-pr-number
uses: actions/upload-artifact@v3
if: github.event_name == 'pull_request'
with:
name: pr_num
path: pr_num
doc-build-pdf:
name: "Documentation Build (PDF)"
if: github.event_name != 'pull_request'
runs-on: zephyr-runner-linux-x64-4xlarge
container: texlive/texlive:latest
timeout-minutes: 60
concurrency:
group: doc-build-pdf-${{ github.ref }}
cancel-in-progress: true
steps:
- name: checkout
uses: actions/checkout@v3
- name: install-pkgs
run: |
apt-get update
apt-get install -y python3-pip python3-venv ninja-build doxygen graphviz librsvg2-bin
- name: cache-pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('doc/requirements.txt') }}
- name: setup-venv
run: |
python3 -m venv .venv
. .venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: install-pip
run: |
pip3 install -U setuptools wheel pip
pip3 install -r doc/requirements.txt
pip3 install west==${WEST_VERSION}
pip3 install cmake==${CMAKE_VERSION}
- name: west setup
run: |
west init -l .
- name: build-docs
shell: bash
continue-on-error: true
run: |
if [[ "$GITHUB_REF" =~ "refs/tags/v" ]]; then
DOC_TAG="release"
else
DOC_TAG="development"
fi
DOC_TAG=${DOC_TAG} SPHINXOPTS="-q -j auto" LATEXMKOPTS="-quiet -halt-on-error" make -C doc pdf
- name: upload-build
if: always()
uses: actions/upload-artifact@v3
with:
name: pdf-output
if-no-files-found: ignore
path: |
doc/_build/latex/zephyr.pdf
doc/_build/latex/zephyr.log

View File

@@ -1,63 +0,0 @@
# Copyright (c) 2020 Linaro Limited.
# Copyright (c) 2021 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
name: Documentation Publish (Pull Request)
on:
workflow_run:
workflows: ["Documentation Build"]
types:
- completed
jobs:
doc-publish:
name: Publish Documentation
runs-on: ubuntu-22.04
if: |
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' &&
github.repository == 'zephyrproject-rtos/zephyr'
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v2
with:
workflow: doc-build.yml
run_id: ${{ github.event.workflow_run.id }}
- name: Load PR number
run: |
echo "PR_NUM=$(<pr_num/pr_num)" >> $GITHUB_ENV
- name: Check PR number
id: check-pr
uses: carpentries/actions/check-valid-pr@v0.14.0
with:
pr: ${{ env.PR_NUM }}
sha: ${{ github.event.workflow_run.head_sha }}
- name: Validate PR number
if: steps.check-pr.outputs.VALID != 'true'
run: |
echo "ABORT: PR number validation failed!"
exit 1
- name: Uncompress HTML docs
run: |
tar xf html-output/html-output.tar.xz -C html-output
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ vars.AWS_BUILDS_ZEPHYR_PR_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_BUILDS_ZEPHYR_PR_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload to AWS S3
env:
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
run: |
aws s3 sync --quiet html-output/html \
s3://builds.zephyrproject.org/${{ github.event.repository.name }}/pr/${PR_NUM}/docs \
--delete

View File

@@ -1,55 +0,0 @@
# Copyright (c) 2020 Linaro Limited.
# Copyright (c) 2021 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
name: Documentation Publish
on:
workflow_run:
workflows: ["Documentation Build"]
branches:
- main
- v*
types:
- completed
jobs:
doc-publish:
name: Publish Documentation
runs-on: ubuntu-22.04
if: |
github.event.workflow_run.event != 'pull_request' &&
github.event.workflow_run.conclusion == 'success' &&
github.repository == 'zephyrproject-rtos/zephyr'
steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v2
with:
workflow: doc-build.yml
run_id: ${{ github.event.workflow_run.id }}
- name: Uncompress HTML docs
run: |
tar xf html-output/html-output.tar.xz -C html-output
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ vars.AWS_DOCS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_DOCS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Upload to AWS S3
env:
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
run: |
if [ "${HEAD_BRANCH:0:1}" == "v" ]; then
VERSION=${HEAD_BRANCH:1}
else
VERSION="latest"
fi
aws s3 sync --quiet html-output/html s3://docs.zephyrproject.org/${VERSION} --delete
aws s3 sync --quiet html-output/html/doxygen/html s3://docs.zephyrproject.org/apidoc/${VERSION} --delete
aws s3 cp --quiet pdf-output/zephyr.pdf s3://docs.zephyrproject.org/${VERSION}/zephyr.pdf

View File

@@ -1,32 +0,0 @@
name: Error numbers
on:
pull_request:
paths:
- '.github/workflows/errno.yml'
- 'lib/libc/minimal/include/errno.h'
- 'scripts/ci/errno.py'
jobs:
check-errno:
runs-on: ubuntu-22.04
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.4
env:
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.1
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: checkout
uses: actions/checkout@v3
- name: Run errno.py
run: |
export ZEPHYR_BASE=${PWD}
./scripts/ci/errno.py

View File

@@ -1,85 +0,0 @@
name: Footprint Tracking
# Run every 12 hours and on tags
on:
schedule:
- cron: '50 1/12 * * *'
push:
paths:
- 'VERSION'
- '.github/workflows/footprint-tracking.yml'
branches:
- main
- v*-branch
tags:
# only publish v* tags, do not care about zephyr-v* which point to the
# same commit
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
footprint-tracking:
runs-on: ubuntu-22.04
if: github.repository_owner == 'zephyrproject-rtos'
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.4
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
env:
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.1
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Update PATH for west
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y python3-venv
sudo pip3 install -U setuptools wheel pip gitpython
- name: checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: west setup
run: |
west init -l . || true
west config --global update.narrow true
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update2.log
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ vars.AWS_TESTING_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TESTING_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Record Footprint
env:
BASE_REF: ${{ github.base_ref }}
run: |
export ZEPHYR_BASE=${PWD}
./scripts/footprint/track.py -p scripts/footprint/plan.txt
- name: Upload footprint data
run: |
python3 -m venv .venv
. .venv/bin/activate
pip3 install awscli
aws s3 sync --quiet footprint_data/ s3://testing.zephyrproject.org/footprint_data/

View File

@@ -1,71 +0,0 @@
name: Footprint Delta
on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
footprint-delta:
runs-on: ubuntu-22.04
if: github.repository == 'zephyrproject-rtos/zephyr'
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.4
options: '--entrypoint /bin/bash'
strategy:
fail-fast: false
env:
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.1
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Update PATH for west
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: west setup
run: |
west init -l . || true
west config --global update.narrow true
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update.log
- name: Detect Changes in Footprint
env:
BASE_REF: ${{ github.base_ref }}
run: |
export ZEPHYR_BASE=${PWD}
git config --global user.email "actions@zephyrproject.org"
git config --global user.name "Github Actions"
git remote -v
git rebase origin/${BASE_REF}
git checkout -b this_pr
west update
west build -b frdm_k64f tests/benchmarks/footprints -t ram_report
cp build/ram.json ram2.json
west build -b frdm_k64f tests/benchmarks/footprints -t rom_report
cp build/rom.json rom2.json
git checkout origin/${BASE_REF}
west update
west build -p always -b frdm_k64f tests/benchmarks/footprints -t ram_report
west build -b frdm_k64f tests/benchmarks/footprints -t rom_report
cp build/ram.json ram1.json
cp build/rom.json rom1.json
git checkout this_pr
./scripts/footprint/fpdiff.py ram1.json ram2.json
./scripts/footprint/fpdiff.py rom1.json rom2.json

View File

@@ -1,52 +0,0 @@
name: Greet first time contributor
on:
issues:
types: [opened]
pull_request_target:
types: [opened, closed]
jobs:
check_for_first_interaction:
runs-on: ubuntu-22.04
if: github.repository == 'zephyrproject-rtos/zephyr'
steps:
- uses: actions/checkout@v3
- uses: zephyrproject-rtos/action-first-interaction@v1.1.1-zephyr-4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: >
Hi @${{github.event.issue.user.login}}! We appreciate you submitting your first issue
for our open-source project. 🌟
Even though I'm a bot, I can assure you that the whole community is genuinely grateful
for your time and effort. 🤖💙
pr-opened-message: >
Hello @${{ github.event.pull_request.user.login }}, and thank you very much for your
first pull request to the Zephyr project!
A project maintainer just triggered our CI pipeline to run it against your PR and
ensure it's compliant and doesn't cause any issues. You might want to take this
opportunity to review the project's [Contributor
Expectations](https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html)
and make any updates to your pull request if necessary. 😊
pr-merged-message: >
Hi @${{ github.event.pull_request.user.login }}!
Congratulations on getting your very first Zephyr pull request merged 🎉🥳. This is a
fantastic achievement, and we're thrilled to have you as part of our community!
To celebrate this milestone and showcase your contribution, we'd love to award you the
Zephyr Technical Contributor badge. If you're interested, please claim your badge by
filling out this form: [Claim Your Zephyr Badge](https://forms.gle/oCw9iAPLhUsHTapc8).
Thank you for your valuable input, and we look forward to seeing more of your
contributions in the future! 🪁

View File

@@ -1,54 +0,0 @@
name: Issue Tracker
on:
schedule:
- cron: '*/10 * * * *'
env:
OUTPUT_FILE_NAME: IssuesReport.md
COMMITTER_EMAIL: actions@github.com
COMMITTER_NAME: github-actions
COMMITTER_USERNAME: github-actions
jobs:
track-issues:
name: "Collect Issue Stats"
runs-on: ubuntu-22.04
if: github.repository == 'zephyrproject-rtos/zephyr'
steps:
- name: Download configuration file
run: |
wget -q https://raw.githubusercontent.com/$GITHUB_REPOSITORY/main/.github/workflows/issues-report-config.json
- name: install-packages
run: |
sudo apt-get update
sudo apt-get install discount
- uses: brcrista/summarize-issues@v3
with:
title: 'Issues Report for ${{ github.repository }}'
configPath: 'issues-report-config.json'
outputPath: ${{ env.OUTPUT_FILE_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: upload-stats
uses: actions/upload-artifact@v3
continue-on-error: true
with:
name: ${{ env.OUTPUT_FILE_NAME }}
path: ${{ env.OUTPUT_FILE_NAME }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ vars.AWS_TESTING_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TESTING_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Post Results
run: |
mkd2html IssuesReport.md IssuesReport.html
aws s3 cp --quiet IssuesReport.html s3://testing.zephyrproject.org/issues/$GITHUB_REPOSITORY/index.html

View File

@@ -1,37 +0,0 @@
[
{
"section": "High Priority Bugs",
"labels": ["bug", "priority: high"],
"threshold": 0
},
{
"section": "Medium Priority Bugs",
"labels": ["bug", "priority: medium"],
"threshold": 20
},
{
"section": "Low Priority Bugs",
"labels": ["bug", "priority: low"],
"threshold": 100
},
{
"section": "Enhancements",
"labels": ["Enhancement"],
"threshold": 500
},
{
"section": "Features",
"labels": ["Feature"],
"threshold": 100
},
{
"section": "Questions",
"labels": ["question"],
"threshold": 100
},
{
"section": "Static Analysis",
"labels": ["Coverity"],
"threshold": 100
}
]

View File

@@ -1,32 +0,0 @@
name: Scancode
on: [pull_request]
jobs:
scancode_job:
runs-on: ubuntu-22.04
name: Scan code for licenses
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Scan the code
id: scancode
uses: zephyrproject-rtos/action_scancode@v4
with:
directory-to-scan: 'scan/'
- name: Artifact Upload
uses: actions/upload-artifact@v3
with:
name: scancode
path: ./artifacts
- name: Verify
run: |
if [ -s ./artifacts/report.txt ]; then
report=$(cat ./artifacts/report.txt)
report="${report//'%'/'%25'}"
report="${report//$'\n'/'%0A'}"
report="${report//$'\r'/'%0D'}"
echo "::error file=./artifacts/report.txt::$report"
exit 1
fi

View File

@@ -1,38 +0,0 @@
name: Manifest
on:
pull_request_target:
jobs:
contribs:
runs-on: ubuntu-22.04
name: Manifest
steps:
- name: Checkout the code
uses: actions/checkout@v3
with:
path: zephyrproject/zephyr
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: west setup
env:
BASE_REF: ${{ github.base_ref }}
working-directory: zephyrproject/zephyr
run: |
pip3 install west
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
west init -l . || true
- name: Manifest
uses: zephyrproject-rtos/action-manifest@f223dce288b0d8f30bfd57eb2b14b18c230a7d8b
with:
github-token: ${{ secrets.ZB_GITHUB_TOKEN }}
manifest-path: 'west.yml'
checkout-path: 'zephyrproject/zephyr'
use-tree-checkout: 'true'
label-prefix: 'manifest-'
verbosity-level: '1'
labels: 'manifest'
dnm-labels: 'DNM'

View File

@@ -1,60 +0,0 @@
name: Create a Release
on:
push:
tags:
- 'v*'
- '!v*rc*'
jobs:
release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get the version
id: get_version
run: |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
echo "TRIMMED_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1
with:
args: spdx -o zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
- name: upload-results
uses: actions/upload-artifact@v3
continue-on-error: true
with:
name: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
path: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
- name: Create empty release notes body
run: |
echo "TODO: add release overview and notes link" > release-notes.txt
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Zephyr ${{ steps.get_version.outputs.TRIMMED_VERSION }}
body_path: release-notes.txt
draft: true
prerelease: true
- name: Upload Release Assets
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
asset_name: zephyr-${{ steps.get_version.outputs.VERSION }}.spdx
asset_content_type: text/plain

View File

@@ -1,71 +0,0 @@
# Copyright 2023 Google LLC
# SPDX-License-Identifier: Apache-2.0
name: Scripts tests
on:
push:
branches:
- main
- v*-branch
paths:
- 'scripts/build/**'
- '.github/workflows/scripts_tests.yml'
pull_request:
branches:
- main
- v*-branch
paths:
- 'scripts/build/**'
- '.github/workflows/scripts_tests.yml'
jobs:
scripts-tests:
name: Scripts tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9, '3.10']
os: [ubuntu-20.04]
steps:
- name: checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Rebase
continue-on-error: true
env:
BASE_REF: ${{ github.base_ref }}
PR_HEAD: ${{ github.event.pull_request.head.sha }}
run: |
git config --global user.email "actions@zephyrproject.org"
git config --global user.name "Github Actions"
git rebase origin/${BASE_REF}
git log --graph --oneline HEAD...${PR_HEAD}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: cache-pip-linux
if: startsWith(runner.os, 'Linux')
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: install-packages
run: |
pip3 install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt
- name: Run pytest
env:
ZEPHYR_BASE: ./
run: |
echo "Run script tests"
pytest ./scripts/build

View File

@@ -1,28 +0,0 @@
name: Stale Workflow Queue Cleanup
on:
workflow_dispatch:
branches: [main]
schedule:
# everyday at 15:00
- cron: '0 15 * * *'
concurrency:
group: stale-workflow-queue-cleanup
cancel-in-progress: true
jobs:
cleanup:
name: Cleanup
runs-on: ubuntu-22.04
steps:
- name: Delete stale queued workflow runs
uses: MajorScruffy/delete-old-workflow-runs@v0.3.0
with:
repository: ${{ github.repository }}
# Remove any workflow runs in "queued" state for more than 1 day
older-than-seconds: 86400
status: queued
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,28 +0,0 @@
name: "Close stale pull requests/issues"
on:
schedule:
- cron: "16 00 * * *"
jobs:
stale:
name: Find Stale issues and PRs
runs-on: ubuntu-22.04
if: github.repository == 'zephyrproject-rtos/zephyr'
steps:
- uses: actions/stale@v8
with:
stale-pr-message: 'This pull request has been marked as stale because it has been open (more
than) 60 days with no activity. Remove the stale label or add a comment saying that you
would like to have the label removed otherwise this pull request will automatically be
closed in 14 days. Note, that you can always re-open a closed pull request at any time.'
stale-issue-message: 'This issue has been marked as stale because it has been open (more
than) 60 days with no activity. Remove the stale label or add a comment saying that you
would like to have the label removed otherwise this issue will automatically be closed in
14 days. Note, that you can always re-open a closed issue at any time.'
days-before-stale: 60
days-before-close: 14
stale-issue-label: 'Stale'
stale-pr-label: 'Stale'
exempt-pr-labels: 'Blocked,In progress'
exempt-issue-labels: 'In progress,Enhancement,Feature,Feature Request,RFC,Meta,Process'
operations-per-run: 400

View File

@@ -1,331 +0,0 @@
name: Run tests with twister
on:
push:
branches:
- main
- v*-branch
pull_request_target:
branches:
- main
- v*-branch
schedule:
# Run at 03:00 UTC on every Sunday
- cron: '0 3 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
twister-build-prep:
if: github.repository_owner == 'zephyrproject-rtos'
runs-on: zephyr-runner-linux-x64-4xlarge
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.4
options: '--entrypoint /bin/bash'
volumes:
- /repo-cache/zephyrproject:/github/cache/zephyrproject
outputs:
subset: ${{ steps.output-services.outputs.subset }}
size: ${{ steps.output-services.outputs.size }}
fullrun: ${{ steps.output-services.outputs.fullrun }}
env:
MATRIX_SIZE: 10
PUSH_MATRIX_SIZE: 15
DAILY_MATRIX_SIZE: 80
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.1
BSIM_OUT_PATH: /opt/bsim/
BSIM_COMPONENTS_PATH: /opt/bsim/components
TESTS_PER_BUILDER: 700
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
BASE_REF: ${{ github.base_ref }}
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Clone cached Zephyr repository
if: github.event_name == 'pull_request_target'
continue-on-error: true
run: |
git clone --shared /github/cache/zephyrproject/zephyr .
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
- name: Checkout
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: Environment Setup
if: github.event_name == 'pull_request_target'
run: |
git config --global user.email "bot@zephyrproject.org"
git config --global user.name "Zephyr Bot"
rm -fr ".git/rebase-apply"
git rebase origin/${BASE_REF}
git log --pretty=oneline | head -n 10
west init -l . || true
west config manifest.group-filter -- +ci
west config --global update.narrow true
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
west forall -c 'git reset --hard HEAD'
- name: Generate Test Plan with Twister
if: github.event_name == 'pull_request_target'
id: test-plan
run: |
export ZEPHYR_BASE=${PWD}
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request -t $TESTS_PER_BUILDER
if [ -s .testplan ]; then
cat .testplan >> $GITHUB_ENV
else
echo "TWISTER_NODES=${MATRIX_SIZE}" >> $GITHUB_ENV
fi
rm -f testplan.json .testplan
- name: Determine matrix size
id: output-services
run: |
if [ "${{github.event_name}}" = "pull_request_target" ]; then
if [ -n "${TWISTER_NODES}" ]; then
subset="[$(seq -s',' 1 ${TWISTER_NODES})]"
else
subset="[$(seq -s',' 1 ${MATRIX_SIZE})]"
fi
size=${TWISTER_NODES}
elif [ "${{github.event_name}}" = "push" ]; then
subset="[$(seq -s',' 1 ${PUSH_MATRIX_SIZE})]"
size=${MATRIX_SIZE}
elif [ "${{github.event_name}}" = "schedule" -a "${{github.repository}}" = "zephyrproject-rtos/zephyr" ]; then
subset="[$(seq -s',' 1 ${DAILY_MATRIX_SIZE})]"
size=${DAILY_MATRIX_SIZE}
else
size=0
fi
echo "subset=${subset}" >> $GITHUB_OUTPUT
echo "size=${size}" >> $GITHUB_OUTPUT
echo "fullrun=${TWISTER_FULL}" >> $GITHUB_OUTPUT
twister-build:
runs-on: zephyr-runner-linux-x64-4xlarge
needs: twister-build-prep
if: needs.twister-build-prep.outputs.size != 0
container:
image: ghcr.io/zephyrproject-rtos/ci:v0.26.4
options: '--entrypoint /bin/bash'
volumes:
- /repo-cache/zephyrproject:/github/cache/zephyrproject
strategy:
fail-fast: false
matrix:
subset: ${{fromJSON(needs.twister-build-prep.outputs.subset)}}
env:
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.1
BSIM_OUT_PATH: /opt/bsim/
BSIM_COMPONENTS_PATH: /opt/bsim/components
TWISTER_COMMON: ' --force-color --inline-logs -v -N -M --retry-failed 3 '
DAILY_OPTIONS: ' -M --build-only --all --show-footprint'
PR_OPTIONS: ' --clobber-output --integration'
PUSH_OPTIONS: ' --clobber-output -M --show-footprint'
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
BASE_REF: ${{ github.base_ref }}
steps:
- name: Apply container owner mismatch workaround
run: |
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
# match the container user UID because of the way GitHub
# Actions runner is implemented. Remove this workaround when
# GitHub comes up with a fundamental fix for this problem.
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Clone cached Zephyr repository
continue-on-error: true
run: |
git clone --shared /github/cache/zephyrproject/zephyr .
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
persist-credentials: false
- name: Environment Setup
run: |
if [ "${{github.event_name}}" = "pull_request_target" ]; then
git config --global user.email "bot@zephyrproject.org"
git config --global user.name "Zephyr Builder"
rm -fr ".git/rebase-apply"
git rebase origin/${BASE_REF}
git log --pretty=oneline | head -n 10
fi
echo "$HOME/.local/bin" >> $GITHUB_PATH
west init -l . || true
west config --global update.narrow true
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
west forall -c 'git reset --hard HEAD'
- name: Check Environment
run: |
cmake --version
gcc --version
ls -la
echo "github.ref: ${{ github.ref }}"
echo "github.base_ref: ${{ github.base_ref }}"
echo "github.ref_name: ${{ github.ref_name }}"
- name: Prepare ccache timestamp/data
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
string(REPLACE "/" "_" repo ${{github.repository}})
string(REPLACE "-" "_" repo2 ${repo})
file(APPEND $ENV{GITHUB_OUTPUT} "repo=${repo2}\n")
- name: use cache
id: cache-ccache
uses: zephyrproject-rtos/action-s3-cache@v1.2.0
continue-on-error: true
with:
key: ${{ steps.ccache_cache_timestamp.outputs.repo }}-${{ github.ref_name }}-${{github.event_name}}-${{ matrix.subset }}-ccache
path: /github/home/.cache/ccache
aws-s3-bucket: ccache.zephyrproject.org
aws-access-key-id: ${{ vars.AWS_CCACHE_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_CCACHE_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: ccache stats initial
run: |
mkdir -p /github/home/.cache
test -d github/home/.cache/ccache && rm -rf /github/home/.cache/ccache && mv github/home/.cache/ccache /github/home/.cache/ccache
ccache -M 10G -s
- if: github.event_name == 'push'
name: Run Tests with Twister (Push)
run: |
export ZEPHYR_BASE=${PWD}
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${PUSH_OPTIONS}
if [ "${{matrix.subset}}" = "1" ]; then
./scripts/zephyr_module.py --twister-out module_tests.args
if [ -s module_tests.args ]; then
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PUSH_OPTIONS}
fi
fi
- if: github.event_name == 'pull_request_target'
name: Run Tests with Twister (Pull Request)
run: |
rm -f testplan.json
export ZEPHYR_BASE=${PWD}
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
python3 ./scripts/ci/test_plan.py -c origin/${BASE_REF}.. --pull-request
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} --load-tests testplan.json ${TWISTER_COMMON} ${PR_OPTIONS}
if [ "${{matrix.subset}}" = "1" -a ${{needs.twister-build-prep.outputs.fullrun}} = 'True' ]; then
./scripts/zephyr_module.py --twister-out module_tests.args
if [ -s module_tests.args ]; then
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PR_OPTIONS}
fi
fi
- if: github.event_name == 'schedule'
name: Run Tests with Twister (Daily)
run: |
export ZEPHYR_BASE=${PWD}
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${DAILY_OPTIONS}
if [ "${{matrix.subset}}" = "1" ]; then
./scripts/zephyr_module.py --twister-out module_tests.args
if [ -s module_tests.args ]; then
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${DAILY_OPTIONS}
fi
fi
- name: ccache stats post
run: |
ccache -p
ccache -s
- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v3
with:
name: Unit Test Results (Subset ${{ matrix.subset }})
if-no-files-found: ignore
path: |
twister-out/twister.xml
twister-out/twister.json
module_tests/twister.xml
testplan.json
twister-test-results:
name: "Publish Unit Tests Results"
env:
ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }}
ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
needs: twister-build
runs-on: ubuntu-22.04
# the build-and-test job might be skipped, we don't need to run this job then
if: success() || failure()
steps:
# Needed for opensearch and upload script
- if: github.event_name == 'push' || github.event_name == 'schedule'
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- if: github.event_name == 'push' || github.event_name == 'schedule'
name: Upload to opensearch
run: |
pip3 install elasticsearch
# set run date on upload to get consistent and unified data across the matrix.
run_date=`date --iso-8601=minutes`
if [ "${{github.event_name}}" = "push" ]; then
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
--index zephyr-main-ci-push-1 artifacts/*/*/twister.json
elif [ "${{github.event_name}}" = "schedule" ]; then
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
--index zephyr-main-ci-weekly-1 artifacts/*/*/twister.json
fi
- name: Merge Test Results
run: |
pip3 install junitparser junit2html
junitparser merge artifacts/*/*/twister.xml junit.xml
junit2html junit.xml junit.html
- name: Upload Unit Test Results in HTML
if: always()
uses: actions/upload-artifact@v3
with:
name: HTML Unit Test Results
if-no-files-found: ignore
path: |
junit.html
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: Unit Test Results
files: "**/twister.xml"
comment_mode: off

View File

@@ -1,66 +0,0 @@
# Copyright (c) 2020 Intel Corporation.
# SPDX-License-Identifier: Apache-2.0
name: Twister TestSuite
on:
push:
branches:
- main
- v*-branch
paths:
- 'scripts/pylib/twister/**'
- 'scripts/twister'
- 'scripts/tests/twister/**'
- '.github/workflows/twister_tests.yml'
pull_request:
branches:
- main
- v*-branch
paths:
- 'scripts/pylib/twister/**'
- 'scripts/twister'
- 'scripts/tests/twister/**'
- '.github/workflows/twister_tests.yml'
jobs:
twister-tests:
name: Twister Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9, '3.10']
os: [ubuntu-22.04]
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: cache-pip-linux
if: startsWith(runner.os, 'Linux')
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: install-packages
run: |
pip3 install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt
- name: Run pytest for twisterlib
env:
ZEPHYR_BASE: ./
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
run: |
echo "Run twister tests"
PYTHONPATH=./scripts/tests pytest ./scripts/tests/twister
- name: Run pytest for pytest-twister-harness
env:
ZEPHYR_BASE: ./
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
PYTHONPATH: ./scripts/pylib/pytest-twister-harness/src:${PYTHONPATH}
run: |
echo "Run twister tests"
pytest ./scripts/pylib/pytest-twister-harness/tests

View File

@@ -1,80 +0,0 @@
# Copyright (c) 2020 Linaro Limited.
# SPDX-License-Identifier: Apache-2.0
name: Zephyr West Command Tests
on:
push:
branches:
- main
- v*-branch
paths:
- 'scripts/west-commands.yml'
- 'scripts/west_commands/**'
- '.github/workflows/west_cmds.yml'
pull_request:
branches:
- main
- v*-branch
paths:
- 'scripts/west-commands.yml'
- 'scripts/west_commands/**'
- '.github/workflows/west_cmds.yml'
jobs:
west-commnads:
name: West Command Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9, '3.10']
os: [ubuntu-22.04, macos-11, windows-2022]
exclude:
- os: macos-11
python-version: 3.6
- os: windows-2022
python-version: 3.6
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: cache-pip-linux
if: startsWith(runner.os, 'Linux')
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: cache-pip-mac
if: startsWith(runner.os, 'macOS')
uses: actions/cache@v3
with:
path: ~/Library/Caches/pip
# Trailing '-' was just to get a different cache name
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: cache-pip-win
if: startsWith(runner.os, 'Windows')
uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: install pytest
run: |
pip3 install wheel
pip3 install pytest west pyelftools canopen natsort progress mypy intelhex psutil ply pyserial
- name: run pytest-win
if: runner.os == 'Windows'
run: |
python ./scripts/west_commands/run_tests.py
- name: run pytest-mac-linux
if: runner.os != 'Windows'
run: |
./scripts/west_commands/run_tests.py

71
.gitignore vendored
View File

@@ -7,26 +7,18 @@
*.swp
*.swo
*~
.\#*
\#*\#
build*/
!doc/build/
!scripts/build
!tests/drivers/build_all
!scripts/pylib/build_helpers
cscope.*
.dir
/*.patch
# The .cache directory will be used to cache toolchain capabilities if
# no suitable out-of-tree directory is found.
.cache
outdir
outdir-*
scripts/basic/fixdep
scripts/gen_idt/gen_idt
scripts/gen_offset_header/gen_offset_header
scripts/kconfig/conf
scripts/kconfig/mconf
scripts/kconfig/zconf.hash.c
scripts/kconfig/zconf.lex.c
scripts/kconfig/zconf.tab.c
doc/_build
doc/doxygen
doc/xml
@@ -34,50 +26,11 @@ doc/html
doc/boards
doc/samples
doc/latex
doc/themes/zephyr-docs-theme
sanity-out*
twister-out*
bsim_out
bsim_bt_out
tests/RunResults.xml
sanity-out/
scripts/grub
doc/reference/kconfig/*.rst
doc/doc.warnings
.*project
.settings
.envrc
.vscode
hide-defaults-note
venv
.venv
.DS_Store
.clangd
# CI output
compliance.xml
_error.types
# Tag files
GPATH
GRTAGS
GTAGS
TAGS
doc/reference/kconfig/CONFIG_*
doc/reference/kconfig/index.rst
tags
.idea
# from check_compliance.py
BinaryFiles.txt
Checkpatch.txt
DevicetreeBindings.txt
Gitlint.txt
Identity.txt
ImageSize.txt
Kconfig.txt
KconfigBasic.txt
KconfigBasicNoModules.txt
MaintainersFormat.txt
ModulesMaintainers.txt
Nits.txt
Pylint.txt
YAMLLint.txt
.project
.cproject
.xxproject

View File

@@ -1,61 +0,0 @@
# All these sections are optional, edit this file as you like.
# Zephyr-specific defaults are located in scripts/gitlint/zephyr_commit_rules.py
[general]
ignore=title-trailing-punctuation, T3, title-max-length, T1, body-hard-tab, B3, B1
# verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this
verbosity = 3
# By default gitlint will ignore merge commits. Set to 'false' to disable.
ignore-merge-commits=false
ignore-revert-commits=false
ignore-fixup-commits=false
ignore-squash-commits=false
# Enable debug mode (prints more output). Disabled by default
debug = false
# Set the extra-path where gitlint will search for user defined rules
# See http://jorisroovers.github.io/gitlint/user_defined_rules for details
extra-path=scripts/gitlint
[title-max-length-no-revert]
# line-length=75
[body-min-line-count]
# min-line-count=1
[body-max-line-count]
# max-line-count=200
[title-starts-with-subsystem]
regex = ^(?!subsys:)(([^:]+):)(\s([^:]+):)*\s(.+)$
[title-must-not-contain-word]
# Comma-separated list of words that should not occur in the title. Matching is case
# insensitive. It's fine if the keyword occurs as part of a larger word (so "WIPING"
# will not cause a violation, but "WIP: my title" will.
words=wip
[title-match-regex]
# python like regex (https://docs.python.org/2/library/re.html) that the
# commit-msg title must be matched to.
# Note that the regex can contradict with other rules if not used correctly
# (e.g. title-must-not-contain-word).
#regex=^US[0-9]*
[max-line-length-with-exceptions]
# B1 = body-max-line-length
# line-length=75
[body-min-length]
min-length=3
[body-is-missing]
# Whether to ignore this rule on merge commits (which typically only have a title)
# default = True
ignore-merge-commits=false
[body-changed-file-mention]
# List of files that need to be explicitly mentioned in the body when they are changed
# This is useful for when developers often erroneously edit certain files or git submodules.
# By specifying this rule, developers can only change the file when they explicitly reference
# it in the commit message.
#files=gitlint/rules.py,README.md

4
.gitreview Normal file
View File

@@ -0,0 +1,4 @@
[gerrit]
host=gerrit.zephyrproject.org
port=29418
project=zephyr.git

55
.known-issues/README Normal file
View File

@@ -0,0 +1,55 @@
This directory contains configuration files to ignore errors found in
the build and test process which are known to the developers and for
now can be safely ignored.
To use:
$ cd zephyr
$ make SOMETHING >& result
$ scripts/filter-known-issues.py result
It is included in the source tree so if anyone has to submit anything
that triggers some kind of error that is a false positive, it can
include the "ignore me" file, properly documented.
Each file can contain one or more multiline Python regular expressions
(https://docs.python.org/2/library/re.html#regular-expression-syntax)
that match an error message. Multiple regular expressions are
separated by comment blocks (that start with #). Note that an empty
line still is considered part of the multiline regular expression.
For example
---beginning---
#
# This testcase always fails, pending fix ZEP-1234
#
.*/tests/kernel/grumpy .* FAIL
#
# Documentation issue, masks:
#
# /home/e/inaky/z/kernel.git/doc/api/io_interfaces.rst:28: WARNING: Invalid definition: Expected identifier in nested name. [error at 19]
# struct dev_config::@65 dev_config::bits
# -------------------^
#
^(?P<filename>.+/doc/api/io_interfaces.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^\s+struct dev_config::@[0-9]+ dev_config::bits.*
^\s+-+\^
---end---
Note you want to:
- use relateive paths; instead of
/home/me/mydir/zephyr/something/somewhere.c you will want
^.*/something/somewhere.c (as they will depend on where it is being
built)
- Replace line numbers with [0-9]+, as they will change
- (?P<filename>[-._/\w]+/something/somewhere.c) saves the match on
that file path in a "variable" called 'filename' that later you can
match with (?P=filename) if you want to match multiple lines of the
same error message.
Can get really twisted and interesting in terms of regexps; they are
powerful, so start small :)

View File

@@ -0,0 +1,38 @@
#
# Bluetooth unnamed struct definition
#
# FIXME: all these should match the relative filename
#
^(?P<filename>[-._/\w]+/doc/api/bluetooth.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]$
^[ \t]*$
^[ \t]*\^$
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]$
^[ \t]*$
^[ \t]*\^$
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]$
^.*bt_conn_info.__unnamed__.*$
^[- \t]*\^$
#
# bt_gatt_discover_params unnamed struct definition
#
^(?P<filename>[-._/\w]+/doc/api/bluetooth.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]
^.*bt_gatt_discover_params.__unnamed__.*
^[- \t]*\^
#
# Bluetooth GATT unnamed struct definition
#
^(?P<filename>[-._/\w]+/doc/api/bluetooth.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]
^.*bt_gatt_read_params.__unnamed__.*
^[- \t]*\^

View File

@@ -0,0 +1,18 @@
#
# KERNELVERSION not being defined in local builds, kill that warning,
# can ignore it
#
^.*/Kconfig.zephyr:[0-9]+: warning: The symbol KERNELVERSION references the non-existent environment variable KERNELVERSION.*
#
# Documentation generation, early message
#
^cd .* && doxygen doc/doxygen.config
^srctree=.* SRCARCH=\w+ python scripts/genrest/genrest.py .*$
# This cuts the sphinx build line; has to be separate because in the
# middle, we have removed the KERNELVERSION one and a full regex won't match
^sphinx-build -t \w+ -b html .*
#
# Documentation generation, footer message
#
^[ \t]*
^Build finished. The HTML pages are in [-._/\w]+

View File

@@ -0,0 +1,14 @@
#
# Kernel unnamed struct definition
#
# FIXME: all these should match the relative filename
#
^(?P<filename>[-._/\w]+/doc/api/kernel_api.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]$
^[ \t]*$
^[ \t]*\^$
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]$
^[ \t]*$
^[ \t]*\^$
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]$
^.*k_msg.extra.*$
^[- \t]*\^$

View File

@@ -0,0 +1,49 @@
#
# Networking
#
#
# include/net/net_ip.h warnings
#
^(?P<filename>[-._/\w]+/doc/api/networking.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]
^.*in[_6]+addr.in[46]_u
^[- \t]*\^
#
# include/net/net_if.h warnings
#
^(?P<filename>[-._/\w]+/doc/api/networking.rst):(?P<lineno>[0-9]+): WARNING: Error when parsing function declaration.
^\If the function has no return type:
^[ \t]*Error in declarator or parameters and qualifiers
^[ \t]*Invalid definition: Expected identifier in nested name, got keyword: struct \[error at [0-9]+]
^.*struct net_if __aligned\(32\)
^[- \t]*\^
^\If the function has a return type:
^[ \t]*Error in declarator or parameters and qualifiers
^[ \t]*If pointer to member declarator:
^[ \t]*Invalid definition: Expected \'::\' in pointer to member \(function\). \[error at [0-9]+]
^.*struct net_if __aligned\(32\)
^[- \t]*\^
^[ \t]*If declarator-id:
^[ \t]*Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^.*struct net_if __aligned\(32\)
^[- \t]*\^
#
# include/net/dns_client.h
#
^(?P<filename>[-._/\w]+/doc/api/networking.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]
^.*dns_context.address
^[- \t]*\^

View File

@@ -0,0 +1,12 @@
#
# Sensor value unnamed struct definition
#
^(?P<filename>[-._/\w]+/doc/api/io_interfaces.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]
^.*sensor_value.__unnamed__.*
^[- \t]*\^

View File

@@ -0,0 +1,15 @@
#
# UART unnamed struct definition
#
^(?P<filename>[-._/\w]+/doc/api/io_interfaces.rst):(?P<lineno>[0-9]+): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected identifier in nested name. \[error at [0-9]+]
^[ \t]*
^[ \t]*\^
^(?P=filename):(?P=lineno): WARNING: Invalid definition: Expected end of definition. \[error at [0-9]+]
^.*uart_device_config.__unnamed__.*
^[- \t]*\^

6
.known-issues/make.conf Normal file
View File

@@ -0,0 +1,6 @@
#
# When filtering output of the build process, ignore lines that don't
# provide any information that helps the invoker tell if there was an
# error.
#
^make: (Entering|Leaving) directory .*

View File

@@ -0,0 +1,11 @@
#
# When executing test cases, ignore the following messages as they are
# not to be considered hard errors.
#
# Block line when test case cannot run in the HW due to server or connection issues
#
^BLCK0/[-a-z0-9:]+ (.+)#test @[^/]+/[^:]+:[^:]+: evaluation blocked(.*)$
#
# Block line when there is an issue with the YKUSH serial connection
#
^BLCK0/[-a-z0-9:]+ (.+)#test @[^/]+/(?P<board>[^:]+):[^:]+: exception: 400: (?P=board): Cannot find YKUSH serial '[A-Z0-9]+'$

View File

@@ -0,0 +1,18 @@
#
# When executing test cases under TCF, ignore the following messages
# as they are not to be considered hard errors.
#
# TCF is run under make for taking advantage of the jobserver; when
# the testcase execution fail, make will complain, which we can
# ignore ('sommersault' was the old name of the target).
#
^/tmp/tcf-[a-zA-Z0-9]+.mk:[0-9]+: recipe for target ('tcf-jobserver-run'|'sommersault') failed$
#
# More of the same
#
^make: \*\*\* \[(tcf-jobserver-run|sommersault)\] Error 1$
#
# TCF's summary line. We don't need to consider it to determine if the
# run failed or passed.
#
^[A-Z]+0/\S+:\s+\S+\s+@\S+: [0-9]+ tests \([0-9]+ passed, [0-9]+ failed, [0-9]+ blocked, [0-9]+ skipped\).*$

View File

@@ -0,0 +1,4 @@
#
# Skip line when test case is eliminated due to filters
#
^SKIP0/\S+\s+\S+: No targets can be used \(all [0-9]+ selected from [0-9]+ available eliminated by testcase filtering\)$

138
.mailmap
View File

@@ -1,121 +1,21 @@
Alexandr Kolosov <rikorsev@gmail.com>
Alexandre d'Alton <alexandre.dalton@intel.com>
Dirk Brandewie <dirk.j.brandewie@intel.com> <dirk.j.brandewie@intel.com>
Mike Hirst <michael.hirst@windriver.com> <michael.hirst@windriver.com>
Johan Kruger <johan.kruger@windriver.com> <johan.kruger@windriver.com>
Leona Cook <leonax.cook@intel.com> <lsc@hackeress.com>
Leona Cook <leonax.cook@intel.com> <leonax.cook@intel.com>
Thomas Heeley <thomas.heeley@intel.com> <thomas.heeley@intel.com>
Shuang He <shuang.he@intel.com> <shuang.he@intel.com>
Chuck Jordan <cjordan@synopsys.com> <cjordan@synopsys.com>
Jeremie Garcia <jeremie.garcia@intel.com> <jeremie.garcia@intel.com>
Bit Pathe <bitpathe@gmail.com> <bitpathe@gmail.com>
Carles Cufi <carles.cufi@nordicsemi.no> <carles.cufi@nordicsemi.no>
Kuo-Lang Tseng <kuo-lang.tseng@intel.com> <kuo-lang.tseng@intel.com>
Gerardo Aceves <gerardo.aceves@intel.com> <gerardo.aceves@intel.com>
Evan Couzens <evanx.couzens@intel.com> <evanx.couzens@intel.com>
Lei Liu <lei.a.liu@intel.com> <lei.a.liu@intel.com>
Douglas Su <d0u9.su@outlook.com> <d0u9.su@outlook.com>
Keren Siman-Tov <keren.siman-tov@intel.com> <keren.siman-tov@intel.com>
Naga Raja Rao Tulasi <tulasi.r@tcs.com> <tulasi.r@tcs.com>
Felipe Neves <ryukokki.felipe@gmail.com> <ryukokki.felipe@gmail.com>
Amir Kaplan <amir.kaplan@intel.com> <amir.kaplan@intel.com>
Anas Nashif <anas.nashif@intel.com> <anas.nashif@intel.com>
Andrzej Kuroś <andrzej.kuros@nordicsemi.no>
Anthony Smigielski <thebasti0ncode@gmail.com>
Armand Ciejak <armand@riedonetworks.com> <armandciejak@users.noreply.github.com>
Aska Wu <aska.wu@linaro.org>
Bit Pathe <bitpathe@gmail.com> <bitpathe@gmail.com>
Bjarki Arge Andreasen <baa@trackunit.com>
Carles Cufi <carles.cufi@nordicsemi.no> <carles.cufi@nordicsemi.no>
chao an <anchao@xiaomi.com>
Charles E. Youse <charles.youse@intel.com>
Chen Xingyu <hi@xingrz.me>
Christoph Schnetzler <christoph.schnetzler@husqvarnagroup.com>
Christoph Schramm <schramm@makaio.com>
Christopher Friedt <cfriedt@meta.com>
Christopher Friedt <cfriedt@meta.com> <cfriedt@fb.com>
Chuck Jordan <cjordan@synopsys.com> <cjordan@synopsys.com>
Chunlin Han <chunlin.han@linaro.org> <chunlin.han@acer.com>
David B. Kinder <david.b.kinder@intel.com>
David Komel <a8961713@gmail.com>
David Leach <david.leach@nxp.com>
Dirk Brandewie <dirk.j.brandewie@intel.com> <dirk.j.brandewie@intel.com>
Douglas Su <d0u9.su@outlook.com> <d0u9.su@outlook.com>
Enjia Mai <enjia.mai@intel.com>
Enjia Mai <enjia.mai@intel.com> <enjiax.mai@intel.com>
Evan Couzens <evanx.couzens@intel.com> <evanx.couzens@intel.com>
Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Evgeniy Paltsev <PaltsevEvgeniy@gmail.com> <Eugeniy.Paltsev@synopsys.com>
Felipe Neves <ryukokki.felipe@gmail.com> <ryukokki.felipe@gmail.com>
Findlay Feng <i@fengch.me>
Flavio Arieta Netto <flavio@exati.com.br>
Francois Ramu <francois.ramu@st.com>
Gerardo Aceves <gerardo.aceves@intel.com> <gerardo.aceves@intel.com>
Gregory Shue <gregory.shue@legrand.com>
Gregory Shue <gregory.shue@legrand.com> <gregory.shue@legrand.us>
HaiLong Yang <cameledyang@pm.me>
James Johnson <james.johnson672@t-mobile.com>
Jarno Lämsä <jarno.lamsa@nordicsemi.no>
Jędrzej Ciupis <jedrzej.ciupis@nordicsemi.no>
Jeremie Garcia <jeremie.garcia@intel.com> <jeremie.garcia@intel.com>
Jim Benjamin Luther <jilu@oticon.com>
Johan Kruger <johan.kruger@windriver.com> <johan.kruger@windriver.com>
Johann Fischer <j.fischer@phytec.de>
Jørgen Kvalvaag <jorgen.kvalvaag@nordicsemi.no>
Juan Manuel Cruz Alcaraz <juan.m.cruz.alcaraz@intel.com>
Juan Solano <juanx.solano.menacho@intel.com>
Julien D'Ascenzio <julien.dascenzio@paratronic.fr>
Jun Li <jun.r.li@intel.com>
Justin Watson <jwatson5@gmail.com>
Kamil Sroka <kamil.sroka@nordicsemi.no>
Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
Keren Siman-Tov <keren.siman-tov@intel.com> <keren.siman-tov@intel.com>
Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Kuo-Lang Tseng <kuo-lang.tseng@intel.com> <kuo-lang.tseng@intel.com>
Lei Liu <lei.a.liu@intel.com> <lei.a.liu@intel.com>
Leona Cook <leonax.cook@intel.com> <leonax.cook@intel.com>
Leona Cook <leonax.cook@intel.com> <lsc@hackeress.com>
Lixin Guo <lixinx.guo@intel.com>
Łukasz Mazur <lukasz.mazur@hidglobal.com>
Manuel Argüelles <manuel.arguelles@nxp.com>
Manuel Argüelles <manuel.arguelles@nxp.com> <manuel.arguelles@coredumplabs.com>
Marc Herbert <marc.herbert@intel.com> <46978960+marc-hb@users.noreply.github.com>
Marin Jurjević <marin.jurjevic@hotmail.com>
Mariusz Ryndzionek <mariusz.ryndzionek@firmwave.com>
Mariusz Skamra <mariusz.skamra@codecoup.pl>
Mariusz Skamra <mariusz.skamra@codecoup.pl> <mariusz.skamra@tieto.com>
Martí Bolívar <marti.bolivar@nordicsemi.no>
Martí Bolívar <marti.bolivar@nordicsemi.no> <marti.bolivar@linaro.org>
Martí Bolívar <marti.bolivar@nordicsemi.no> <marti.f.bolivar@gmail.com>
Martí Bolívar <marti.bolivar@nordicsemi.no> <marti@foundries.io>
Martí Bolívar <marti.bolivar@nordicsemi.no> <marti@opensourcefoundries.com>
Martin Jäger <martin@libre.solar> <17674105+martinjaeger@users.noreply.github.com>
Mateusz Hołenko <mholenko@antmicro.com>
Michael Rosen <michael.r.rosen@intel.com>
Michal Narajowski <michal.narajowski@codecoup.pl>
Mike Hirst <michael.hirst@windriver.com> <michael.hirst@windriver.com>
Ming Shao <ming.shao@intel.com>
Mohan Kumar Kumar <mohankm@fb.com>
Naga Raja Rao Tulasi <tulasi.r@tcs.com> <tulasi.r@tcs.com>
Navin Sankar Velliangiri <navin@linumiz.com>
NingX Zhao <ningx.zhao@intel.com>
Nishikant Nayak <nishikantax.nayak@intel.com>
Ole Sæther <ole.saether@nordicsemi.no>
Pavel Král <pavel.kral@omsquare.com>
Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Paweł Czarnecki <pczarnecki@antmicro.com>
Paweł Czarnecki <pczarnecki@antmicro.com>
Paweł Czarnecki <pczarnecki@antmicro.com> <pczarnecki@internships.antmicro.com>
Paweł Kwiek <pawel.kwiek@nordicsemi.no>
Peng Chen <peng1.chen@intel.com>
Peter Bigot <peter.bigot@nordicsemi.no>
Peter Bigot <peter.bigot@nordicsemi.no> <pab@pabigot.com>
Peter Johanson <peter@peterjohanson.com>
Piyush Itankar <piyush.t.itankar@intel.com>
Radosław Koppel <radoslaw.koppel@nordicsemi.no>
Radosław Koppel <radoslaw.koppel@nordicsemi.no> <r.koppel@k-el.com>
Raja D. Singh <rdsingh@iotwizards.com>
Ricardo Salveti <ricardo@opensourcefoundries.com>
Ricardo Salveti <ricardo@opensourcefoundries.com> <ricardo.salveti@linaro.org>
Ruud Derwig <Ruud.Derwig@synopsys.com> <Ruud.Derwig@synopsys.com>
Saku Rautio <saku.rautio@nordicsemi.no>
Scott Worley <scott.worley@microchip.com>
Sean Nyekjaer <sean@geanix.com> <sean.nyekjaer@prevas.dk>
Sean Nyekjaer <sean@geanix.com> <sean@nyekjaer.dk>
Sharron Liu <sharron.liu@intel.com>
Shilpashree L C <shilpashree.lc@intel.com>
Shuang He <shuang.he@intel.com> <shuang.he@intel.com>
Sigvart Hovland <sigvart.hovland@nordicsemi.no>
Stéphane D'Alu <sdalu@sdalu.com>
Stine Åkredalen <stine.akredalen@nordicsemi.no>
Thomas Heeley <thomas.heeley@intel.com> <thomas.heeley@intel.com>
Tim Sørensen <tims@demant.com>
Tim Sørensen <tims@demant.com> <tims@oticon.com>
Vinayak Kariappa Chettimada <vinayak.kariappa.chettimada@nordicsemi.no> <vinayak.kariappa.chettimada@nordicsemi.no> <vich@nordicsemi.no> <vinayak.kariappa@gmail.com>
Xiaorui Hu <xiaorui.hu@linaro.org>
Yannis Damigos <giannis.damigos@gmail.com> <ydamigos@iccs.gr>
Yonattan Louise <yonattan.a.louise.mendoza@intel.com>
Yonattan Louise <yonattan.a.louise.mendoza@intel.com> <yonattan.a.louise.mendoza@linux.intel.com>
YouhuaX Zhu <youhuax.zhu@intel.com>

View File

@@ -1,16 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
extends: default
rules:
line-length:
max: 100
comments:
min-spaces-from-content: 1
indentation:
spaces: 2
indent-sequences: consistent
document-start:
present: false
truthy:
check-keys: false

File diff suppressed because it is too large Load Diff

View File

@@ -1,956 +0,0 @@
# CODEOWNERS for autoreview assigning in github
# https://help.github.com/en/articles/about-code-owners#codeowners-syntax
# Order is important; for each modified file, the last matching
# pattern takes the most precedence.
# That is, with the last pattern being
# *.rst @nashif
# if only .rst files are being modified, only nashif is
# automatically requested for review, but you can manually
# add others as needed.
# Do not use wildcard on all source yet
# * @galak @nashif
/.github/ @nashif @stephanosio
/.github/workflows/ @galak @nashif
/MAINTAINERS.yml @MaureenHelm
/arch/arc/ @abrodkin @ruuddw @evgeniy-paltsev
/arch/arm/ @MaureenHelm @galak @ioannisg
/arch/arm/core/cortex_m/cmse/ @ioannisg
/arch/arm/include/cortex_m/cmse.h @ioannisg
/arch/arm/core/cortex_a_r/ @MaureenHelm @galak @ioannisg @bbolen @stephanosio
/arch/arm64/ @carlocaione
/arch/arm64/core/cortex_r/ @povergoing
/arch/arm64/core/xen/ @lorc @firscity
/arch/common/ @ioannisg @andyross
/arch/mips/ @frantony
/soc/arc/snps_*/ @abrodkin @ruuddw @evgeniy-paltsev
/soc/nios2/ @nashif
/soc/arm/ @MaureenHelm @galak @ioannisg
/soc/arm/arm/mps2/ @fvincenzo
/soc/arm/aspeed/ @aspeeddylan
/soc/arm/atmel_sam/common/*_sam4l_*.c @nandojve
/soc/arm/atmel_sam/sam3x/ @ioannisg
/soc/arm/atmel_sam/sam4e/ @nandojve
/soc/arm/atmel_sam/sam4l/ @nandojve
/soc/arm/atmel_sam/sam4s/ @fallrisk
/soc/arm/atmel_sam/same70/ @nandojve
/soc/arm/atmel_sam/samv71/ @nandojve
/soc/arm/cypress/ @ifyall @npal-cy
/soc/arm/bcm*/ @sbranden
/soc/arm/gigadevice/ @nandojve
/soc/arm/infineon_cat1/ @ifyall @npal-cy
/soc/arm/infineon_xmc/ @parthitce
/soc/arm/nxp*/ @mmahadevan108 @dleach02
/soc/arm/nxp_s32/ @manuargue
/soc/arm/nordic_nrf/ @anangl
/soc/arm/nuvoton_npcx/ @MulinChao @ChiHuaL
/soc/arm/nuvoton_numicro/ @ssekar15
/soc/arm/quicklogic_eos_s3/ @fkokosinski @kgugala
/soc/arm/rpi_pico/ @yonsch
/soc/arm/silabs_exx32/efm32pg1b/ @rdmeneze
/soc/arm/silabs_exx32/efr32mg21/ @l-alfred
/soc/arm/st_stm32/ @erwango
/soc/arm/st_stm32/*/power.c @FRASTM
/soc/arm/st_stm32/stm32mp1/ @arnopo
/soc/arm/st_stm32/stm32h7/*stm32h735* @benediktibk
/soc/arm/st_stm32/stm32l4/*stm32l451* @benediktibk
/soc/arm/ti_simplelink/cc13x2_cc26x2/ @bwitherspoon
/soc/arm/ti_simplelink/cc32xx/ @vanti
/soc/arm/ti_simplelink/msp432p4xx/ @Mani-Sadhasivam
/soc/arm/xilinx_zynq7000/ @ibirnbaum
/soc/arm/xilinx_zynqmp/ @stephanosio
/soc/arm/renesas_rcar/ @aaillet
/soc/arm64/ @carlocaione
/soc/arm64/qemu_cortex_a53/ @carlocaione
/soc/arm64/bcm_vk/ @abhishek-brcm
/soc/arm64/nxp_layerscape/ @JiafeiPan
/soc/arm64/xenvm/ @lorc @firscity
/soc/arm64/nxp_imx/ @MrVan @JiafeiPan
/soc/arm64/arm/ @povergoing
/soc/arm64/arm/fvp_aemv8a/ @carlocaione
/soc/arm64/intel_socfpga/* @siclim
/soc/arm64/renesas_rcar/ @lorc @xakep-amatop
/soc/Kconfig @tejlmand @galak @nashif @nordicjm
/submanifests/* @mbolivar-ampere
/arch/x86/ @jhedberg @nashif
/arch/nios2/ @nashif
/arch/posix/ @aescolar @daor-oti
/arch/riscv/ @kgugala @pgielda
/soc/mips/ @frantony
/soc/posix/ @aescolar @daor-oti
/soc/riscv/ @kgugala @pgielda
/soc/riscv/openisa*/ @dleach02
/soc/riscv/riscv-privileged/andes_v5/ @cwshu @kevinwang821020 @jimmyzhe
/soc/riscv/riscv-privileged/neorv32/ @henrikbrixandersen
/soc/riscv/riscv-privileged/gd32vf103/ @soburi
/soc/riscv/riscv-privileged/niosv/ @sweeaun
/soc/x86/ @dcpleung @nashif
/arch/xtensa/ @dcpleung @andyross @nashif
/soc/xtensa/ @dcpleung @andyross @nashif
/arch/sparc/ @julius-barendt
/soc/sparc/ @julius-barendt
/boards/arc/ @abrodkin @ruuddw @evgeniy-paltsev
/boards/arm/ @MaureenHelm @galak
/boards/arm/96b_argonkey/ @avisconti
/boards/arm/96b_avenger96/ @Mani-Sadhasivam
/boards/arm/96b_carbon/ @idlethread
/boards/arm/96b_meerkat96/ @Mani-Sadhasivam
/boards/arm/96b_nitrogen/ @idlethread
/boards/arm/96b_neonkey/ @Mani-Sadhasivam
/boards/arm/96b_stm32_sensor_mez/ @Mani-Sadhasivam
/boards/arm/96b_wistrio/ @Mani-Sadhasivam
/boards/arm/arduino_due/ @ioannisg
/boards/arm/acn52832/ @sven-hm
/boards/arm/arduino_mkrzero/ @soburi
/boards/arm/bbc_microbit_v2/ @LingaoM
/boards/arm/bl5340_dvk/ @lairdjm
/boards/arm/bl65*/ @lairdjm
/boards/arm/blackpill_f401ce/ @coderkalyan
/boards/arm/blackpill_f411ce/ @coderkalyan
/boards/arm/bt*10/ @greg-leach
/boards/arm/cc1352r1_launchxl/ @bwitherspoon
/boards/arm/cc26x2r1_launchxl/ @bwitherspoon
/boards/arm/cc3220sf_launchxl/ @vanti
/boards/arm/cy8ckit_062_ble/ @ifyall @npal-cy
/boards/arm/cy8ckit_062s4/ @DaWei8823
/boards/arm/cy8ckit_062_wifi_bt/ @ifyall @npal-cy
/boards/arm/cy8cproto_062_4343w/ @ifyall @npal-cy
/boards/arm/disco_l475_iot1/ @erwango
/boards/arm/efm32pg_stk3401a/ @rdmeneze
/boards/arm/faze/ @mbittan @simonguinot
/boards/arm/frdm*/ @mmahadevan108 @dleach02
/boards/arm/gd32*/ @nandojve
/boards/arm/google_*/ @jackrosenthal
/boards/arm/hexiwear*/ @mmahadevan108 @dleach02
/boards/arm/ip_k66f/ @parthitce @lmajewski
/boards/arm/legend/ @mbittan @simonguinot
/boards/arm/lpcxpresso*/ @mmahadevan108 @dleach02
/boards/arm/mg100/ @rerickson1
/boards/arm/mimx8mm_evk/ @Mani-Sadhasivam
/boards/arm/mimx8mm_phyboard_polis @pefech
/boards/arm/mimxrt*/ @mmahadevan108 @dleach02
/boards/arm/mps2_an385/ @fvincenzo
/boards/arm/msp_exp432p401r_launchxl/ @Mani-Sadhasivam
/boards/arm/npcx7m6fb_evb/ @MulinChao @ChiHuaL
/boards/arm/nrf*/ @carlescufi @lemrey
/boards/arm/nucleo*/ @erwango @ABOSTM @FRASTM
/boards/arm/nucleo_f401re/ @idlethread
/boards/arm/nuvoton_pfm_m487/ @ssekar15
/boards/arm/pinnacle_100_dvk/ @rerickson1
/boards/arm/qemu_cortex_a9/ @ibirnbaum
/boards/arm/qemu_cortex_r*/ @stephanosio
/boards/arm/qemu_cortex_m*/ @ioannisg @stephanosio
/boards/arm/quick_feather/ @fkokosinski @kgugala
/boards/arm/rak4631_nrf52840/ @gpaquet85
/boards/arm/rak5010_nrf52840/ @gpaquet85
/boards/arm/rpi_pico/ @yonsch
/boards/arm/ronoth_lodev/ @NorthernDean
/boards/arm/xmc45_relax_kit/ @parthitce
/boards/arm/sam4e_xpro/ @nandojve
/boards/arm/sam4l_ek/ @nandojve
/boards/arm/sam4s_xplained/ @fallrisk
/boards/arm/sam_e70_xplained/ @nandojve
/boards/arm/sam_v71_xult/ @nandojve
/boards/arm/scobc_module1/ @yashi
/boards/arm/v2m_beetle/ @fvincenzo
/boards/arm/olimexino_stm32/ @ydamigos
/boards/arm/s32*/ @manuargue
/boards/arm/sensortile_box/ @avisconti
/boards/arm/steval_fcu001v1/ @Navin-Sankar
/boards/arm/stm32l1_disco/ @karlp
/boards/arm/stm32*_disco/ @erwango @ABOSTM @FRASTM
/boards/arm/stm32h735g_disco/ @benediktibk
/boards/arm/stm32f3_disco/ @ydamigos
/boards/arm/stm32*_eval/ @erwango @ABOSTM @FRASTM
/boards/arm/rcar_*/ @aaillet
/boards/arm/ubx_bmd345eval_nrf52840/ @Navin-Sankar @brec-u-blox
/boards/arm/nrf5340_audio_dk_nrf5340 @koffes @alexsven @erikrobstad @rick1082 @gWacey
/boards/common/ @mbolivar-ampere
/boards/deprecated.cmake @tejlmand
/boards/mips/ @frantony
/boards/nios2/ @nashif
/boards/nios2/altera_max10/ @nashif
/boards/arm/stm32_min_dev/ @sidcha
/boards/posix/ @aescolar @daor-oti
/boards/posix/nrf52_bsim/ @aescolar @wopu-ot
/boards/riscv/ @kgugala @pgielda
/boards/riscv/rv32m1_vega/ @dleach02
/boards/riscv/adp_xc7k_ae350/ @cwshu @kevinwang821020 @jimmyzhe
/boards/riscv/longan_nano/ @soburi
/boards/riscv/neorv32/ @henrikbrixandersen
/boards/riscv/niosv*/ @sweeaun
/boards/riscv/sparkfun_red_v_things_plus/ @soburi
/boards/riscv/stamp_c3/ @soburi
/boards/shields/ @erwango
/boards/shields/atmel_rf2xx/ @nandojve
/boards/shields/esp_8266/ @nandojve
/boards/shields/inventek_eswifi/ @nandojve
/boards/x86/ @dcpleung @nashif
/boards/x86/acrn/ @enjiamai
/boards/xtensa/ @nashif @dcpleung
/boards/xtensa/odroid_go/ @ydamigos
/boards/xtensa/nxp_adsp_imx8/ @iuliana-prodan @dbaluta
/boards/sparc/ @julius-barendt
/boards/arm64/qemu_cortex_a53/ @carlocaione
/boards/arm64/bcm958402m2_a72/ @abhishek-brcm
/boards/arm64/mimx8mm_evk/ @MrVan @JiafeiPan
/boards/arm64/mimx8mp_evk/ @MrVan @JiafeiPan
/boards/arm64/mimx8mn_evk/ @JiafeiPan
/boards/arm64/mimx93_evk/ @JiafeiPan
/boards/arm64/nxp_ls1046ardb/ @JiafeiPan
/boards/arm64/xenvm/ @lorc @firscity
/boards/arm64/fvp_baser_aemv8r/ @povergoing
/boards/arm64/fvp_base_revc_2xaemv8a/ @carlocaione
/boards/arm64/intel_socfpga_agilex_socdk/ @siclim @ngboonkhai
/boards/arm64/intel_socfpga_agilex5_socdk/ @chongteikheng
/boards/arm64/rcar_*/ @lorc @xakep-amatop
/boards/Kconfig @tejlmand @galak @nashif @nordicjm
# All cmake related files
/cmake/ @tejlmand @nashif
/cmake/*/arcmwdt/ @abrodkin @evgeniy-paltsev @tejlmand
/CMakeLists.txt @tejlmand @nashif
/doc/ @carlescufi
/doc/develop/tools/coccinelle.rst @himanshujha199640 @JuliaLawall
/doc/services/device_mgmt/smp_protocol.rst @de-nordic @nordicjm
/doc/services/device_mgmt/smp_groups/ @de-nordic @nordicjm
/doc/services/sensing/ @lixuzha @ghu0510 @qianruh
/doc/CMakeLists.txt @carlescufi
/doc/_scripts/ @carlescufi
/doc/connectivity/bluetooth/ @alwa-nordic @jhedberg @Vudentz
/doc/build/dts/ @galak @mbolivar-ampere
/doc/build/sysbuild/ @tejlmand @nordicjm
/doc/hardware/peripherals/canbus/ @alexanderwachter @henrikbrixandersen
/doc/security/ @ceolin @d3zd3z
/drivers/debug/ @nashif
/drivers/*/*sam4l* @nandojve
/drivers/*/*cc13xx_cc26xx* @bwitherspoon
/drivers/*/*gd32* @nandojve
/drivers/*/*litex* @mateusz-holenko @kgugala @pgielda
/drivers/*/*mcux* @mmahadevan108 @dleach02
/drivers/*/*stm32* @erwango @ABOSTM @FRASTM
/drivers/*/*native_posix* @aescolar @daor-oti
/drivers/*/*lpc11u6x* @mbittan @simonguinot
/drivers/*/*npcx* @MulinChao @ChiHuaL
/drivers/*/*andes* @cwshu @kevinwang821020 @jimmyzhe
/drivers/*/*ifx_cat1* @ifyall @npal-cy
/drivers/*/*neorv32* @henrikbrixandersen
/drivers/*/*_s32* @manuargue
/drivers/adc/ @anangl
/drivers/adc/adc_ads1x1x.c @XenuIsWatching
/drivers/adc/adc_stm32.c @cybertale
/drivers/adc/adc_rpi_pico.c @soburi
/drivers/adc/*ads114s0x* @benediktibk
/drivers/adc/*max11102_17* @benediktibk
/drivers/audio/*nrfx* @anangl
/drivers/auxdisplay/*pt6314* @xingrz
/drivers/auxdisplay/* @thedjnK
/drivers/bbram/* @yperess @sjg20 @jackrosenthal
/drivers/bluetooth/ @alwa-nordic @jhedberg @Vudentz
/drivers/bluetooth/hci/hci_esp32.c @sylvioalves
/drivers/cache/ @carlocaione
/drivers/syscon/ @carlocaione @yperess
/drivers/can/ @alexanderwachter @henrikbrixandersen
/drivers/can/*mcp2515* @karstenkoenig
/drivers/can/*rcar* @aaillet
/drivers/clock_control/*agilex* @siclim @gdengi
/drivers/clock_control/*nrf* @nordic-krch
/drivers/clock_control/*esp32* @extremegtx @sylvioalves
/drivers/clock_control/*cpg_mssr* @aaillet
/drivers/counter/ @nordic-krch
/drivers/console/ipm_console.c @finikorg
/drivers/console/semihost_console.c @luozhongyao
/drivers/console/jailhouse_debug_console.c @MrVan
/drivers/counter/counter_cmos.c @dcpleung
/drivers/counter/counter_ll_stm32_timer.c @kentjhall
/drivers/counter/*esp32* @sylvioalves
/drivers/counter/dw_timer.c @pbalsundar
/drivers/counter/counter_timer_shell.c @pbalsundar
/drivers/crypto/*nrf_ecb* @maciekfabia @anangl
/drivers/display/*rm68200* @mmahadevan108
/drivers/display/display_ili9342c.* @extremegtx
/drivers/dac/ @martinjaeger
/drivers/dac/*ad56xx* @benediktibk
/drivers/dai/ @kv2019i @marcinszkudlinski @abonislawski
/drivers/dai/intel/ @kv2019i @marcinszkudlinski @abonislawski
/drivers/dai/intel/ssp/ @kv2019i @marcinszkudlinski @abonislawski
/drivers/dai/intel/dmic/ @marcinszkudlinski @abonislawski
/drivers/dai/intel/alh/ @abonislawski
/drivers/dma/*dw* @tbursztyka
/drivers/dma/*dw_common* @abonislawski
/drivers/dma/*sam0* @Sizurka
/drivers/dma/dma_stm32* @cybertale @lowlander
/drivers/dma/*pl330* @raveenp
/drivers/dma/*iproc_pax* @raveenp
/drivers/dma/*intel_adsp* @teburd @abonislawski
/drivers/dma/*rpi_pico* @soburi
/drivers/dma/*xmc4xxx* @talih0
/drivers/edac/ @finikorg
/drivers/eeprom/ @henrikbrixandersen
/drivers/eeprom/eeprom_stm32.c @KwonTae-young
/drivers/entropy/*b91* @andy-liu-telink
/drivers/entropy/*bt_hci* @JordanYates
/drivers/entropy/*rv32m1* @dleach02
/drivers/entropy/*litex* @mateusz-holenko @kgugala @pgielda
/drivers/espi/ @albertofloyd @franciscomunoz @sjvasanth1
/drivers/ethernet/ @tbursztyka @jukkar
/drivers/ethernet/*dwmac* @npitre
/drivers/ethernet/*stm32* @Nukersson @lochej
/drivers/ethernet/*w5500* @parthitce
/drivers/ethernet/*xlnx_gem* @ibirnbaum
/drivers/ethernet/*smsc91x* @sgrrzhf
/drivers/ethernet/*adin2111* @GeorgeCGV
/drivers/ethernet/phy/ @rlubos @tbursztyka @arvinf @jukkar
/drivers/ethernet/phy/*adin2111* @GeorgeCGV
/drivers/mdio/ @rlubos @tbursztyka @arvinf
/drivers/mdio/*adin2111* @GeorgeCGV
/drivers/flash/ @nashif @de-nordic
/drivers/flash/*stm32_qspi* @lmajewski
/drivers/flash/*b91* @andy-liu-telink
/drivers/flash/*cadence* @ngboonkhai
/drivers/flash/*cc13xx_cc26xx* @pepe2k
/drivers/flash/*nrf* @de-nordic
/drivers/flash/*esp32* @sylvioalves
/drivers/fpga/ @tgorochowik @kgugala
/drivers/gpio/ @mnkp
/drivers/gpio/*b91* @andy-liu-telink
/drivers/gpio/*lmp90xxx* @henrikbrixandersen
/drivers/gpio/*nct38xx* @MulinChao @ChiHuaL
/drivers/gpio/*stm32* @erwango
/drivers/gpio/*eos_s3* @fkokosinski @kgugala
/drivers/gpio/*rcar* @aaillet
/drivers/gpio/*esp32* @sylvioalves
/drivers/gpio/*rpi_pico* @yonsch
/drivers/gpio/*xlnx_ps* @ibirnbaum
/drivers/gpio/*ads114s0x* @benediktibk
/drivers/gpio/*bd8lb600fs* @benediktibk
/drivers/gpio/*pcal64xxa* @benediktibk
/drivers/hwinfo/ @alexanderwachter
/drivers/i2c/i2c_common.c @sjg20
/drivers/i2c/i2c_emul.c @sjg20
/drivers/i2c/i2c_ite_enhance.c @GTLin08
/drivers/i2c/i2c_ite_it8xxx2.c @GTLin08
/drivers/i2c/i2c_shell.c @nashif
/drivers/i2c/Kconfig.i2c_emul @sjg20
/drivers/i2c/Kconfig.it8xxx2 @GTLin08
/drivers/i2c/target/*eeprom* @henrikbrixandersen
/drivers/i2c/Kconfig.test @mbolivar-ampere
/drivers/i2c/i2c_test.c @mbolivar-ampere
/drivers/i2c/*rcar* @aaillet
/drivers/i2s/*litex* @mateusz-holenko @kgugala @pgielda
/drivers/i2s/i2s_ll_stm32* @avisconti
/drivers/i2s/*nrfx* @anangl
/drivers/i3c/ @dcpleung
/drivers/i3c/i3c_cdns.c @XenuIsWatching
/drivers/ieee802154/ @rlubos @tbursztyka @jukkar @fgrandel
/drivers/ieee802154/*b91* @andy-liu-telink
/drivers/ieee802154/ieee802154_nrf5* @jciupis
/drivers/ieee802154/ieee802154_rf2xx* @tbursztyka @nandojve
/drivers/ieee802154/ieee802154_cc13xx* @bwitherspoon @cfriedt @vaishnavachath
/drivers/interrupt_controller/ @dcpleung @nashif
/drivers/interrupt_controller/intc_gic.c @stephanosio
/drivers/interrupt_controller/*esp32* @sylvioalves
/drivers/interrupt_controller/intc_nuclei_eclic.c @soburi
/drivers/ipm/ipm_mhu* @karl-zh
/drivers/ipm/Kconfig.nrfx @masz-nordic
/drivers/ipm/Kconfig.nrfx_ipc_channel @masz-nordic
/drivers/ipm/ipm_cavs* @dcpleung @andyross
/drivers/ipm/ipm_nrfx_ipc.c @masz-nordic
/drivers/ipm/ipm_nrfx_ipc.h @masz-nordic
/drivers/ipm/ipm_stm32_ipcc.c @arnopo
/drivers/ipm/ipm_stm32_hsem.c @cameled
/drivers/ipm/ipm_esp32.c @uLipe
/drivers/ipm/ipm_ivshmem.c @uLipe
/drivers/kscan/ @VenkatKotakonda @franciscomunoz @sjvasanth1
/drivers/kscan/*xec* @franciscomunoz @sjvasanth1
/drivers/kscan/*ft5336* @MaureenHelm
/drivers/kscan/*ht16k33* @henrikbrixandersen
/drivers/led/ @Mani-Sadhasivam
/drivers/led_strip/ @mbolivar-ampere
/drivers/lora/ @Mani-Sadhasivam
/drivers/mbox/ @carlocaione
/drivers/misc/ @tejlmand
/drivers/misc/ft8xx/ @hubertmis
/drivers/mm/ @dcpleung
/drivers/modem/hl7800.c @rerickson1
/drivers/modem/simcom-sim7080.c @lgehreke
/drivers/modem/simcom-sim7080.h @lgehreke
/drivers/modem/Kconfig.hl7800 @rerickson1
/drivers/modem/Kconfig.simcom-sim7080 @lgehreke
/drivers/pcie/ @dcpleung @nashif @jhedberg
/drivers/peci/ @albertofloyd @franciscomunoz @sjvasanth1
/drivers/pinctrl/ @gmarull
/drivers/pinctrl/*esp32* @sylvioalves
/drivers/pinctrl/*it8xxx2* @ite
/drivers/pm_cpu_ops/ @carlocaione @gdengi
/drivers/pm_cpu_ops/psci_shell.c @nbalabak @gdengi
/drivers/power_domain/ @ceolin
/drivers/ps2/ @franciscomunoz @sjvasanth1
/drivers/ps2/*xec* @franciscomunoz @sjvasanth1
/drivers/ps2/*npcx* @MulinChao @ChiHuaL
/drivers/pwm/*b91* @andy-liu-telink
/drivers/pwm/*pca9685* @nixward
/drivers/pwm/*rpi_pico* @burumaj
/drivers/pwm/*rv32m1* @henrikbrixandersen
/drivers/pwm/*sam0* @nzmichaelh
/drivers/pwm/*test* @JordanYates
/drivers/pwm/*xlnx* @henrikbrixandersen
/drivers/pwm/pwm_capture.c @henrikbrixandersen
/drivers/pwm/pwm_shell.c @henrikbrixandersen
/drivers/pwm/*gecko* @sun681
/drivers/pwm/*it8xxx2* @RuibinChang
/drivers/pwm/*esp32* @LucasTambor
/drivers/pwm/*rcar* @aaillet
/drivers/pwm/*max31790* @benediktibk
/drivers/regulator/* @gmarull
/drivers/regulator/regulator_pca9420.c @danieldegrasse
/drivers/regulator/regulator_rpi_pico.c @soburi
/drivers/regulator/regulator_shell.c @danieldegrasse
/drivers/reset/ @andrei-edward-popa
/drivers/reset/reset_intel_socfpga.c @nbalabak
/drivers/reset/Kconfig.intel_socfpga @nbalabak
/drivers/sensor/ @MaureenHelm
/drivers/sensor/ams_iAQcore/ @alexanderwachter
/drivers/sensor/ens210/ @alexanderwachter
/drivers/sensor/grow_r502a/ @DineshDK03
/drivers/sensor/hts*/ @avisconti
/drivers/sensor/ina23*/ @bbilas
/drivers/sensor/lis*/ @avisconti
/drivers/sensor/lps*/ @avisconti
/drivers/sensor/lsm*/ @avisconti
/drivers/sensor/mpr/ @sven-hm
/drivers/sensor/qdec_stm32/ @valeriosetti
/drivers/sensor/rpi_pico_temp/ @soburi
/drivers/sensor/st*/ @avisconti
/drivers/serial/*b91* @andy-liu-telink
/drivers/serial/uart_altera_jtag.c @nashif @gohshunjing
/drivers/serial/uart_altera.c @gohshunjing
/drivers/serial/*ns16550* @dcpleung @nashif @gdengi
/drivers/serial/*nrfx* @anangl
/drivers/serial/uart_liteuart.c @mateusz-holenko @kgugala @pgielda
/drivers/serial/Kconfig.mcux_iuart @Mani-Sadhasivam
/drivers/serial/uart_mcux_iuart.c @Mani-Sadhasivam
/drivers/serial/Kconfig.rtt @carlescufi @pkral78
/drivers/serial/uart_rtt.c @carlescufi @pkral78
/drivers/serial/*rpi_pico* @yonsch
/drivers/serial/Kconfig.xlnx @wjliang
/drivers/serial/uart_xlnx_ps.c @wjliang
/drivers/serial/uart_xlnx_uartlite.c @henrikbrixandersen
/drivers/serial/*xmc4xxx* @parthitce
/drivers/serial/*numicro* @ssekar15
/drivers/serial/*apbuart* @julius-barendt
/drivers/serial/*rcar* @aaillet
/drivers/serial/Kconfig.test @str4t0m
/drivers/serial/serial_test.c @str4t0m
/drivers/serial/Kconfig.xen @lorc @firscity
/drivers/serial/uart_hvc_xen.c @lorc @firscity
/drivers/serial/uart_hvc_xen_consoleio.c @lorc @firscity
/drivers/serial/Kconfig.it8xxx2 @GTLin08
/drivers/serial/uart_ite_it8xxx2.c @GTLin08
/drivers/smbus/ @finikorg
/drivers/sip_svc/ @maheshraotm
/drivers/disk/ @jfischer-no
/drivers/disk/sdmmc_sdhc.h @JunYangNXP
/drivers/disk/sdmmc_stm32.c @anthonybrandon
/drivers/net/ @rlubos @tbursztyka @jukkar
/drivers/ptp_clock/ @tbursztyka @jukkar
/drivers/spi/ @tbursztyka
/drivers/spi/*b91* @andy-liu-telink
/drivers/spi/spi_rv32m1_lpspi* @karstenkoenig
/drivers/spi/*esp32* @sylvioalves
/drivers/spi/*pl022* @soburi
/drivers/sdhc/ @danieldegrasse
/drivers/timer/*apic* @dcpleung @nashif
/drivers/timer/apic_tsc.c @andyross
/drivers/timer/*arm_arch* @carlocaione
/drivers/timer/*cortex_m_systick* @anangl
/drivers/timer/*altera_avalon* @nashif
/drivers/timer/*riscv_machine* @kgugala @pgielda
/drivers/timer/*ite_it8xxx2* @ite
/drivers/timer/*xlnx_psttc* @wjliang @stephanosio
/drivers/timer/*cc13xx_cc26xx_rtc* @vanti
/drivers/timer/*cavs* @dcpleung
/drivers/timer/*stm32_lptim* @FRASTM
/drivers/timer/*leon_gptimer* @julius-barendt
/drivers/timer/*mips_cp0* @frantony
/drivers/timer/*rcar_cmt* @aaillet
/drivers/timer/*esp32c3_sys* @uLipe
/drivers/timer/*sam0_rtc* @bendiscz
/drivers/timer/*arcv2* @ruuddw
/drivers/timer/*xtensa* @dcpleung
/drivers/timer/*rv32m1_lptmr* @mbolivar
/drivers/timer/*nrf_rtc* @anangl
/drivers/timer/*hpet* @dcpleung
/drivers/usb/ @jfischer-no
/drivers/usb/device/usb_dc_stm32.c @ydamigos @loicpoulain
/drivers/usb_c/ @sambhurst
/drivers/video/ @loicpoulain
/drivers/i2c/*b91* @andy-liu-telink
/drivers/i2c/i2c_ll_stm32* @ydamigos
/drivers/i2c/i2c_rv32m1_lpi2c* @henrikbrixandersen
/drivers/i2c/*sam0* @Sizurka
/drivers/i2c/i2c_dw* @dcpleung
/drivers/i2c/*tca954x* @kurddt
/drivers/*/*xec* @franciscomunoz @albertofloyd @sjvasanth1
/drivers/w1/ @str4t0m
/drivers/watchdog/*gecko* @oanerer
/drivers/watchdog/*sifive* @katsuster
/drivers/watchdog/wdt_handlers.c @dcpleung @nashif
/drivers/watchdog/*cc32xx* @pavlohamov
/drivers/watchdog/wdt_ite_it8xxx2.c @RuibinChang
/drivers/watchdog/Kconfig.it8xxx2 @RuibinChang
/drivers/watchdog/wdt_counter.c @nordic-krch
/drivers/watchdog/*rpi_pico* @thedjnK
/drivers/watchdog/*dw* @softwarecki
/drivers/watchdog/*ifx* @sreeramIfx
/drivers/wifi/ @rlubos @tbursztyka @jukkar
/drivers/wifi/esp_at/ @mniestroj
/drivers/wifi/eswifi/ @loicpoulain @nandojve
/drivers/wifi/winc1500/ @kludentwo
/drivers/virtualization/ @tbursztyka
/drivers/xen/ @lorc @firscity
/dts/arc/ @abrodkin @ruuddw @iriszzw @evgeniy-paltsev
/dts/arm/acsip/ @NorthernDean
/dts/arm/aspeed/ @aspeeddylan
/dts/arm/atmel/sam4e* @nandojve
/dts/arm/atmel/sam4l* @nandojve
/dts/arm/atmel/samr21.dtsi @benpicco
/dts/arm/atmel/sam*5*.dtsi @benpicco
/dts/arm/atmel/same70* @nandojve
/dts/arm/atmel/samv71* @nandojve
/dts/arm/atmel/ @galak
/dts/arm/broadcom/ @sbranden
/dts/arm/cypress/ @ifyall @npal-cy
/dts/arm/gigadevice/ @nandojve
/dts/arm/infineon/xmc4* @parthitce @ifyall @npal-cy
/dts/arm/infineon/psoc6/ @ifyall @npal-cy
/dts/arm64/ @carlocaione
/dts/arm64/armv8-r.dtsi @povergoing
/dts/arm64/intel/*intel_socfpga* @siclim
/dts/arm64/nxp/ @JiafeiPan
/dts/arm64/renesas/ @lorc @xakep-amatop
/dts/arm/quicklogic/ @fkokosinski @kgugala
/dts/arm/seeed/ @str4t0m
/dts/arm/st/ @erwango
/dts/arm/st/h7/*stm32h735* @benediktibk
/dts/arm/st/l4/*stm32l451* @benediktibk
/dts/arm/ti/cc13?2* @bwitherspoon
/dts/arm/ti/cc26?2* @bwitherspoon
/dts/arm/ti/cc3235* @vanti
/dts/arm/nordic/ @anangl @carlescufi
/dts/arm/nuvoton/ @ssekar15 @MulinChao @ChiHuaL
/dts/arm/nxp/ @mmahadevan108 @dleach02
/dts/arm/nxp/nxp_s32* @manuargue
/dts/arm/microchip/ @franciscomunoz @albertofloyd @sjvasanth1
/dts/arm/rpi_pico/ @yonsch
/dts/arm/silabs/efm32_pg_1b.dtsi @rdmeneze
/dts/arm/silabs/efm32gg11b* @oanerer
/dts/arm/silabs/efr32bg13p* @mnkp
/dts/arm/silabs/efr32bg22* @kgugala @fkokosinski @pczarnecki
/dts/arm/silabs/efr32xg13p* @mnkp
/dts/arm/silabs/efm32pg1b* @rdmeneze
/dts/arm/silabs/efr32mg21* @l-alfred
/dts/arm/silabs/efr32fg13* @yonsch
/dts/riscv/ @kgugala @pgielda
/dts/riscv/ite/ @ite
/dts/riscv/microchip/microchip-miv.dtsi @galak
/dts/riscv/openisa/rv32m1* @dleach02
/dts/riscv/riscv32-litex-vexriscv.dtsi @mateusz-holenko @kgugala @pgielda
/dts/riscv/starfive/ @rajnesh-kanwal
/dts/riscv/andes/andes_v5* @cwshu @kevinwang821020 @jimmyzhe
/dts/riscv/niosv/ @sweeaun
/dts/arm/armv*m.dtsi @galak @ioannisg
/dts/arm/armv7-a.dtsi @ibirnbaum
/dts/arm/armv7-r.dtsi @bbolen @stephanosio
/dts/arm/xilinx/ @bbolen @stephanosio
/dts/arm/renesas/rcar/ @aaillet
/dts/x86/ @jhedberg
/dts/xtensa/xtensa.dtsi @ydamigos
/dts/xtensa/intel/ @dcpleung
/dts/xtensa/espressif/ @sylvioalves
/dts/xtensa/nxp/ @iuliana-prodan @dbaluta
/dts/sparc/ @julius-barendt
/dts/bindings/ @galak
/dts/bindings/can/ @alexanderwachter @henrikbrixandersen
/dts/bindings/i2c/zephyr*i2c-emul*.yaml @sjg20
/dts/bindings/adc/st*stm32-adc.yaml @cybertale
/dts/bindings/adc/*ads114s08.yaml @benediktibk
/dts/bindings/adc/*max111* @benediktibk
/dts/bindings/modem/*hl7800.yaml @rerickson1
/dts/bindings/serial/ns16550.yaml @dcpleung @nashif
/dts/bindings/counter/snps,dw-timers.yaml @pbalsundar
/dts/bindings/wifi/*esp-at.yaml @mniestroj
/dts/bindings/*/*gd32* @nandojve
/dts/bindings/*/*npcx* @MulinChao @ChiHuaL
/dts/bindings/*/*psoc6* @ifyall @npal-cy
/dts/bindings/*/*infineon*cat1* @ifyall @npal-cy
/dts/bindings/*/nordic* @anangl
/dts/bindings/*/nxp* @mmahadevan108 @dleach02
/dts/bindings/*/nxp*s32* @manuargue
/dts/bindings/*/openisa* @dleach02
/dts/bindings/*/raspberrypi*pico* @yonsch
/dts/bindings/*/st* @erwango
/dts/bindings/sensor/ams* @alexanderwachter
/dts/bindings/*/sifive* @mateusz-holenko @kgugala @pgielda
/dts/bindings/*/litex* @mateusz-holenko @kgugala @pgielda
/dts/bindings/*/vexriscv* @mateusz-holenko @kgugala @pgielda
/dts/bindings/*/andes* @cwshu @kevinwang821020 @jimmyzhe
/dts/bindings/*/neorv32* @henrikbrixandersen
/dts/bindings/*/*lan91c111* @sgrrzhf
/dts/bindings/i3c/ @dcpleung
/dts/bindings/pm_cpu_ops/* @carlocaione
/dts/bindings/ethernet/*gem.yaml @ibirnbaum
/dts/bindings/auxdisplay/*pt6314.yaml @xingrz
/dts/bindings/auxdisplay/* @thedjnK
/dts/posix/ @aescolar @daor-oti
/dts/bindings/sensor/*bme680* @BoschSensortec
/dts/bindings/sensor/*ina23* @bbilas
/dts/bindings/sensor/st* @avisconti
/dts/bindings/sensor/zephyr,sensing.yaml @lixuzha @ghu0510 @qianruh
/dts/bindings/sensor/zephyr,sensing*.yaml @lixuzha @ghu0510 @qianruh
/dts/bindings/smbus/ @finikorg
/dts/bindings/sip_svc/ @maheshraotm
/dts/bindings/cpu/intel,niosv.yaml @sweeaun
/dts/bindings/reset/intel,socfpga-reset.yaml @nbalabak
/dts/bindings/gpio/*pcal64* @benediktibk
/dts/bindings/gpio/*bd8lb600fs* @benediktibk
/dts/bindings/gpio/*ads114s0x* @benediktibk
/dts/bindings/pwm/*max31790* @benediktibk
/dts/bindings/dac/*ad56* @benediktibk
/dts/common/ @galak
/include/ @nashif @carlescufi @galak @MaureenHelm
/include/zephyr/drivers/*/*litex* @mateusz-holenko @kgugala @pgielda
/include/zephyr/drivers/adc.h @anangl
/include/zephyr/drivers/adc/ads114s0x.h @benediktibk
/include/zephyr/drivers/auxdisplay.h @thedjnK
/include/zephyr/drivers/can.h @alexanderwachter @henrikbrixandersen
/include/zephyr/drivers/can/ @alexanderwachter @henrikbrixandersen
/include/zephyr/drivers/counter.h @nordic-krch
/include/zephyr/drivers/dac.h @martinjaeger
/include/zephyr/drivers/espi.h @albertofloyd @franciscomunoz @sjvasanth1
/include/zephyr/drivers/bluetooth/ @alwa-nordic @jhedberg @Vudentz
/include/zephyr/drivers/flash.h @nashif @carlescufi @galak @MaureenHelm @de-nordic
/include/zephyr/drivers/i2c_emul.h @sjg20
/include/zephyr/drivers/i3c.h @dcpleung
/include/zephyr/drivers/i3c/ @dcpleung
/include/zephyr/drivers/led/ht16k33.h @henrikbrixandersen
/include/zephyr/drivers/interrupt_controller/ @dcpleung @nashif
/include/zephyr/drivers/interrupt_controller/gic.h @stephanosio
/include/zephyr/drivers/modem/hl7800.h @rerickson1
/include/zephyr/drivers/pcie/ @dcpleung
/include/zephyr/drivers/hwinfo.h @alexanderwachter
/include/zephyr/drivers/led.h @Mani-Sadhasivam
/include/zephyr/drivers/led_strip.h @mbolivar-ampere
/include/zephyr/drivers/sensor.h @MaureenHelm
/include/zephyr/drivers/smbus.h @finikorg
/include/zephyr/drivers/spi.h @tbursztyka
/include/zephyr/drivers/sip_svc/ @maheshraotm
/include/zephyr/drivers/lora.h @Mani-Sadhasivam
/include/zephyr/drivers/peci.h @albertofloyd @franciscomunoz @sjvasanth1
/include/zephyr/drivers/pm_cpu_ops.h @carlocaione
/include/zephyr/drivers/pm_cpu_ops/ @carlocaione
/include/zephyr/drivers/w1.h @str4t0m
/include/zephyr/drivers/pwm/max31790.h @benediktibk
/include/zephyr/app_memory/ @dcpleung
/include/zephyr/arch/arc/ @abrodkin @ruuddw @evgeniy-paltsev
/include/zephyr/arch/arc/arch.h @abrodkin @ruuddw @evgeniy-paltsev
/include/zephyr/arch/arc/v2/irq.h @abrodkin @ruuddw @evgeniy-paltsev
/include/zephyr/arch/arm @MaureenHelm @galak @ioannisg
/include/zephyr/arch/arm/cortex_a_r/ @stephanosio
/include/zephyr/arch/arm64/ @carlocaione
/include/zephyr/arch/arm64/cortex_r/ @povergoing
/include/zephyr/arch/arm/irq.h @carlocaione
/include/zephyr/arch/mips/ @frantony
/include/zephyr/arch/nios2/ @nashif
/include/zephyr/arch/nios2/arch.h @nashif
/include/zephyr/arch/posix/ @aescolar @daor-oti
/include/zephyr/arch/riscv/ @kgugala @pgielda
/include/zephyr/arch/x86/ @jhedberg @dcpleung
/include/zephyr/arch/common/ @andyross @nashif
/include/zephyr/arch/xtensa/ @andyross @dcpleung
/include/zephyr/arch/sparc/ @julius-barendt
/include/zephyr/sys/atomic.h @andyross
/include/zephyr/bluetooth/ @alwa-nordic @jhedberg @Vudentz @sjanc
/include/zephyr/bluetooth/audio/ @jhedberg @Vudentz @Thalley
/include/zephyr/cache.h @carlocaione @andyross
/include/zephyr/canbus/ @alexanderwachter @henrikbrixandersen
/include/zephyr/tracing/ @nashif
/include/zephyr/debug/ @nashif
/include/zephyr/debug/coredump.h @dcpleung
/include/zephyr/debug/gdbstub.h @ceolin
/include/zephyr/device.h @tbursztyka @nashif
/include/zephyr/devicetree.h @galak
/include/zephyr/devicetree/can.h @henrikbrixandersen
/include/zephyr/dt-bindings/clock/kinetis_mcg.h @henrikbrixandersen
/include/zephyr/dt-bindings/clock/kinetis_scg.h @henrikbrixandersen
/include/zephyr/dt-bindings/ethernet/xlnx_gem.h @ibirnbaum
/include/zephyr/dt-bindings/pcie/ @dcpleung
/include/zephyr/dt-bindings/pinctrl/esp* @sylvioalves
/include/zephyr/dt-bindings/pwm/*it8xxx2* @RuibinChang
/include/zephyr/dt-bindings/usb/usb.h @galak
/include/zephyr/dt-bindings/adc/ads114s0x_adc.h @benediktibk
/include/zephyr/drivers/emul.h @sjg20
/include/zephyr/fs/ @nashif @de-nordic
/include/zephyr/init.h @nashif @andyross
/include/zephyr/irq.h @dcpleung @nashif @andyross
/include/zephyr/irq_offload.h @dcpleung @nashif @andyross
/include/zephyr/kernel.h @dcpleung @nashif @andyross
/include/zephyr/kernel_version.h @dcpleung @nashif @andyross
/include/zephyr/linker/app_smem*.ld @dcpleung @nashif
/include/zephyr/linker/ @dcpleung @nashif @andyross
/include/zephyr/logging/ @nordic-krch
/include/zephyr/lorawan/lorawan.h @Mani-Sadhasivam
/include/zephyr/mgmt/osdp.h @sidcha
/include/zephyr/mgmt/mcumgr/ @nordicjm
/include/zephyr/net/ @rlubos @tbursztyka @jukkar
/include/zephyr/net/buf.h @jhedberg @tbursztyka @rlubos @jukkar
/include/zephyr/net/coap*.h @rlubos
/include/zephyr/net/conn_mgr*.h @rlubos @glarsennordic @jukkar
/include/zephyr/net/gptp.h @rlubos @jukkar @fgrandel
/include/zephyr/net/ieee802154*.h @rlubos @tbursztyka @jukkar @fgrandel
/include/zephyr/net/lwm2m*.h @rlubos
/include/zephyr/net/mqtt.h @rlubos
/include/zephyr/net/mqtt_sn.h @rlubos @BeckmaR
/include/zephyr/net/net_pkt_filter.h @npitre
/include/zephyr/posix/ @cfreidt
/include/zephyr/pm/pm.h @nashif @ceolin
/include/zephyr/drivers/ptp_clock.h @tbursztyka @jukkar
/include/zephyr/rtio/ @teburd
/include/zephyr/sensing/ @lixuzha @ghu0510 @qianruh
/include/zephyr/shared_irq.h @dcpleung @nashif @andyross
/include/zephyr/shell/ @jakub-uC @nordic-krch
/include/zephyr/shell/shell_mqtt.h @ycsin
/include/zephyr/sw_isr_table.h @dcpleung @nashif @andyross
/include/zephyr/sd/ @danieldegrasse
/include/zephyr/sip_svc/ @maheshraotm
/include/zephyr/sys_clock.h @dcpleung @nashif @andyross
/include/zephyr/sys/sys_io.h @dcpleung @nashif @andyross
/include/zephyr/sys/kobject.h @dcpleung @nashif
/include/zephyr/toolchain.h @dcpleung @andyross @nashif
/include/zephyr/toolchain/ @dcpleung @nashif @andyross
/include/zephyr/zephyr.h @dcpleung @nashif @andyross
/kernel/ @dcpleung @nashif @andyross
/lib/cpp/ @stephanosio
/lib/smf/ @sambhurst
/lib/util/ @carlescufi @jakub-uC
/lib/util/fnmatch/ @carlescufi @jakub-uC
/lib/open-amp/ @arnopo
/lib/os/ @dcpleung @nashif @andyross
/lib/os/cbprintf_packaged.c @npitre
/lib/posix/ @cfriedt
/lib/posix/getopt/ @jakub-uC
/subsys/portability/ @nashif
/subsys/sensing/ @lixuzha @ghu0510 @qianruh
/lib/libc/ @nashif
/lib/libc/arcmwdt/ @abrodkin @ruuddw @evgeniy-paltsev
/misc/ @tejlmand
/modules/ @nashif
/modules/canopennode/ @henrikbrixandersen
/modules/mbedtls/ @ceolin @d3zd3z
/modules/hal_gigadevice/ @nandojve
/modules/hal_nordic/nrf_802154/ @jciupis
/modules/trusted-firmware-m/ @microbuilder
/kernel/device.c @andyross @nashif
/kernel/idle.c @andyross @nashif
/samples/ @nashif
/samples/application_development/sysbuild/ @tejlmand @nordicjm
/samples/basic/minimal/ @carlescufi
/samples/basic/servo_motor/boards/*microbit* @jhe
/samples/bluetooth/ @jhedberg @Vudentz @alwa-nordic @sjanc
/samples/compression/ @Navin-Sankar
/samples/drivers/can/ @alexanderwachter @henrikbrixandersen
/samples/drivers/clock_control_litex/ @mateusz-holenko @kgugala @pgielda
/samples/drivers/eeprom/ @henrikbrixandersen
/samples/drivers/ht16k33/ @henrikbrixandersen
/samples/drivers/lora/ @Mani-Sadhasivam
/samples/drivers/smbus/ @finikorg
/samples/subsys/lorawan/ @Mani-Sadhasivam
/samples/modules/canopennode/ @henrikbrixandersen
/samples/net/ @rlubos @tbursztyka @jukkar
/samples/net/cloud/tagoio_http_post/ @nandojve
/samples/net/dns_resolve/ @rlubos @tbursztyka @jukkar
/samples/net/gptp/ @rlubos @jukkar @fgrandel
/samples/net/lwm2m_client/ @rlubos
/samples/net/mqtt_publisher/ @rlubos
/samples/net/mqtt_sn_publisher/ @rlubos @BeckmaR
/samples/net/sockets/coap_*/ @rlubos
/samples/net/sockets/ @rlubos @tbursztyka @jukkar
/samples/sensor/ @MaureenHelm
/samples/shields/ @avisconti
/samples/subsys/ipc/ipc_service/icmsg @emob-nordic
/samples/subsys/logging/ @nordic-krch @jakub-uC
/samples/subsys/logging/syst/ @dcpleung
/samples/subsys/shell/ @jakub-uC @nordic-krch @gdengi
/samples/subsys/sip_svc/ @maheshraotm
/samples/subsys/mgmt/mcumgr/ @de-nordic @nordicjm
/samples/subsys/mgmt/updatehub/ @nandojve @otavio
/samples/subsys/mgmt/osdp/ @sidcha
/samples/subsys/usb/ @jfischer-no
/samples/subsys/usb_c/ @sambhurst
/samples/subsys/pm/ @nashif @ceolin
/samples/subsys/sensing/ @lixuzha @ghu0510 @qianruh
/samples/tfm_integration/ @microbuilder
/samples/userspace/ @dcpleung @nashif
/scripts/release/bug_bash.py @cfriedt
/scripts/coccicheck @himanshujha199640 @JuliaLawall
/scripts/coccinelle/ @himanshujha199640 @JuliaLawall
/scripts/coredump/ @dcpleung
/scripts/footprint/ @nashif
/scripts/kconfig/ @ulfalizer
/scripts/logging/dictionary/ @dcpleung
/scripts/native_simulator/ @aescolar
/scripts/pylib/twister/expr_parser.py @nashif
/scripts/schemas/twister/ @nashif
/scripts/build/gen_app_partitions.py @dcpleung @nashif
scripts/build/gen_image_info.py @tejlmand
/scripts/get_maintainer.py @nashif
/scripts/dts/ @mbolivar-ampere @galak
/scripts/release/ @nashif
/scripts/ci/ @nashif
/scripts/ci/check_compliance.py @nashif @carlescufi
/arch/x86/gen_gdt.py @dcpleung @nashif
/arch/x86/gen_idt.py @dcpleung @nashif
/scripts/build/gen_kobject_list.py @dcpleung @nashif
/scripts/build/gen_kobject_placeholders.py @dcpleung
/scripts/build/gen_syscalls.py @dcpleung @nashif
/scripts/list_boards.py @mbolivar-ampere
/scripts/build/process_gperf.py @dcpleung @nashif
/scripts/build/gen_relocate_app.py @dcpleung
/scripts/generate_usb_vif/ @madhurimaparuchuri
/scripts/requirements*.txt @mbolivar-ampere @galak @nashif
/scripts/tests/build/test_subfolder_list.py @rmstoi
/scripts/tracing/ @nashif
/scripts/pylib/twister/ @nashif
/scripts/twister @nashif
/scripts/series-push-hook.sh @erwango
/scripts/utils/pinctrl_nrf_migrate.py @gmarull
/scripts/utils/migrate_mcumgr_kconfigs.py @de-nordic
/scripts/west_commands/ @mbolivar-ampere
/scripts/west_commands/blobs.py @carlescufi
/scripts/west_commands/fetchers/ @carlescufi
/scripts/west_commands/runners/gd32isp.py @mbolivar-ampere @nandojve
/scripts/west_commands/tests/test_gd32isp.py @mbolivar-ampere @nandojve
/scripts/west-commands.yml @mbolivar-ampere
/scripts/zephyr_module.py @tejlmand
/scripts/build/uf2conv.py @petejohanson
/scripts/build/user_wordsize.py @cfriedt
/scripts/valgrind.supp @aescolar @daor-oti
/share/sysbuild/ @tejlmand @nordicjm
/share/zephyr-package/ @tejlmand
/share/zephyrunittest-package/ @tejlmand
/subsys/bluetooth/ @alwa-nordic @jhedberg @Vudentz
/subsys/bluetooth/audio/ @jhedberg @Vudentz @Thalley @sjanc
/subsys/bluetooth/controller/ @carlescufi @cvinayak @thoh-ot @kruithofa
/subsys/bluetooth/host/ @alwa-nordic @jhedberg @Vudentz @sjanc
/subsys/bluetooth/mesh/ @jhedberg @PavelVPV @Vudentz @LingaoM
/subsys/canbus/ @alexanderwachter @henrikbrixandersen
/subsys/debug/ @nashif
/subsys/debug/coredump/ @dcpleung
/subsys/debug/gdbstub/ @ceolin
/subsys/debug/gdbstub.c @ceolin
/subsys/dfu/ @de-nordic @nordicjm
/subsys/disk/ @jfischer-no
/subsys/dsp/ @yperess
/subsys/tracing/ @nashif
/subsys/debug/asan_hacks.c @aescolar @daor-oti
/subsys/demand_paging/ @dcpleung @nashif
/subsys/emul/ @sjg20
/subsys/fb/ @jfischer-no
/subsys/fs/ @nashif
/subsys/fs/nvs/ @Laczen
/subsys/ipc/ @carlocaione
/subsys/ipc/ipc_service/*/*icmsg* @emob-nordic
/subsys/logging/ @nordic-krch
/subsys/logging/backends/log_backend_net.c @nordic-krch @rlubos @jukkar
/subsys/lorawan/ @Mani-Sadhasivam
/subsys/mgmt/ec_host_cmd/ @jettr
/subsys/mgmt/mcumgr/ @carlescufi @de-nordic @nordicjm
/subsys/mgmt/hawkbit/ @Navin-Sankar
/subsys/mgmt/updatehub/ @nandojve @otavio
/subsys/mgmt/osdp/ @sidcha
/subsys/modbus/ @jfischer-no
/subsys/net/buf.c @jhedberg @tbursztyka @rlubos @jukkar
/subsys/net/conn_mgr/ @rlubos @glarsennordic @jukkar
/subsys/net/ip/ @rlubos @tbursztyka @jukkar
/subsys/net/lib/ @rlubos @tbursztyka @jukkar
/subsys/net/lib/dns/ @rlubos @tbursztyka @cfriedt @jukkar
/subsys/net/lib/lwm2m/ @rlubos
/subsys/net/lib/config/ @rlubos @tbursztyka @jukkar
/subsys/net/lib/mqtt/ @rlubos
/subsys/net/lib/mqtt_sn/ @rlubos @BeckmaR
/subsys/net/lib/coap/ @rlubos
/subsys/net/lib/sockets/socketpair.c @cfriedt
/subsys/net/lib/sockets/ @rlubos @tbursztyka @jukkar
/subsys/net/lib/tls_credentials/ @rlubos
/subsys/net/l2/ @rlubos @tbursztyka @jukkar
/subsys/net/l2/ethernet/gptp/ @rlubos @jukkar @fgrandel
/subsys/net/l2/ieee802154/ @rlubos @tbursztyka @jukkar @fgrandel
/subsys/net/l2/canbus/ @alexanderwachter
/subsys/net/pkt_filter/ @npitre
/subsys/net/*/openthread/ @rlubos
/subsys/pm/ @nashif @ceolin
/subsys/random/ @dleach02
/subsys/shell/ @jakub-uC @nordic-krch
/subsys/shell/backends/shell_mqtt.c @ycsin
/subsys/sd/ @danieldegrasse
/subsys/sip_svc/ @maheshraotm
/subsys/task_wdt/ @martinjaeger
/subsys/testsuite/ @nashif
/subsys/testsuite/ztest/*/ztress* @nordic-krch
/subsys/timing/ @nashif @dcpleung
/subsys/usb/ @jfischer-no
/subsys/usb/usb_c/ @sambhurst
/tests/ @nashif
/tests/arch/arm/ @ioannisg @stephanosio
/tests/benchmarks/cmsis_dsp/ @stephanosio
/tests/boards/native_posix/ @aescolar @daor-oti
/tests/bluetooth/ @alwa-nordic @jhedberg @Vudentz @sjanc
/tests/bluetooth/audio/ @jhedberg @Vudentz @wopu-ot @Thalley
/tests/bluetooth/controller/ @cvinayak @thoh-ot @kruithofa @erbr-ot @sjanc @ppryga
/tests/bsim/bluetooth/ @alwa-nordic @jhedberg @Vudentz @wopu-ot
/tests/bsim/bluetooth/audio/ @jhedberg @Vudentz @wopu-ot @Thalley
/tests/bsim/bluetooth/mesh/ @jhedberg @Vudentz @wopu-ot @PavelVPV
/tests/bluetooth/mesh_shell/ @jhedberg @Vudentz @sjanc @PavelVPV
/tests/bluetooth/tester/ @alwa-nordic @jhedberg @Vudentz @sjanc
/tests/posix/ @cfriedt
/tests/crypto/ @ceolin
/tests/crypto/mbedtls/ @nashif @ceolin @d3zd3z
/tests/drivers/can/ @alexanderwachter @henrikbrixandersen
/tests/drivers/counter/ @nordic-krch
/tests/drivers/eeprom/ @henrikbrixandersen @sjg20
/tests/drivers/flash_simulator/ @de-nordic
/tests/drivers/gpio/ @mnkp
/tests/drivers/hwinfo/ @alexanderwachter
/tests/drivers/smbus/ @finikorg
/tests/drivers/spi/ @tbursztyka
/tests/drivers/uart/uart_async_api/ @anangl
/tests/drivers/w1/ @str4t0m
/tests/kernel/ @dcpleung @andyross @nashif
/tests/lib/ @nashif
/tests/lib/cmsis_dsp/ @stephanosio
/tests/net/ @rlubos @tbursztyka @jukkar
/tests/net/buf/ @jhedberg @tbursztyka @jukkar
/tests/net/conn_mgr_monitor/ @rlubos @glarsennordic @jukkar
/tests/net/conn_mgr_conn/ @rlubos @glarsennordic @jukkar
/tests/net/ieee802154/l2/ @rlubos @tbursztyka @jukkar @fgrandel
/tests/net/lib/ @rlubos @tbursztyka @jukkar
/tests/net/lib/http_header_fields/ @rlubos @tbursztyka @jukkar
/tests/net/lib/mqtt_packet/ @rlubos
/tests/net/lib/mqtt_sn_packet/ @rlubos @BeckmaR
/tests/net/lib/mqtt_sn_client/ @rlubos @BeckmaR
/tests/net/lib/coap/ @rlubos
/tests/net/npf/ @npitre
/tests/net/socket/socketpair/ @cfriedt
/tests/net/socket/ @rlubos @tbursztyka @jukkar
/tests/subsys/debug/coredump/ @dcpleung
/tests/subsys/fs/ @nashif @de-nordic
/tests/subsys/mgmt/mcumgr/ @de-nordic @nordicjm
/tests/subsys/sd/ @danieldegrasse
/tests/subsys/rtio/ @teburd
/tests/subsys/shell/ @jakub-uC @nordic-krch
# Get all docs reviewed
*.rst @nashif
/doc/kernel/ @andyross @nashif
*posix*.rst @aescolar @daor-oti

View File

@@ -1,78 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at conduct@zephyrproject.org.
Reports will be received by Kate Stewart (Linux Foundation) and Amy Occhialino
(Intel). All complaints will be reviewed and investigated, and will result in a
response that is deemed necessary and appropriate to the circumstances. The
project team is obligated to maintain confidentiality with regard to the
reporter of an incident. Further details of specific enforcement policies may
be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

View File

@@ -1,39 +0,0 @@
Contribution Guidelines
#######################
As an open-source project, we welcome and encourage the community to submit
patches directly to the project. In our collaborative open source environment,
standards and methods for submitting changes help reduce the chaos that can result
from an active development community.
This document briefly summarizes the full `Contribution
Guidelines <http://docs.zephyrproject.org/latest/contribute/index.html>`_
documentation.
* Zephyr uses the permissive open source `Apache 2.0 license`_
that allows you to freely use, modify, distribute and sell your own products
that include Apache 2.0 licensed software.
* There are some imported or reused components of the Zephyr project that
use other licensing and are clearly identified.
* The Developer Certificate of Origin (DCO) process is followed to
ensure developers are following licensing criteria for their
contributions, and documented with a ``Signed-off-by`` line in commits.
* Zephyr development workflow is supported on Linux, macOS, and Windows,
(with a few exceptions).
* Source code for the project is maintained in the GitHub repo:
https://github.com/zephyrproject-rtos/zephyr
* Issue and feature tracking is done using GitHub issues in this repo.
* A Continuous Integration (CI) system runs on every Pull Request (PR)
to verify several aspects of the PR including Git commit formatting,
Coding Style, sanity checks builds, and documentation builds.
* The `Zephyr devel mailing list`_ is a great place to engage with the
community, ask questions, discuss issues, and help each other.
.. _Zephyr devel mailing list: https://lists.zephyrproject.org/g/devel

142
Kbuild Normal file
View File

@@ -0,0 +1,142 @@
# vim: filetype=make
ifneq ("$(wildcard $(MDEF_FILE))","")
MDEF_FILE_PATH=$(strip $(MDEF_FILE))
else
ifneq ($(MDEF_FILE),)
MDEF_FILE_PATH=$(strip $(PROJECT_BASE)/$(MDEF_FILE))
endif
endif
ifeq (${CONFIG_NUM_COMMAND_PACKETS},)
CONFIG_NUM_COMMAND_PACKETS=0
endif
ifeq (${CONFIG_NUM_TIMER_PACKETS},)
CONFIG_NUM_TIMER_PACKETS=0
endif
ifeq (${CONFIG_NUM_TASK_PRIORITIES},)
CONFIG_NUM_TASK_PRIORITIES=$(CONFIG_NUM_PREEMPT_PRIORITIES)
endif
ifeq ($(ARCH),x86)
TASKGROUP_SSE=" TASKGROUP SSE"
endif
define filechk_prj.mdef
(echo "% WARNING. THIS FILE IS AUTO-GENERATED. DO NOT MODIFY!"; \
echo; \
echo "% CONFIG NUM_COMMAND_PACKETS NUM_TIMER_PACKETS NUM_TASK_PRIORITIES"; \
echo "% ============================================================="; \
echo " CONFIG ${CONFIG_NUM_COMMAND_PACKETS} ${CONFIG_NUM_TIMER_PACKETS} ${CONFIG_NUM_TASK_PRIORITIES}"; \
echo; \
echo "% TASKGROUP NAME";\
echo "% ==============";\
echo " TASKGROUP EXE";\
echo " TASKGROUP SYS";\
echo " TASKGROUP FPU_LEGACY";\
echo $(TASKGROUP_SSE);\
echo; \
if test -e "$(MDEF_FILE_PATH)"; then \
cat $(MDEF_FILE_PATH); \
fi;)
endef
misc/generated/sysgen/prj.mdef: $(MDEF_FILE_PATH) \
include/config/auto.conf FORCE
$(call filechk,prj.mdef)
sysgen_cmd=$(strip \
$(PYTHON) $(srctree)/scripts/sysgen \
-i $(CURDIR)/misc/generated/sysgen/prj.mdef \
-o $(CURDIR)/misc/generated/sysgen/ \
)
misc/generated/sysgen/kernel_main.c: misc/generated/sysgen/prj.mdef \
$(srctree)/scripts/sysgen
$(Q)$(sysgen_cmd)
define filechk_configs.c
(echo "/* file is auto-generated, do not modify ! */"; \
echo; \
echo "#include <toolchain.h>"; \
echo; \
echo "GEN_ABS_SYM_BEGIN (_ConfigAbsSyms)"; \
echo; \
cat $(CURDIR)/include/generated/autoconf.h | sed \
's/".*"/1/' | awk \
'/#define/{printf "GEN_ABSOLUTE_SYM(%s, %s);\n", $$2, $$3}'; \
echo; \
echo "GEN_ABS_SYM_END";)
endef
misc/generated/configs.c: include/config/auto.conf FORCE
$(call filechk,configs.c)
targets := misc/generated/configs.c
targets += include/generated/generated_dts_board.h
targets += include/generated/offsets.h
always := misc/generated/configs.c
always += include/generated/generated_dts_board.h
always += include/generated/offsets.h
ifeq ($(CONFIG_MDEF),y)
targets += misc/generated/sysgen/kernel_main.c
always += misc/generated/sysgen/kernel_main.c
endif
define rule_cc_o_c_1
$(call echo-cmd,cc_o_c_1) $(cmd_cc_o_c_1);
endef
cmd_cc_o_c_1 = $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(ZEPHYRINCLUDE) -c -o $@ $<
arch/$(ARCH)/core/offsets/offsets.o: arch/$(ARCH)/core/offsets/offsets.c $(KCONFIG_CONFIG) \
include/generated/generated_dts_board.h
$(Q)mkdir -p $(dir $@)
$(call if_changed,cc_o_c_1)
define offsetchk
$(Q)set -e; \
$(kecho) ' CHK $@'; \
mkdir -p $(dir $@); \
$(GENOFFSET_H) -i $(1) -o $@.tmp; \
if [ -r $@ ] && cmp -s $@ $@.tmp; then \
rm -f $@.tmp; \
else \
$(kecho) ' UPD $@'; \
mv -f $@.tmp $@; \
fi
endef
include/generated/offsets.h: arch/$(ARCH)/core/offsets/offsets.o \
include/config/auto.conf FORCE
$(call offsetchk,arch/$(ARCH)/core/offsets/offsets.o)
ifeq ($(CONFIG_HAS_DTS),y)
define filechk_generated_dts_board.h
(echo "/* WARNING. THIS FILE IS AUTO-GENERATED. DO NOT MODIFY! */"; \
extract_dts_includes.py dts/$(ARCH)/$(BOARD_NAME).dts_compiled $(ZEPHYR_BASE)/dts/$(ARCH)/yaml; \
if test -e $(ZEPHYR_BASE)/dts/$(ARCH)/$(BOARD_NAME).fixup; then \
echo; echo; \
echo "/* Following definitions fixup the generated include */"; \
echo; \
cat $(ZEPHYR_BASE)/dts/$(ARCH)/$(BOARD_NAME).fixup; \
fi; \
)
endef
else
define filechk_generated_dts_board.h
(echo "/* WARNING. THIS FILE IS AUTO-GENERATED. DO NOT MODIFY! */";)
endef
endif
include/generated/generated_dts_board.h: include/config/auto.conf FORCE
ifeq ($(CONFIG_HAS_DTS),y)
$(Q)$(MAKE) $(build)=dts/$(ARCH)
endif
$(call filechk,generated_dts_board.h)

View File

@@ -1,8 +1,10 @@
# General configuration options
# Kconfig - general configuration options
#
# Copyright (c) 2014-2015 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
mainmenu "Zephyr Kernel Configuration"
source "Kconfig.zephyr"

View File

@@ -1,913 +1,39 @@
# General configuration options
# Kconfig - general configuration options
#
# Copyright (c) 2014-2015 Wind River Systems, Inc.
# Copyright (c) 2016 Intel Corporation
# Copyright (c) 2023 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0
osource "${APPLICATION_SOURCE_DIR}/VERSION"
# Include Kconfig.defconfig files first so that they can override defaults and
# other symbol/choice properties by adding extra symbol/choice definitions.
# After merging all definitions for a symbol/choice, Kconfig picks the first
# property (e.g. the first default) with a satisfied condition.
#
# Shield defaults should have precedence over board defaults, which should have
# precedence over SoC defaults, so include them in that order.
#
# $ARCH and $BOARD_DIR will be glob patterns when building documentation.
# This loads custom shields defconfigs (from BOARD_ROOT)
osource "$(KCONFIG_BINARY_DIR)/Kconfig.shield.defconfig"
# This loads Zephyr base shield defconfigs
source "boards/shields/*/Kconfig.defconfig"
config KERNELVERSION
string
option env="KERNELVERSION"
source "$(BOARD_DIR)/Kconfig.defconfig"
# This loads custom SoC root defconfigs
osource "$(KCONFIG_BINARY_DIR)/Kconfig.soc.defconfig"
# This loads Zephyr base SoC root defconfigs
osource "soc/$(ARCH)/*/Kconfig.defconfig"
# This loads the toolchain defconfigs
osource "$(TOOLCHAIN_KCONFIG_DIR)/Kconfig.defconfig"
# This loads the testsuite defconfig
source "subsys/testsuite/Kconfig.defconfig"
# This should be early since the autogen Kconfig.dts symbols may get
# used by modules
source "dts/Kconfig"
menu "Modules"
source "modules/Kconfig"
endmenu
source "boards/Kconfig"
source "soc/Kconfig"
source "arch/Kconfig"
source "kernel/Kconfig"
source "drivers/Kconfig"
source "net/Kconfig"
source "misc/Kconfig"
source "lib/Kconfig"
source "subsys/Kconfig"
osource "$(TOOLCHAIN_KCONFIG_DIR)/Kconfig"
menu "Build and Link Features"
menu "Linker Options"
choice LINKER_ORPHAN_CONFIGURATION
prompt "Linker Orphan Section Handling"
default LINKER_ORPHAN_SECTION_WARN
config LINKER_ORPHAN_SECTION_PLACE
bool "Place"
help
Linker puts orphan sections in place without warnings
or errors.
config LINKER_ORPHAN_SECTION_WARN
bool "Warn"
help
Linker places the orphan sections in output and issues
warning about those sections.
config LINKER_ORPHAN_SECTION_ERROR
bool "Error"
help
Linker exits with error when an orphan section is found.
endchoice
config HAS_FLASH_LOAD_OFFSET
bool
help
This option is selected by targets having a FLASH_LOAD_OFFSET
and FLASH_LOAD_SIZE.
if HAS_FLASH_LOAD_OFFSET
config USE_DT_CODE_PARTITION
bool "Link application into /chosen/zephyr,code-partition from devicetree"
help
When enabled, the application will be linked into the flash partition
selected by the zephyr,code-partition property in /chosen in devicetree.
When this is disabled, the flash load offset and size can be set manually
below.
# Workaround for not being able to have commas in macro arguments
DT_CHOSEN_Z_CODE_PARTITION := zephyr,code-partition
config FLASH_LOAD_OFFSET
# Only user-configurable when USE_DT_CODE_PARTITION is disabled
hex "Kernel load offset" if !USE_DT_CODE_PARTITION
default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_DT_CODE_PARTITION
default 0
help
This option specifies the byte offset from the beginning of flash that
the kernel should be loaded into. Changing this value from zero will
affect the Zephyr image's link, and will decrease the total amount of
flash available for use by application code.
If unsure, leave at the default value 0.
config FLASH_LOAD_SIZE
# Only user-configurable when USE_DT_CODE_PARTITION is disabled
hex "Kernel load size" if !USE_DT_CODE_PARTITION
default $(dt_chosen_reg_size_hex,$(DT_CHOSEN_Z_CODE_PARTITION)) if USE_DT_CODE_PARTITION
default 0
help
If non-zero, this option specifies the size, in bytes, of the flash
area that the Zephyr image will be allowed to occupy. If zero, the
image will be able to occupy from the FLASH_LOAD_OFFSET to the end of
the device.
If unsure, leave at the default value 0.
endif # HAS_FLASH_LOAD_OFFSET
config ROM_START_OFFSET
hex
prompt "ROM start offset" if !BOOTLOADER_MCUBOOT
default 0x200 if BOOTLOADER_MCUBOOT
default 0
help
If the application is built for chain-loading by a bootloader this
variable is required to be set to value that leaves sufficient
space between the beginning of the image and the start of the first
section to store an image header or any other metadata.
In the particular case of the MCUboot bootloader this reserves enough
space to store the image header, which should also meet vector table
alignment requirements on most ARM targets, although some targets
may require smaller or larger values.
config LD_LINKER_SCRIPT_SUPPORTED
bool
default y
choice LINKER_SCRIPT
prompt "Linker script"
default LD_LINKER_TEMPLATE if LD_LINKER_SCRIPT_SUPPORTED
config LD_LINKER_TEMPLATE
bool "LD template"
depends on LD_LINKER_SCRIPT_SUPPORTED
help
Select this option to use the LD linker script templates.
The templates are pre-processed by the C pre-processor to create the
final LD linker script.
config CMAKE_LINKER_GENERATOR
bool "CMake generator"
depends on ARM
help
Select this option to use the Zephyr CMake linker script generator.
The linker configuration is written in CMake and the final linker
script will be generated by the toolchain specific linker generator.
For LD based linkers, this will be the ld generator, for ARMClang /
armlink based linkers it will be the scatter generator.
endchoice
config HAVE_CUSTOM_LINKER_SCRIPT
bool "Custom linker script provided"
help
Set this option if you have a custom linker script which needed to
be define in CUSTOM_LINKER_SCRIPT.
config CUSTOM_LINKER_SCRIPT
string "Path to custom linker script"
depends on HAVE_CUSTOM_LINKER_SCRIPT
help
Path to the linker script to be used instead of the one define by the
board.
The linker script must be based on a version provided by Zephyr since
the kernel can expect a certain layout/certain regions.
This is useful when an application needs to add sections into the
linker script and avoid having to change the script provided by
Zephyr.
config KERNEL_ENTRY
string "Kernel entry symbol"
default "__start"
help
Code entry symbol, to be set at linking phase.
config LINKER_SORT_BY_ALIGNMENT
bool "Sort input sections by alignment"
default y
help
This turns on the linker flag to sort sections by alignment
in decreasing size of symbols. This helps to minimize
padding between symbols.
config SRAM_VECTOR_TABLE
bool "Place the vector table in SRAM instead of flash"
help
The option specifies that the vector table should be placed at the
start of SRAM instead of the start of flash.
config HAS_SRAM_OFFSET
bool
help
This option is selected by targets that require SRAM_OFFSET.
config SRAM_OFFSET
hex "Kernel SRAM offset" if HAS_SRAM_OFFSET
default 0
help
This option specifies the byte offset from the beginning of SRAM
where the kernel begins. Changing this value from zero will affect
the Zephyr image's link, and will decrease the total amount of
SRAM available for use by application code.
If unsure, leave at the default value 0.
menu "Linker Sections"
config LINKER_USE_BOOT_SECTION
bool "Use Boot Linker Section"
help
If enabled, the symbols which are needed for the boot process
will be put into another linker section reserved for these
symbols.
Requires that boot sections exist in the architecture, SoC,
board or custom linker script.
config LINKER_USE_PINNED_SECTION
bool "Use Pinned Linker Section"
help
If enabled, the symbols which need to be pinned in memory
will be put into another linker section reserved for pinned
symbols. During boot, the corresponding memory will be marked
as pinned.
Requires that pinned sections exist in the architecture, SoC,
board or custom linker script.
config LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT
bool "Generic sections are present at boot" if DEMAND_PAGING && LINKER_USE_PINNED_SECTION
default y
help
When disabled, the linker sections other than the boot and
pinned sections will be marked as not present in the page
tables. This allows kernel to pull in data pages on demand
as required by current execution context when demand paging
is enabled. There is no need to load all code and data into
memory at once.
If unsure, say Y.
config LINKER_LAST_SECTION_ID
bool "Last section identifier"
default y
depends on ARM || ARM64 || RISCV
help
If enabled, the last section will contain an identifier.
This ensures that the '_flash_used' linker symbol will always be
correctly calculated, even in cases where the location counter may
have been incremented for alignment purposes but no data is placed
after alignment.
Note: in cases where the flash is fully used, for example application
specific data is written at the end of the flash area, then writing a
last section identifier may cause rom region overflow.
In such cases this setting should be disabled.
config LINKER_LAST_SECTION_ID_PATTERN
hex "Last section identifier pattern"
default "0xE015E015"
depends on LINKER_LAST_SECTION_ID
help
Pattern to fill into last section as identifier.
Default pattern is 0xE015 (end of last section), but any pattern can
be used.
The size of the pattern must not exceed 4 bytes.
config LINKER_USE_NO_RELAX
bool
help
Hidden symbol to allow features to force the use of no relax.
config LINKER_USE_RELAX
bool "Linker optimization of call addressing"
depends on !LINKER_USE_NO_RELAX
default y
help
This option performs global optimizations that become possible when the linker resolves
addressing in the program, such as relaxing address modes and synthesizing new
instructions in the output object file. For ld and lld, this enables `--relax`.
On platforms where this is not supported, `--relax' is accepted, but ignored.
Disabling it can reduce performance, as the linker is no longer able to substiture long /
in-effective jump calls to shorter / more effective instructions.
endmenu # "Linker Sections"
endmenu
menu "Compiler Options"
config CODING_GUIDELINE_CHECK
bool "Enforce coding guideline rules"
help
Use available compiler flags to check coding guideline rules during
the build.
config NATIVE_BUILD
bool
select FULL_LIBC_SUPPORTED
select FULL_LIBCPP_SUPPORTED if CPP
help
Zephyr will be built targeting the host system for debug and
development purposes.
config NATIVE_APPLICATION
bool
default y if ARCH_POSIX
depends on !NATIVE_LIBRARY
select NATIVE_BUILD
help
Build as a native application that can run on the host and using
resources and libraries provided by the host.
config NATIVE_LIBRARY
bool
select NATIVE_BUILD
help
Build as a prelinked library for the native host target.
This library can later be built into an executable for the host.
config COMPILER_FREESTANDING
bool "Build in a freestanding compiler mode"
help
Configure the compiler to operate in freestanding mode according to
the C and C++ language specifications. Freestanding mode reduces the
requirements of the compiler and language environment, which can
negatively impact the ability for the compiler to detect errors and
perform optimizations.
choice COMPILER_OPTIMIZATIONS
prompt "Optimization level"
default NO_OPTIMIZATIONS if COVERAGE
default DEBUG_OPTIMIZATIONS if DEBUG
default SIZE_OPTIMIZATIONS
help
Note that these flags shall only control the compiler
optimization level, and that no extra debug code shall be
conditionally compiled based on them.
config SIZE_OPTIMIZATIONS
bool "Optimize for size"
help
Compiler optimizations will be set to -Os independently of other
options.
config SPEED_OPTIMIZATIONS
bool "Optimize for speed"
help
Compiler optimizations will be set to -O2 independently of other
options.
config DEBUG_OPTIMIZATIONS
bool "Optimize debugging experience"
help
Compiler optimizations will be set to -Og independently of other
options.
config NO_OPTIMIZATIONS
bool "Optimize nothing"
help
Compiler optimizations will be set to -O0 independently of other
options.
Selecting this option will likely require manual tuning of the
default stack sizes in order to avoid stack overflows.
endchoice
config COMPILER_WARNINGS_AS_ERRORS
bool "Treat warnings as errors"
help
Turn on "warning as error" toolchain flags
config COMPILER_SAVE_TEMPS
bool "Save temporary object files"
help
Instruct the compiler to save the temporary intermediate files
permanently. These can be useful for troubleshooting build issues.
config COMPILER_TRACK_MACRO_EXPANSION
bool "Track macro expansion"
default y
help
When enabled, locations of tokens across macro expansions will be
tracked. Disabling this option may be useful to debug long macro
expansion chains.
config COMPILER_COLOR_DIAGNOSTICS
bool "Colored diagnostics"
default y
help
Compiler diagnostic messages are colorized.
choice COMPILER_SECURITY_FORTIFY
prompt "Detect buffer overflows in libc calls"
default FORTIFY_SOURCE_NONE if NO_OPTIMIZATIONS || MINIMAL_LIBC || NATIVE_BUILD
default FORTIFY_SOURCE_COMPILE_TIME
help
Buffer overflow checking in libc calls. Supported by Clang and
GCC when using Picolibc or Newlib. Requires compiler optimization
to be enabled.
config FORTIFY_SOURCE_NONE
bool "No detection"
help
Disables both compile-time and run-time checking.
config FORTIFY_SOURCE_COMPILE_TIME
bool "Compile-time detection"
help
Enables only compile-time checking. Compile-time checking
doesn't increase executable size or reduce performance, it
limits checking to what can be done with information available
at compile time.
config FORTIFY_SOURCE_RUN_TIME
bool "Compile-time and run-time detection"
help
Enables both compile-time and run-time checking. Run-time
checking increases coverage at the expense of additional code,
and means that applications will raise a runtime exception
when buffer overflow is detected.
endchoice
config COMPILER_OPT
string "Custom compiler options"
help
This option is a free-form string that is passed to the compiler
when building all parts of a project (i.e. kernel).
The compiler options specified by this string supplement the
predefined set of compiler supplied by the build system,
and can be used to change compiler optimization, warning and error
messages, and so on.
config MISRA_SANE
bool "MISRA standards compliance features"
help
Causes the source code to build in "MISRA" mode, which
disallows some otherwise-permitted features of the C
standard for safety reasons. Specifically variable length
arrays are not permitted (and gcc will enforce this).
endmenu
choice
prompt "Error checking behavior for CHECK macro"
default RUNTIME_ERROR_CHECKS
config ASSERT_ON_ERRORS
bool "Assert on all errors"
help
Assert on errors covered with the CHECK macro.
config NO_RUNTIME_CHECKS
bool "No runtime error checks"
help
Do not do any runtime checks or asserts when using the CHECK macro.
config RUNTIME_ERROR_CHECKS
bool "Runtime error checks"
help
Always perform runtime checks covered with the CHECK macro. This
option is the default and the only option used during testing.
endchoice
menu "Build Options"
config KERNEL_BIN_NAME
string "The kernel binary name"
default "zephyr"
help
This option sets the name of the generated kernel binary.
config OUTPUT_STAT
bool "Create a statistics file"
default y
help
Create a stat file using readelf -e <elf>
config OUTPUT_SYMBOLS
bool "Create a symbol file"
help
Create a symbol file using nm <elf>
config OUTPUT_DISASSEMBLY
bool "Create a disassembly file"
help
Create an .lst file with the assembly listing of the firmware.
config OUTPUT_DISASSEMBLE_ALL
bool "Disassemble all sections with source. Fill zeros."
default n
depends on OUTPUT_DISASSEMBLY
help
The .lst file will contain complete disassembly of the firmware
not just those expected to contain instructions including zeros
config OUTPUT_PRINT_MEMORY_USAGE
bool "Print memory usage to stdout"
default y
help
If the toolchain supports it, this option will pass
--print-memory-region to the linker when it is doing it's first
linker pass. Note that the memory regions are symbolic concepts
defined by the linker scripts and do not necessarily map
directly to the real physical address space. Take also note that
some platforms do two passes of the linker so the results do not
match exactly to the final elf file. See also rom_report,
ram_report and
https://sourceware.org/binutils/docs/ld/MEMORY.html
config CLEANUP_INTERMEDIATE_FILES
bool "Remove all intermediate files"
help
Delete intermediate files to save space and cleanup clutter resulting
from the build process. Note this breaks incremental builds, west spdx
(Software Bill of Material generation), and maybe others.
config BUILD_NO_GAP_FILL
bool "Don't fill gaps in generated hex/bin/s19 files."
config BUILD_OUTPUT_HEX
bool "Build a binary in HEX format"
help
Build an Intel HEX binary zephyr/zephyr.hex in the build directory.
The name of this file can be customized with CONFIG_KERNEL_BIN_NAME.
config BUILD_OUTPUT_BIN
bool "Build a binary in BIN format"
default y
help
Build a "raw" binary zephyr/zephyr.bin in the build directory.
The name of this file can be customized with CONFIG_KERNEL_BIN_NAME.
config BUILD_OUTPUT_EFI
bool "Build as an EFI application"
default n
depends on X86_64
help
Build as an EFI application.
This works by creating a "zephyr.efi" EFI binary containing a zephyr
image extracted from a built zephyr.elf file. EFI applications are
relocatable, and cannot be placed at specific locations in memory.
Instead, the stub code will copy the embedded zephyr sections to the
appropriate locations at startup, clear any zero-filled (BSS, etc...)
areas, then jump into the 64 bit entry point.
config BUILD_OUTPUT_EXE
bool "Build a binary in ELF format with .exe extension"
help
Build an ELF binary that can run in the host system at
zephyr/zephyr.exe in the build directory.
The name of this file can be customized with CONFIG_KERNEL_BIN_NAME.
config BUILD_OUTPUT_S19
bool "Build a binary in S19 format"
help
Build an S19 binary zephyr/zephyr.s19 in the build directory.
The name of this file can be customized with CONFIG_KERNEL_BIN_NAME.
config BUILD_OUTPUT_UF2
bool "Build a binary in UF2 format"
depends on BUILD_OUTPUT_BIN
help
Build a UF2 binary zephyr/zephyr.uf2 in the build directory.
The name of this file can be customized with CONFIG_KERNEL_BIN_NAME.
if BUILD_OUTPUT_UF2
config BUILD_OUTPUT_UF2_FAMILY_ID
string "UF2 device family ID"
default "0x1c5f21b0" if SOC_SERIES_ESP32
default "0x621e937a" if SOC_NRF52833_QIAA
default "0xada52840" if SOC_NRF52840_QIAA
default "0x4fb2d5bd" if SOC_SERIES_IMX_RT
default "0x2abc77ec" if SOC_SERIES_LPC55XXX
default "0xe48bff56" if SOC_SERIES_RP2XXX
default "0x68ed2b88" if SOC_SERIES_SAMD21
default "0x55114460" if SOC_SERIES_SAMD51
default "0x647824b6" if SOC_SERIES_STM32F0X
default "0x5d1a0a2e" if SOC_SERIES_STM32F2X
default "0x6b846188" if SOC_SERIES_STM32F3X
default "0x53b80f00" if SOC_SERIES_STM32F7X
default "0x300f5633" if SOC_SERIES_STM32G0X
default "0x4c71240a" if SOC_SERIES_STM32G4X
default "0x6db66082" if SOC_SERIES_STM32H7X
default "0x202e3a91" if SOC_SERIES_STM32L0X
default "0x1e1f432d" if SOC_SERIES_STM32L1X
default "0x00ff6919" if SOC_SERIES_STM32L4X
default "0x04240bdf" if SOC_SERIES_STM32L5X
default "0x70d16653" if SOC_SERIES_STM32WBX
default "0x5ee21072" if SOC_STM32F103XE
default "0x57755a57" if SOC_SERIES_STM32F4X && (!SOC_STM32F407XE) && (!SOC_STM32F407XG)
default "0x6d0922fa" if SOC_STM32F407XE
default "0x8fb060fe" if SOC_STM32F407XG
help
UF2 bootloaders only accept UF2 files with a matching family ID.
This can be either a hex, e.g. 0x68ed2b88, or well-known family
name string. If the SoC in use is known by UF2, the Family ID will
be pre-filled with the known value.
config BUILD_OUTPUT_UF2_USE_FLASH_BASE
bool
default n
config BUILD_OUTPUT_UF2_USE_FLASH_OFFSET
bool
default n
endif # BUILD_OUTPUT_UF2
config BUILD_OUTPUT_STRIPPED
bool "Build a stripped binary"
help
Build a stripped binary zephyr/zephyr.strip in the build directory.
The name of this file can be customized with CONFIG_KERNEL_BIN_NAME.
config BUILD_OUTPUT_ADJUST_LMA
string
help
This will adjust the LMA address in the final ELF and hex files with
the value provided.
This will not affect the internal address symbols inside the image but
can be useful when adjusting the LMA address for flash tools or multi
stage loaders where a pre-loader may copy image to a second location
before booting a second core.
The value will be evaluated as a math expression, this means that
following are valid expression
- 1024
- 0x1000
- -0x1000
- 0x20000000 - 0x10000000
Note: negative numbers are valid.
To adjust according to a chosen flash partition one can specify a
default as:
DT_CHOSEN_IMAGE_<name> := <name>,<name>-partition
DT_CHOSEN_Z_FLASH := zephyr,flash
config BUILD_OUTPUT_ADJUST_LMA
default "$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_IMAGE_M4))-\
$(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_FLASH))"
config BUILD_OUTPUT_INFO_HEADER
bool "Create a image information header"
help
Create an image information header which will contain image
information from the Zephyr binary.
Example of information contained in the header file:
- Number of segments in the image
- LMA address of each segment
- VMA address of each segment
- Size of each segment
config BUILD_ALIGN_LMA
bool "Align LMA in output image"
default y if BUILD_OUTPUT_ADJUST_LMA!=""
help
Ensure that the LMA for each section in the output image respects
the alignment requirements of that section. This is required for
some tooling, such as objcopy, to be able to adjust the LMA of the
ELF file.
config APPLICATION_DEFINED_SYSCALL
bool "Scan application folder for any syscall definition"
help
Scan additional folders inside application source folder
for application defined syscalls.
config MAKEFILE_EXPORTS
bool "Generate build metadata files named Makefile.exports"
help
Generates a file with build information that can be read by
third party Makefile-based build systems.
config BUILD_OUTPUT_META
bool "Create a build meta file"
help
Create a build meta file in the build directory containing lists of:
- Zephyr: path and revision (if git repo)
- Zephyr modules: name, path, and revision (if git repo)
- West:
- manifest: path and revision
- projects: path and revision
- Workspace:
- dirty: one or more repositories are marked dirty
- extra: extra Zephyr modules are manually included in the build
- off: the SHA of one or more west projects are not what the manifest
defined when `west update` was run the last time (`manifest-rev`).
The off state is only present if a west workspace is found.
File extension is .meta
config BUILD_OUTPUT_META_STATE_PROPAGATE
bool "Propagate module and project state"
depends on BUILD_OUTPUT_META
help
Propagate to state of each module to the Zephyr revision field.
If west is used the state of each west project is also propagated to
the Zephyr revision field.
West manifest repo revision field will also
be marked with the same state as the Zephyr revision.
The final revision will become: <SHA>-<state1>-<state2>-<state3>...
If no states are appended to the SHA it means the build is of a clean
tree.
- dirty: one or more repositories are marked dirty
- extra: extra Zephyr modules are manually included in the build
- off: the SHA of one or more west projects are not what the manifest
defined when `west update` was run the last time (`manifest-rev`).
The off state is only present if a west workspace is found.
config BUILD_OUTPUT_STRIP_PATHS
bool "Strip absolute paths from binaries"
default y
help
If the compiler supports it, strip the ${ZEPHYR_BASE} prefix from the
__FILE__ macro used in __ASSERT*, in the
.noinit."/home/joe/zephyr/fu/bar.c" section names and in any
application code.
This saves some memory, stops leaking user locations in binaries, makes
failure logs more deterministic and most importantly makes builds more
deterministic.
Debuggers usually have a path mapping feature to ensure the files are
still found.
config CHECK_INIT_PRIORITIES
bool "Build time initialization priorities check"
default y
depends on !NATIVE_LIBRARY
depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" != "armclang"
help
Check the build for initialization priority issues by comparing the
initialization priority in the build with the device dependency
derived from the devicetree definition.
Fails the build on priority errors (dependent devices, inverted
priority), see CHECK_INIT_PRIORITIES_FAIL_ON_WARNING to fail on
warnings (dependent devices, same priority) as well.
config CHECK_INIT_PRIORITIES_FAIL_ON_WARNING
bool "Fail the build on priority check warnings"
depends on CHECK_INIT_PRIORITIES
help
Fail the build if the dependency check script identifies any pair of
devices depending on each other but initialized with the same
priority.
config EMIT_ALL_SYSCALLS
bool "Emit all possible syscalls in the tree"
help
This tells the build system to emit all possible syscalls found
in the tree, instead of only those syscalls associated with enabled
drivers and subsystems.
endmenu
config DEPRECATED
bool
help
Symbol that must be selected by a feature or module if it is
considered to be deprecated.
config WARN_DEPRECATED
bool
default y
prompt "Warn on deprecated usage"
help
Print a warning when the Kconfig tree is parsed if any deprecated
features are enabled.
config EXPERIMENTAL
bool
help
Symbol that must be selected by a feature if it is considered to be
at an experimental implementation stage.
config WARN_EXPERIMENTAL
bool
prompt "Warn on experimental usage"
help
Print a warning when the Kconfig tree is parsed if any experimental
features are enabled.
config TAINT
bool
help
Symbol that must be selected by a feature or module if the Zephyr
build is considered tainted.
config ENFORCE_ZEPHYR_STDINT
bool
prompt "Enforce Zephyr convention for stdint"
depends on !ARCH_POSIX
default y
help
This enforces the Zephyr stdint convention where int32_t = int,
int64_t = long long, and intptr_t = long so that short string
format length modifiers can be used universally across ILP32
and LP64 architectures. Sometimes this is not possible e.g. when
linking against a binary-only C++ library whose type mangling
is incompatible with the Zephyr convention, or if the build
environment doesn't allow such enforcement, in which case this
should be turned off with the caveat that argument type validation
on Zephyr code will be skipped.
endmenu
menu "Boot Options"
config IS_BOOTLOADER
bool "Act as a bootloader"
depends on XIP
depends on ARM
help
This option indicates that Zephyr will act as a bootloader to execute
a separate Zephyr image payload.
config BOOTLOADER_SRAM_SIZE
int "SRAM reserved for bootloader"
default 0
depends on !XIP || IS_BOOTLOADER
depends on ARM || XTENSA
help
This option specifies the amount of SRAM (measure in kB) reserved for
a bootloader image, when either:
- the Zephyr image itself is to act as the bootloader, or
- Zephyr is a !XIP image, which implicitly assumes existence of a
bootloader that loads the Zephyr !XIP image onto SRAM.
config BOOTLOADER_ESP_IDF
bool "ESP-IDF bootloader support"
depends on SOC_FAMILY_ESP32 && !BOOTLOADER_MCUBOOT && !MCUBOOT
default y
help
This option will trigger the compilation of the ESP-IDF bootloader
inside the build folder.
At flash time, the bootloader will be flashed with the zephyr image
config BOOTLOADER_BOSSA
bool "BOSSA bootloader support"
select USE_DT_CODE_PARTITION
help
Signifies that the target uses a BOSSA compatible bootloader. If CDC
ACM USB support is also enabled then the board will reboot into the
bootloader automatically when bossac is run.
config BOOTLOADER_BOSSA_DEVICE_NAME
string "BOSSA CDC ACM device name"
depends on BOOTLOADER_BOSSA && CDC_ACM_DTE_RATE_CALLBACK_SUPPORT
default "CDC_ACM_0"
help
Sets the CDC ACM port to watch for reboot commands.
choice
prompt "BOSSA bootloader variant"
depends on BOOTLOADER_BOSSA
config BOOTLOADER_BOSSA_LEGACY
bool "Legacy"
help
Select the Legacy variant of the BOSSA bootloader. This is defined
for compatibility mode only. The recommendation is use newer
versions like Arduino or Adafruit UF2.
config BOOTLOADER_BOSSA_ARDUINO
bool "Arduino"
help
Select the Arduino variant of the BOSSA bootloader. Uses 0x07738135
as the magic value to enter the bootloader.
config BOOTLOADER_BOSSA_ADAFRUIT_UF2
bool "Adafruit UF2"
help
Select the Adafruit UF2 variant of the BOSSA bootloader. Uses
0xf01669ef as the magic value to enter the bootloader.
endchoice
endmenu
menu "Compatibility"
config COMPAT_INCLUDES
bool "Suppress warnings when using header shims"
default y
help
Suppress any warnings from the pre-processor when including
deprecated header files.
endmenu
source "ext/Kconfig"
source "tests/Kconfig"
#
# The following are for Kconfig files for default values only.
# These should be parsed at the end.
#
# Board defaults should be parsed after SoC defaults
# because board usually overrides SoC values.
#
source "arch/*/soc/*/Kconfig.defconfig"
source "boards/*/*/Kconfig.defconfig"

510
MAINTAINERS Normal file
View File

@@ -0,0 +1,510 @@
Originally from the Linux Kernel.
# Licensed under the terms of the GNU GPL License version 2
Descriptions of section entries:
P: Person (obsolete)
M: Mail patches to: FullName <address@domain>
R: Designated reviewer: FullName <address@domain>
These reviewers should be CCed on patches.
L: Mailing list that is relevant to this area
W: Web-page with status/info
Q: Patchwork web based patch tracking system site
T: SCM tree type and location.
Type is one of: git, hg, quilt, stgit, topgit
S: Status, one of the following:
Supported: Someone is actually paid to look after this.
Maintained: Someone actually looks after it.
Odd Fixes: It has a maintainer but they don't have time to do
much other than throw the odd patch in. See below..
Orphan: No current maintainer [but maybe you could take the
role as you write your new code].
Obsolete: Old code. Something tagged obsolete generally means
it has been replaced by a better system and you
should be using that.
F: Files and directories with wildcard patterns.
A trailing slash includes all files and subdirectory files.
F: drivers/net/ all files in and below drivers/net
F: drivers/net/* all files in drivers/net, but not below
F: */net/* all files in "any top level directory"/net
One pattern per line. Multiple F: lines acceptable.
N: Files and directories with regex patterns.
N: [^a-z]tegra all files whose path contains the word tegra
One pattern per line. Multiple N: lines acceptable.
scripts/get_maintainer.pl has different behavior for files that
match F: pattern and matches of N: patterns. By default,
get_maintainer will not look at git log history when an F: pattern
match occurs. When an N: match occurs, git log history is used
to also notify the people that have git commit signatures.
X: Files and directories that are NOT maintained, same rules as F:
Files exclusions are tested before file matches.
Can be useful for excluding a specific subdirectory, for instance:
F: net/
X: net/ipv6/
matches all files in and below net excluding net/ipv6/
K: Keyword perl extended regex pattern to match content in a
patch or file. For instance:
K: of_get_profile
matches patches or files that contain "of_get_profile"
K: \b(printk|pr_(info|err))\b
matches patches or files that contain one or more of the words
printk, pr_info or pr_err
One regex pattern per line. Multiple K: lines acceptable.
Note: For the hard of thinking, this list is meant to remain in alphabetical
order. If you could add yourselves to it in alphabetical order that would be
so much easier [Ed]
Maintainers List (try to look for most precise areas first)
-----------------------------------
ARC ARCHITECTURE
M: Ruud Derwig <Ruud.Derwig@synopsys.com>
M: Chuck Jordan <cjordan@synopsys.com>
M: Benjamin Walsh <benjamin.walsh@windriver.com>
S: Supported
F: arch/arc/
F: include/arch/arc/
F: boards/arc/
ARM ARCHITECTURE
M: Maureen Helm <maureen.helm@nxp.com>
M: Kumar Gala <kumar.gala@linaro.org>
S: Supported
F: arch/arm/
F: include/arch/arm/
F: boards/arm/
ARM CORTEX MICROCONTROLLER SOFTWARE INTERFACE STANDARD (CMSIS)
M: Maureen Helm <maureen.helm@nxp.com>
M: Kumar Gala <kumar.gala@linaro.org>
S: Supported
F: ext/hal/cmsis/
BOARDS/ARC - ARDUINO 101 SSS
M: Anas Nashif <anas.nashif@intel.com>
S: Supported
F: boards/arc/arduino_101_sss/
BOARDS/ARC - EM Starterkit
M: Chuck Jordan <cjordan@synopsys.com>
S: Supported
F: boards/arc/em_starterkit/
BOARDS/ARC - QUARK SE C1000 SS Devboard
M: Anas Nashif <anas.nashif@intel.com>
S: Supported
F: boards/arc/quark_se_c1000_ss_devboard/
BOARDS/ARM - 96Boards CARBON
M: Amit Kucheria <amit.kucheria@linaro.org>
M: Ricardo Salveti <ricardo.salveti@linaro.org>
S: Supported
F: boards/arm/96b_carbon/
BOARDS/ARM - 96Boards NITROGEN
M: Amit Kucheria <amit.kucheria@linaro.org>
S: Supported
F: boards/arm/96b_nitrogen/
BOARDS/ARM - ARDUINO 101 BLE
M: Johan Hedberg <johan.hedberg@intel.com>
S: Supported
F: boards/arm/arduino_101_ble/
BOARDS/ARM - CC3200 LAUNCHXL
M: Gil Pitney <gil.pitney@linaro.org>
S: Supported
F: boards/arm/cc3200_launchxl/
BOARDS/ARM - NXP FRDM-K64F
M: Maureen Helm <maureen.helm@nxp.com>
S: Supported
F: boards/arm/frdm_k64f/
BOARDS/ARM - NXP FRDM-KW41Z
M: Maureen Helm <maureen.helm@nxp.com>
S: Supported
F: boards/arm/frdm_kw41z/
BOARDS/ARM - NXP Hexiwear
M: Maureen Helm <maureen.helm@nxp.com>
S: Supported
F: boards/arm/hexiwear_k64/
BOARDS/ARM - NORDIC NRF51 REDBEAR BLENANO
M: Ricardo Salveti <ricardo.salveti@linaro.org>
S: Supported
F: boards/arm/nrf51_blenano/
BOARDS/ARM - NORDIC NRF52 PCA10040
M: Carles Cufi <carles.cufi@nordicsemi.no>
S: Supported
F: boards/arm/nrf52_pca10040/
BOARDS/ARM - NUCLEO-64 F401RE Devboard
M: Amit Kucheria <amit.kucheria@linaro.org>
M: Ricardo Salveti <ricardo.salveti@linaro.org>
S: Supported
F: boards/arm/nucleo_f401re/
BOARDS/ARM - ARM LTD V2M Beetle
M: Vincenzo Frascino <vincenzo.frascino@linaro.org>
S: Supported
F: boards/arm/v2m_beetle/
BOARDS/NIOS2 - ALTERA MAX10
M: Andrew Boie <andrew.p.boie@intel.com>
S: Supported
F: boards/nios2/altera_max10/
BOARDS/X86 - ARDUINO 101
M: Anas Nashif <anas.nashif@intel.com>
S: Supported
F: boards/x86/arduino_101/
BOARDS/X86 - Galileo
M: Anas Nashif <anas.nashif@intel.com>
S: Supported
F: boards/x86/galileo/
BOARDS/X86 - QUARK D2000 Devboard
M: Anas Nashif <anas.nashif@intel.com>
S: Supported
F: boards/x86/quark_d2000/
BOARDS/X86 - QUARK SE C1000 Devboard
M: Anas Nashif <anas.nashif@intel.com>
S: Supported
F: boards/x86/quark_se_c1000/
BLUETOOTH
M: Johan Hedberg <johan.hedberg@intel.com>
M: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
M: Szymon Janc <szymon.janc@gmail.com>
S: Supported
W: https://www.zephyrproject.org/doc/subsystems/bluetooth/bluetooth.html
F: subsys/bluetooth/
F: include/bluetooth/
F: include/drivers/bluetooth/
F: drivers/bluetooth/
F: samples/bluetooth/
F: tests/bluetooth/
F: doc/subsystems/bluetooth/
BLUETOOTH CONTROLLER
M: Vinayak Chettimada <vinayak.kariappa.chettimada@nordicsemi.no>
M: Carles Cufi <carles.cufi@nordicsemi.no>
S: Supported
F: subsys/bluetooth/controller/
CC3200 SDK
M: Gil Pitney <gil.pitney@linaro.org>
S: Supported
F: ext/hal/cc3200sdk/
CC32XX SOC - TI SIMPLELINK
M: Gil Pitney <gil.pitney@linaro.org>
S: Supported
F: arch/arm/soc/ti_simplelink/
DOCUMENTATION
M: Kinder, David <david.b.kinder@intel.com>
M: Perez-Gonzalez, Inaky <inaky.perez-gonzalez@intel.com>
S: Supported
F: doc/
F: *.rst
F: */*.rst
F: */*/*.rst
F: */*/*/*.rst
F: */*/*/*/*.rst
F: */*/*/*/*/*.rst
F: */*/*/*/*/*/*.rst
F: */*/*/*/*/*/*/*.rst
F: */*/*/*/*/*/*/*/*.rst
FILE SYSTEM
M: Ramesh Thomas <ramesh.thomas@intel.com>
M: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
S: Supported
F: ext/fs/
F: subsys/fs/
F: include/fs/
F: include/fs.h
F: samples/fs/
FLASH DRIVER
M: Baohong Liu <baohong.liu@intel.com>
M: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
S: Supported
F: drivers/flash/
INTERRUPTS
M: Andrew Boie <andrew.p.boie@intel.com>
S: Supported
F: drivers/interrupt_controller/
F: arch/arc/core/
F: arch/arm/core/
F: arch/nios2/core/
F: arch/x86/core/
F: include/irq.h
F: include/arch/x86/arch.h
F: include/arch/arm/cortex_m/irq.h
F: include/arch/nios2/arch.h
F: include/arch/arc/arch.h
F: include/arch/arc/v2/irq.h
F: include/drivers/loapic.h
F: include/drivers/ioapic.h
F: include/drivers/mvic.h
KERNEL CORE
M: Benjamin Walsh <benjamin.walsh@windriver.com>
M: Andrew Boie <andrew.p.boie@intel.com>
M: Andy Ross <andrew.j.ross@intel.com>
S: Supported
F: kernel/
F: include/nanokernel.h
F: include/microkernel.h
F: include/misc/
F: include/toolchain/
F: include/atomic.h
F: include/cache.h
F: include/init.h
F: include/irq.h
F: include/irq_offload.h
F: include/kernel_version.h
F: include/linker-defs.h
F: include/linker-tool-gcc.h
F: include/linker-tool.h
F: include/section_tags.h
F: include/sections.h
F: include/shared_irq.h
F: include/sw_isr_table.h
F: include/sys_clock.h
F: include/sys_io.h
F: include/toolchain.h
F: include/zephyr.h
F: include/kernel.h
F: include/legacy.h
F: tests/kernel/
KNOWN ISSUES
M: Anas Nashif <anas.nashif@intel.com>
M: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
M: Genaro Saucedo <genaro.saucedo.tejada@intel.com>
F: .known-issues/
MAINTAINERS
M: Genaro Saucedo <genaro.saucedo.tejada@intel.com>
M: Anas Nashif <anas.nashif@intel.com>
M: Perez-Gonzalez, Inaky <inaky.perez-gonzalez@intel.com>
S: Supported
F: MAINTAINERS
MBEDTLS
M: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
M: Jithu Joseph <jithu.joseph@intel.com>
M: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
S: Supported
F: ext/lib/crypto/mbedtls/
F: samples/net/mbedtls_sslclient/
F: tests/crypto/test_mbedtls/
MCUXPRESSO SOFTWARE DEVELOPMENT KIT (MCUX)
M: Maureen Helm <maureen.helm@nxp.com>
S: Supported
F: ext/hal/nxp/mcux/
MPS2 - ARM LTD CORTEX-M PROTOTYPING SYSTEM
M: Vincenzo Frascino <vincenzo.frascino@linaro.org>
S: Supported
F: arch/arm/soc/arm/mps2/
F: boards/arm/mps2/
NETWORKING
M: Jukka Rissanen <jukka.rissanen@linux.intel.com>
M: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
S: Supported
W: https://www.zephyrproject.org/doc/subsystems/networking/networking.html
F: subsys/net/ip/
F: subsys/net/lib/
F: include/net/
F: samples/net/
F: tests/net/
F: tests/net/lib/
F: drivers/ethernet/
F: drivers/ieee802154/
F: drivers/slip/
NETWORK APPLICATIONS
M: Flavio Santes <flavio.santes@intel.com>
S: Supported
F: subsys/net/lib/dns/
F: subsys/net/lib/http/
F: subsys/net/lib/mqtt/
F: samples/net/dns_client/
F: samples/net/http_server/
F: samples/net/mqtt_publisher/
F: tests/net/lib/http_header_fields/
F: tests/net/lib/mqtt_packet/
NETWORK BUFFERS
M: Johan Hedberg <johan.hedberg@intel.com>
M: Jukka Rissanen <jukka.rissanen@linux.intel.com>
M: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
S: Supported
W: https://www.zephyrproject.org/doc/subsystems/networking/buffers.html
F: subsys/net/buf.c
F: include/net/buf.h
F: tests/net/buf/
NIOS II
M: Andrew Boie <andrew.p.boie@intel.com>
S: Supported
F: arch/nios2/
F: include/arch/nios2/
F: drivers/serial/uart_altera_jtag.c
F: drivers/timer/altera_avalon_timer.c
F: tests/kernel/test_intmath/
F: boards/nios2/
NORDIC MDK
M: Carles Cufi <carles.cufi@nordicsemi.no>
S: Supported
F: ext/hal/nordic/mdk/
POWER MANAGEMENT
M: Ramesh Thomas <ramesh.thomas@intel.com>
M: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
S: Supported
F: arch/x86/core/crt0.S
F: include/device.h
F: include/init.h
F: include/power.h
F: kernel/k_idle.c
F: kernel/device.c
F: samples/power/
QMSI
M: Anas Nashif <anas.nashif@intel.com>
S: Supported
F: ext/hal/qmsi/
QMSI DRIVERS
M: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
M: Baohong Liu <baohong.liu@intel.com>
M: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
S: Supported
F: drivers/*/*qmsi*
F: drivers/*/*/*qmsi*
QUARK D2000 SOC
M: Anas Nashif <anas.nashif@intel.com>
S: Supported
F: arch/x86/soc/intel_quark/quark_d2000/
QUARK SE C1000 SOC
M: Anas Nashif <anas.nashif@intel.com>
S: Supported
F: arch/x86/soc/intel_quark/quark_se_c1000/
QUARK X1000 SOC
M: Anas Nashif <anas.nashif@intel.com>
S: Supported
F: arch/x86/soc/intel_quark/quark_x1000/
SANITYCHECK
M: Andrew Boie <andrew.p.boie@intel.com>
S: Supported
F: scripts/sanitycheck
F: scripts/expr_parser.py
F: scripts/sanity_chk/
SENSOR DRIVERS
M: Bogdan Davidoaia <bogdan.davidoaia@linaro.org>
M: Murtaza Alexandru <murtaza.alexandru1995@gmail.com>
S: Supported
W: https://www.zephyrproject.org/doc/subsystems/sensor.html
F: include/sensor.h
F: drivers/sensor/
F: samples/sensor/
STM32CUBE SDK
M: Erwan Gouriou <erwan.gouriou@linaro.org>
S: Supported
F: ext/hal/st/stm32cube/
STM32F4X SoC FAMILY and DRIVERS
M: Amit Kucheria <amit.kucheria@linaro.org>
M: Ricardo Salveti <ricardo.salveti@linaro.org>
S: Supported
F: arch/arm/soc/st_stm32/stm32f4/
F: drivers/pinmux/stm32/
F: drivers/gpio/*stm32*
F: drivers/clock_control/*stm32f4*
TINYCRYPT
M: Constanza Heath <constanza.m.heath@intel.com>
M: Flavio Santes <flavio.santes@intel.com>
S: Supported
F: ext/lib/crypto/tinycrypt/
F: tests/crypto/
SPI
M: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
S: Supported
F: drivers/spi/
F: include/spi.h
F: tests/drivers/spi_test/
USB
M: Jithu Joseph <jithu.joseph@intel.com>
S: Supported
F: subsys/usb
F: drivers/usb
F: samples/usb
X86 ARCH
M: Benjamin Walsh <benjamin.walsh@windriver.com>
M: Andrew Boie <andrew.p.boie@intel.com>
S: Supported
F: arch/x86/
F: include/arch/x86/
F: boards/x86/
XTENSA ARCH
M: Andrew Boie <andrew.p.boie@intel.com>
S: Supported
F: arch/xtensa
F: include/arch/xtensa/
F: boards/xtensa/
RISCV32 ARCH
M: Jean-Paul Etienne <fractalclone@gmail.com>
S: Supported
F: arch/riscv32
F: include/arch/riscv32
F: boards/riscv32
F: drivers/serial/uart_riscv_qemu.c
F: drivers/timer/pulpino_timer.c
F: drivers/timer/riscv_machine_timer.c
F: drivers/gpio/gpio_pulpino.c
ZOAP
M: Vinicius Costa Gomes <vinicius.gomes@intel.com>
S: Supported
F: subsys/net/lib/zoap/
F: samples/net/zoap_client/
F: samples/net/zoap_server/
F: tests/net/lib/zoap/
THE REST
M: Anas Nashif <anas.nashif@intel.com>
M: Kumar Gala <kumar.gala@linaro.org>
L: devel@lists.zephyrproject.com
T: git https://gerrit.zephyrproject.org/r/a/zephyr
S: Buried alive in reporters
F: *
F: */

File diff suppressed because it is too large Load Diff

1313
Makefile Normal file

File diff suppressed because it is too large Load Diff

146
Makefile.inc Normal file
View File

@@ -0,0 +1,146 @@
# vim: filetype=make
#
UNAME := $(shell uname)
ifeq (MINGW, $(findstring MINGW, $(UNAME)))
DQUOTE = '
# '
PROJECT_BASE ?= $(shell sh -c "pwd -W")
else
DQUOTE = "
# "
PROJECT_BASE ?= $(CURDIR)
endif
ifdef BOARD
KBUILD_DEFCONFIG_PATH=$(wildcard $(ZEPHYR_BASE)/boards/*/*/$(BOARD)_defconfig)
ifeq ($(KBUILD_DEFCONFIG_PATH),)
$(error Board $(BOARD) not found!)
endif
else
$(error BOARD is not defined!)
endif
# Choose a default output directory if one wasn't supplied. Note that
# PRISTINE_O depends on whether this is default or not. If building
# in-tree, we want to remove the whole outdir and not just the BOARD
# specified (thus "pristine"). Out of tree, we can obviously remove
# only what we were told to build.
ifndef O
PRISTINE_O = outdir
O = $(PROJECT_BASE)/outdir/$(BOARD)
else
PRISTINE_O = $(O)
endif
# Turn O into an absolute path; we call the main Kbuild with $(MAKE) -C
# which changes the working directory, relative paths don't work right.
# Need to create the directory first to make realpath happy
ifneq ($(MAKECMDGOALS),help)
$(shell mkdir -p $(O))
override O := $(realpath $(O))
endif
export ARCH MDEF_FILE QEMU_EXTRA_FLAGS PROJECT_BASE
override CONF_FILE := $(strip $(subst $(DQUOTE),,$(CONF_FILE)))
SOURCE_DIR ?= $(PROJECT_BASE)/src/
override SOURCE_DIR := $(realpath $(SOURCE_DIR))
override SOURCE_DIR := $(subst \,/,$(SOURCE_DIR))
override SOURCE_DIR_PARENT := $(patsubst %, %/.., $(SOURCE_DIR))
override SOURCE_DIR_PARENT := $(abspath $(SOURCE_DIR_PARENT))
override SOURCE_DIR_PARENT := $(subst \,/,$(SOURCE_DIR_PARENT))
export SOURCE_DIR SOURCE_DIR_PARENT
ifeq ("$(origin V)", "command line")
KBUILD_VERBOSE = $(V)
endif
ifndef KBUILD_VERBOSE
KBUILD_VERBOSE = 0
endif
ifeq ($(KBUILD_VERBOSE),1)
Q =
S =
else
Q = @
S = -s
endif
export CFLAGS
zephyrmake = +$(MAKE) -C $(ZEPHYR_BASE) O=$(1) \
PROJECT=$(PROJECT_BASE) SOURCE_DIR=$(DQUOTE)$(SOURCE_DIR)$(DQUOTE) $(2)
BOARDCONFIG = $(O)/.board_$(BOARD)
DOTCONFIG = $(O)/.config
all: $(DOTCONFIG)
$(Q)$(call zephyrmake,$(O),$@)
debug: $(DOTCONFIG)
$(Q)$(call zephyrmake,$(O),$@)
flash: $(DOTCONFIG)
$(Q)$(call zephyrmake,$(O),$@)
qemugdb: debugserver
qemu: $(DOTCONFIG)
@echo This target is deprecated, use 'make run' instead
$(Q)$(call zephyrmake,$(O),$@)
run: $(DOTCONFIG)
$(Q)$(call zephyrmake,$(O),$@)
ifeq ($(MAKECMDGOALS),debugserver)
ARCH = $(notdir $(subst /$(BOARD),,$(wildcard $(ZEPHYR_BASE)/boards/*/$(BOARD))))
-include $(ZEPHYR_BASE)/boards/$(ARCH)/$(BOARD)/Makefile.board
-include $(ZEPHYR_BASE)/scripts/Makefile.toolchain.$(ZEPHYR_GCC_VARIANT)
BOARD_NAME = $(BOARD)
export BOARD_NAME
endif
debugserver: FORCE
$(Q)$(CONFIG_SHELL) $(ZEPHYR_BASE)/scripts/support/$(DEBUG_SCRIPT) debugserver
initconfig outputexports: $(DOTCONFIG)
$(BOARDCONFIG):
@rm -f $(O)/.board_*
@touch $@
ram_report: initconfig
$(Q)$(call zephyrmake,$(O),$@)
rom_report: initconfig
$(Q)$(call zephyrmake,$(O),$@)
menuconfig: initconfig
$(Q)$(call zephyrmake,$(O),$@)
help:
$(Q)$(MAKE) -s -C $(ZEPHYR_BASE) $@
# Catch all
%:
$(Q)$(call zephyrmake,$(O),$@)
OVERLAY_CONFIG += $(ZEPHYR_BASE)/kernel/configs/kernel.config
$(DOTCONFIG): $(BOARDCONFIG) $(KBUILD_DEFCONFIG_PATH) $(CONF_FILE)
$(Q)$(CONFIG_SHELL) $(ZEPHYR_BASE)/scripts/kconfig/merge_config.sh \
-q -m -O $(O) $(KBUILD_DEFCONFIG_PATH) $(OVERLAY_CONFIG) $(CONF_FILE) \
$(wildcard $(O)/*.conf)
$(Q)$(MAKE) $(S) -C $(ZEPHYR_BASE) O=$(O) PROJECT=$(PROJECT_BASE) oldnoconfig
pristine:
$(Q)rm -rf $(PRISTINE_O)
PHONY += FORCE initconfig
FORCE:
.PHONY: $(PHONY)

4
Makefile.test Normal file
View File

@@ -0,0 +1,4 @@
OVERLAY_CONFIG += $(ZEPHYR_BASE)/tests/include/test.config
include ${ZEPHYR_BASE}/Makefile.inc

View File

@@ -1,92 +0,0 @@
.. raw:: html
<a href="https://www.zephyrproject.org">
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="doc/_static/images/logo-readme-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="doc/_static/images/logo-readme-light.svg">
<img src="doc/_static/images/logo-readme-light.svg">
</picture>
</p>
</a>
<a href="https://bestpractices.coreinfrastructure.org/projects/74"><img
src="https://bestpractices.coreinfrastructure.org/projects/74/badge"></a>
<a
href="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml?query=branch%3Amain">
<img
src="https://github.com/zephyrproject-rtos/zephyr/actions/workflows/twister.yaml/badge.svg?event=push"></a>
The Zephyr Project is a scalable real-time operating system (RTOS) supporting
multiple hardware architectures, optimized for resource constrained devices,
and built with security in mind.
The Zephyr OS is based on a small-footprint kernel designed for use on
resource-constrained systems: from simple embedded environmental sensors and
LED wearables to sophisticated smart watches and IoT wireless gateways.
The Zephyr kernel supports multiple architectures, including ARM (Cortex-A,
Cortex-R, Cortex-M), Intel x86, ARC, Nios II, Tensilica Xtensa, and RISC-V,
SPARC, MIPS, and a large number of `supported boards`_.
.. below included in doc/introduction/introduction.rst
Getting Started
***************
Welcome to Zephyr! See the `Introduction to Zephyr`_ for a high-level overview,
and the documentation's `Getting Started Guide`_ to start developing.
.. start_include_here
Community Support
*****************
Community support is provided via mailing lists and Discord; see the Resources
below for details.
.. _project-resources:
Resources
*********
Here's a quick summary of resources to help you find your way around:
* **Help**: `Asking for Help Tips`_
* **Documentation**: http://docs.zephyrproject.org (`Getting Started Guide`_)
* **Source Code**: https://github.com/zephyrproject-rtos/zephyr is the main
repository; https://elixir.bootlin.com/zephyr/latest/source contains a
searchable index
* **Releases**: https://github.com/zephyrproject-rtos/zephyr/releases
* **Samples and example code**: see `Sample and Demo Code Examples`_
* **Mailing Lists**: users@lists.zephyrproject.org and
devel@lists.zephyrproject.org are the main user and developer mailing lists,
respectively. You can join the developer's list and search its archives at
`Zephyr Development mailing list`_. The other `Zephyr mailing list
subgroups`_ have their own archives and sign-up pages.
* **Nightly CI Build Status**: https://lists.zephyrproject.org/g/builds
The builds@lists.zephyrproject.org mailing list archives the CI nightly build results.
* **Chat**: Real-time chat happens in Zephyr's Discord Server. Use
this `Discord Invite`_ to register.
* **Contributing**: see the `Contribution Guide`_
* **Wiki**: `Zephyr GitHub wiki`_
* **Issues**: https://github.com/zephyrproject-rtos/zephyr/issues
* **Security Issues**: Email vulnerabilities@zephyrproject.org to report
security issues; also see our `Security`_ documentation. Security issues are
tracked separately at https://zephyrprojectsec.atlassian.net.
* **Zephyr Project Website**: https://zephyrproject.org
.. _Discord Invite: https://chat.zephyrproject.org
.. _supported boards: http://docs.zephyrproject.org/latest/boards/index.html
.. _Zephyr Documentation: http://docs.zephyrproject.org
.. _Introduction to Zephyr: http://docs.zephyrproject.org/latest/introduction/index.html
.. _Getting Started Guide: http://docs.zephyrproject.org/latest/develop/getting_started/index.html
.. _Contribution Guide: http://docs.zephyrproject.org/latest/contribute/index.html
.. _Zephyr GitHub wiki: https://github.com/zephyrproject-rtos/zephyr/wiki
.. _Zephyr Development mailing list: https://lists.zephyrproject.org/g/devel
.. _Zephyr mailing list subgroups: https://lists.zephyrproject.org/g/main/subgroups
.. _Sample and Demo Code Examples: http://docs.zephyrproject.org/latest/samples/index.html
.. _Security: http://docs.zephyrproject.org/latest/security/index.html
.. _Asking for Help Tips: https://docs.zephyrproject.org/latest/develop/getting_started/index.html#asking-for-help

View File

@@ -1,5 +0,0 @@
VERSION_MAJOR = 3
VERSION_MINOR = 4
PATCHLEVEL = 99
VERSION_TWEAK = 0
EXTRAVERSION =

View File

@@ -1,14 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
# FIXME: SHADOW_VARS: Remove this once we have enabled -Wshadow globally.
add_compile_options($<TARGET_PROPERTY:compiler,warning_shadow_variables>)
add_definitions(-D__ZEPHYR_SUPERVISOR__)
include_directories(
${ZEPHYR_BASE}/kernel/include
${ARCH_DIR}/${ARCH}/include
)
add_subdirectory(common)
add_subdirectory(${ARCH_DIR}/${ARCH} arch/${ARCH})

File diff suppressed because it is too large Load Diff

1
arch/Makefile Normal file
View File

@@ -0,0 +1 @@
obj-y += common/ $(ARCH)/

View File

@@ -1,47 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
# Enable debug support in mdb
# Dwarf version 2 can be recognized by mdb
# The default dwarf version in gdb is not recognized by mdb
zephyr_cc_option(-g3 -gdwarf-2)
# Without this (poorly named) option, compiler may generate undefined
# references to abort().
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63691
zephyr_cc_option(-fno-delete-null-pointer-checks)
zephyr_cc_option_ifdef(CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS -munaligned-access)
if(NOT COMPILER STREQUAL arcmwdt)
if(CONFIG_THREAD_LOCAL_STORAGE)
# Instruct compiler to use proper register as cached thread pointer for thread local storage.
# For ARCv2 the default register is usually not specified - so we need to specify it
# For ARCv3 the register is fixed to r30, so we don't need to specify it
zephyr_compile_options_ifdef(CONFIG_ISA_ARCV2 -mtp-regno=26)
else()
# If thread local storage isn't used - we can safely schedule thread pointer register
zephyr_compile_options_ifdef(CONFIG_ISA_ARCV2 -mtp-regno=none)
endif()
endif()
add_subdirectory(core)
if(COMPILER STREQUAL arcmwdt)
add_subdirectory(arcmwdt)
if(CONFIG_64BIT)
zephyr_compile_options(-Ml)
# Instruct MWDT assembler not to warn when we load only lower half (32bit) of symbol
# instead of full 64bit address in ASM code. It is valid as we don't support Zephyr
# linkage to high addresses for 64bit ARC platforms.
zephyr_compile_options(-Wa,-offwarn=168)
endif()
endif()
if(CONFIG_ISA_ARCV3 AND CONFIG_64BIT)
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf64-littlearc64)
elseif(CONFIG_ISA_ARCV3 AND NOT CONFIG_64BIT)
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-littlearc64)
else()
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-littlearc)
endif()

6
arch/arc/Kbuild Normal file
View File

@@ -0,0 +1,6 @@
subdir-ccflags-y +=-I$(srctree)/include/drivers
subdir-ccflags-y +=-I$(srctree)/drivers
subdir-asflags-y += $(subdir-ccflags-y)
obj-y += soc/$(SOC_PATH)/
obj-y += core/

View File

@@ -1,7 +1,18 @@
# ARC options
# ARC EM4 options
# Copyright (c) 2014, 2019 Wind River Systems, Inc.
#
# Copyright (c) 2014 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
choice
prompt "ARC SoC Selection"
depends on ARC
source "arch/arc/soc/*/Kconfig.soc"
endchoice
menu "ARC Options"
depends on ARC
@@ -9,136 +20,52 @@ menu "ARC Options"
config ARCH
default "arc"
config ARCH_DEFCONFIG
string
default "arch/arc/defconfig"
config CPU_ARCEM
menu "ARC EM4 processor options"
config CPU_ARCEM4
bool
default y
select CPU_ARCV2
select ATOMIC_OPERATIONS_C
help
This option signifies the use of an ARC EM CPU
This option signifies the use of an ARC EM4 CPU
config CPU_ARCHS
endmenu
menu "ARCv2 Family Options"
config CPU_ARCV2
bool
select ATOMIC_OPERATIONS_BUILTIN
help
This option signifies the use of an ARC HS CPU
choice
prompt "ARC Instruction Set"
default ISA_ARCV2
config ISA_ARCV2
bool "ARC ISA v2"
select ARCH_HAS_STACK_PROTECTION if ARC_HAS_STACK_CHECKING || (ARC_MPU && ARC_MPU_VER !=2)
select ARCH_HAS_USERSPACE if ARC_MPU
select ARCH_HAS_SINGLE_THREAD_SUPPORT if !SMP
select USE_SWITCH
select USE_SWITCH_SUPPORTED
help
v2 ISA for the ARC-HS & ARC-EM cores
config ISA_ARCV3
bool "ARC ISA v3"
select ARCH_HAS_SINGLE_THREAD_SUPPORT if !SMP
select USE_SWITCH
select USE_SWITCH_SUPPORTED
endchoice
if ISA_ARCV2
config CPU_EM4
bool
select CPU_ARCEM
help
If y, the SoC uses an ARC EM4 CPU
config CPU_EM4_DMIPS
bool
select CPU_ARCEM
help
If y, the SoC uses an ARC EM4 DMIPS CPU
config CPU_EM4_FPUS
bool
select CPU_ARCEM
help
If y, the SoC uses an ARC EM4 DMIPS CPU with the single-precision
floating-point extension
config CPU_EM4_FPUDA
bool
select CPU_ARCEM
help
If y, the SoC uses an ARC EM4 DMIPS CPU with single-precision
floating-point and double assist instructions
config CPU_EM6
bool
select CPU_ARCEM
select CPU_HAS_DCACHE
select CPU_HAS_ICACHE
help
If y, the SoC uses an ARC EM6 CPU
config CPU_HS3X
bool
select CPU_ARCHS
select CPU_HAS_DCACHE
select CPU_HAS_ICACHE
help
If y, the SoC uses an ARC HS3x CPU
config CPU_HS4X
bool
select CPU_ARCHS
select CPU_HAS_DCACHE
select CPU_HAS_ICACHE
help
If y, the SoC uses an HS4X CPU
endif #ISA_ARCV2
if ISA_ARCV3
config CPU_HS5X
bool
select CPU_ARCHS
select CPU_HAS_DCACHE
select CPU_HAS_ICACHE
help
If y, the SoC uses an ARC HS6x CPU
config CPU_HS6X
bool
select CPU_ARCHS
select 64BIT
select CPU_HAS_DCACHE
select CPU_HAS_ICACHE
help
If y, the SoC uses an ARC HS6x CPU
endif #ISA_ARCV3
config FP_FPU_DA
bool
menu "ARC CPU Options"
config ARC_HAS_ZOL
bool
depends on ISA_ARCV2
default y
help
ARCv2 CPUs have ZOL hardware loop mechanism which the ARCv3 ISA drops.
Architecturally ZOL provides
- LPcc instruction
- LP_COUNT core reg
- LP_START, LP_END aux regs
Disabling this option removes usage of ZOL regs from code
This option signifies the use of a CPU of the ARCv2 family.
config NUM_IRQ_PRIO_LEVELS
int "Number of supported interrupt priority levels"
config NSIM
prompt "Running on the MetaWare nSIM simulator"
bool
default n
help
For running on nSIM simulator.
a) Uses non-XIP to run in RAM.
b) Linked at address 0x4000 with 0x4000 of RAM so that it works with
a pc_size of 16 (default).
config DATA_ENDIANNESS_LITTLE
bool
default y
help
This is driven by the processor implementation, since it is fixed in
hardware. The BSP should set this value to 'n' if the data is
implemented as big endian.
config NUM_IRQ_PRIO_LEVELS
int
prompt "Number of supported interrupt priority levels"
range 1 16
help
Interrupt priorities available will be 0 to NUM_IRQ_PRIO_LEVELS-1.
@@ -146,8 +73,9 @@ config NUM_IRQ_PRIO_LEVELS
The BSP must provide a valid default for proper operation.
config NUM_IRQS
int "Upper limit of interrupt numbers/IDs used"
config NUM_IRQS
int
prompt "Upper limit of interrupt numbers/IDs used"
range 17 256
help
Interrupts available will be 0 to NUM_IRQS-1.
@@ -157,116 +85,64 @@ config NUM_IRQS
The BSP must provide a valid default. This drives the size of the
vector table.
config RGF_NUM_BANKS
int "Number of General Purpose Register Banks"
depends on ARC_FIRQ
depends on NUM_IRQ_PRIO_LEVELS > 1
config RGF_NUM_BANKS
int
prompt "Number of General Purpose Register Banks"
depends on CPU_ARCV2
range 1 2
default 2
help
The ARC CPU can be configured to have more than one register
bank. If fast interrupts are supported (FIRQ), the 2nd
register bank, in the set, will be used by FIRQ interrupts.
If fast interrupts are supported but there is only 1
register bank, the fast interrupt handler must save
and restore general purpose registers.
NOTE: it's required to have more than one interrupt priority level
to use second register bank - otherwise all interrupts will use
same register bank. Such configuration isn't supported in software
and it is not beneficial from the performance point of view.
The ARC CPU can be configured to have more than one register
bank. If fast interrupts are supported (FIRQ), the 2nd
register bank, in the set, will be used by FIRQ interrupts.
If fast interrupts are supported but there is only 1
register bank, the fast interrupt handler must save
and restore general purpose regsiters.
config ARC_FIRQ
bool "FIRQ enable"
depends on ISA_ARCV2
depends on NUM_IRQ_PRIO_LEVELS > 1
depends on !ARC_HAS_SECURE
default y
help
Fast interrupts are supported (FIRQ). If FIRQ enabled, for interrupts
with highest priority, status32 and pc will be saved in aux regs,
other regs will be saved according to the number of register bank;
If FIRQ is disabled, the handle of interrupts with highest priority
will be same with other interrupts.
NOTE: we don't allow the configuration with FIRQ enabled and only one
interrupt priority level (so all interrupts are FIRQ). Such
configuration isn't supported in software and it is not beneficial
from the performance point of view.
config ARC_FIRQ_STACK
bool "Separate firq stack"
depends on ARC_FIRQ && RGF_NUM_BANKS > 1
help
Use separate stack for FIRQ handing. When the fast irq is also a direct
irq, this will get the minimal interrupt latency.
config ARC_FIRQ_STACK_SIZE
int "FIRQ stack size"
depends on ARC_FIRQ_STACK
config FIRQ_STACK_SIZE
int
prompt "Size of stack for FIRQs (in bytes)"
depends on CPU_ARCV2
default 1024
help
The size of firq stack.
FIRQs and regular IRQs have different stacks so that a FIRQ can start
running without doing stack switching in software.
config ARC_HAS_STACK_CHECKING
bool "ARC has STACK_CHECKING"
depends on ISA_ARCV2
default y
config ARC_STACK_CHECKING
bool "Enable Stack Checking"
depends on CPU_ARCV2
default n
help
ARC is configured with STACK_CHECKING which is a mechanism for
checking stack accesses and raising an exception when a stack
overflow or underflow is detected.
ARCV2 has a special feature allowing to check stack overflows. This
enables code that allows using this debug feature
config ARC_CONNECT
bool "ARC has ARC connect"
select SCHED_IPI_SUPPORTED
help
ARC is configured with ARC CONNECT which is a hardware for connecting
multi cores.
config ARC_STACK_CHECKING
bool
select NO_UNUSED_STACK_INSPECTION
help
Use ARC STACK_CHECKING to do stack protection
config ARC_STACK_PROTECTION
bool
default y if HW_STACK_PROTECTION
select ARC_STACK_CHECKING if ARC_HAS_STACK_CHECKING
select MPU_STACK_GUARD if (!ARC_STACK_CHECKING && ARC_MPU && ARC_MPU_VER !=2)
select THREAD_STACK_INFO
help
This option enables either:
- The ARC stack checking, or
- the MPU-based stack guard
to cause a system fatal error
if the bounds of the current process stack are overflowed.
The two stack guard options are mutually exclusive. The
selection of the ARC stack checking is
prioritized over the MPU-based stack guard.
config ARC_USE_UNALIGNED_MEM_ACCESS
bool "Unaligned access in HW"
default y if CPU_ARCHS
depends on (CPU_ARCEM && !ARC_HAS_SECURE) || CPU_ARCHS
help
ARC EM cores w/o secure shield 2+2 mode support might be configured
to support unaligned memory access which is then disabled by default.
Enable unaligned access in hardware and make software to use it.
config FAULT_DUMP
int "Fault dump level"
config FAULT_DUMP
int
prompt "Fault dump level"
default 2
range 0 2
help
Different levels for display information when a fault occurs.
Different levels for display information when a fault occurs.
2: The default. Display specific and verbose information. Consumes
2: The default. Display specific and verbose information. Consumes
the most memory (long strings).
1: Display general and short information. Consumes less memory
1: Display general and short information. Consumes less memory
(short strings).
0: Off.
0: Off.
config IRQ_OFFLOAD
bool "Enable IRQ offload"
default n
help
Enable irq_offload() API which allows functions to be synchronously
run in interrupt context. Uses one entry in the IDT. Mainly useful
for test cases.
config XIP
default n if NSIM
default y
config GEN_ISR_TABLES
default y
@@ -275,148 +151,106 @@ config GEN_IRQ_START_VECTOR
default 16
config HARVARD
bool "Harvard Architecture"
prompt "Harvard Architecture"
bool
default n
help
The ARC CPU can be configured to have two busses;
one for instruction fetching and another that serves as a data bus.
config CODE_DENSITY
bool "Code Density Option"
config ICCM_SIZE
int "ICCM Size in kB"
help
Enable code density option to get better code density
This option specifies the size of the ICCM in kB. It is normally set by
the board's defconfig file and the user should generally avoid modifying
it via the menu configuration.
config ARC_HAS_ACCL_REGS
bool "Reg Pair ACCL:ACCH (FPU and/or MPY > 6 and/or DSP)"
default y if CPU_HS3X || CPU_HS4X || CPU_HS5X || CPU_HS6X
config ICCM_BASE_ADDRESS
hex "ICCM Base Address"
help
Depending on the configuration, CPU can contain accumulator reg-pair
(also referred to as r58:r59). These can also be used by gcc as GPR so
kernel needs to save/restore per process
This option specifies the base address of the ICCM on the board. It is
normally set by the board's defconfig file and the user should generally
avoid modifying it via the menu configuration.
config ARC_HAS_SECURE
bool "ARC has SecureShield"
depends on ISA_ARCV2
select CPU_HAS_TEE
select ARCH_HAS_TRUSTED_EXECUTION
config DCCM_SIZE
int "DCCM Size in kB"
help
This option is enabled when ARC core supports secure mode
This option specifies the size of the DCCM in kB. It is normally set by
the board's defconfig file and the user should generally avoid modifying
it via the menu configuration.
config SJLI_TABLE_SIZE
int "SJLI table size"
depends on ARC_SECURE_FIRMWARE
default 8
config DCCM_BASE_ADDRESS
hex "DCCM Base Address"
help
The size of sjli (Secure Jump and Link Indexed) table. The
code in normal mode call secure services in secure mode through
sjli instruction.
This option specifies the base address of the DCCM on the board. It is
normally set by the board's defconfig file and the user should generally
avoid modifying it via the menu configuration.
config ARC_SECURE_FIRMWARE
bool "Generate Secure Firmware"
depends on ARC_HAS_SECURE
default y if TRUSTED_EXECUTION_SECURE
config SRAM_SIZE
int "SRAM Size in kB"
help
This option indicates that we are building a Zephyr image that
is intended to execute in secure mode. The option is only
applicable to ARC processors that implement the SecureShield.
This option specifies the size of the SRAM in kB. It is normally set by
the board's defconfig file and the user should generally avoid modifying
it via the menu configuration.
This option enables Zephyr to include code that executes in
secure mode, as well as to exclude code that is designed to
execute only in normal mode.
Code executing in secure mode has access to both the secure
and normal resources of the ARC processors.
config ARC_NORMAL_FIRMWARE
bool "Generate Normal Firmware"
depends on !ARC_SECURE_FIRMWARE
depends on ARC_HAS_SECURE
default y if TRUSTED_EXECUTION_NONSECURE
config SRAM_BASE_ADDRESS
hex "SRAM Base Address"
help
This option indicates that we are building a Zephyr image that
is intended to execute in normal mode. Execution of this
image is triggered by secure firmware that executes in secure
mode. The option is only applicable to ARC processors that
implement the SecureShield.
This option specifies the base address of the SRAM on the board. It is
normally set by the board's defconfig file and the user should generally
avoid modifying it via the menu configuration.
This option enables Zephyr to include code that executes in
normal mode only, as well as to exclude code that is
designed to execute only in secure mode.
Code executing in normal mode has no access to secure
resources of the ARC processors, and, therefore, it shall avoid
accessing them.
source "arch/arc/core/dsp/Kconfig"
menu "ARC MPU Options"
depends on CPU_HAS_MPU
config ARC_MPU_ENABLE
bool "Memory Protection Unit (MPU)"
select ARC_MPU
config FLASH_SIZE
int "Flash Size in kB"
help
Enable MPU
This option specifies the size of the flash in kB. It is normally set by
the board's defconfig file and the user should generally avoid modifying
it via the menu configuration.
source "arch/arc/core/mpu/Kconfig"
endmenu
config DCACHE_LINE_SIZE
default 32
config ARC_EXCEPTION_STACK_SIZE
int "ARC exception handling stack size"
default 768 if !64BIT
default 2048 if 64BIT
config FLASH_BASE_ADDRESS
hex "Flash Base Address"
help
Size in bytes of exception handling stack which is at the top of
interrupt stack to get smaller memory footprint because exception
is not frequent. To reduce the impact on interrupt handling,
especially nested interrupt, it cannot be too large.
This option specifies the base address of the flash on the board. It is
normally set by the board's defconfig file and the user should generally
avoid modifying it via the menu configuration.
endmenu
config ARC_EXCEPTION_DEBUG
bool "Unhandled exception debugging information"
config CACHE_LINE_SIZE_DETECT
bool
prompt "Detect d-cache line size at runtime"
default n
depends on PRINTK || LOG
help
Print human-readable information about exception vectors, cause codes,
and parameters, at a cost of code/data size for the human-readable
strings.
This option enables querying the d-cache build register for finding
the d-cache line size at the expense of taking more memory and code
and a slightly increased boot time.
config ARC_EARLY_SOC_INIT
bool "Make early stage SoC-specific initialization"
If the CPU's d-cache line size is known in advance, disable this
option and manually enter the value for CACHE_LINE_SIZE.
config CACHE_LINE_SIZE
int
prompt "Cache line size" if !CACHE_LINE_SIZE_DETECT
default 32
help
Call SoC per-core setup code on early stage initialization
(before C runtime initialization). Setup code is called in form of
soc_early_asm_init_percpu assembler macro.
Size in bytes of a CPU d-cache line.
Detect automatically at runtime by selecting CACHE_LINE_SIZE_DETECT.
config ARCH_CACHE_FLUSH_DETECT
bool
default n
config CACHE_FLUSHING
bool
default n
prompt "Enable d-cache flushing mechanism"
help
This links in the sys_cache_flush() function, which provides a
way to flush multiple lines of the d-cache.
If the d-cache is present, set this to y.
If the d-cache is NOT present, set this to n.
endmenu
config MAIN_STACK_SIZE
default 4096 if 64BIT
source "arch/arc/soc/*/Kconfig"
config ISR_STACK_SIZE
default 4096 if 64BIT
config SYSTEM_WORKQUEUE_STACK_SIZE
default 4096 if 64BIT
config IDLE_STACK_SIZE
default 1024 if 64BIT
config IPM_CONSOLE_STACK_SIZE
default 2048 if 64BIT
config TEST_EXTRA_STACK_SIZE
default 2048 if 64BIT
config CMSIS_THREAD_MAX_STACK_SIZE
default 2048 if 64BIT
config CMSIS_V2_THREAD_MAX_STACK_SIZE
default 2048 if 64BIT
config CMSIS_V2_THREAD_DYNAMIC_STACK_SIZE
default 2048 if 64BIT
endmenu

21
arch/arc/Makefile Normal file
View File

@@ -0,0 +1,21 @@
cflags-y += $(call cc-option,-ffunction-sections,) $(call cc-option,-fdata-sections,)
# Without this (poorly named) option, compiler may generate undefined
# references to abort().
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63691
cflags-y += $(call cc-option,-fno-delete-null-pointer-checks)
cflags-$(CONFIG_ARC_STACK_CHECKING) = $(call cc-option,-fomit-frame-pointer)
cflags-$(CONFIG_LTO) = $(call cc-option,-flto,)
include $(srctree)/arch/$(ARCH)/soc/$(SOC_PATH)/Makefile
KBUILD_CFLAGS += $(cflags-y)
KBUILD_CXXFLAGS += $(cflags-y)
soc-cxxflags ?= $(soc-cflags)
soc-aflags ?= $(soc-cflags)
KBUILD_CFLAGS += $(soc-cflags)
KBUILD_CXXFLAGS += $(soc-cxxflags)
KBUILD_AFLAGS += $(soc-aflags)

View File

@@ -1,5 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
if(CONFIG_ARCMWDT_LIBC OR CONFIG_CPP)
zephyr_sources(arcmwdt-dtr-stubs.c)
endif()

View File

@@ -1,22 +0,0 @@
/*
* Copyright (c) 2021 Synopsys.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/toolchain.h>
__weak void *__dso_handle;
int __cxa_atexit(void (*destructor)(void *), void *objptr, void *dso)
{
ARG_UNUSED(destructor);
ARG_UNUSED(objptr);
ARG_UNUSED(dso);
return 0;
}
int atexit(void (*function)(void))
{
return 0;
}

View File

@@ -1,36 +0,0 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_library()
zephyr_library_sources(
thread.c
thread_entry_wrapper.S
cpu_idle.S
fatal.c
fault.c
fault_s.S
irq_manage.c
timestamp.c
isr_wrapper.S
regular_irq.S
switch.S
prep_c.c
reset.S
vector_table.c
)
zephyr_library_sources_ifdef(CONFIG_ARCH_CACHE cache.c)
zephyr_library_sources_ifdef(CONFIG_ARC_FIRQ fast_irq.S)
zephyr_library_sources_ifdef(CONFIG_IRQ_OFFLOAD irq_offload.c)
zephyr_library_sources_ifdef(CONFIG_USERSPACE userspace.S)
zephyr_library_sources_ifdef(CONFIG_ARC_CONNECT arc_connect.c)
zephyr_library_sources_ifdef(CONFIG_ARC_CONNECT arc_smp.c)
zephyr_library_sources_ifdef(CONFIG_THREAD_LOCAL_STORAGE tls.c)
add_subdirectory_ifdef(CONFIG_ARC_CORE_MPU mpu)
add_subdirectory_ifdef(CONFIG_ARC_SECURE_FIRMWARE secureshield)
zephyr_linker_sources(ROM_START SORT_KEY 0x0vectors vector_table.ld)

18
arch/arc/core/Makefile Normal file
View File

@@ -0,0 +1,18 @@
ccflags-y += -I$(srctree)/kernel/include
ccflags-y +=-I$(srctree)/arch/$(ARCH)/include
obj-y += thread.o thread_entry_wrapper.o \
cpu_idle.o fast_irq.o fatal.o fault.o \
fault_s.o irq_manage.o cache.o timestamp.o \
isr_wrapper.o regular_irq.o swap.o \
sys_fatal_error_handler.o
obj-y += prep_c.o \
reset.o \
vector_table.o
obj-$(CONFIG_IRQ_OFFLOAD) += irq_offload.o
# Some ARC cores like the EM4 lack the atomic LLOCK/SCOND and
# can't use these.
obj-$(CONFIG_ATOMIC_OPERATIONS_CUSTOM) += atomic.o

View File

@@ -1,443 +0,0 @@
/*
* Copyright (c) 2019 Synopsys.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief ARCv2 ARC CONNECT driver
*
*/
#include <zephyr/kernel.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/spinlock.h>
#include <kernel_internal.h>
static struct k_spinlock arc_connect_spinlock;
/* Generate an inter-core interrupt to the target core */
void z_arc_connect_ici_generate(uint32_t core)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_INTRPT_GENERATE_IRQ, core);
}
}
/* Acknowledge the inter-core interrupt raised by core */
void z_arc_connect_ici_ack(uint32_t core)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_INTRPT_GENERATE_ACK, core);
}
}
/* Read inter-core interrupt status */
uint32_t z_arc_connect_ici_read_status(uint32_t core)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_INTRPT_READ_STATUS, core);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/* Check the source of inter-core interrupt */
uint32_t z_arc_connect_ici_check_src(void)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_INTRPT_CHECK_SOURCE, 0);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/* Clear the inter-core interrupt */
void z_arc_connect_ici_clear(void)
{
uint32_t cpu, c;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_INTRPT_CHECK_SOURCE, 0);
cpu = z_arc_connect_cmd_readback(); /* 1,2,4,8... */
/*
* In rare case, multiple concurrent ICIs sent to same target can
* possibly be coalesced by MCIP into 1 asserted IRQ, so @cpu can be
* "vectored" (multiple bits sets) as opposed to typical single bit
*/
while (cpu) {
c = find_lsb_set(cpu) - 1;
z_arc_connect_cmd(
ARC_CONNECT_CMD_INTRPT_GENERATE_ACK, c);
cpu &= ~(1U << c);
}
}
}
/* Reset the cores in core_mask */
void z_arc_connect_debug_reset(uint32_t core_mask)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd_data(ARC_CONNECT_CMD_DEBUG_RESET,
0, core_mask);
}
}
/* Halt the cores in core_mask */
void z_arc_connect_debug_halt(uint32_t core_mask)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd_data(ARC_CONNECT_CMD_DEBUG_HALT,
0, core_mask);
}
}
/* Run the cores in core_mask */
void z_arc_connect_debug_run(uint32_t core_mask)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd_data(ARC_CONNECT_CMD_DEBUG_RUN,
0, core_mask);
}
}
/* Set core mask */
void z_arc_connect_debug_mask_set(uint32_t core_mask, uint32_t mask)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd_data(ARC_CONNECT_CMD_DEBUG_SET_MASK,
mask, core_mask);
}
}
/* Read core mask */
uint32_t z_arc_connect_debug_mask_read(uint32_t core_mask)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd_data(ARC_CONNECT_CMD_DEBUG_READ_MASK,
0, core_mask);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/*
* Select cores that should be halted if the core issuing the command is halted
*/
void z_arc_connect_debug_select_set(uint32_t core_mask)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd_data(ARC_CONNECT_CMD_DEBUG_SET_SELECT,
0, core_mask);
}
}
/* Read the select value */
uint32_t z_arc_connect_debug_select_read(void)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_DEBUG_READ_SELECT, 0);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/* Read the status, halt or run of all cores in the system */
uint32_t z_arc_connect_debug_en_read(void)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_DEBUG_READ_EN, 0);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/* Read the last command sent */
uint32_t z_arc_connect_debug_cmd_read(void)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_DEBUG_READ_CMD, 0);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/* Read the value of internal MCD_CORE register */
uint32_t z_arc_connect_debug_core_read(void)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_DEBUG_READ_CORE, 0);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/* Clear global free running counter */
void z_arc_connect_gfrc_clear(void)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_GFRC_CLEAR, 0);
}
}
/* Read total 64 bits of global free running counter */
uint64_t z_arc_connect_gfrc_read(void)
{
uint32_t low;
uint32_t high;
uint32_t key;
/*
* each core has its own arc connect interface, i.e.,
* CMD/READBACK. So several concurrent commands to ARC
* connect are of if they are trying to access different
* sub-components. For GFRC, HW allows simultaneously accessing to
* counters. So an irq lock is enough.
*/
key = arch_irq_lock();
z_arc_connect_cmd(ARC_CONNECT_CMD_GFRC_READ_LO, 0);
low = z_arc_connect_cmd_readback();
z_arc_connect_cmd(ARC_CONNECT_CMD_GFRC_READ_HI, 0);
high = z_arc_connect_cmd_readback();
arch_irq_unlock(key);
return (((uint64_t)high) << 32) | low;
}
/* Enable global free running counter */
void z_arc_connect_gfrc_enable(void)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_GFRC_ENABLE, 0);
}
}
/* Disable global free running counter */
void z_arc_connect_gfrc_disable(void)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_GFRC_DISABLE, 0);
}
}
/* Disable global free running counter */
void z_arc_connect_gfrc_core_set(uint32_t core_mask)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd_data(ARC_CONNECT_CMD_GFRC_SET_CORE,
0, core_mask);
}
}
/* Set the relevant cores to halt global free running counter */
uint32_t z_arc_connect_gfrc_halt_read(void)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_GFRC_READ_HALT, 0);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/* Read the internal CORE register */
uint32_t z_arc_connect_gfrc_core_read(void)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_GFRC_READ_CORE, 0);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/* Enable interrupt distribute unit */
void z_arc_connect_idu_enable(void)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_IDU_ENABLE, 0);
}
}
/* Disable interrupt distribute unit */
void z_arc_connect_idu_disable(void)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_IDU_DISABLE, 0);
}
}
/* Read enable status of interrupt distribute unit */
uint32_t z_arc_connect_idu_read_enable(void)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_IDU_READ_ENABLE, 0);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/*
* Set the triggering mode and distribution mode for the specified common
* interrupt
*/
void z_arc_connect_idu_set_mode(uint32_t irq_num,
uint16_t trigger_mode, uint16_t distri_mode)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd_data(ARC_CONNECT_CMD_IDU_SET_MODE,
irq_num, (distri_mode | (trigger_mode << 4)));
}
}
/* Read the internal MODE register of the specified common interrupt */
uint32_t z_arc_connect_idu_read_mode(uint32_t irq_num)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_IDU_READ_MODE, irq_num);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/*
* Set the target cores to receive the specified common interrupt
* when it is triggered
*/
void z_arc_connect_idu_set_dest(uint32_t irq_num, uint32_t core_mask)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd_data(ARC_CONNECT_CMD_IDU_SET_DEST,
irq_num, core_mask);
}
}
/* Read the internal DEST register of the specified common interrupt */
uint32_t z_arc_connect_idu_read_dest(uint32_t irq_num)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_IDU_READ_DEST, irq_num);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/* Assert the specified common interrupt */
void z_arc_connect_idu_gen_cirq(uint32_t irq_num)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_IDU_GEN_CIRQ, irq_num);
}
}
/* Acknowledge the specified common interrupt */
void z_arc_connect_idu_ack_cirq(uint32_t irq_num)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_IDU_ACK_CIRQ, irq_num);
}
}
/* Read the internal STATUS register of the specified common interrupt */
uint32_t z_arc_connect_idu_check_status(uint32_t irq_num)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_IDU_CHECK_STATUS, irq_num);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/* Read the internal SOURCE register of the specified common interrupt */
uint32_t z_arc_connect_idu_check_source(uint32_t irq_num)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_IDU_CHECK_SOURCE, irq_num);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/* Mask or unmask the specified common interrupt */
void z_arc_connect_idu_set_mask(uint32_t irq_num, uint32_t mask)
{
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd_data(ARC_CONNECT_CMD_IDU_SET_MASK,
irq_num, mask);
}
}
/* Read the internal MASK register of the specified common interrupt */
uint32_t z_arc_connect_idu_read_mask(uint32_t irq_num)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_IDU_READ_MASK, irq_num);
ret = z_arc_connect_cmd_readback();
}
return ret;
}
/*
* Check if it is the first-acknowledging core to the common interrupt
* if IDU is programmed in the first-acknowledged mode
*/
uint32_t z_arc_connect_idu_check_first(uint32_t irq_num)
{
uint32_t ret = 0;
K_SPINLOCK(&arc_connect_spinlock) {
z_arc_connect_cmd(ARC_CONNECT_CMD_IDU_CHECK_FIRST, irq_num);
ret = z_arc_connect_cmd_readback();
}
return ret;
}

View File

@@ -1,193 +0,0 @@
/*
* Copyright (c) 2019 Synopsys.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief codes required for ARC multicore and Zephyr smp support
*
*/
#include <zephyr/device.h>
#include <zephyr/kernel.h>
#include <zephyr/kernel_structs.h>
#include <ksched.h>
#include <zephyr/init.h>
#include <zephyr/irq.h>
#include <arc_irq_offload.h>
volatile struct {
arch_cpustart_t fn;
void *arg;
} arc_cpu_init[CONFIG_MP_MAX_NUM_CPUS];
/*
* arc_cpu_wake_flag is used to sync up master core and slave cores
* Slave core will spin for arc_cpu_wake_flag until master core sets
* it to the core id of slave core. Then, slave core clears it to notify
* master core that it's waken
*
*/
volatile uint32_t arc_cpu_wake_flag;
volatile char *arc_cpu_sp;
/*
* _curr_cpu is used to record the struct of _cpu_t of each cpu.
* for efficient usage in assembly
*/
volatile _cpu_t *_curr_cpu[CONFIG_MP_MAX_NUM_CPUS];
/* Called from Zephyr initialization */
void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz,
arch_cpustart_t fn, void *arg)
{
_curr_cpu[cpu_num] = &(_kernel.cpus[cpu_num]);
arc_cpu_init[cpu_num].fn = fn;
arc_cpu_init[cpu_num].arg = arg;
/* set the initial sp of target sp through arc_cpu_sp
* arc_cpu_wake_flag will protect arc_cpu_sp that
* only one slave cpu can read it per time
*/
arc_cpu_sp = Z_KERNEL_STACK_BUFFER(stack) + sz;
arc_cpu_wake_flag = cpu_num;
/* wait slave cpu to start */
while (arc_cpu_wake_flag != 0U) {
;
}
}
#ifdef CONFIG_SMP
static void arc_connect_debug_mask_update(int cpu_num)
{
uint32_t core_mask = 1 << cpu_num;
/*
* MDB debugger may modify debug_select and debug_mask registers on start, so we can't
* rely on debug_select reset value.
*/
if (cpu_num != ARC_MP_PRIMARY_CPU_ID) {
core_mask |= z_arc_connect_debug_select_read();
}
z_arc_connect_debug_select_set(core_mask);
/* Debugger halts cores at all conditions:
* ARC_CONNECT_CMD_DEBUG_MASK_H: Core global halt.
* ARC_CONNECT_CMD_DEBUG_MASK_AH: Actionpoint halt.
* ARC_CONNECT_CMD_DEBUG_MASK_BH: Software breakpoint halt.
* ARC_CONNECT_CMD_DEBUG_MASK_SH: Self halt.
*/
z_arc_connect_debug_mask_set(core_mask, (ARC_CONNECT_CMD_DEBUG_MASK_SH
| ARC_CONNECT_CMD_DEBUG_MASK_BH | ARC_CONNECT_CMD_DEBUG_MASK_AH
| ARC_CONNECT_CMD_DEBUG_MASK_H));
}
#endif
void arc_core_private_intc_init(void);
/* the C entry of slave cores */
void z_arc_slave_start(int cpu_num)
{
arch_cpustart_t fn;
#ifdef CONFIG_SMP
struct arc_connect_bcr bcr;
bcr.val = z_arc_v2_aux_reg_read(_ARC_V2_CONNECT_BCR);
if (bcr.dbg) {
/* configure inter-core debug unit if available */
arc_connect_debug_mask_update(cpu_num);
}
z_irq_setup();
arc_core_private_intc_init();
arc_irq_offload_init_smp();
z_arc_connect_ici_clear();
z_irq_priority_set(DT_IRQN(DT_NODELABEL(ici)),
DT_IRQ(DT_NODELABEL(ici), priority), 0);
irq_enable(DT_IRQN(DT_NODELABEL(ici)));
#endif
/* call the function set by arch_start_cpu */
fn = arc_cpu_init[cpu_num].fn;
fn(arc_cpu_init[cpu_num].arg);
}
#ifdef CONFIG_SMP
static void sched_ipi_handler(const void *unused)
{
ARG_UNUSED(unused);
z_arc_connect_ici_clear();
z_sched_ipi();
}
/* arch implementation of sched_ipi */
void arch_sched_ipi(void)
{
uint32_t i;
/* broadcast sched_ipi request to other cores
* if the target is current core, hardware will ignore it
*/
unsigned int num_cpus = arch_num_cpus();
for (i = 0U; i < num_cpus; i++) {
z_arc_connect_ici_generate(i);
}
}
static int arc_smp_init(void)
{
struct arc_connect_bcr bcr;
/* necessary master core init */
_curr_cpu[0] = &(_kernel.cpus[0]);
bcr.val = z_arc_v2_aux_reg_read(_ARC_V2_CONNECT_BCR);
if (bcr.dbg) {
/* configure inter-core debug unit if available */
arc_connect_debug_mask_update(ARC_MP_PRIMARY_CPU_ID);
}
if (bcr.ipi) {
/* register ici interrupt, just need master core to register once */
z_arc_connect_ici_clear();
IRQ_CONNECT(DT_IRQN(DT_NODELABEL(ici)),
DT_IRQ(DT_NODELABEL(ici), priority),
sched_ipi_handler, NULL, 0);
irq_enable(DT_IRQN(DT_NODELABEL(ici)));
} else {
__ASSERT(0,
"ARC connect has no inter-core interrupt\n");
return -ENODEV;
}
if (bcr.gfrc) {
/* global free running count init */
z_arc_connect_gfrc_enable();
/* when all cores halt, gfrc halt */
z_arc_connect_gfrc_core_set((1 << arch_num_cpus()) - 1);
z_arc_connect_gfrc_clear();
} else {
__ASSERT(0,
"ARC connect has no global free running counter\n");
return -ENODEV;
}
return 0;
}
SYS_INIT(arc_smp_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#endif

422
arch/arc/core/atomic.S Normal file
View File

@@ -0,0 +1,422 @@
/*
* Copyright (c) 2014 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief ARC atomic operations library
*
* This library provides routines to perform a number of atomic operations
* on a memory location: add, subtract, increment, decrement, bitwise OR,
* bitwise NOR, bitwise AND, bitwise NAND, set, clear and compare-and-swap.
*
* This requires the processor to support LLOCK and SCOND instructions,
* where they are not supported on ARC EM family processors.
*/
#include <toolchain.h>
#include <sections.h>
/* exports */
GTEXT(atomic_set)
GTEXT(atomic_get)
GTEXT(atomic_add)
GTEXT(atomic_nand)
GTEXT(atomic_and)
GTEXT(atomic_or)
GTEXT(atomic_xor)
GTEXT(atomic_clear)
GTEXT(atomic_dec)
GTEXT(atomic_inc)
GTEXT(atomic_sub)
GTEXT(atomic_cas)
.section .TEXT._Atomic, "ax"
.balign 2
/**
*
* @brief Atomically clear a memory location
*
* This routine atomically clears the contents of <target> and returns the old
* value that was in <target>.
*
* This routine can be used from both task and interrupt level.
*
* @return Contents of <target> before the atomic operation
*
* ERRNO: N/A
*
* atomic_val_t atomic_clear
* (
* atomic_t *target /@ memory location to clear @/
* )
*/
SECTION_SUBSEC_FUNC(TEXT, atomic_clear_set, atomic_clear)
mov_s r1, 0
/* fall through into atomic_set */
/**
*
* @brief Atomically set a memory location
*
* This routine atomically sets the contents of <target> to <value> and returns
* the old value that was in <target>.
*
* This routine can be used from both task and interrupt level.
*
* @return Contents of <target> before the atomic operation
*
* ERRNO: N/A
*
* atomic_val_t atomic_set
* (
* atomic_t *target, /@ memory location to set @/
* atomic_val_t value /@ set with this value @/
* )
*
*/
SECTION_SUBSEC_FUNC(TEXT, atomic_clear_set, atomic_set)
ex r1, [r0] /* swap new value with old value */
j_s.d [blink]
mov_s r0, r1 /* return old value */
/**
*
* @brief Get the value of a shared memory atomically
*
* This routine atomically retrieves the value in *target
*
* atomic_val_t atomic_get
* (
* atomic_t *target /@ address of atom to be retrieved @/
* )
*
* RETURN: value read from address target.
*
*/
SECTION_FUNC(TEXT, atomic_get)
ld_s r0, [r0, 0]
j_s [blink]
/**
*
* @brief Atomically increment a memory location
*
* This routine atomically increments the value in <target>. The operation is
* done using unsigned integer arithmetic. Various CPU architectures may impose
* restrictions with regards to the alignment and cache attributes of the
* atomic_t type.
*
* This routine can be used from both task and interrupt level.
*
* @return Contents of <target> before the atomic operation
*
* ERRNO: N/A
*
* atomic_val_t atomic_inc
* (
* atomic_t *target, /@ memory location to increment @/
* )
*
*/
SECTION_SUBSEC_FUNC(TEXT, atomic_inc_add, atomic_inc)
mov_s r1, 1
/* fall through into atomic_add */
/**
*
* @brief Atomically add a value to a memory location
*
* This routine atomically adds the contents of <target> and <value>, placing
* the result in <target>. The operation is done using signed integer arithmetic.
* Various CPU architectures may impose restrictions with regards to the
* alignment and cache attributes of the atomic_t type.
*
* This routine can be used from both task and interrupt level.
*
* @return Contents of <target> before the atomic operation
*
* ERRNO: N/A
*
* atomic_val_t atomic_add
* (
* atomic_t *target, /@ memory location to add to @/
* atomic_val_t value /@ value to add @/
* )
*/
SECTION_SUBSEC_FUNC(TEXT, atomic_inc_add, atomic_add)
llock r2, [r0] /* load old value and mark exclusive access */
add_s r3, r1, r2
scond r3, [r0] /* try to store new value */
/* STATUS32.Z = 1 if successful */
bne_s atomic_add /* if store is not successful, retry */
j_s.d [blink]
mov_s r0, r2 /* return old value */
/**
*
* @brief Atomically decrement a memory location
*
* This routine atomically decrements the value in <target>. The operation is
* done using unsigned integer arithmetic. Various CPU architectures may impose
* restrictions with regards to the alignment and cache attributes of the
* atomic_t type.
*
* This routine can be used from both task and interrupt level.
*
* @return Contents of <target> before the atomic operation
*
* ERRNO: N/A
*
* atomic_val_t atomic_dec
* (
* atomic_t *target, /@ memory location to decrement @/
* )
*
*/
SECTION_SUBSEC_FUNC(TEXT, atomic_dec_sub, atomic_dec)
mov_s r1, 1
/* fall through into atomic_sub */
/**
*
* @brief Atomically subtract a value from a memory location
*
* This routine atomically subtracts <value> from the contents of <target>,
* placing the result in <target>. The operation is done using signed integer
* arithmetic. Various CPU architectures may impose restrictions with regards to
* the alignment and cache attributes of the atomic_t type.
*
* This routine can be used from both task and interrupt level.
*
* @return Contents of <target> before the atomic operation
*
* ERRNO: N/A
*
* atomic_val_t atomic_sub
* (
* atomic_t *target, /@ memory location to subtract from @/
* atomic_val_t value /@ value to subtract @/
* )
*
*/
SECTION_SUBSEC_FUNC(TEXT, atomic_dec_sub, atomic_sub)
llock r2, [r0] /* load old value and mark exclusive access */
sub r3, r2, r1
scond r3, [r0] /* try to store new value */
/* STATUS32.Z = 1 if successful */
bne_s atomic_sub /* if store is not successful, retry */
j_s.d [blink]
mov_s r0, r2 /* return old value */
/**
*
* @brief Atomically perform a bitwise NAND on a memory location
*
* This routine atomically performs a bitwise NAND operation of the contents of
* <target> and <value>, placing the result in <target>.
* Various CPU architectures may impose restrictions with regards to the
* alignment and cache attributes of the atomic_t type.
*
* This routine can be used from both task and interrupt level.
*
* @return Contents of <target> before the atomic operation
*
* ERRNO: N/A
*
* atomic_val_t atomic_nand
* (
* atomic_t *target, /@ memory location to NAND @/
* atomic_val_t value /@ NAND with this value @/
* )
*
*/
SECTION_FUNC(TEXT, atomic_nand)
llock r2, [r0] /* load old value and mark exclusive access */
and r3, r1, r2
not r3, r3
scond r3, [r0] /* try to store new value */
/* STATUS32.Z = 1 if successful */
bne_s atomic_nand /* if store is not successful, retry */
j_s.d [blink]
mov_s r0, r2 /* return old value */
/**
*
* @brief Atomically perform a bitwise AND on a memory location
*
* This routine atomically performs a bitwise AND operation of the contents of
* <target> and <value>, placing the result in <target>.
* Various CPU architectures may impose restrictions with regards to the
* alignment and cache attributes of the atomic_t type.
*
* This routine can be used from both task and interrupt level.
*
* @return Contents of <target> before the atomic operation
*
* ERRNO: N/A
*
* atomic_val_t atomic_and
* (
* atomic_t *target, /@ memory location to AND @/
* atomic_val_t value /@ AND with this value @/
* )
*
*/
SECTION_FUNC(TEXT, atomic_and)
llock r2, [r0] /* load old value and mark exclusive access */
and r3, r1, r2
scond r3, [r0] /* try to store new value */
/* STATUS32.Z = 1 if successful */
bne_s atomic_and /* if store is not successful, retry */
j_s.d [blink]
mov_s r0, r2 /* return old value */
/**
*
* @brief Atomically perform a bitwise OR on memory location
*
* This routine atomically performs a bitwise OR operation of the contents of
* <target> and <value>, placing the result in <target>.
* Various CPU architectures may impose restrictions with regards to the
* alignment and cache attributes of the atomic_t type.
*
* This routine can be used from both task and interrupt level.
*
* @return Contents of <target> before the atomic operation
*
* ERRNO: N/A
*
* atomic_val_t atomic_or
* (
* atomic_t *target, /@ memory location to OR @/
* atomic_val_t value /@ OR with this value @/
* )
*
*/
SECTION_FUNC(TEXT, atomic_or)
llock r2, [r0] /* load old value and mark exclusive access */
or r3, r1, r2
scond r3, [r0] /* try to store new value */
/* STATUS32.Z = 1 if successful */
bne_s atomic_or /* if store is not successful, retry */
j_s.d [blink]
mov_s r0, r2 /* return old value */
/**
*
* @brief Atomically perform a bitwise XOR on a memory location
*
* This routine atomically performs a bitwise XOR operation of the contents of
* <target> and <value>, placing the result in <target>.
* Various CPU architectures may impose restrictions with regards to the
* alignment and cache attributes of the atomic_t type.
*
* This routine can be used from both task and interrupt level.
*
* @return Contents of <target> before the atomic operation
*
* ERRNO: N/A
*
* atomic_val_t atomic_xor
* (
* atomic_t *target, /@ memory location to XOR @/
* atomic_val_t value /@ XOR with this value @/
* )
*
*/
SECTION_FUNC(TEXT, atomic_xor)
llock r2, [r0] /* load old value and mark exclusive access */
xor r3, r1, r2
scond r3, [r0] /* try to store new value */
/* STATUS32.Z = 1 if successful */
bne_s atomic_xor /* if store is not successful, retry */
j_s.d [blink]
mov_s r0, r2 /* return old value */
/**
*
* @brief Atomically compare-and-swap the contents of a memory location
*
* This routine performs an atomic compare-and-swap. testing that the contents of
* <target> contains <oldValue>, and if it does, setting the value of <target>
* to <newValue>. Various CPU architectures may impose restrictions with regards
* to the alignment and cache attributes of the atomic_t type.
*
* This routine can be used from both task and interrupt level.
*
* @return 1 if the swap is actually executed, 0 otherwise.
*
* ERRNO: N/A
*
* int atomic_cas
* (
* atomic_t *target, /@ memory location to compare-and-swap @/
* atomic_val_t oldValue, /@ compare to this value @/
* atomic_val_t newValue, /@ swap with this value @/
* )
*
*/
SECTION_FUNC(TEXT, atomic_cas)
llock r3, [r0] /* load old value and mark exclusive access */
cmp_s r1, r3
bne_s nanoAtomicCas_fail
scond r2, [r0] /* try to store new value */
/* STATUS32.Z = 1 if successful */
bne_s atomic_cas /* if store is not successful, retry */
j_s.d [blink]
mov_s r0, 1 /* return TRUE */
/* failed comparison */
nanoAtomicCas_fail:
scond r1, [r0] /* write old value to clear the access lock */
j_s.d [blink]
mov_s r0, 0 /* return FALSE */

View File

@@ -13,20 +13,27 @@
* This module contains functions for manipulation of the d-cache.
*/
#include <zephyr/kernel.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/sys/util.h>
#include <zephyr/toolchain.h>
#include <zephyr/cache.h>
#include <zephyr/linker/linker-defs.h>
#include <zephyr/arch/arc/v2/aux_regs.h>
#include <kernel_internal.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/init.h>
#include <stdbool.h>
#include <kernel.h>
#include <arch/cpu.h>
#include <misc/util.h>
#include <toolchain.h>
#include <cache.h>
#include <linker-defs.h>
#include <arch/arc/v2/aux_regs.h>
#include <nano_internal.h>
#include <misc/__assert.h>
#include <init.h>
#if defined(CONFIG_DCACHE_LINE_SIZE_DETECT)
size_t sys_cache_line_size;
#if defined(CONFIG_CACHE_FLUSHING)
#if (CONFIG_CACHE_LINE_SIZE == 0) && !defined(CONFIG_CACHE_LINE_SIZE_DETECT)
#error Cannot use this implementation with a cache line size of 0
#endif
#if defined(CONFIG_CACHE_LINE_SIZE_DETECT)
#define DCACHE_LINE_SIZE sys_cache_line_size
#else
#define DCACHE_LINE_SIZE CONFIG_CACHE_LINE_SIZE
#endif
#define DC_CTRL_DC_ENABLE 0x0 /* enable d-cache */
@@ -40,188 +47,121 @@ size_t sys_cache_line_size;
#define DC_CTRL_INDIRECT_ACCESS 0x20 /* indirect access mode */
#define DC_CTRL_OP_SUCCEEDED 0x4 /* d-cache operation succeeded */
static bool dcache_available(void)
static int dcache_available(void)
{
unsigned long val = z_arc_v2_aux_reg_read(_ARC_V2_D_CACHE_BUILD);
unsigned long val = _arc_v2_aux_reg_read(_ARC_V2_D_CACHE_BUILD);
val &= 0xff; /* extract version */
return (val == 0) ? false : true;
return (val == 0)?0:1;
}
static void dcache_dc_ctrl(uint32_t dcache_en_mask)
{
if (dcache_available()) {
z_arc_v2_aux_reg_write(_ARC_V2_DC_CTRL, dcache_en_mask);
}
if (!dcache_available())
return;
_arc_v2_aux_reg_write(_ARC_V2_DC_CTRL, dcache_en_mask);
}
void arch_dcache_enable(void)
static void dcache_enable(void)
{
dcache_dc_ctrl(DC_CTRL_DC_ENABLE);
}
void arch_dcache_disable(void)
{
/* nothing */
}
int arch_dcache_flush_range(void *start_addr_ptr, size_t size)
/**
*
* @brief Flush multiple d-cache lines to memory
*
* No alignment is required for either <start_addr> or <size>, but since
* dcache_flush_mlines() iterates on the d-cache lines, a cache line
* alignment for both is optimal.
*
* The d-cache line size is specified either via the CONFIG_CACHE_LINE_SIZE
* kconfig option or it is detected at runtime.
*
* @param start_addr the pointer to start the multi-line flush
* @param size the number of bytes that are to be flushed
*
* @return N/A
*/
static void dcache_flush_mlines(uint32_t start_addr, uint32_t size)
{
size_t line_size = sys_cache_data_line_size_get();
uintptr_t start_addr = (uintptr_t)start_addr_ptr;
uintptr_t end_addr;
uint32_t end_addr;
unsigned int key;
if (!dcache_available() || (size == 0U) || line_size == 0U) {
return -ENOTSUP;
if (!dcache_available() || (size == 0)) {
return;
}
end_addr = start_addr + size;
end_addr = start_addr + size - 1;
start_addr &= (uint32_t)(~(DCACHE_LINE_SIZE - 1));
start_addr = ROUND_DOWN(start_addr, line_size);
key = arch_irq_lock(); /* --enter critical section-- */
key = irq_lock(); /* --enter critical section-- */
do {
z_arc_v2_aux_reg_write(_ARC_V2_DC_FLDL, start_addr);
__builtin_arc_nop();
__builtin_arc_nop();
__builtin_arc_nop();
_arc_v2_aux_reg_write(_ARC_V2_DC_FLDL, start_addr);
__asm__ volatile("nop_s");
__asm__ volatile("nop_s");
__asm__ volatile("nop_s");
/* wait for flush completion */
do {
if ((z_arc_v2_aux_reg_read(_ARC_V2_DC_CTRL) &
DC_CTRL_FLUSH_STATUS) == 0) {
if ((_arc_v2_aux_reg_read(_ARC_V2_DC_CTRL) &
DC_CTRL_FLUSH_STATUS) == 0)
break;
}
} while (1);
start_addr += line_size;
} while (start_addr < end_addr);
start_addr += DCACHE_LINE_SIZE;
} while (start_addr <= end_addr);
arch_irq_unlock(key); /* --exit critical section-- */
irq_unlock(key); /* --exit critical section-- */
return 0;
}
int arch_dcache_invd_range(void *start_addr_ptr, size_t size)
/**
*
* @brief Flush d-cache lines to main memory
*
* No alignment is required for either <virt> or <size>, but since
* sys_cache_flush() iterates on the d-cache lines, a d-cache line alignment for
* both is optimal.
*
* The d-cache line size is specified either via the CONFIG_CACHE_LINE_SIZE
* kconfig option or it is detected at runtime.
*
* @param start_addr the pointer to start the multi-line flush
* @param size the number of bytes that are to be flushed
*
* @return N/A
*/
void sys_cache_flush(vaddr_t start_addr, size_t size)
{
size_t line_size = sys_cache_data_line_size_get();
uintptr_t start_addr = (uintptr_t)start_addr_ptr;
uintptr_t end_addr;
unsigned int key;
if (!dcache_available() || (size == 0U) || line_size == 0U) {
return -ENOTSUP;
}
end_addr = start_addr + size;
start_addr = ROUND_DOWN(start_addr, line_size);
key = arch_irq_lock(); /* -enter critical section- */
do {
z_arc_v2_aux_reg_write(_ARC_V2_DC_IVDL, start_addr);
__builtin_arc_nop();
__builtin_arc_nop();
__builtin_arc_nop();
start_addr += line_size;
} while (start_addr < end_addr);
irq_unlock(key); /* -exit critical section- */
return 0;
dcache_flush_mlines((uint32_t)start_addr, (uint32_t)size);
}
int arch_dcache_flush_and_invd_range(void *start_addr_ptr, size_t size)
{
return -ENOTSUP;
}
int arch_dcache_flush_all(void)
{
return -ENOTSUP;
}
int arch_dcache_invd_all(void)
{
return -ENOTSUP;
}
int arch_dcache_flush_and_invd_all(void)
{
return -ENOTSUP;
}
#if defined(CONFIG_DCACHE_LINE_SIZE_DETECT)
#if defined(CONFIG_CACHE_LINE_SIZE_DETECT)
size_t sys_cache_line_size;
static void init_dcache_line_size(void)
{
uint32_t val;
val = z_arc_v2_aux_reg_read(_ARC_V2_D_CACHE_BUILD);
__ASSERT((val&0xff) != 0U, "d-cache is not present");
val = _arc_v2_aux_reg_read(_ARC_V2_D_CACHE_BUILD);
__ASSERT((val&0xff) != 0, "d-cache is not present");
val = ((val>>16) & 0xf) + 1;
val *= 16U;
val *= 16;
sys_cache_line_size = (size_t) val;
}
size_t arch_dcache_line_size_get(void)
{
return sys_cache_line_size;
}
#endif
void arch_icache_enable(void)
static int init_dcache(struct device *unused)
{
/* nothing */
}
ARG_UNUSED(unused);
void arch_icache_disable(void)
{
/* nothing */
}
dcache_enable();
int arch_icache_flush_all(void)
{
return -ENOTSUP;
}
int arch_icache_invd_all(void)
{
return -ENOTSUP;
}
int arch_icache_flush_and_invd_all(void)
{
return -ENOTSUP;
}
int arch_icache_flush_range(void *addr, size_t size)
{
ARG_UNUSED(addr);
ARG_UNUSED(size);
return -ENOTSUP;
}
int arch_icache_invd_range(void *addr, size_t size)
{
ARG_UNUSED(addr);
ARG_UNUSED(size);
return -ENOTSUP;
}
int arch_icache_flush_and_invd_range(void *addr, size_t size)
{
ARG_UNUSED(addr);
ARG_UNUSED(size);
return -ENOTSUP;
}
static int init_dcache(void)
{
arch_dcache_enable();
#if defined(CONFIG_DCACHE_LINE_SIZE_DETECT)
#if defined(CONFIG_CACHE_LINE_SIZE_DETECT)
init_dcache_line_size();
#endif
@@ -229,3 +169,6 @@ static int init_dcache(void)
}
SYS_INIT(init_dcache, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
#endif /* CONFIG_CACHE_FLUSHING */

View File

@@ -11,19 +11,18 @@
* CPU power management routines.
*/
#include <zephyr/kernel_structs.h>
#include <kernel_structs.h>
#include <offsets_short.h>
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/arch/arc/asm-compat/assembler.h>
#include <toolchain.h>
#include <sections.h>
#include <arch/cpu.h>
GTEXT(arch_cpu_idle)
GTEXT(arch_cpu_atomic_idle)
GDATA(z_arc_cpu_sleep_mode)
GTEXT(k_cpu_idle)
GTEXT(k_cpu_atomic_idle)
GDATA(k_cpu_sleep_mode)
SECTION_VAR(BSS, z_arc_cpu_sleep_mode)
.align 4
.balign 4
SECTION_VAR(BSS, k_cpu_sleep_mode)
.word 0
/*
@@ -34,16 +33,15 @@ SECTION_VAR(BSS, z_arc_cpu_sleep_mode)
* void nanCpuIdle(void)
*/
SECTION_FUNC(TEXT, arch_cpu_idle)
SECTION_FUNC(TEXT, k_cpu_idle)
#ifdef CONFIG_TRACING
PUSHR blink
jl sys_trace_idle
POPR blink
#ifdef CONFIG_KERNEL_EVENT_LOGGER_SLEEP
push_s blink
jl _sys_k_event_logger_enter_sleep
pop_s blink
#endif
/* z_arc_cpu_sleep_mode is 32 bit despite of platform bittnes */
ld r1, [z_arc_cpu_sleep_mode]
ld r1, [k_cpu_sleep_mode]
or r1, r1, (1 << 4) /* set IRQ-enabled bit */
sleep r1
j_s [blink]
@@ -54,18 +52,17 @@ SECTION_FUNC(TEXT, arch_cpu_idle)
*
* This function exits with interrupts restored to <key>.
*
* void arch_cpu_atomic_idle(unsigned int key)
* void k_cpu_atomic_idle(unsigned int key)
*/
SECTION_FUNC(TEXT, arch_cpu_atomic_idle)
SECTION_FUNC(TEXT, k_cpu_atomic_idle)
#ifdef CONFIG_TRACING
PUSHR blink
jl sys_trace_idle
POPR blink
#ifdef CONFIG_KERNEL_EVENT_LOGGER_SLEEP
push_s blink
jl _sys_k_event_logger_enter_sleep
pop_s blink
#endif
/* z_arc_cpu_sleep_mode is 32 bit despite of platform bittnes */
ld r1, [z_arc_cpu_sleep_mode]
ld r1, [k_cpu_sleep_mode]
or r1, r1, (1 << 4) /* set IRQ-enabled bit */
sleep r1
j_s.d [blink]

View File

@@ -1,75 +0,0 @@
# Digital Signal Processing (DSP) configuration options
# Copyright (c) 2022 Synopsys
# SPDX-License-Identifier: Apache-2.0
config ARC_HAS_DSP
bool
help
This option is enabled when the ARC CPU has hardware DSP unit.
menu "ARC DSP Options"
depends on ARC_HAS_DSP
config ARC_DSP
bool "digital signal processing (DSP)"
help
This option enables DSP and DSP instructions.
config ARC_DSP_TURNED_OFF
bool "Turn off DSP if it presents"
depends on !ARC_DSP
help
This option disables DSP block via resetting DSP_CRTL register.
config ARC_DSP_SHARING
bool "DSP register sharing"
depends on ARC_DSP && MULTITHREADING
select ARC_HAS_ACCL_REGS
help
This option enables preservation of the hardware DSP registers
across context switches to allow multiple threads to perform concurrent
DSP operations.
config ARC_DSP_BFLY_SHARING
bool "ARC complex DSP operation"
depends on ARC_DSP && CPU_ARCEM
help
This option is to enable Zephyr to store and restore DSP_BFLY0
and FFT_CTRL registers during context switch. This option is
only required when butterfly instructions are used in
multi-thread.
config ARC_XY_ENABLE
bool "ARC address generation unit registers"
help
Processors with XY memory and AGU registers can configure this
option to accelerate DSP instrctions.
config ARC_AGU_SHARING
bool "ARC address generation unit register sharing"
depends on ARC_XY_ENABLE && MULTITHREADING
default y if ARC_DSP_SHARING
help
This option enables preservation of the hardware AGU registers
across context switches to allow multiple threads to perform concurrent
operations on XY memory. Save and restore small size AGU registers is
set as default, including 4 address pointers regs, 2 address offset regs
and 4 modifiers regs.
config ARC_AGU_MEDIUM
bool "ARC AGU medium size register"
depends on ARC_AGU_SHARING
help
Save and restore medium AGU registers, including 8 address pointers regs,
4 address offset regs and 12 modifiers regs.
config ARC_AGU_LARGE
bool "ARC AGU large size register"
depends on ARC_AGU_SHARING
select ARC_AGU_MEDIUM
help
Save and restore large AGU registers, including 12 address pointers regs,
8 address offset regs and 24 modifiers regs.
endmenu

View File

@@ -1,70 +0,0 @@
/*
* Copyright (c) 2022 Synopsys.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief ARCv2 DSP and AGU structure member offset definition file
*
*/
#ifdef CONFIG_ARC_DSP_SHARING
GEN_OFFSET_SYM(_callee_saved_stack_t, dsp_ctrl);
GEN_OFFSET_SYM(_callee_saved_stack_t, acc0_glo);
GEN_OFFSET_SYM(_callee_saved_stack_t, acc0_ghi);
#ifdef CONFIG_ARC_DSP_BFLY_SHARING
GEN_OFFSET_SYM(_callee_saved_stack_t, dsp_bfly0);
GEN_OFFSET_SYM(_callee_saved_stack_t, dsp_fft_ctrl);
#endif
#endif
#ifdef CONFIG_ARC_AGU_SHARING
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_ap0);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_ap1);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_ap2);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_ap3);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_os0);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_os1);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod0);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod1);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod2);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod3);
#ifdef CONFIG_ARC_AGU_MEDIUM
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_ap4);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_ap5);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_ap6);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_ap7);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_os2);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_os3);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod4);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod5);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod6);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod7);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod8);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod9);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod10);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod11);
#endif
#ifdef CONFIG_ARC_AGU_LARGE
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_ap8);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_ap9);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_ap10);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_ap11);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_os4);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_os5);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_os6);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_os7);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod12);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod13);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod14);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod15);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod16);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod17);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod18);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod19);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod20);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod21);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod22);
GEN_OFFSET_SYM(_callee_saved_stack_t, agu_mod23);
#endif
#endif

View File

@@ -1,269 +0,0 @@
/*
* Copyright (c) 2022 Synopsys.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief save and load macro for ARCv2 DSP and AGU regs
*
*/
.macro _save_dsp_regs
#ifdef CONFIG_ARC_DSP_SHARING
ld_s r13, [r2, ___thread_base_t_user_options_OFFSET]
bbit0 r13, K_DSP_IDX, dsp_skip_save
lr r13, [_ARC_V2_DSP_CTRL]
st_s r13, [sp, ___callee_saved_stack_t_dsp_ctrl_OFFSET]
lr r13, [_ARC_V2_ACC0_GLO]
st_s r13, [sp, ___callee_saved_stack_t_acc0_glo_OFFSET]
lr r13, [_ARC_V2_ACC0_GHI]
st_s r13, [sp, ___callee_saved_stack_t_acc0_ghi_OFFSET]
#ifdef CONFIG_ARC_DSP_BFLY_SHARING
lr r13, [_ARC_V2_DSP_BFLY0]
st_s r13, [sp, ___callee_saved_stack_t_dsp_bfly0_OFFSET]
lr r13, [_ARC_V2_DSP_FFT_CTRL]
st_s r13, [sp, ___callee_saved_stack_t_dsp_fft_ctrl_OFFSET]
#endif
#endif
dsp_skip_save :
#ifdef CONFIG_ARC_AGU_SHARING
_save_agu_regs
#endif
.endm
.macro _save_agu_regs
#ifdef CONFIG_ARC_AGU_SHARING
ld_s r13, [r2, ___thread_base_t_user_options_OFFSET]
btst r13, K_AGU_IDX
jeq agu_skip_save
lr r13, [_ARC_V2_AGU_AP0]
st r13, [sp, ___callee_saved_stack_t_agu_ap0_OFFSET]
lr r13, [_ARC_V2_AGU_AP1]
st r13, [sp, ___callee_saved_stack_t_agu_ap1_OFFSET]
lr r13, [_ARC_V2_AGU_AP2]
st r13, [sp, ___callee_saved_stack_t_agu_ap2_OFFSET]
lr r13, [_ARC_V2_AGU_AP3]
st r13, [sp, ___callee_saved_stack_t_agu_ap3_OFFSET]
lr r13, [_ARC_V2_AGU_OS0]
st r13, [sp, ___callee_saved_stack_t_agu_os0_OFFSET]
lr r13, [_ARC_V2_AGU_OS1]
st r13, [sp, ___callee_saved_stack_t_agu_os1_OFFSET]
lr r13, [_ARC_V2_AGU_MOD0]
st r13, [sp, ___callee_saved_stack_t_agu_mod0_OFFSET]
lr r13, [_ARC_V2_AGU_MOD1]
st r13, [sp, ___callee_saved_stack_t_agu_mod1_OFFSET]
lr r13, [_ARC_V2_AGU_MOD2]
st r13, [sp, ___callee_saved_stack_t_agu_mod2_OFFSET]
lr r13, [_ARC_V2_AGU_MOD3]
st r13, [sp, ___callee_saved_stack_t_agu_mod3_OFFSET]
#ifdef CONFIG_ARC_AGU_MEDIUM
lr r13, [_ARC_V2_AGU_AP4]
st r13, [sp, ___callee_saved_stack_t_agu_ap4_OFFSET]
lr r13, [_ARC_V2_AGU_AP5]
st r13, [sp, ___callee_saved_stack_t_agu_ap5_OFFSET]
lr r13, [_ARC_V2_AGU_AP6]
st r13, [sp, ___callee_saved_stack_t_agu_ap6_OFFSET]
lr r13, [_ARC_V2_AGU_AP7]
st r13, [sp, ___callee_saved_stack_t_agu_ap7_OFFSET]
lr r13, [_ARC_V2_AGU_OS2]
st r13, [sp, ___callee_saved_stack_t_agu_os2_OFFSET]
lr r13, [_ARC_V2_AGU_OS3]
st r13, [sp, ___callee_saved_stack_t_agu_os3_OFFSET]
lr r13, [_ARC_V2_AGU_MOD4]
st r13, [sp, ___callee_saved_stack_t_agu_mod4_OFFSET]
lr r13, [_ARC_V2_AGU_MOD5]
st r13, [sp, ___callee_saved_stack_t_agu_mod5_OFFSET]
lr r13, [_ARC_V2_AGU_MOD6]
st r13, [sp, ___callee_saved_stack_t_agu_mod6_OFFSET]
lr r13, [_ARC_V2_AGU_MOD7]
st r13, [sp, ___callee_saved_stack_t_agu_mod7_OFFSET]
lr r13, [_ARC_V2_AGU_MOD8]
st r13, [sp, ___callee_saved_stack_t_agu_mod8_OFFSET]
lr r13, [_ARC_V2_AGU_MOD9]
st r13, [sp, ___callee_saved_stack_t_agu_mod9_OFFSET]
lr r13, [_ARC_V2_AGU_MOD10]
st r13, [sp, ___callee_saved_stack_t_agu_mod10_OFFSET]
lr r13, [_ARC_V2_AGU_MOD11]
st r13, [sp, ___callee_saved_stack_t_agu_mod11_OFFSET]
#endif
#ifdef CONFIG_ARC_AGU_LARGE
lr r13, [_ARC_V2_AGU_AP8]
st r13, [sp, ___callee_saved_stack_t_agu_ap8_OFFSET]
lr r13, [_ARC_V2_AGU_AP9]
st r13, [sp, ___callee_saved_stack_t_agu_ap9_OFFSET]
lr r13, [_ARC_V2_AGU_AP10]
st r13, [sp, ___callee_saved_stack_t_agu_ap10_OFFSET]
lr r13, [_ARC_V2_AGU_AP11]
st r13, [sp, ___callee_saved_stack_t_agu_ap11_OFFSET]
lr r13, [_ARC_V2_AGU_OS4]
st r13, [sp, ___callee_saved_stack_t_agu_os4_OFFSET]
lr r13, [_ARC_V2_AGU_OS5]
st r13, [sp, ___callee_saved_stack_t_agu_os5_OFFSET]
lr r13, [_ARC_V2_AGU_OS6]
st r13, [sp, ___callee_saved_stack_t_agu_os6_OFFSET]
lr r13, [_ARC_V2_AGU_OS7]
st r13, [sp, ___callee_saved_stack_t_agu_os7_OFFSET]
lr r13, [_ARC_V2_AGU_MOD12]
st r13, [sp, ___callee_saved_stack_t_agu_mod12_OFFSET]
lr r13, [_ARC_V2_AGU_MOD13]
st r13, [sp, ___callee_saved_stack_t_agu_mod13_OFFSET]
lr r13, [_ARC_V2_AGU_MOD14]
st r13, [sp, ___callee_saved_stack_t_agu_mod14_OFFSET]
lr r13, [_ARC_V2_AGU_MOD15]
st r13, [sp, ___callee_saved_stack_t_agu_mod15_OFFSET]
lr r13, [_ARC_V2_AGU_MOD16]
st r13, [sp, ___callee_saved_stack_t_agu_mod16_OFFSET]
lr r13, [_ARC_V2_AGU_MOD17]
st r13, [sp, ___callee_saved_stack_t_agu_mod17_OFFSET]
lr r13, [_ARC_V2_AGU_MOD18]
st r13, [sp, ___callee_saved_stack_t_agu_mod18_OFFSET]
lr r13, [_ARC_V2_AGU_MOD19]
st r13, [sp, ___callee_saved_stack_t_agu_mod19_OFFSET]
lr r13, [_ARC_V2_AGU_MOD20]
st r13, [sp, ___callee_saved_stack_t_agu_mod20_OFFSET]
lr r13, [_ARC_V2_AGU_MOD21]
_st32_huge_offset r13, sp, ___callee_saved_stack_t_agu_mod21_OFFSET, r1
lr r13, [_ARC_V2_AGU_MOD22]
_st32_huge_offset r13, sp, ___callee_saved_stack_t_agu_mod22_OFFSET, r1
lr r13, [_ARC_V2_AGU_MOD23]
_st32_huge_offset r13, sp, ___callee_saved_stack_t_agu_mod23_OFFSET, r1
#endif
#endif
agu_skip_save :
.endm
.macro _load_dsp_regs
#ifdef CONFIG_ARC_DSP_SHARING
ld_s r13, [r2, ___thread_base_t_user_options_OFFSET]
bbit0 r13, K_DSP_IDX, dsp_skip_load
ld_s r13, [sp, ___callee_saved_stack_t_dsp_ctrl_OFFSET]
sr r13, [_ARC_V2_DSP_CTRL]
ld_s r13, [sp, ___callee_saved_stack_t_acc0_glo_OFFSET]
sr r13, [_ARC_V2_ACC0_GLO]
ld_s r13, [sp, ___callee_saved_stack_t_acc0_ghi_OFFSET]
sr r13, [_ARC_V2_ACC0_GHI]
#ifdef CONFIG_ARC_DSP_BFLY_SHARING
ld_s r13, [sp, ___callee_saved_stack_t_dsp_bfly0_OFFSET]
sr r13, [_ARC_V2_DSP_BFLY0]
ld_s r13, [sp, ___callee_saved_stack_t_dsp_fft_ctrl_OFFSET]
sr r13, [_ARC_V2_DSP_FFT_CTRL]
#endif
#endif
dsp_skip_load :
#ifdef CONFIG_ARC_AGU_SHARING
_load_agu_regs
#endif
.endm
.macro _load_agu_regs
#ifdef CONFIG_ARC_AGU_SHARING
ld_s r13, [r2, ___thread_base_t_user_options_OFFSET]
btst r13, K_AGU_IDX
jeq agu_skip_load
ld r13, [sp, ___callee_saved_stack_t_agu_ap0_OFFSET]
sr r13, [_ARC_V2_AGU_AP0]
ld r13, [sp, ___callee_saved_stack_t_agu_ap1_OFFSET]
sr r13, [_ARC_V2_AGU_AP1]
ld r13, [sp, ___callee_saved_stack_t_agu_ap2_OFFSET]
sr r13, [_ARC_V2_AGU_AP2]
ld r13, [sp, ___callee_saved_stack_t_agu_ap3_OFFSET]
sr r13, [_ARC_V2_AGU_AP3]
ld r13, [sp, ___callee_saved_stack_t_agu_os0_OFFSET]
sr r13, [_ARC_V2_AGU_OS0]
ld r13, [sp, ___callee_saved_stack_t_agu_os1_OFFSET]
sr r13, [_ARC_V2_AGU_OS1]
ld r13, [sp, ___callee_saved_stack_t_agu_mod0_OFFSET]
sr r13, [_ARC_V2_AGU_MOD0]
ld r13, [sp, ___callee_saved_stack_t_agu_mod1_OFFSET]
sr r13, [_ARC_V2_AGU_MOD1]
ld r13, [sp, ___callee_saved_stack_t_agu_mod2_OFFSET]
sr r13, [_ARC_V2_AGU_MOD2]
ld r13, [sp, ___callee_saved_stack_t_agu_mod3_OFFSET]
sr r13, [_ARC_V2_AGU_MOD3]
#ifdef CONFIG_ARC_AGU_MEDIUM
ld r13, [sp, ___callee_saved_stack_t_agu_ap4_OFFSET]
sr r13, [_ARC_V2_AGU_AP4]
ld r13, [sp, ___callee_saved_stack_t_agu_ap5_OFFSET]
sr r13, [_ARC_V2_AGU_AP5]
ld r13, [sp, ___callee_saved_stack_t_agu_ap6_OFFSET]
sr r13, [_ARC_V2_AGU_AP6]
ld r13, [sp, ___callee_saved_stack_t_agu_ap7_OFFSET]
sr r13, [_ARC_V2_AGU_AP7]
ld r13, [sp, ___callee_saved_stack_t_agu_os2_OFFSET]
sr r13, [_ARC_V2_AGU_OS2]
ld r13, [sp, ___callee_saved_stack_t_agu_os3_OFFSET]
sr r13, [_ARC_V2_AGU_OS3]
ld r13, [sp, ___callee_saved_stack_t_agu_mod4_OFFSET]
sr r13, [_ARC_V2_AGU_MOD4]
ld r13, [sp, ___callee_saved_stack_t_agu_mod5_OFFSET]
sr r13, [_ARC_V2_AGU_MOD5]
ld r13, [sp, ___callee_saved_stack_t_agu_mod6_OFFSET]
sr r13, [_ARC_V2_AGU_MOD6]
ld r13, [sp, ___callee_saved_stack_t_agu_mod7_OFFSET]
sr r13, [_ARC_V2_AGU_MOD7]
ld r13, [sp, ___callee_saved_stack_t_agu_mod8_OFFSET]
sr r13, [_ARC_V2_AGU_MOD8]
ld r13, [sp, ___callee_saved_stack_t_agu_mod9_OFFSET]
sr r13, [_ARC_V2_AGU_MOD9]
ld r13, [sp, ___callee_saved_stack_t_agu_mod10_OFFSET]
sr r13, [_ARC_V2_AGU_MOD10]
ld r13, [sp, ___callee_saved_stack_t_agu_mod11_OFFSET]
sr r13, [_ARC_V2_AGU_MOD11]
#endif
#ifdef CONFIG_ARC_AGU_LARGE
ld r13, [sp, ___callee_saved_stack_t_agu_ap8_OFFSET]
sr r13, [_ARC_V2_AGU_AP8]
ld r13, [sp, ___callee_saved_stack_t_agu_ap9_OFFSET]
sr r13, [_ARC_V2_AGU_AP9]
ld r13, [sp, ___callee_saved_stack_t_agu_ap10_OFFSET]
sr r13, [_ARC_V2_AGU_AP10]
ld r13, [sp, ___callee_saved_stack_t_agu_ap11_OFFSET]
sr r13, [_ARC_V2_AGU_AP11]
ld r13, [sp, ___callee_saved_stack_t_agu_os4_OFFSET]
sr r13, [_ARC_V2_AGU_OS4]
ld r13, [sp, ___callee_saved_stack_t_agu_os5_OFFSET]
sr r13, [_ARC_V2_AGU_OS5]
ld r13, [sp, ___callee_saved_stack_t_agu_os6_OFFSET]
sr r13, [_ARC_V2_AGU_OS6]
ld r13, [sp, ___callee_saved_stack_t_agu_os7_OFFSET]
sr r13, [_ARC_V2_AGU_OS7]
ld r13, [sp, ___callee_saved_stack_t_agu_mod12_OFFSET]
sr r13, [_ARC_V2_AGU_MOD12]
ld r13, [sp, ___callee_saved_stack_t_agu_mod13_OFFSET]
sr r13, [_ARC_V2_AGU_MOD13]
ld r13, [sp, ___callee_saved_stack_t_agu_mod14_OFFSET]
sr r13, [_ARC_V2_AGU_MOD14]
ld r13, [sp, ___callee_saved_stack_t_agu_mod15_OFFSET]
sr r13, [_ARC_V2_AGU_MOD15]
ld r13, [sp, ___callee_saved_stack_t_agu_mod16_OFFSET]
sr r13, [_ARC_V2_AGU_MOD16]
ld r13, [sp, ___callee_saved_stack_t_agu_mod17_OFFSET]
sr r13, [_ARC_V2_AGU_MOD17]
ld r13, [sp, ___callee_saved_stack_t_agu_mod18_OFFSET]
sr r13, [_ARC_V2_AGU_MOD18]
ld r13, [sp, ___callee_saved_stack_t_agu_mod19_OFFSET]
sr r13, [_ARC_V2_AGU_MOD19]
ld r13, [sp, ___callee_saved_stack_t_agu_mod20_OFFSET]
sr r13, [_ARC_V2_AGU_MOD20]
ld r13, [sp, ___callee_saved_stack_t_agu_mod21_OFFSET]
sr r13, [_ARC_V2_AGU_MOD21]
ld r13, [sp, ___callee_saved_stack_t_agu_mod22_OFFSET]
sr r13, [_ARC_V2_AGU_MOD22]
ld r13, [sp, ___callee_saved_stack_t_agu_mod23_OFFSET]
sr r13, [_ARC_V2_AGU_MOD23]
#endif
#endif
agu_skip_load :
.endm
.macro _dsp_extension_probe
#ifdef CONFIG_ARC_DSP_TURNED_OFF
mov r0, 0 /* DSP_CTRL_DISABLED_ALL */
sr r0, [_ARC_V2_DSP_CTRL]
#endif
.endm

View File

@@ -13,17 +13,38 @@
* See isr_wrapper.S for details.
*/
#include <zephyr/kernel_structs.h>
#include <kernel_structs.h>
#include <offsets_short.h>
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <zephyr/arch/cpu.h>
#include <toolchain.h>
#include <arch/cpu.h>
#include <swap_macros.h>
GTEXT(_firq_enter)
GTEXT(_firq_exit)
GTEXT(_firq_stack_setup)
GTEXT(_firq_stack_suspend)
GTEXT(_firq_stack_resume)
#if CONFIG_RGF_NUM_BANKS != 1
GDATA(_firq_stack)
GDATA(_saved_firq_stack)
SECTION_VAR(NOINIT, _firq_stack)
.space CONFIG_FIRQ_STACK_SIZE
#else
GDATA(saved_r0)
#endif
.macro _firq_return
#if CONFIG_RGF_NUM_BANKS == 1
b _firq_no_reschedule
#else
rtie
#endif
.endm
/**
*
* @brief Work to be done before handing control to a FIRQ ISR
*
* The processor switches to a second register bank so registers from the
@@ -40,9 +61,12 @@ GTEXT(_firq_exit)
* interrupt. An exception, however, can be taken.
*
* Assumption by _isr_demux: r3 is untouched by _firq_enter.
*
* @return N/A
*/
SECTION_FUNC(TEXT, _firq_enter)
/*
* ATTENTION:
* If CONFIG_RGF_NUM_BANKS>1, firq uses a 2nd register bank so GPRs do
@@ -50,20 +74,16 @@ SECTION_FUNC(TEXT, _firq_enter)
* If CONFIG_RGF_NUM_BANKS==1, firq must use the stack to save registers.
* This has already been done by _isr_wrapper.
*/
#ifdef CONFIG_ARC_STACK_CHECKING
#ifdef CONFIG_ARC_SECURE_FIRMWARE
lr r2, [_ARC_V2_SEC_STAT]
bclr r2, r2, _ARC_V2_SEC_STAT_SSC_BIT
sflag r2
#else
/* disable stack checking */
lr r2, [_ARC_V2_STATUS32]
bclr r2, r2, _ARC_V2_STATUS32_SC_BIT
kflag r2
#endif
#endif
#if CONFIG_RGF_NUM_BANKS != 1
#ifndef CONFIG_FIRQ_NO_LPCC
/*
* Save LP_START/LP_COUNT/LP_END because called handler might use.
* Save these in callee saved registers to avoid using memory.
@@ -73,151 +93,115 @@ SECTION_FUNC(TEXT, _firq_enter)
lr r24, [_ARC_V2_LP_START]
lr r25, [_ARC_V2_LP_END]
#endif
/* check whether irq stack is used */
_check_and_inc_int_nest_counter r0, r1
bne.d firq_nest
mov_s r0, sp
_get_curr_cpu_irq_stack sp
#if CONFIG_RGF_NUM_BANKS != 1
b firq_nest_1
firq_nest:
/*
* because firq and rirq share the same interrupt stack,
* switch back to original register bank to get correct sp.
* to get better firq latency, an approach is to prepare
* separate interrupt stack for firq and do not do thread
* switch in firq.
*/
lr r1, [_ARC_V2_STATUS32]
and r1, r1, ~_ARC_V2_STATUS32_RB(7)
kflag r1
/* here use _ARC_V2_USER_SP and ilink to exchange sp
* save original value of _ARC_V2_USER_SP and ilink into
* the stack of interrupted context first, then restore them later
*/
push ilink
PUSHAX ilink, _ARC_V2_USER_SP
/* sp here is the sp of interrupted context */
sr sp, [_ARC_V2_USER_SP]
/* here, bank 0 sp must go back to the value before push and
* PUSHAX as we will switch to bank1, the pop and POPAX later will
* change bank1's sp, not bank0's sp
*/
add sp, sp, 8
/* switch back to banked reg, only ilink can be used */
lr ilink, [_ARC_V2_STATUS32]
or ilink, ilink, _ARC_V2_STATUS32_RB(1)
kflag ilink
lr sp, [_ARC_V2_USER_SP]
POPAX ilink, _ARC_V2_USER_SP
pop ilink
firq_nest_1:
#else
firq_nest:
#endif
push_s r0
j _isr_demux
j @_isr_demux
/**
*
* @brief Work to be done exiting a FIRQ
*
* @return N/A
*/
SECTION_FUNC(TEXT, _firq_exit)
#if CONFIG_RGF_NUM_BANKS != 1
#ifndef CONFIG_FIRQ_NO_LPCC
/* restore lp_count, lp_start, lp_end from r23-r25 */
mov lp_count,r23
sr r24, [_ARC_V2_LP_START]
sr r25, [_ARC_V2_LP_END]
#endif
_dec_int_nest_counter r0, r1
#endif
_check_nest_int_by_irq_act r0, r1
#ifdef CONFIG_PREEMPT_ENABLED
mov_s r1, _kernel
ld_s r2, [r1, _kernel_offset_to_current]
jne _firq_no_switch
#if CONFIG_NUM_IRQ_PRIO_LEVELS > 1
/* check if we're a nested interrupt: if so, let the interrupted
* interrupt handle the reschedule */
/* sp is struct k_thread **old of z_arc_switch_in_isr which is a wrapper of
* z_get_next_switch_handle. r0 contains the 1st thread in ready queue. If it isn't NULL,
* then do switch to this thread.
lr r3, [_ARC_V2_AUX_IRQ_ACT]
/* the OS on ARCv2 always runs in kernel mode, so assume bit31 [U] in
* AUX_IRQ_ACT is always 0: if the contents of AUX_IRQ_ACT is not 1, it
* means that another bit is set so an interrupt was interrupted.
*/
_get_next_switch_handle
CMPR r0, 0
bne _firq_switch
breq r3, 1, _firq_check_for_swap
/* fall to no switch */
_firq_return
#endif
.align 4
_firq_no_switch:
/* restore interrupted context' sp */
pop sp
.balign 4
_firq_check_for_swap:
/*
* Non-preemptible thread ? Do not schedule (see explanation of
* preempt field in kernel_struct.h).
*/
ldh_s r0, [r2, _thread_offset_to_preempt]
brhs r0, _NON_PREEMPT_THRESHOLD, _firq_no_reschedule
/* Check if the current thread (in r2) is the cached thread */
ld_s r0, [r1, _kernel_offset_to_ready_q_cache]
brne r0, r2, _firq_reschedule
/* fall to no rescheduling */
#endif /* CONFIG_PREEMPT_ENABLED */
.balign 4
_firq_no_reschedule:
/*
* Keeping this code block close to those that use it allows using brxx
* instruction instead of a pair of cmp and bxx
*/
#if CONFIG_RGF_NUM_BANKS == 1
_pop_irq_stack_frame
add sp,sp,4 /* don't need r0 from stack */
pop_s r1
pop_s r2
pop_s r3
pop r4
pop r5
pop r6
pop r7
pop r8
pop r9
pop r10
pop r11
pop_s r12
pop_s r13
pop_s blink
pop_s r0
sr r0, [_ARC_V2_LP_END]
pop_s r0
sr r0, [_ARC_V2_LP_START]
pop_s r0
mov lp_count,r0
ld r0,[saved_r0]
add sp,sp,8 /* don't need ilink & status32_po from stack */
#endif
rtie
.align 4
_firq_switch:
/* restore interrupted context' sp */
pop sp
#ifdef CONFIG_PREEMPT_ENABLED
.balign 4
_firq_reschedule:
#if CONFIG_RGF_NUM_BANKS != 1
/*
* save r0, r2 in irq stack for a while, as they will be changed by register
* bank switch
*/
_get_curr_cpu_irq_stack r1
st r0, [r1, -4]
st r2, [r1, -8]
/*
* We know there is no interrupted interrupt of lower priority at this
* point, so when switching back to register bank 0, it will contain the
* registers from the interrupted thread.
*/
#if defined(CONFIG_USERSPACE)
/* when USERSPACE is configured, here need to consider the case where firq comes
* out in user mode, according to ARCv2 ISA and nsim, the following micro ops
* will be executed:
* sp<-reg bank1'sp
* switch between sp and _ARC_V2_USER_SP
* then:
* sp is the sp of kernel stack of interrupted thread
* _ARC_V2_USER_SP is reg bank1'sp
* the sp of user stack of interrupted thread is reg bank0'sp
* if firq comes out in kernel mode, the following micro ops will be executed:
* sp<-reg bank'sp
* so, sw needs to do necessary handling to set up the correct sp
*/
lr r0, [_ARC_V2_AUX_IRQ_ACT]
bbit0 r0, 31, _firq_from_kernel
aex sp, [_ARC_V2_USER_SP]
lr r0, [_ARC_V2_STATUS32]
and r0, r0, ~_ARC_V2_STATUS32_RB(7)
kflag r0
aex sp, [_ARC_V2_USER_SP]
b _firq_create_irq_stack_frame
_firq_from_kernel:
#endif
/* chose register bank #0 */
lr r0, [_ARC_V2_STATUS32]
and r0, r0, ~_ARC_V2_STATUS32_RB(7)
kflag r0
_firq_create_irq_stack_frame:
/* we're back on the outgoing thread's stack */
_create_irq_stack_frame
@@ -230,56 +214,68 @@ _firq_create_irq_stack_frame:
st_s r0, [sp, ___isf_t_status32_OFFSET]
st ilink, [sp, ___isf_t_pc_OFFSET] /* ilink into pc */
/*
* load r0, r2 from irq stack
*/
_get_curr_cpu_irq_stack r1
ld r0, [r1, -4]
ld r2, [r1, -8]
#endif
/* r2 is old thread */
mov_s r1, _kernel
ld_s r2, [r1, _kernel_offset_to_current]
_save_callee_saved_regs
st _CAUSE_FIRQ, [r2, _thread_offset_to_relinquish_cause]
_irq_store_old_thread_callee_regs
ld_s r2, [r1, _kernel_offset_to_ready_q_cache]
st_s r2, [r1, _kernel_offset_to_current]
/* mov new thread (r0) to r2 */
#ifdef CONFIG_ARC_STACK_CHECKING
/* Use stack top and down registers from restored context */
add r3, r2, _K_THREAD_NO_FLOAT_SIZEOF
sr r3, [_ARC_V2_KSTACK_TOP]
ld_s r3, [r2, _thread_offset_to_stack_top]
sr r3, [_ARC_V2_KSTACK_BASE]
#endif
/*
* _load_callee_saved_regs expects incoming thread in r2.
* _load_callee_saved_regs restores the stack pointer.
*/
_load_callee_saved_regs
mov r2, r0
_load_new_thread_callee_regs
ld_s r3, [r2, _thread_offset_to_relinquish_cause]
breq r3, _CAUSE_RIRQ, _firq_switch_from_rirq
nop_s
breq r3, _CAUSE_FIRQ, _firq_switch_from_firq
nop_s
breq r3, _CAUSE_RIRQ, _firq_return_from_rirq
nop
breq r3, _CAUSE_FIRQ, _firq_return_from_firq
nop
/* fall through */
.align 4
_firq_switch_from_coop:
.balign 4
_firq_return_from_coop:
_set_misc_regs_irq_switch_from_coop
ld_s r3, [r2, _thread_offset_to_intlock_key]
st 0, [r2, _thread_offset_to_intlock_key]
/* pc into ilink */
pop_s r0
mov ilink, r0
pop_s r0 /* status32 into r0 */
/*
* There are only two interrupt lock states: locked and unlocked. When
* entering _Swap(), they are always locked, so the IE bit is unset in
* status32. If the incoming thread had them locked recursively, it
* means that the IE bit should stay unset. The only time the bit
* has to change is if they were not locked recursively.
*/
and.f r3, r3, (1 << 4)
or.nz r0, r0, _ARC_V2_STATUS32_IE
sr r0, [_ARC_V2_STATUS32_P0]
#ifdef CONFIG_INSTRUMENT_THREAD_SWITCHING
push_s blink
bl z_thread_mark_switched_in
pop_s blink
#endif
ld_s r0, [r2, _thread_offset_to_return_value]
rtie
.align 4
_firq_switch_from_rirq:
_firq_switch_from_firq:
_set_misc_regs_irq_switch_from_irq
.balign 4
_firq_return_from_rirq:
_firq_return_from_firq:
_pop_irq_stack_frame
@@ -287,12 +283,88 @@ _firq_switch_from_firq:
sr ilink, [_ARC_V2_STATUS32_P0]
ld ilink, [sp, -8] /* pc into ilink */
#ifdef CONFIG_INSTRUMENT_THREAD_SWITCHING
push_s blink
bl z_thread_mark_switched_in
pop_s blink
#endif
/* LP registers are already restored, just switch back to bank 0 */
rtie
#endif /* CONFIG_PREEMPT_ENABLED */
/**
*
* @brief Install the FIRQ stack in register bank 1 if CONFIG_RGF_NUM_BANK!=1
*
* @return N/A
*/
SECTION_FUNC(TEXT, _firq_stack_setup)
#if CONFIG_RGF_NUM_BANKS != 1
lr r0, [_ARC_V2_STATUS32]
and r0, r0, ~_ARC_V2_STATUS32_RB(7)
or r0, r0, _ARC_V2_STATUS32_RB(1)
kflag r0
mov sp, _firq_stack
add sp, sp, CONFIG_FIRQ_STACK_SIZE
/*
* We have to reload r0 here, because it is bank1 r0 which contains
* garbage, not bank0 r0 containing the previous value of status32.
*/
lr r0, [_ARC_V2_STATUS32]
and r0, r0, ~_ARC_V2_STATUS32_RB(7)
kflag r0
#endif
j_s [blink]
/**
*
* @brief Save the FIRQ context if CONFIG_RGF_NUM_BANK!=1
*
* @return N/A
*/
SECTION_FUNC(TEXT, _firq_stack_suspend)
#if CONFIG_RGF_NUM_BANKS != 1
/* Switch to bank 1 */
lr r0, [_ARC_V2_STATUS32]
and r0, r0, ~_ARC_V2_STATUS32_RB(7)
or r0, r0, _ARC_V2_STATUS32_RB(1)
kflag r0
st sp, [_saved_firq_stack]
/* Switch back to bank 0 */
lr r0, [_ARC_V2_STATUS32]
and r0, r0, ~_ARC_V2_STATUS32_RB(7)
kflag r0
#endif
j_s [blink]
/**
*
* @brief Restore the FIRQ context if CONFIG_RGF_NUM_BANK!=1
*
* @return N/A
*/
SECTION_FUNC(TEXT, _firq_stack_resume)
#if CONFIG_RGF_NUM_BANKS != 1
/* Switch to bank 1 */
lr r0, [_ARC_V2_STATUS32]
and r0, r0, ~_ARC_V2_STATUS32_RB(7)
or r0, r0, _ARC_V2_STATUS32_RB(1)
kflag r0
ld sp, [_saved_firq_stack]
/* Switch back to bank 0 */
lr r0, [_ARC_V2_STATUS32]
and r0, r0, ~_ARC_V2_STATUS32_RB(7)
kflag r0
#endif
j_s [blink]

View File

@@ -12,59 +12,74 @@
* ARCv2 CPUs.
*/
#include <zephyr/kernel.h>
#include <kernel_structs.h>
#include <offsets_short.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/logging/log.h>
#include <kernel_arch_data.h>
#include <zephyr/arch/arc/v2/exc.h>
#include <toolchain.h>
#include <arch/cpu.h>
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
#ifdef CONFIG_PRINTK
#include <misc/printk.h>
#define PR_EXC(...) printk(__VA_ARGS__)
#else
#define PR_EXC(...)
#endif /* CONFIG_PRINTK */
#ifdef CONFIG_ARC_EXCEPTION_DEBUG
static void dump_arc_esf(const z_arch_esf_t *esf)
const NANO_ESF _default_esf = {
0xdeaddead, /* placeholder */
};
/**
*
* @brief Kernel fatal error handler
*
* This routine is called when fatal error conditions are detected by software
* and is responsible only for reporting the error. Once reported, it then
* invokes the user provided routine _SysFatalErrorHandler() which is
* responsible for implementing the error handling policy.
*
* The caller is expected to always provide a usable ESF. In the event that the
* fatal error does not have a hardware generated ESF, the caller should either
* create its own or use a pointer to the global default ESF <_default_esf>.
*
* @return This function does not return.
*/
FUNC_NORETURN void _NanoFatalErrorHandler(unsigned int reason,
const NANO_ESF *pEsf)
{
LOG_ERR(" r0: 0x%" PRIxPTR " r1: 0x%" PRIxPTR " r2: 0x%" PRIxPTR " r3: 0x%" PRIxPTR "",
esf->r0, esf->r1, esf->r2, esf->r3);
LOG_ERR(" r4: 0x%" PRIxPTR " r5: 0x%" PRIxPTR " r6: 0x%" PRIxPTR " r7: 0x%" PRIxPTR "",
esf->r4, esf->r5, esf->r6, esf->r7);
LOG_ERR(" r8: 0x%" PRIxPTR " r9: 0x%" PRIxPTR " r10: 0x%" PRIxPTR " r11: 0x%" PRIxPTR "",
esf->r8, esf->r9, esf->r10, esf->r11);
LOG_ERR("r12: 0x%" PRIxPTR " r13: 0x%" PRIxPTR " pc: 0x%" PRIxPTR "",
esf->r12, esf->r13, esf->pc);
LOG_ERR(" blink: 0x%" PRIxPTR " status32: 0x%" PRIxPTR "", esf->blink, esf->status32);
#ifdef CONFIG_ARC_HAS_ZOL
LOG_ERR("lp_end: 0x%" PRIxPTR " lp_start: 0x%" PRIxPTR " lp_count: 0x%" PRIxPTR "",
esf->lp_end, esf->lp_start, esf->lp_count);
#endif /* CONFIG_ARC_HAS_ZOL */
}
switch (reason) {
case _NANO_ERR_INVALID_TASK_EXIT:
PR_EXC("***** Invalid Exit Software Error! *****\n");
break;
#if defined(CONFIG_STACK_CANARIES)
case _NANO_ERR_STACK_CHK_FAIL:
PR_EXC("***** Stack Check Fail! *****\n");
break;
#endif
void z_arc_fatal_error(unsigned int reason, const z_arch_esf_t *esf)
{
#ifdef CONFIG_ARC_EXCEPTION_DEBUG
if (esf != NULL) {
dump_arc_esf(esf);
case _NANO_ERR_ALLOCATION_FAIL:
PR_EXC("**** Kernel Allocation Failure! ****\n");
break;
default:
PR_EXC("**** Unknown Fatal Error %d! ****\n", reason);
break;
}
#endif /* CONFIG_ARC_EXCEPTION_DEBUG */
PR_EXC("Current thread ID = %p\n"
"Faulting instruction address = 0x%lx\n",
k_current_get(),
_arc_v2_aux_reg_read(_ARC_V2_ERET));
z_fatal_error(reason, esf);
}
FUNC_NORETURN void arch_syscall_oops(void *ssf_ptr)
{
/* TODO: convert ssf_ptr contents into an esf, they are not the same */
ARG_UNUSED(ssf_ptr);
z_arc_fatal_error(K_ERR_KERNEL_OOPS, NULL);
CODE_UNREACHABLE;
}
FUNC_NORETURN void arch_system_halt(unsigned int reason)
{
ARG_UNUSED(reason);
__asm__("brk");
CODE_UNREACHABLE;
/*
* Now that the error has been reported, call the user implemented
* policy
* to respond to the error. The decisions as to what responses are
* appropriate to the various errors are something the customer must
* decide.
*/
_SysFatalErrorHandler(reason, pEsf);
for (;;)
;
}

View File

@@ -11,406 +11,73 @@
* Common fault handler for ARCv2 processors.
*/
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <toolchain.h>
#include <sections.h>
#include <inttypes.h>
#include <zephyr/kernel.h>
#include <kernel_internal.h>
#include <zephyr/kernel_structs.h>
#include <zephyr/arch/common/exc_handle.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(os, CONFIG_KERNEL_LOG_LEVEL);
#include <kernel.h>
#include <kernel_structs.h>
#ifdef CONFIG_USERSPACE
Z_EXC_DECLARE(z_arc_user_string_nlen);
#ifdef CONFIG_PRINTK
#include <misc/printk.h>
#define PR_EXC(...) printk(__VA_ARGS__)
#else
#define PR_EXC(...)
#endif /* CONFIG_PRINTK */
static const struct z_exc_handle exceptions[] = {
Z_EXC_HANDLE(z_arc_user_string_nlen)
};
#if (CONFIG_FAULT_DUMP > 0)
#define FAULT_DUMP(esf, fault) _FaultDump(esf, fault)
#else
#define FAULT_DUMP(esf, fault) \
do { \
(void) esf; \
(void) fault; \
} while ((0))
#endif
#if defined(CONFIG_MPU_STACK_GUARD)
/**
* @brief Assess occurrence of current thread's stack corruption
#if (CONFIG_FAULT_DUMP > 0)
/*
* @brief Dump information regarding fault (FAULT_DUMP > 0)
*
* This function performs an assessment whether a memory fault (on a given
* memory address) is the result of a stack overflow of the current thread.
* Dump information regarding the fault when CONFIG_FAULT_DUMP is set to 1
* (short form).
*
* When called, we know at this point that we received an ARC
* protection violation, with any cause code, with the protection access
* error either "MPU" or "Secure MPU". In other words, an MPU fault of
* some kind. Need to determine whether this is a general MPU access
* exception or the specific case of a stack overflow.
*
* @param fault_addr memory address on which memory access violation
* has been reported.
* @param sp stack pointer when exception comes out
* @retval True if this appears to be a stack overflow
* @retval False if this does not appear to be a stack overflow
* @return N/A
*/
static bool z_check_thread_stack_fail(const uint32_t fault_addr, uint32_t sp)
void _FaultDump(const NANO_ESF *esf, int fault)
{
uint32_t guard_end, guard_start;
ARG_UNUSED(esf);
ARG_UNUSED(fault);
#if defined(CONFIG_MULTITHREADING)
const struct k_thread *thread = _current;
#ifdef CONFIG_PRINTK
uint32_t exc_addr = _arc_v2_aux_reg_read(_ARC_V2_EFA);
uint32_t ecr = _arc_v2_aux_reg_read(_ARC_V2_ECR);
if (!thread) {
/* TODO: Under what circumstances could we get here ? */
return false;
}
#ifdef CONFIG_USERSPACE
if ((thread->base.user_options & K_USER) != 0) {
if ((z_arc_v2_aux_reg_read(_ARC_V2_ERSTATUS) &
_ARC_V2_STATUS32_U) != 0) {
/* Normal user mode context. There is no specific
* "guard" installed in this case, instead what's
* happening is that the stack pointer is crashing
* into the privilege mode stack buffer which
* immediately precededs it.
*/
guard_end = thread->stack_info.start;
guard_start = (uint32_t)thread->stack_obj;
} else {
/* Special case: handling a syscall on privilege stack.
* There is guard memory reserved immediately before
* it.
*/
guard_end = thread->arch.priv_stack_start;
guard_start = guard_end - Z_ARC_STACK_GUARD_SIZE;
}
} else
#endif /* CONFIG_USERSPACE */
{
/* Supervisor thread */
guard_end = thread->stack_info.start;
guard_start = guard_end - Z_ARC_STACK_GUARD_SIZE;
}
#endif /* CONFIG_MULTITHREADING */
/* treat any MPU exceptions within the guard region as a stack
* overflow.As some instrustions
* (like enter_s {r13-r26, fp, blink}) push a collection of
* registers on to the stack. In this situation, the fault_addr
* will less than guard_end, but sp will greater than guard_end.
*/
if (fault_addr < guard_end && fault_addr >= guard_start) {
return true;
}
return false;
}
PR_EXC("Exception vector: 0x%" PRIx32 ", cause code: 0x%" PRIx32
", parameter 0x%" PRIx32 "\n",
_ARC_V2_ECR_VECTOR(ecr),
_ARC_V2_ECR_CODE(ecr),
_ARC_V2_ECR_PARAMETER(ecr));
PR_EXC("Address 0x%" PRIx32 "\n", exc_addr);
#endif
#ifdef CONFIG_ARC_EXCEPTION_DEBUG
/* For EV_ProtV, the numbering/semantics of the parameter are consistent across
* several codes, although not all combination will be reported.
*
* These codes and parameters do not have associated* names in
* the technical manual, just switch on the values in Table 6-5
*/
static const char *get_protv_access_err(uint32_t parameter)
{
switch (parameter) {
case 0x1:
return "code protection scheme";
case 0x2:
return "stack checking scheme";
case 0x4:
return "MPU";
case 0x8:
return "MMU";
case 0x10:
return "NVM";
case 0x24:
return "Secure MPU";
case 0x44:
return "Secure MPU with SID mismatch";
default:
return "unknown";
}
}
static void dump_protv_exception(uint32_t cause, uint32_t parameter)
{
switch (cause) {
case 0x0:
LOG_ERR("Instruction fetch violation (%s)",
get_protv_access_err(parameter));
break;
case 0x1:
LOG_ERR("Memory read protection violation (%s)",
get_protv_access_err(parameter));
break;
case 0x2:
LOG_ERR("Memory write protection violation (%s)",
get_protv_access_err(parameter));
break;
case 0x3:
LOG_ERR("Memory read-modify-write violation (%s)",
get_protv_access_err(parameter));
break;
case 0x10:
LOG_ERR("Normal vector table in secure memory");
break;
case 0x11:
LOG_ERR("NS handler code located in S memory");
break;
case 0x12:
LOG_ERR("NSC Table Range Violation");
break;
default:
LOG_ERR("unknown");
break;
}
}
static void dump_machine_check_exception(uint32_t cause, uint32_t parameter)
{
switch (cause) {
case 0x0:
LOG_ERR("double fault");
break;
case 0x1:
LOG_ERR("overlapping TLB entries");
break;
case 0x2:
LOG_ERR("fatal TLB error");
break;
case 0x3:
LOG_ERR("fatal cache error");
break;
case 0x4:
LOG_ERR("internal memory error on instruction fetch");
break;
case 0x5:
LOG_ERR("internal memory error on data fetch");
break;
case 0x6:
LOG_ERR("illegal overlapping MPU entries");
if (parameter == 0x1) {
LOG_ERR(" - jump and branch target");
}
break;
case 0x10:
LOG_ERR("secure vector table not located in secure memory");
break;
case 0x11:
LOG_ERR("NSC jump table not located in secure memory");
break;
case 0x12:
LOG_ERR("secure handler code not located in secure memory");
break;
case 0x13:
LOG_ERR("NSC target address not located in secure memory");
break;
case 0x80:
LOG_ERR("uncorrectable ECC or parity error in vector memory");
break;
default:
LOG_ERR("unknown");
break;
}
}
static void dump_privilege_exception(uint32_t cause, uint32_t parameter)
{
switch (cause) {
case 0x0:
LOG_ERR("Privilege violation");
break;
case 0x1:
LOG_ERR("disabled extension");
break;
case 0x2:
LOG_ERR("action point hit");
break;
case 0x10:
switch (parameter) {
case 0x1:
LOG_ERR("N to S return using incorrect return mechanism");
break;
case 0x2:
LOG_ERR("N to S return with incorrect operating mode");
break;
case 0x3:
LOG_ERR("IRQ/exception return fetch from wrong mode");
break;
case 0x4:
LOG_ERR("attempt to halt secure processor in NS mode");
break;
case 0x20:
LOG_ERR("attempt to access secure resource from normal mode");
break;
case 0x40:
LOG_ERR("SID violation on resource access (APEX/UAUX/key NVM)");
break;
default:
LOG_ERR("unknown");
break;
}
break;
case 0x13:
switch (parameter) {
case 0x20:
LOG_ERR("attempt to access secure APEX feature from NS mode");
break;
case 0x40:
LOG_ERR("SID violation on access to APEX feature");
break;
default:
LOG_ERR("unknown");
break;
}
break;
default:
LOG_ERR("unknown");
break;
}
}
static void dump_exception_info(uint32_t vector, uint32_t cause, uint32_t parameter)
{
if (vector >= 0x10 && vector <= 0xFF) {
LOG_ERR("interrupt %u", vector);
return;
}
/* Names are exactly as they appear in Designware ARCv2 ISA
* Programmer's reference manual for easy searching
*/
switch (vector) {
case ARC_EV_RESET:
LOG_ERR("Reset");
break;
case ARC_EV_MEM_ERROR:
LOG_ERR("Memory Error");
break;
case ARC_EV_INS_ERROR:
LOG_ERR("Instruction Error");
break;
case ARC_EV_MACHINE_CHECK:
LOG_ERR("EV_MachineCheck");
dump_machine_check_exception(cause, parameter);
break;
case ARC_EV_TLB_MISS_I:
LOG_ERR("EV_TLBMissI");
break;
case ARC_EV_TLB_MISS_D:
LOG_ERR("EV_TLBMissD");
break;
case ARC_EV_PROT_V:
LOG_ERR("EV_ProtV");
dump_protv_exception(cause, parameter);
break;
case ARC_EV_PRIVILEGE_V:
LOG_ERR("EV_PrivilegeV");
dump_privilege_exception(cause, parameter);
break;
case ARC_EV_SWI:
LOG_ERR("EV_SWI");
break;
case ARC_EV_TRAP:
LOG_ERR("EV_Trap");
break;
case ARC_EV_EXTENSION:
LOG_ERR("EV_Extension");
break;
case ARC_EV_DIV_ZERO:
LOG_ERR("EV_DivZero");
break;
case ARC_EV_DC_ERROR:
LOG_ERR("EV_DCError");
break;
case ARC_EV_MISALIGNED:
LOG_ERR("EV_Misaligned");
break;
case ARC_EV_VEC_UNIT:
LOG_ERR("EV_VecUnit");
break;
default:
LOG_ERR("unknown");
break;
}
}
#endif /* CONFIG_ARC_EXCEPTION_DEBUG */
#endif /* CONFIG_FAULT_DUMP */
/*
* @brief Fault handler
*
* This routine is called when fatal error conditions are detected by hardware
* and is responsible only for reporting the error. Once reported, it then
* invokes the user provided routine k_sys_fatal_error_handler() which is
* invokes the user provided routine _SysFatalErrorHandler() which is
* responsible for implementing the error handling policy.
*
* @return This function does not return.
*/
void _Fault(z_arch_esf_t *esf, uint32_t old_sp)
void _Fault(void)
{
uint32_t vector, cause, parameter;
uint32_t exc_addr = z_arc_v2_aux_reg_read(_ARC_V2_EFA);
uint32_t ecr = z_arc_v2_aux_reg_read(_ARC_V2_ECR);
uint32_t ecr = _arc_v2_aux_reg_read(_ARC_V2_ECR);
#ifdef CONFIG_USERSPACE
for (int i = 0; i < ARRAY_SIZE(exceptions); i++) {
uint32_t start = (uint32_t)exceptions[i].start;
uint32_t end = (uint32_t)exceptions[i].end;
FAULT_DUMP(&_default_esf, ecr);
if (esf->pc >= start && esf->pc < end) {
esf->pc = (uint32_t)(exceptions[i].fixup);
return;
}
}
#endif
vector = Z_ARC_V2_ECR_VECTOR(ecr);
cause = Z_ARC_V2_ECR_CODE(ecr);
parameter = Z_ARC_V2_ECR_PARAMETER(ecr);
/* exception raised by kernel */
if (vector == ARC_EV_TRAP && parameter == _TRAP_S_CALL_RUNTIME_EXCEPT) {
/*
* in user mode software-triggered system fatal exceptions only allow
* K_ERR_KERNEL_OOPS and K_ERR_STACK_CHK_FAIL
*/
#ifdef CONFIG_USERSPACE
if ((esf->status32 & _ARC_V2_STATUS32_U) &&
esf->r0 != K_ERR_STACK_CHK_FAIL) {
esf->r0 = K_ERR_KERNEL_OOPS;
}
#endif
z_arc_fatal_error(esf->r0, esf);
return;
}
LOG_ERR("***** Exception vector: 0x%x, cause code: 0x%x, parameter 0x%x",
vector, cause, parameter);
LOG_ERR("Address 0x%x", exc_addr);
#ifdef CONFIG_ARC_EXCEPTION_DEBUG
dump_exception_info(vector, cause, parameter);
#endif
#ifdef CONFIG_ARC_STACK_CHECKING
/* Vector 6 = EV_ProV. Regardless of cause, parameter 2 means stack
* check violation
* stack check and mpu violation can come out together, then
* parameter = 0x2 | [0x4 | 0x8 | 0x1]
*/
if (vector == ARC_EV_PROT_V && parameter & 0x2) {
z_arc_fatal_error(K_ERR_STACK_CHK_FAIL, esf);
return;
}
#endif
#ifdef CONFIG_MPU_STACK_GUARD
if (vector == ARC_EV_PROT_V && ((parameter == 0x4) ||
(parameter == 0x24))) {
if (z_check_thread_stack_fail(exc_addr, old_sp)) {
z_arc_fatal_error(K_ERR_STACK_CHK_FAIL, esf);
return;
}
}
#endif
z_arc_fatal_error(K_ERR_CPU_EXCEPTION, esf);
_SysFatalErrorHandler(_NANO_ERR_HW_EXCEPTION, &_default_esf);
}

View File

@@ -1,6 +1,5 @@
/*
* Copyright (c) 2014 Wind River Systems, Inc.
* Copyright (c) 2018 Synopsys.
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -12,14 +11,13 @@
* Fault handlers for ARCv2 processors.
*/
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <zephyr/arch/cpu.h>
#include <toolchain.h>
#include <sections.h>
#include <arch/cpu.h>
#include <swap_macros.h>
#include <zephyr/syscall.h>
#include <zephyr/arch/arc/asm-compat/assembler.h>
GTEXT(_Fault)
GTEXT(__reset)
GTEXT(__memory_error)
GTEXT(__instruction_error)
@@ -35,27 +33,17 @@ GTEXT(__ev_div_zero)
GTEXT(__ev_dc_error)
GTEXT(__ev_maligned)
.macro _save_exc_regs_into_stack
#ifdef CONFIG_ARC_HAS_SECURE
/* ERSEC_STAT is IOW/RAZ in normal mode */
lr r0,[_ARC_V2_ERSEC_STAT]
st_s r0, [sp, ___isf_t_sec_stat_OFFSET]
#endif
LRR r0, [_ARC_V2_ERET]
STR r0, sp, ___isf_t_pc_OFFSET
LRR r0, [_ARC_V2_ERSTATUS]
STR r0, sp, ___isf_t_status32_OFFSET
.endm
.balign 4
SECTION_VAR(BSS, saved_stack_pointer)
.word 0
/*
* The exception handling will use top part of interrupt stack to
* get smaller memory footprint, because exception is not frequent.
* To reduce the impact on interrupt handling, especially nested interrupt
* the top part of interrupt stack cannot be too large, so add a check
* here
*/
#if CONFIG_ARC_EXCEPTION_STACK_SIZE > (CONFIG_ISR_STACK_SIZE >> 1)
#error "interrupt stack size is too small"
#if CONFIG_RGF_NUM_BANKS == 1
GDATA(_exception_stack)
SECTION_VAR(NOINIT, _exception_stack)
.space 512
/* note: QUARK_SE_C1000_SS can't afford 512B */
#else
GDATA(_firq_stack)
#endif
/*
@@ -70,167 +58,133 @@ SECTION_SUBSEC_FUNC(TEXT,__fault,__ev_tlb_miss_d)
SECTION_SUBSEC_FUNC(TEXT,__fault,__ev_prot_v)
SECTION_SUBSEC_FUNC(TEXT,__fault,__ev_privilege_v)
SECTION_SUBSEC_FUNC(TEXT,__fault,__ev_swi)
#ifndef CONFIG_IRQ_OFFLOAD
SECTION_SUBSEC_FUNC(TEXT,__fault,__ev_trap)
#endif
SECTION_SUBSEC_FUNC(TEXT,__fault,__ev_extension)
SECTION_SUBSEC_FUNC(TEXT,__fault,__ev_div_zero)
SECTION_SUBSEC_FUNC(TEXT,__fault,__ev_dc_error)
SECTION_SUBSEC_FUNC(TEXT,__fault,__ev_maligned)
_exc_entry:
/*
* re-use the top part of interrupt stack as exception
* stack. If this top part is used by interrupt handling,
* and exception is raised, then here it's guaranteed that
* exception handling has necessary stack to use
* Before invoking exception handler, the kernel switches to an exception
* stack, to save the faulting thread's registers.
* The exception is fatal and all the kernel can do is just print
* a diagnostic message and halt.
*/
MOVR ilink, sp
_get_curr_cpu_irq_stack sp
SUBR sp, sp, (CONFIG_ISR_STACK_SIZE - CONFIG_ARC_EXCEPTION_STACK_SIZE)
/*
* save caller saved registers
* this stack frame is set up in exception stack,
* not in the original sp (thread stack or interrupt stack).
* Because the exception may be raised by stack checking or
* mpu protect violation related to stack. If this stack frame
* is setup in original sp, double exception may be raised during
* _create_irq_stack_frame, which is unrecoverable.
*/
#ifdef CONFIG_ARC_STACK_CHECKING
push_s r2
/* disable stack checking */
lr r2, [_ARC_V2_STATUS32]
bclr r2, r2, _ARC_V2_STATUS32_SC_BIT
kflag r2
pop_s r2
#endif
st sp, [saved_stack_pointer]
#if CONFIG_RGF_NUM_BANKS == 1
mov_s sp, _exception_stack
add sp, sp, 512
#else
mov_s sp, _firq_stack
add sp, sp, CONFIG_FIRQ_STACK_SIZE
#endif
/* save caller saved registers */
_create_irq_stack_frame
_save_exc_regs_into_stack
lr r0,[_ARC_V2_ERSTATUS]
st_s r0, [sp, ___isf_t_status32_OFFSET]
lr r0,[_ARC_V2_ERET]
st_s r0, [sp, ___isf_t_pc_OFFSET] /* eret into pc */
/* sp is parameter of _Fault */
MOVR r0, sp
/* ilink is the thread's original sp */
MOVR r1, ilink
jl _Fault
_exc_return:
/* the exception cause must be fixed in exception handler when exception returns
* directly, or exception will be repeated.
*
* If thread switch is raised in exception handler, the context of old thread will
* not be saved, i.e., it cannot be recovered, because we don't know where the
* exception comes out, thread context?irq_context?nest irq context?
*/
_get_next_switch_handle
BREQR r0, 0, _exc_return_from_exc
/* Save old thread into switch handle which is required by z_sched_switch_spin which
* will be called during old thread abort.
*/
STR r2, r2, ___thread_t_switch_handle_OFFSET
MOVR r2, r0
#ifdef CONFIG_ARC_SECURE_FIRMWARE
/*
* sync up the ERSEC_STAT.ERM and SEC_STAT.IRM.
* use a fake interrupt return to simulate an exception turn.
* ERM and IRM record which mode the cpu should return, 1: secure
* 0: normal
*/
lr r3,[_ARC_V2_ERSEC_STAT]
btst r3, 31
bset.nz r3, r3, _ARC_V2_SEC_STAT_IRM_BIT
bclr.z r3, r3, _ARC_V2_SEC_STAT_IRM_BIT
sflag r3
#endif
/* clear AE bit to forget this was an exception, and go to
* register bank0 (if exception is raised in firq with 2 reg
* banks, then we may be bank1)
*/
#if defined(CONFIG_ARC_FIRQ) && CONFIG_RGF_NUM_BANKS != 1
/* save r2 in ilink because of the possible following reg
* bank switch
*/
mov ilink, r2
#endif
LRR r3, [_ARC_V2_STATUS32]
ANDR r3, r3, (~(_ARC_V2_STATUS32_AE | _ARC_V2_STATUS32_RB(7)))
kflag r3
/* pretend lowest priority interrupt happened to use common handler
* if exception is raised in irq, i.e., _ARC_V2_AUX_IRQ_ACT !=0,
* ignore irq handling, we cannot return to irq handling which may
* raise exception again. The ignored interrupts will be re-triggered
* if not cleared, or re-triggered by interrupt sources, or just missed
*/
#ifdef CONFIG_ARC_SECURE_FIRMWARE
mov_s r3, (1 << (ARC_N_IRQ_START_LEVEL - 1))
#else
MOVR r3, (1 << (CONFIG_NUM_IRQ_PRIO_LEVELS - 1))
#endif
#ifdef CONFIG_ARC_NORMAL_FIRMWARE
push_s r2
mov_s r0, _ARC_V2_AUX_IRQ_ACT
mov_s r1, r3
mov_s r6, ARC_S_CALL_AUX_WRITE
sjli SJLI_CALL_ARC_SECURE
pop_s r2
#else
SRR r3, [_ARC_V2_AUX_IRQ_ACT]
#endif
#if defined(CONFIG_ARC_FIRQ) && CONFIG_RGF_NUM_BANKS != 1
mov r2, ilink
#endif
/* Assumption: r2 has next thread */
b _rirq_newthread_switch
_exc_return_from_exc:
/* exception handler may change return address.
* reload it
*/
LDR r0, sp, ___isf_t_pc_OFFSET
SRR r0, [_ARC_V2_ERET]
/* if _Fault returns, restore the registers */
_pop_irq_stack_frame
MOVR sp, ilink
/* now restore the stack */
ld sp,[saved_stack_pointer]
rtie
/* separated entry for trap which may be used by irq_offload, USERPSACE */
#ifdef CONFIG_IRQ_OFFLOAD
GTEXT(_irq_do_offload);
SECTION_SUBSEC_FUNC(TEXT,__fault,__ev_trap)
/* get the id of trap_s */
LRR ilink, [_ARC_V2_ECR]
ANDR ilink, ilink, 0x3f
#ifdef CONFIG_USERSPACE
cmp ilink, _TRAP_S_CALL_SYSTEM_CALL
bne _do_non_syscall_trap
/* do sys_call */
mov ilink, K_SYSCALL_LIMIT
cmp r6, ilink
blo valid_syscall_id
mov_s r0, r6
mov_s r6, K_SYSCALL_BAD
valid_syscall_id:
/* create a sys call frame
* caller regs (r0 - 12) are saved in _create_irq_stack_frame
* ok to use them later
/*
* Before invoking exception handler, the kernel switches to an exception
* stack to save the faulting thread's registers.
* The exception is fatal and all the kernel can do is just print
* a diagnostic message and halt.
*/
#ifdef CONFIG_ARC_STACK_CHECKING
push_s r2
/* disable stack checking */
lr r2, [_ARC_V2_STATUS32]
bclr r2, r2, _ARC_V2_STATUS32_SC_BIT
kflag r2
pop_s r2
#endif
/* save caller saved registers */
_create_irq_stack_frame
_save_exc_regs_into_stack
lr r0,[_ARC_V2_ERSTATUS]
st_s r0, [sp, ___isf_t_status32_OFFSET]
lr r0,[_ARC_V2_ERET]
st_s r0, [sp, ___isf_t_pc_OFFSET] /* eret into pc */
/* exc return and do sys call in kernel mode,
* so need to clear U bit, r0 is already loaded
* with ERSTATUS in _save_exc_regs_into_stack
jl _irq_do_offload
mov_s r1, _kernel
ld_s r2, [r1, _kernel_offset_to_current]
/* check if we're a nested interrupt: if so, let the
* interrupted interrupt handle the reschedule
*/
bclr r0, r0, _ARC_V2_STATUS32_U_BIT
sr r0, [_ARC_V2_ERSTATUS]
mov_s r0, _arc_do_syscall
sr r0, [_ARC_V2_ERET]
lr r3, [_ARC_V2_AUX_IRQ_ACT]
/* the OS on ARCv2 always runs in kernel mode, so assume bit31 [U] in
* AUX_IRQ_ACT is always 0: if the contents of AUX_IRQ_ACT is 0, it
* means trap was taken from outside an interrupt handler.
* But if it was inside, let that handler do the swap.
*/
breq r3, 0, _trap_check_for_swap
_trap_return:
_pop_irq_stack_frame
rtie
_do_non_syscall_trap:
#endif /* CONFIG_USERSPACE */
b _exc_entry
.balign 4
_trap_check_for_swap:
/*
* Non-preemptible thread ? Do not schedule (see explanation of
* preempt field in kernel_struct.h).
*/
ldh_s r0, [r2, _thread_offset_to_preempt]
brhs r0, _NON_PREEMPT_THRESHOLD, _trap_return
/* check if the current thread needs to be rescheduled */
ld_s r0, [r1, _kernel_offset_to_ready_q_cache]
breq r0, r2, _trap_return
_save_callee_saved_regs
st _CAUSE_RIRQ, [r2, _thread_offset_to_relinquish_cause]
/* note: Ok to use _CAUSE_RIRQ since everything is saved */
ld_s r2, [r1, _kernel_offset_to_ready_q_cache]
st_s r2, [r1, _kernel_offset_to_current]
/* clear AE bit to forget this was an exception */
lr r3, [_ARC_V2_STATUS32]
and r3,r3,(~_ARC_V2_STATUS32_AE)
kflag r3
/* pretend lowest priority interrupt happened to use common handler */
lr r3, [_ARC_V2_AUX_IRQ_ACT]
or r3,r3,(1<<(CONFIG_NUM_IRQ_PRIO_LEVELS-1)) /* use lowest */
sr r3, [_ARC_V2_AUX_IRQ_ACT]
/* Assumption: r2 has current thread */
b _rirq_common_interrupt_swap
#endif /* CONFIG_IRQ_OFFLOAD */

View File

@@ -17,191 +17,50 @@
* number from 16 to last IRQ number on the platform.
*/
#include <zephyr/kernel.h>
#include <zephyr/arch/cpu.h>
#include <zephyr/sys/__assert.h>
#include <zephyr/toolchain.h>
#include <zephyr/linker/sections.h>
#include <zephyr/sw_isr_table.h>
#include <zephyr/irq.h>
#include <zephyr/sys/printk.h>
#include <kernel.h>
#include <arch/cpu.h>
#include <misc/__assert.h>
#include <toolchain.h>
#include <sections.h>
#include <sw_isr_table.h>
#include <irq.h>
/*
* storage space for the interrupt stack of fast_irq
*/
#if defined(CONFIG_ARC_FIRQ_STACK)
#if defined(CONFIG_SMP)
K_KERNEL_STACK_ARRAY_DEFINE(_firq_interrupt_stack, CONFIG_MP_MAX_NUM_CPUS,
CONFIG_ARC_FIRQ_STACK_SIZE);
#else
K_KERNEL_STACK_DEFINE(_firq_interrupt_stack, CONFIG_ARC_FIRQ_STACK_SIZE);
#endif
/**
* @brief Set the stack pointer for firq handling
*/
void z_arc_firq_stack_set(void)
{
#ifdef CONFIG_SMP
char *firq_sp = Z_KERNEL_STACK_BUFFER(
_firq_interrupt_stack[z_arc_v2_core_id()]) +
CONFIG_ARC_FIRQ_STACK_SIZE;
#else
char *firq_sp = Z_KERNEL_STACK_BUFFER(_firq_interrupt_stack) +
CONFIG_ARC_FIRQ_STACK_SIZE;
#endif
/* the z_arc_firq_stack_set must be called when irq diasbled, as
* it can be called not only in the init phase but also other places
*/
unsigned int key = arch_irq_lock();
__asm__ volatile (
/* only ilink will not be banked, so use ilink as channel
* between 2 banks
*/
"mov %%ilink, %0\n\t"
"lr %0, [%1]\n\t"
"or %0, %0, %2\n\t"
"kflag %0\n\t"
"mov %%sp, %%ilink\n\t"
/* switch back to bank0, use ilink to avoid the pollution of
* bank1's gp regs.
*/
"lr %%ilink, [%1]\n\t"
"and %%ilink, %%ilink, %3\n\t"
"kflag %%ilink\n\t"
:
: "r"(firq_sp), "i"(_ARC_V2_STATUS32),
"i"(_ARC_V2_STATUS32_RB(1)),
"i"(~_ARC_V2_STATUS32_RB(7))
);
arch_irq_unlock(key);
}
#endif
/*
* ARC CPU interrupt controllers hierarchy.
*
* Single-core (UP) case:
*
* --------------------------
* | CPU core 0 |
* --------------------------
* | core 0 (private) |
* | interrupt controller |
* --------------------------
* |
* [internal interrupts]
* [external interrupts]
*
*
* Multi-core (SMP) case:
*
* -------------------------- --------------------------
* | CPU core 0 | | CPU core 1 |
* -------------------------- --------------------------
* | core 0 (private) | | core 1 (private) |
* | interrupt controller | | interrupt controller |
* -------------------------- --------------------------
* | | | | | |
* | | [core 0 private internal interrupts] | | [core 1 private internal interrupts]
* | | | |
* | | | |
* | ------------------------------------------- |
* | | IDU (Interrupt Distribution Unit) | |
* | ------------------------------------------- |
* | | |
* | [common (shared) interrupts] |
* | |
* | |
* [core 0 private external interrupts] [core 1 private external interrupts]
*
*
*
* The interrupts are grouped in HW in the same order - firstly internal interrupts
* (with lowest line numbers in IVT), than common interrupts (if present), than external
* interrupts (with highest line numbers in IVT).
*
* NOTE: in case of SMP system we currently support in Zephyr only private internal and common
* interrupts, so the core-private external interrupts are currently not supported for SMP.
*/
/**
* @brief Enable an interrupt line
*
* Clear possible pending interrupts on the line, and enable the interrupt
* line. After this call, the CPU will receive interrupts for the specified
* @a irq.
*
* @return N/A
*/
void arch_irq_enable(unsigned int irq);
/**
void _arch_irq_enable(unsigned int irq)
{
int key = irq_lock();
_arc_v2_irq_unit_int_enable(irq);
irq_unlock(key);
}
/*
* @brief Disable an interrupt line
*
* Disable an interrupt line. After this call, the CPU will stop receiving
* interrupts for the specified @a irq.
*/
void arch_irq_disable(unsigned int irq);
/**
* @brief Return IRQ enable state
*
* @param irq IRQ line
* @return interrupt enable state, true or false
* @return N/A
*/
int arch_irq_is_enabled(unsigned int irq);
#ifdef CONFIG_ARC_CONNECT
#define IRQ_NUM_TO_IDU_NUM(id) ((id) - ARC_CONNECT_IDU_IRQ_START)
#define IRQ_IS_COMMON(id) ((id) >= ARC_CONNECT_IDU_IRQ_START)
void arch_irq_enable(unsigned int irq)
void _arch_irq_disable(unsigned int irq)
{
if (IRQ_IS_COMMON(irq)) {
z_arc_connect_idu_set_mask(IRQ_NUM_TO_IDU_NUM(irq), 0x0);
} else {
z_arc_v2_irq_unit_int_enable(irq);
}
int key = irq_lock();
_arc_v2_irq_unit_int_disable(irq);
irq_unlock(key);
}
void arch_irq_disable(unsigned int irq)
{
if (IRQ_IS_COMMON(irq)) {
z_arc_connect_idu_set_mask(IRQ_NUM_TO_IDU_NUM(irq), 0x1);
} else {
z_arc_v2_irq_unit_int_disable(irq);
}
}
int arch_irq_is_enabled(unsigned int irq)
{
if (IRQ_IS_COMMON(irq)) {
return !z_arc_connect_idu_read_mask(IRQ_NUM_TO_IDU_NUM(irq));
} else {
return z_arc_v2_irq_unit_int_enabled(irq);
}
}
#else
void arch_irq_enable(unsigned int irq)
{
z_arc_v2_irq_unit_int_enable(irq);
}
void arch_irq_disable(unsigned int irq)
{
z_arc_v2_irq_unit_int_disable(irq);
}
int arch_irq_is_enabled(unsigned int irq)
{
return z_arc_v2_irq_unit_int_enabled(irq);
}
#endif /* CONFIG_ARC_CONNECT */
/**
/*
* @internal
*
* @brief Set an interrupt's priority
@@ -211,47 +70,37 @@ int arch_irq_is_enabled(unsigned int irq)
* The priority is verified if ASSERT_ON is enabled; max priority level
* depends on CONFIG_NUM_IRQ_PRIO_LEVELS.
*
* @return N/A
*/
void z_irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags)
void _irq_priority_set(unsigned int irq, unsigned int prio, uint32_t flags)
{
ARG_UNUSED(flags);
int key = irq_lock();
__ASSERT(prio < CONFIG_NUM_IRQ_PRIO_LEVELS,
"invalid priority %d for irq %d", prio, irq);
/* 0 -> CONFIG_NUM_IRQ_PRIO_LEVELS allocated to secure world
* left prio levels allocated to normal world
*/
#if defined(CONFIG_ARC_SECURE_FIRMWARE)
prio = prio < ARC_N_IRQ_START_LEVEL ?
prio : (ARC_N_IRQ_START_LEVEL - 1);
#elif defined(CONFIG_ARC_NORMAL_FIRMWARE)
prio = prio < ARC_N_IRQ_START_LEVEL ?
ARC_N_IRQ_START_LEVEL : prio;
#endif
z_arc_v2_irq_unit_prio_set(irq, prio);
_arc_v2_irq_unit_prio_set(irq, prio);
irq_unlock(key);
}
/**
/*
* @brief Spurious interrupt handler
*
* Installed in all dynamic interrupt slots at boot time. Throws an error if
* called.
*
* @return N/A
*/
void z_irq_spurious(const void *unused)
#include <misc/printk.h>
void _irq_spurious(void *unused)
{
ARG_UNUSED(unused);
z_fatal_error(K_ERR_SPURIOUS_IRQ, NULL);
printk("_irq_spurious(). Spinning...\n");
for (;;)
;
}
#ifdef CONFIG_DYNAMIC_INTERRUPTS
int arch_irq_connect_dynamic(unsigned int irq, unsigned int priority,
void (*routine)(const void *parameter),
const void *parameter, uint32_t flags)
{
z_isr_install(irq, routine, parameter);
z_irq_priority_set(irq, priority, flags);
return irq;
}
#endif /* CONFIG_DYNAMIC_INTERRUPTS */

Some files were not shown because too many files have changed in this diff Show More