Dev-Review Meeting Agenda Sept 9th
Kumar Gala
PINCTRL:
- devicetree description (option 1 vs option 3) Option1 (grouping by device): NRF: https://gist.github.com/gmarull/e2afed5c97a188f3830ff0bd59d3d3ae NXP: https://gist.github.com/galak/a3c021d8052e58c818d4df60c981558c Option3 (grouping by pin): NRF: https://gist.github.com/gmarull/6993e3eacad1b0d7c00c1ea2f16c3a12 NXP: https://gist.github.com/galak/fb558ef83203db69b9ad983bd39b5d71 - API discussion - https://github.com/zephyrproject-rtos/zephyr/discussions/35077 drivers: regulator: convert to gpio_dt_spec - https://github.com/zephyrproject-rtos/zephyr/pull/37689 Plus anything anyone else has. - k
|
|
Re: Why do_swap() sets cpu.current before context switch?
Andy Ross
On 9/8/2021 8:08 AM, Katsuhiro Suzuki wrote:
RISC-V's FPU arch has the flag to permit/forbid using FPU. In Zephyr, this flag is set to Can't you just check that flag in the context switch code? It seems like that would be faster on average (most DSP workloads try very hard to avoid doing synchronous context switches to avoid the need to spill all that state), and have much better latency guarantees (taking an exception is REALLY expensive!). Andy
|
|
Re: Why do_swap() sets cpu.current before context switch?
Katsuhiro Suzuki
Hello,
On 2021/09/08 11:35, andy-intel@... wrote: Katsuhiro Suzuki wrote:Thanks for your advice.Newer switching sets NEW thread handle into _current_cpu.currentSo... this is the very middle of a context switch. The expectation of the kernel is that no exception/interrupt handlers are going to fire, because (by definition) if they do they will see corrupt/inconsistent thread state. Or rather, if an architecture wants to allow that, it needs to be prepared to do the work. Current RISC-V implementation (CONFIG_USE_SWITCH=n) is using 'ecall' (this is SW interrupt instruction) to execute context switching explicitly. And jump into interrupt handler that is used from not only SW interrupt but also other interrupts. In interrupt handler, kernel saves FPU registers of current thread that is pointing old thread. I agree with you that I can add special path for explicit context switching. If such path is needed, I will add that. Can you explain why you need to take an FPU exception in the middle of a context switch? That seems a little questionable to me. Why are you hitting lazy-saved FPU registers in a situation where it would be faster to just check the mask state to see if they are populated or not? (Forgive me: I don't know the RISC-V FPU architecture, but I assume that's the situation you're in: the FPU registers may or may not be in use and using them if they aren't will trap.)In my understanding, RISC-V has not supported lazy-saved FPU yet. Always need to save FPU registers at the beginning of interrupt handler. RISC-V's FPU arch has the flag to permit/forbid using FPU. In Zephyr, this flag is set to forbid side if thread was declared as not using FPU. And CPU raise interrupt when using any FPU instruction at FPU forbidden state. AndyBest Regards, Katsuhiro Suzuki
|
|
Re: Why do_swap() sets cpu.current before context switch?
Katsuhiro Suzuki
Hello,
Thank you for reply. On 2021/09/08 16:22, Yasushi SHOJI wrote: Hi,Currently, No. I'm trying to add a support for CONFIG_USE_SWITCH=y case. Sorry for confusing. Older means CONFIG_USE_SWITCH=n.Newer switching sets NEW thread handle into _current_cpu.current BEFORE calling arch_switch().AFAICS, even with v1.11, we are setting `_current` to `new_thread` in Does not means Zephyr's version. Why do you `use _current_cpu` at all? `_arch_switch()` orBecause to keep consistency for another context switching (by preemption) and other interrupts. Only _current_cpu.current is available when an interrupt occurred. Best,Best Regards, Katsuhiro Suzuki
|
|
Re: Why do_swap() sets cpu.current before context switch?
Yasushi SHOJI
Hi,
On Wed, Sep 8, 2021 at 10:23 AM Katsuhiro Suzuki <katsuhiro@...> wrote: I have question about newer version of context switching (CONFIG_USE_SWITCH=y).Does RISC-V support USE_SWITCH? Newer switching sets NEW thread handle into _current_cpu.current BEFORE calling arch_switch().AFAICS, even with v1.11, we are setting `_current` to `new_thread` in `_Swap()` before calling `_arch_switch()`. What version are you referring to as "older"? Why do you `use _current_cpu` at all? `_arch_switch()` or `arch_switch()` on the main branch takes both new and old thread handles. Best, -- yashi
|
|
Re: Why do_swap() sets cpu.current before context switch?
Andy Ross
Katsuhiro Suzuki wrote:
> Newer switching sets NEW thread handle into _current_cpu.current > BEFORE calling arch_switch(). This implementation will face a > problem in RISC-V environment if thread calls do_swap() explicitly > and switch to thread B (use FPU) from thread A (not use FPU) > because... So... this is the very middle of a context switch. The expectation of the kernel is that no exception/interrupt handlers are going to fire, because (by definition) if they do they will see corrupt/inconsistent thread state. Or rather, if an architecture wants to allow that, it needs to be prepared to do the work. I mean, the information is available to you: you know what the new thread is, because you're handed its switch handle which you created yourself. You likewise know the old thread, because you're passed the address of its switch_handle field from which you can extract a pointer to the enclosing thread struct. You know you're in the middle of a context switch, because arch_switch() was called. You COULD write an FPU exception handler to detect this state and do the right thing. I don't necessarily think this would be a good design, but it's possible. Can you explain why you need to take an FPU exception in the middle of a context switch? That seems a little questionable to me. Why are you hitting lazy-saved FPU registers in a situation where it would be faster to just check the mask state to see if they are populated or not? (Forgive me: I don't know the RISC-V FPU architecture, but I assume that's the situation you're in: the FPU registers may or may not be in use and using them if they aren't will trap.) Andy
|
|
Why do_swap() sets cpu.current before context switch?
Katsuhiro Suzuki
Hello kernel guys,
I have question about newer version of context switching (CONFIG_USE_SWITCH=y). Newer switching sets NEW thread handle into _current_cpu.current BEFORE calling arch_switch(). This implementation will face a problem in RISC-V environment if thread calls do_swap() explicitly and switch to thread B (use FPU) from thread A (not use FPU) because... - If _current_cpu.current has FPU flag, interrupt handler will save all FPU regs to stack - At older switching - _current_cpu.current is pointing thread A (not use FPU) - The handler will skip saving - But at newer switching - _current_cpu.current is thread B (use FPU) - The handler try to save FPU regs using FPU instructions - But we haven't switching thread yet and thread A is prohibited to use FPU - The handler will face illegal instruction exception (and going to hang...) I don't know why newer switching sets thread B into _current_cpu.current such timing. Does anyone know the reason about this implementation? Best Regards, Katsuhiro Suzuki
|
|
Event: Zephyr Project: APIs - 09/07/2021
#cal-reminder
devel@lists.zephyrproject.org Calendar <noreply@...>
Reminder: Zephyr Project: APIs When: Where: Organizer: devel@... An RSVP is requested. Click here to RSVP Description: Meeting decisions/discussions in their respective PRs, tracked here: https://github.com/zephyrproject-rtos/zephyr/projects/18 ________________________________________________________________________________
+1 321-558-6518 United States, Orlando (Toll)
Conference ID: 317 990 129#
Local numbers | Reset PIN | Learn more about Teams | Meeting options
________________________________________________________________________________
|
|
Cancelled Event: Zephyr: Networking Forum - Tuesday, September 7, 2021
#cal-cancelled
devel@lists.zephyrproject.org Calendar <noreply@...>
Cancelled: Zephyr: Networking Forum This event has been cancelled. When: Where: Organizer: tsc@... Description: Live Agenda/Minutes: https://docs.google.com/document/d/1qFsOpvbyLzhflJbbv4Vl__497pKHDoUCy9hjAveyCX0/edit?usp=sharing
Shared Folder: https://drive.google.com/drive/folders/1j6d0FLeOjiMil1Ellb59AsfHdzuWdAAc?usp=sharing ________________________________________________________________________________
+1 321-558-6518 United States, Orlando (Toll)
Conference ID: 458 216 365#
Local numbers | Reset PIN | Learn more about Teams | Meeting options
________________________________________________________________________________
|
|
Event: Zephyr: Networking Forum - 09/07/2021
#cal-reminder
devel@lists.zephyrproject.org Calendar <noreply@...>
Reminder: Zephyr: Networking Forum When: Where: Organizer: tsc@... An RSVP is requested. Click here to RSVP Description: Live Agenda/Minutes: https://docs.google.com/document/d/1qFsOpvbyLzhflJbbv4Vl__497pKHDoUCy9hjAveyCX0/edit?usp=sharing
Shared Folder: https://drive.google.com/drive/folders/1j6d0FLeOjiMil1Ellb59AsfHdzuWdAAc?usp=sharing ________________________________________________________________________________
+1 321-558-6518 United States, Orlando (Toll)
Conference ID: 458 216 365#
Local numbers | Reset PIN | Learn more about Teams | Meeting options
________________________________________________________________________________
|
|
Unknown origin of error
markus.prager@...
Hi everyone
|
|
Networking Forum Agenda
Lubos, Robert
Hi all,
Sorry for the late notice, the are no items in the agenda for Today’s networking forum – please let me know if there is any topic you want to discuss. Otherwise, I’ll cancel the meeting.
Meeting notes: https://docs.google.com/document/d/1qFsOpvbyLzhflJbbv4Vl__497pKHDoUCy9hjAveyCX0
Shared Folder: https://drive.google.com/drive/folders/1j6d0FLeOjiMil1Ellb59AsfHdzuWdAAc?usp=sharing
Regards,
|
|
Need assistance with NRF5340dk regarding LWM2M
Hi, Dev. Team I am trying to get the LWM2M example working on the NRF5340dk. I got it working using QEMU. - I flashed the lwm2m example using "nrf5340dk_nrf5340_cpuapp". - I am not sure which network core to flash to "nrf5340dk_nrf5340_cpunet". Which do you suggest? - When I run a serial terminal on the NRF board it says "<err> net_if: There is no network interface to work with!" I assume this is because I didn't flash a network core onto nrf5340dk_nrf5340_cpunet. - I tried the "Socket Echo Server" example and tried following "https://docs.zephyrproject.org/latest/guides/networking/usbnet_setup.html#" however when I typed "dmesg" from the Linux host, I did not receive "cdc_ether 1-2.7:1.0 eth0: register 'cdc_ether' at usb-0000:00:01.2-2.7, CDC Ethernet Device, 00:00:5e:00:53:01" May you please assist me towards this objective? WIth thanks Brenton
|
|
Re: SDK 0.13.0 Release
Stephanos Ioannidis
Hi Roberto,
toggle quoted messageShow quoted text
As per the discussion in the Toolchain WG meeting today, I have created an issue about this: https://github.com/zephyrproject-rtos/sdk-ng/issues/395 Please comment on the linked issue if you have any further suggestions. Stephanos
-----Original Message-----
From: devel@... <devel@...> On Behalf Of Roberto Bagnara via lists.zephyrproject.org Sent: Friday, September 3, 2021 11:18 PM To: devel@... Subject: Re: [Zephyr-devel] SDK 0.13.0 Release On 04/08/21 01:15, Kumar Gala wrote: Hi,Hi there. Would it make sense to add documentation to the SDK installers? I mean, given the reference to gcc 10.3 in the announcement, I know where to find GCC documentation for it, but what about binutils, the standard libraries and the other stuff included. Surely applicable documentation can be found, but the manual process of finding the right documentation is cumbersome and error prone. What do you think? Roberto
|
|
API meeting: agenda
Carles Cufi
Hi all,
Agenda for tomorrow: - Bluetooth: Switch to inclusive naming terms - Issue: https://github.com/zephyrproject-rtos/zephyr/issues/38348 - Pinctrl: Side-by-side comparison of two (similar) approaches proposed - PR #1: https://github.com/zephyrproject-rtos/zephyr/pull/37572 - PR #2: https://github.com/zephyrproject-rtos/zephyr/pull/37621 - Discussion, specifically Devicetree layout format: https://github.com/zephyrproject-rtos/zephyr/discussions/35077#discussioncomment-1201394 If you have additional items please let me know. Teams link: https://teams.microsoft.com/l/meetup-join/19%3ameeting_NWU2MjZlYWEtZDcwMi00MWQzLTgwMjEtNDdkYjQwMjBjMmFj%40thread.v2/0?context=%7b%22Tid%22%3a%22af0096d9-700c-411a-b795-b3dd7122bad2%22%2c%22Oid%22%3a%22841a7c92-7816-4faf-9887-5e334e88f6d8%22%7d https://lists.zephyrproject.org/g/devel/calendar https://github.com/zephyrproject-rtos/zephyr/projects/18 Minutes: https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit Regards, Carles
|
|
Now: Zephyr: Toolchain Working Group - 09/06/2021
#cal-notice
devel@lists.zephyrproject.org Calendar <noreply@...>
Zephyr: Toolchain Working Group When: Where: Organizer: Torsten Rasmussen Description: Live meeting minutes: https://docs.google.com/document/d/1IQKBK-GcJNZG0O9QArqYfvb6Huk5xHscN-XIGEZr-z8/edit#heading=h.x36xe8bnwr9r
________________________________________________________________________________
+1 321-558-6518 United States, Orlando (Toll)
Conference ID: 682 738 030#
Local numbers | Reset PIN | Learn more about Teams | Meeting options
|
|
Event: Zephyr: Toolchain Working Group - 09/06/2021
#cal-reminder
devel@lists.zephyrproject.org Calendar <noreply@...>
Reminder: Zephyr: Toolchain Working Group When: Where: Organizer: Torsten Rasmussen An RSVP is requested. Click here to RSVP Description: Live meeting minutes: https://docs.google.com/document/d/1IQKBK-GcJNZG0O9QArqYfvb6Huk5xHscN-XIGEZr-z8/edit#heading=h.x36xe8bnwr9r
________________________________________________________________________________
+1 321-558-6518 United States, Orlando (Toll)
Conference ID: 682 738 030#
Local numbers | Reset PIN | Learn more about Teams | Meeting options
|
|
Re: Zephyr 2.7.0-rc1
Marc Reilly
Hi All On Sat, 4 Sept 2021 at 06:34, Christopher Friedt <chrisfriedt@...> wrote: Hi all, Damn, I just made a pull request for a new spi bitbang driver (https://github.com/zephyrproject-rtos/zephyr/pull/38313/), is it too late for that to be included? Regardless, a big thanks to all those who make this project possible! Cheers Marc
|
|
Zephyr 2.7.0-rc1
Christopher Friedt
Hi all,
We are pleased to announce Zephyr 2.7.0-rc1 \o/ This marks the beginning of the stabilization period leading up to our scheduled release date of 2021-10-15. During the stabilization period, only PRs for bug-fixes, documentation, and test cases will be accepted. Any additional features must obtain TSC approval. This will be Zephyr's second LTS release. As such, we anticipate the coming weeks to be very busy reducing overall bug count. Please give this RC a test drive and report any issues on supported platforms (with a PR if possible). The full ChangeLog.txt for v2.7.0-rc1 was far too large to list on GitHub's release page, so this time it is available as an attachment at the link below: https://github.com/zephyrproject-rtos/zephyr/releases/tag/v2.7.0-rc1 Thank you to all who contributed to this release! C
|
|
Out of Tree board support on TF-M
Li, Jun R
Hi, I’m working to enable TF-M on a custom board based on nRF53 SoC. After checking the current TF-M module, it looks like that the boards that TF-M supports have been hardcoded in the Kconfig. I’m wondering how I can add a new board support for TF-M without changing TF-M’s module code? Does the current TF-M support Out-Of-Tree boards?
Thank you!
Jun Li Intel Corporation
|
|