Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPC Mailbox, RemoteProc, RPMsg and rpmsg-net support #4

Draft
wants to merge 116 commits into
base: bl808/all
Choose a base branch
from

Conversation

Fishwaldo
Copy link
Member

This is the update mailbox code, remoteproc and rpmsg drivers and a rpmsg-net based driver for linux.

xhackerustc and others added 30 commits January 8, 2023 02:28
Add bindings doc for Bouffalolab UART Driver

Signed-off-by: Jisheng Zhang <[email protected]>
Add the driver for Bouffalolab UART IP which is found in Bouffalolab
SoCs such as bl808.

UART driver probe will create path named "/dev/ttySx".

Signed-off-by: Jisheng Zhang <[email protected]>
I want to maintain this Bouffalolab uart driver from now on.

Signed-off-by: Jisheng Zhang <[email protected]>
The Bouffalolab bl808 SoC contains three riscv CPUs, namely M0, D0 and
LP. The D0 is 64bit RISC-V GC compatible, so can run linux.

Signed-off-by: Jisheng Zhang <[email protected]>
Add a baisc dtsi for the bouffalolab bl808 SoC.

Signed-off-by: Jisheng Zhang <[email protected]>
Sipeed manufactures a M1S system-on-module and dock board, add basic
support for them.

Signed-off-by: Jisheng Zhang <[email protected]>
I want to maintain this Bouffalolab riscv SoC entry from now on.

Signed-off-by: Jisheng Zhang <[email protected]>
Add support for BL808 UART2 and multiple IRQ forwards
Write protect polarity is confirmed backwards, the other quirks
may not be needed.
Switch everything to use an SD card based rootfs
ehci controller registers are at address 0x20072000 not 0x20072010
bl808 does not follow the EHCI spec, rearrange the registers
to match what they actually implemented
Fishwaldo and others added 23 commits March 5, 2023 15:12
-call devm_free_irq() in shutdown to release ISR registered in
 startup.
-change many functions to take driver private bflb_uart_port *
 instead of serial_core uart_port *
-add to_bflb_uart_port() to assist with above
-switch to using uart_port_tx_limited() serial_core helper
 which is the preferred way to do transmission instead of
 accessing serial_core xmit buffer directly
Remove quirks that were added during bringup but are not required.
This will enable DMA and ADMA on sdcard.
bl808 does not follow the EHCI spec, rearrange the registers
to match what they actually implemented
Add MODER RGMII bit to configure MII/RGMII PHY interface.
Add TX_BD_EOF End of Frame interrupt status bit.

These were taken from smaeul's u-boot:
u-boot/u-boot@d19d786
The bl808 EMAC INT_MASK register has reversed polarity, so flip
all the bits in it everwhere it is used.
PHY communication was not stable at 2.5MHz, so reduce down to 1MHz.
* Change cells to 3
* remove unused mailboxes for SDHCI and UART
* Only supports attaching to M0 core atm.
* increase MTU size for RPMSG data to 2032 (buffer size is 2048 minus 16 bytes for vring headers). This allows us to transmit faster and especially important for the next patch where we introduce a rpmsg-net (ethernet over rpmsg) driver and don't want to  fragment packets down to ~490 bytes)
* regardless of source address, we need to announce new rpmsg devices back to M0 for enumeration.
* rpmsg-tty device should rettry if there are no buffers available, as the M0 can be slower in processing vrings, causing frequent -ENOMEM errors on the linux side.

(this patch is debatable if it should upstream)
* found on the Net. It works but needs some TLC
@Fishwaldo Fishwaldo marked this pull request as ready for review March 19, 2023 10:06
@Fishwaldo Fishwaldo marked this pull request as draft March 19, 2023 10:23
Hunter1753 referenced this pull request in Hunter1753/linux Mar 21, 2023
Jakub Sitnicki says:

====================

This patch set addresses the syzbot report in [1].

Patch #1 has been suggested by Eric [2]. I extended it to cover the rest of
sock_map proto callbacks. Otherwise we would still overflow the stack.

Patch #2 contains the actual fix and bug analysis.
Patches #3 & #4 add coverage to selftests to trigger the bug.

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/CANn89iK2UN1FmdUcH12fv_xiZkv2G+Nskvmq7fG6aA_6VKRf6g@mail.gmail.com/
---
v1 -> v2:
v1: https://lore.kernel.org/r/[email protected]
[v1 didn't hit bpf@ ML by mistake]

 * pull in Eric's patch to protect against recursion loop bugs (Eric)
 * add a macro helper to check if pointer is inside a memory range (Eric)
====================

Signed-off-by: Alexei Starovoitov <[email protected]>
@alexhorner alexhorner force-pushed the bl808/all branch 4 times, most recently from a235ef5 to ce94420 Compare May 22, 2023 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants