-
Notifications
You must be signed in to change notification settings - Fork 69
ufs: ffu: Increase chunk size for ufs ffu #49
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
base: dev
Are you sure you want to change the base?
Conversation
arthur-simchaev-sndk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test your change? I don't think MAX_IOCTL_BUF_SIZE definition is using in ffu.
256KB chuck size is the default value, in case you need another chunk size, use -s option.
Also in case ffu file cannot flashed by any 4k aligned chunk, is UFS spec violation
|
Hi arthur, Yes, I've verify that. It will check chunk size when ffu in options.c method "verify_and_set_ffu_chunk_size". |
|
Hi arthur, Could we need to set default chunk size instead of using MAX_IOCTL_BUF_SIZE? Could we define like "DEFAULT_IOCTL_BUF_SIZE = 256kb" ? Once we need use other chunk size, use options "-s" to set between 4K~512K. |
1. For some specific ufs devices, they need flash entire fw once. So Increase MAX chunk size from 256 KB to 512 KB. 2. Set default chunk size 256KB TEST=ufs-utils ffu -t 0 -p /dev/bsg/0\:0\:0\:0 -w FW.bin
fe7e130 to
b385043
Compare
|
Hi arthur,
Could you kindly help review the patch, thanks?
arthur-simchaev-wdc ***@***.***> 於 2023年10月17日 週二 下午10:19寫道:
… ***@***.**** commented on this pull request.
Did you test your change? I don't think MAX_IOCTL_BUF_SIZE definition is
using in ffu.
256KB chuck size is the default value, in case you need another chunk
size, use -s option.
Also in case ffu file cannot flashed by any 4k aligned chunk, is UFS spec
violation
—
Reply to this email directly, view it on GitHub
<#49 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A4QMIKQZ6DMK4DY2YIC3CF3X72HYTAVCNFSM6AAAAAA6DSN7NWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTMOBSGUYDGOBUGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
Hi UFS FFU uses the following mechanism: Host delivers the microcode using one or more WRITE BUFFER commands through any logical unit which supports the WRITE BUFFER command. The host specifies: MODE = 0Eh, BUFFER OFFSET, which should be aligned to 4 Kbyte, BUFFER ID = 00h, and the PARAMETER LIST LENGTH field indicating the number of bytes to be transferred. All WRITE BUFFER commands should be sent to the same logical unit with task attribute set to simple or ordered. In the sequence of WRITE BUFFER commands used to deliver the microcode, the BUFFER OFFSET values should be in increasing order and it should start from zero. |
|
Hi arthur,
In our case, the device can use one or more WRITE BUFFER commands. But I need use "-s" to set trunk size 512KB under hw restrictions. In my patch, still set 256 KB as default trunk size. For other special cases , we can use "-s" to set trunk size between 4KB ~ 512 KB. Is it possible to increase max trunk size from 256KB to 512KB when using -s parameter under hw restrictions ? Or do you have any suggestions? Many thanks. |
TEST=ufs-utils ffu -t 0 -p /dev/bsg/0:0:0:0 -w FW.bin