zhangyangysu and yang.zhang
7e7237d644
Fix stack corruption in rt_sdhci_init_host() ( #11542 )
...
* lwp: fix pid leak on exec failure before task startup
When msh tries to execute a non-ELF path, lwp_execve() may allocate a PID
before lwp_load() fails. The old error path only dropped the LWP reference,
leaving the PID tree entry pointing to a freed LWP.
In an init-less boot flow, this can poison pid 1 after a failed command from
msh. A later LWP launch may then treat the stale pid 1 entry as a valid parent
LWP, resulting in invalid pgrp/session state and a job-control assertion during
process exit.
Add lwp_pid_rollback() for exec/spawn failures before the process becomes
runnable. Unlike lwp_pid_put(), it always releases the PID lock and does not
enter the "no more pid allocation" state when the PID tree becomes empty.
Use the rollback helper in lwp_execve() failure paths after PID allocation.
Signed-off-by: zhangyang <gaoshanliukou@163.com >
* [drivers][sdio] avoid SDHCI device name stack overflow
rt_sdhci_init_host() allocated a fixed 32-byte buffer for device-derived object names, but sdio_host_set_name() may copy up to RT_NAME_MAX bytes into the output buffer. When RT_NAME_MAX is larger than 32, this can overwrite the stack and corrupt nearby locals.
Size the temporary name buffer with RT_NAME_MAX, force it to be NUL-terminated, and derive the append offset from the actual string length. Also replace the suffix rt_sprintf() calls with bounded rt_snprintf() so timer and workqueue suffixes cannot overflow the buffer when the base name is already close to RT_NAME_MAX.
Signed-off-by: zhangyangysu <zhangyangysu0928@gmail.com >
---------
Signed-off-by: zhangyang <gaoshanliukou@163.com >
Signed-off-by: zhangyangysu <zhangyangysu0928@gmail.com >
Co-authored-by: yang.zhang <zhangyang01@kylinos.cn >
2026-11-02 11:24:11 +08:00
zhangyuyang
5d1aee9b32
[components][sdio] Fix CIS tuple memory leak
2026-09-21 10:12:51 +08:00
zhangyuyang
c2f5a28321
[components][sdio] fix possible memory leak of sdio driver unregistration
2026-09-21 09:34:06 +08:00
CYFS
280bcfeec3
[device][mmcsd] Fix Arm Compiler 5 build compatibility #11690
2026-09-07 11:18:41 +08:00
GUI
4cf70e176c
[dm][sdio] Update for SDHCI- #11684 #11684
2026-08-14 12:39:11 +08:00
Damon
88c1e6c88a
sdio: fix missing card status polling after CMD6 in eMMC DDR mode switch
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
doc_doxygen / doxygen_doc generate (push) Has been cancelled
manual_trigger_update_all / update and create pull request (push) Has been cancelled
manual_trigger_scons_build_all / ${{ github.event.inputs.bsp_options }} (push) Has been cancelled
ToolsCI / Tools (push) Has been cancelled
doc_doxygen / deploy (push) Has been cancelled
Weekly CI Scheduler / Trigger and Monitor CIs (push) Has been cancelled
Weekly CI Scheduler / Create Discussion Report (push) Has been cancelled
2026-02-01 14:02:10 +08:00
GUI
c6498b5f65
[sdio][dm] update for DM ( #11078 )
...
* [sdio][dm] import Kconfig for DM
Signed-off-by: GuEe-GUI <2991707448@qq.com >
* [sdio] fixup IRQ and mmcsd threads' stack size default
Signed-off-by: GuEe-GUI <2991707448@qq.com >
* [sdio][dm] Support DM mode
1. Support features read by DM.
2. Support regulator API in drivers.
3. Support send tuning option CMD.
4. Replace `switch_uhs_voltage` by `signal_voltage_switch`.
Signed-off-by: GuEe-GUI <2991707448@qq.com >
* [dm][sdhci] Cleanup the SDHCI
Signed-off-by: GuEe-GUI <2991707448@qq.com >
* [sdio][dm] add new SDIO/SDHCI drivers
1. SDHCI support on PCI bus
2. Synopsys DesignWare MMC Family(MMIO/PCI)
Signed-off-by: GuEe-GUI <2991707448@qq.com >
---------
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2025-12-26 21:04:42 +08:00
Fan Yang
d6b173be4b
fix:[components][drivers][sdio] fix the sequence of switching to emmc high-speed ddr mode #11037
RT-Thread BSP Static Build Check / 🔍 Summary of Git Diff Changes (push) Has been cancelled
RT-Thread BSP Static Build Check / ${{ matrix.legs.RTT_BSP }} (push) Has been cancelled
RT-Thread BSP Static Build Check / collect-artifacts (push) Has been cancelled
pkgs_test / change (push) Has been cancelled
utest_auto_run / A9 :components/dfs.cfg (push) Has been cancelled
utest_auto_run / A9 :components/lwip.cfg (push) Has been cancelled
utest_auto_run / A9 :components/netdev.cfg (push) Has been cancelled
utest_auto_run / A9 :components/sal.cfg (push) Has been cancelled
utest_auto_run / A9 :cpp11/cpp11.cfg (push) Has been cancelled
utest_auto_run / AARCH64-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / A9-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / XUANTIE-rtsmart :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64 :default.cfg (push) Has been cancelled
utest_auto_run / AARCH64-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :default.cfg (push) Has been cancelled
utest_auto_run / A9-smp :default.cfg (push) Has been cancelled
utest_auto_run / RISCV :default.cfg (push) Has been cancelled
utest_auto_run / RISCV-smp :default.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / RISCV :kernel/atomic_c11.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/ipc.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/kernel_basic.cfg (push) Has been cancelled
utest_auto_run / A9 :kernel/mem.cfg (push) Has been cancelled
Weekly CI Scheduler / Trigger and Monitor CIs (push) Has been cancelled
Weekly CI Scheduler / Create Discussion Report (push) Has been cancelled
2025-12-11 19:25:29 +08:00
yixinghua121
983f02151a
修复 MMCSD 宏拼写错误+内核开启LOG_D编译问题
2025-03-12 16:02:43 +08:00
zhujiale
2d78d8cad1
[dm2.0] add general sdhci driver it support pio&&sdma
2024-12-22 19:35:34 +08:00
GuEe-GUI
33785ca68a
[DEVICE/SDIO] port to the block
...
1. remove gpt.
2. remove block device custom.
Signed-off-by: GuEe-GUI <2991707448@qq.com >
2024-11-20 16:11:10 +08:00
CXSforHPU
bb91502465
[drivers] Specifies the name of the drivers driver file
...
https://github.com/RT-Thread/rt-thread/pull/9420
2024-09-13 17:40:40 -04:00
Fan YANG
55c33d9ce2
[components][drivers][sdio][sd] Fix wrong max data rate calculation logic
...
- corrected the default value for max_data_rate variable
Signed-off-by: Fan YANG <fan.yang@hpmicro.com >
2024-08-12 16:23:17 +08:00
Evlers
755cde372c
fix a bug that read members in non-existent functions
2024-07-05 10:51:17 +08:00
Evlers
7d7993f940
fix an issue where repeated remove of card resulted in assertions
2024-07-05 10:51:17 +08:00
sp-cai
f1832fea24
[components] [drivers ] [Kconfig] 整理 components/drivers 的 Kconfig ( #9054 )
...
整理 components/drivers 的 Kconfig
2024-06-16 15:43:27 +08:00
zhuzhuzhu
2866da37a0
[fix] 修复ART-PI smart在sd/emmc读取不到分区的问题 ( #9058 )
...
Update sd.c
2024-06-13 17:06:46 +08:00
zhuzhuzhu
1b4b338ed1
【修复】修复ART-PI samrt上读取不到emmc/sd分区问题 ( #9051 )
...
Update sd.c
2024-06-12 18:14:48 +08:00
Fan YANG
2cc2743fc7
[components][drivers][sd] add uhs-i mode support to sd driver
...
- added SDR50, SDR104 and DDR50 support to SD driver
Signed-off-by: Fan YANG <fan.yang@hpmicro.com >
2024-05-27 11:27:03 +08:00
Fan YANG
1a1514640a
[components][drivers][mmc] add HS400 support to mmc driver
...
- added HS400 supprt (both eMMC5.0 and eMMC5.1 flavor are supported)
Signed-off-by: Fan YANG <fan.yang@hpmicro.com >
2024-05-26 12:36:02 +08:00
yangpeng
25d3136d02
fix MDK AC5 build warnings
2024-02-03 21:43:08 -05:00
xiao-mang
48f53e9150
add blockdev's flush fops for opening file with O_SYNC ( #8232 )
2023-11-10 17:50:20 +08:00
geniusgogo
d55066e10d
cleanup: fix building warnings
2023-08-23 22:58:25 -04:00
geniusgogo
4d20416b2f
update components & lwp. ( #7888 )
2023-08-07 12:22:14 -04:00
Fan Yang
e5c8dd3b05
[components][drivers][sdio] Fix minor issue in sdio driver ( #7904 )
...
Signed-off-by: Fan YANG <fan.yang@hpmicro.com >
2023-08-03 17:10:34 +08:00
heyuanjie87
a98b11747f
[sdio]开启emmc内部cache加快传输 ( #7896 )
2023-08-01 14:48:50 +08:00
7YZ7
501b22aabe
[HUST CSE] Fix many abnormal symbols in annotations and format code
2023-04-17 22:26:23 -04:00
True-False-debug
dc24388833
Update sd.c
2023-04-11 23:01:03 -04:00
Meco Man
f58d3c5200
rt_device_write/read return data type as rt_ssize_t
...
rt_ssize_t can give negative error code, which follows the unix style correctly
2023-02-07 21:43:57 -05:00
bernard
af143ee3f9
[devicedrivers] fix the partition issue in mmc/sdio
2023-01-23 19:16:28 -05:00
Bernard Xiong
2aa600e01b
[components] fix compiling warning ( #6733 )
2022-12-13 09:44:45 +08:00
ecf2d82159
sync branch rt-smart. ( #6641 )
...
* Synchronize the code of the rt mart branch to the master branch.
* TTY device
* Add lwP code from rt-smart
* Add vnode in DFS, but DFS will be re-write for rt-smart
* There are three libcpu for rt-smart:
* arm/cortex-a, arm/aarch64
* riscv64
Co-authored-by: Rbb666 <zhangbingru@rt-thread.com >
Co-authored-by: zhkag <zhkag@foxmail.com >
2022-12-03 12:07:44 +08:00
xiao xie
1755750b2a
[sdio] remove mmcsd_delay_ms
...
修改SD检测线程函数里面的延时实现,将mmcsd_delay_ms改为rt_thread_mdelay. mmcsd_delay_ms过时且延时计算错误。
2022-11-08 00:34:43 -05:00
xiaoguang_ma
e663d2d870
bugfix: remove sdcard block dev may cause a constant loop.
2022-11-02 15:27:41 +09:00
xiaoguang_ma
80f495de4a
bug fix
...
When detecting all SDIO devices fails, it is also necessary to return information
2022-10-09 14:55:01 +08:00
Tangyuxin and Man, Jianting (Meco)
a4829b1c00
[fix] Fix simulator compilation warnings ( #6438 )
...
* [fix] Fix simulator compilation warnings
* Update bsp/simulator/rtconfig_project.h
Co-authored-by: Man, Jianting (Meco) <920369182@qq.com >
2022-09-20 10:31:11 -04:00
tyx
782b9dd45a
[components][sdio] Support DDR mode
2022-04-06 16:06:46 +08:00
nongxiaoming
cec72c92c7
[components][sdio] fix compile warning and optimized code.
2021-12-31 17:05:42 +08:00
Wayne Lin
9dc4ca0d31
Remove unused comment.
2021-12-24 05:36:12 +08:00
Wayne Lin
28f91a86f5
Correct sem's name of sd block device.
2021-12-24 05:36:12 +08:00
Wayne Lin
f508d58c05
Strip tailing space.
2021-12-24 05:36:12 +08:00
Wayne Lin
bac75e24bd
[SDIO] Create SD block device.
...
1. New naming rule for multiple cards: sdXpY. Ex: sd0, sd0p0, sd0p1, sd1, sd1p0, sd1p1, .... sdXpY.
2. Always create super-node for backward-compatible and fdisk-like utility. EX: sd0, sd1, ..... sdX.
3. Shrink code.
2021-12-24 05:36:12 +08:00
Wayne Lin
600e67f952
Revert to RT_IPC_FLAG_PRIO.
2021-12-24 05:36:12 +08:00
Wayne Lin
7e6ffd3447
Support multi-partition/-card mounting.
2021-12-24 05:36:12 +08:00
Wayne Lin
c84952d9cd
Fix infinite-loop in rt_mmcsd_blk_remove.
...
1. Issue on traveling latest node in list if multi-partitions on card.
2021-12-24 05:36:12 +08:00
Meco Man
df9a23c534
[mutex] use RT_IPC_FLAG_PRIO to replace RT_IPC_FLAG_FIFO
2021-11-17 15:57:15 -05:00
Meco Man
84db60ecfa
[sdio] remove rt_mmcsd_blk_init
2021-08-01 07:31:32 +08:00
@lin12345678
9f9c3a2bb0
修改mmc初始化错误,将card-》csd写成card-》cid
2021-07-09 17:53:07 +08:00
Jianjia Ma
398718f0f9
Update mmc.c
2021-04-13 18:27:53 +01:00
Jianjia Ma
4e74279d27
Add more trys when switching data width
...
Try a few times before switching to other data widths.
The original strategy (simply wait for 20ms ) failed on STM32H743 with an MTFC4GACAJCN-4M (4GB EMMC) when switching data width.
(unless the debugging info is enabled, which add more delays)
With this EMMC, the fixed delay was set to 50ms for it to be able to work.
Instead of a fixed delay, I think we better change to trying a few more times with smaller delays.
2021-04-13 18:04:59 +01:00