-
Notifications
You must be signed in to change notification settings - Fork 114
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
JH7110_VisionFive2_devel: jh7110.dtsi has wrong U-Boot fwenv data pointer #81
Comments
Just linking the related discussion here: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 |
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
Works perfectly. @electrorys would you mind to open a pull request for this change? At the moment there seems to be no activity regarding reviewing and merging pull requests, probably they are concentrating on mainline integration. However, it cannot hurt. I'd keep it the minimal correction for now. While it makes generally sense IMO to add all addresses, I'd leave the environment at mtd2 (even that it does not match its logical location after SPL but before U-Boot image), so current guides/instructions floating around and possible existing configs don't get broken. |
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
Hi, Meh it really took me two days of RTFM to learn how to make my first PR ever. You know, I don't have good |
😄, hopefully you and/or the open source community will benefit from this learning curve. As said
i.e. the typo correction only, to maximise the chance that it gets merged soon. Then adding the additional areas in a second PR, as this is a matter of discussion, especially when device names change and hence currently published instructions about how to update the bootloader break. |
Thanks, I hope aswell 💯 |
Just to avoid misunderstanding, I'm not related in any way with StarFive. I just saw your issue here, the related discussion on the rvspace forum, tested So I am not doing anything with this PR, but StarFive are the ones who have to decide whether/what to do with it. I'm not sure how much efforts StarFive put into reviewing and in case adjusting PRs, so my suggestion to keep it minimal was to eliminate any points which may require discussion and any needs to edit the PR, hence minimising required efforts to merge it and maximising the chance that it will be merged 😉. |
Got it, indeed I was falsely impressed that you're affiliated with them.
26 марта 2023 г. 15:55:28 UTC, MichaIng ***@***.***> пишет:
…> Now you can do whatever you want with it
Just to avoid misunderstanding, I'm not related in any way with StarFive. I just saw your issue here, the related discussion on the rvspace forum, tested ***@***.***` => ***@***.***` and can verify it is working and without doubt a mandatory bug fix.
So I am not doing anything with this PR, but StarFive are the ones who have to decide whether/what to do with it.
I'm not sure how much efforts StarFive put into reviewing and in case adjusting PRs, so my suggestion to keep it minimal was to eliminate any points which may require discussion and any needs to edit the PR, hence minimising required efforts to merge it and maximising the chance that it will be merged 😉.
--
Reply to this email directly or view it on GitHub:
#81 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
We can see that "Short form of movsx, dst_reg = (s8,s16,s32)src_reg" in include/linux/filter.h, additionally, for BPF_ALU64 the value of the destination register is unchanged whereas for BPF_ALU the upper 32 bits of the destination register are zeroed, so it should clear the upper 32 bits for BPF_ALU. [root@linux fedora]# echo 1 > /proc/sys/net/core/bpf_jit_enable [root@linux fedora]# modprobe test_bpf Before: test_bpf: #81 ALU_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) test_bpf: #82 ALU_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times) After: test_bpf: #81 ALU_MOVSX | BPF_B jited:1 6 PASS test_bpf: #82 ALU_MOVSX | BPF_H jited:1 6 PASS By the way, the bpf selftest case "./test_progs -t verifier_movsx" can also be fixed with this patch. Fixes: f48012f ("LoongArch: BPF: Support sign-extension mov instructions") Acked-by: Hengqi Chen <[email protected]> Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
[ Upstream commit fe879bb ] Current 'bpftool link' command does not show pids, e.g., $ tools/build/bpftool/bpftool link ... 4: tracing prog 23 prog_type lsm attach_type lsm_mac target_obj_id 1 target_btf_id 31320 Hack the following change to enable normal libbpf debug output, # --- a/tools/bpf/bpftool/pids.c # +++ b/tools/bpf/bpftool/pids.c # @@ -121,9 +121,9 @@ int build_obj_refs_table(struct hashmap **map, enum bpf_obj_type type) # /* we don't want output polluted with libbpf errors if bpf_iter is not # * supported # */ # - default_print = libbpf_set_print(libbpf_print_none); # + /* default_print = libbpf_set_print(libbpf_print_none); */ # err = pid_iter_bpf__load(skel); # - libbpf_set_print(default_print); # + /* libbpf_set_print(default_print); */ Rerun the above bpftool command: $ tools/build/bpftool/bpftool link libbpf: prog 'iter': BPF program load failed: Permission denied libbpf: prog 'iter': -- BEGIN PROG LOAD LOG -- 0: R1=ctx() R10=fp0 ; struct task_struct *task = ctx->task; @ pid_iter.bpf.c:69 0: (79) r6 = *(u64 *)(r1 +8) ; R1=ctx() R6_w=ptr_or_null_task_struct(id=1) ; struct file *file = ctx->file; @ pid_iter.bpf.c:68 ... ; struct bpf_link *link = (struct bpf_link *) file->private_data; @ pid_iter.bpf.c:103 80: (79) r3 = *(u64 *)(r8 +432) ; R3_w=scalar() R8=ptr_file() ; if (link->type == bpf_core_enum_value(enum bpf_link_type___local, @ pid_iter.bpf.c:105 81: (61) r1 = *(u32 *)(r3 +12) R3 invalid mem access 'scalar' processed 39 insns (limit 1000000) max_states_per_insn 0 total_states 3 peak_states 3 mark_read 2 -- END PROG LOAD LOG -- libbpf: prog 'iter': failed to load: -13 ... The 'file->private_data' returns a 'void' type and this caused subsequent 'link->type' (insn starfive-tech#81) failed in verification. To fix the issue, restore the previous BPF_CORE_READ so old kernels can also work. With this patch, the 'bpftool link' runs successfully with 'pids'. $ tools/build/bpftool/bpftool link ... 4: tracing prog 23 prog_type lsm attach_type lsm_mac target_obj_id 1 target_btf_id 31320 pids systemd(1) Fixes: 44ba7b3 ("bpftool: Use a local copy of BPF_LINK_TYPE_PERF_EVENT in pid_iter.bpf.c") Signed-off-by: Yonghong Song <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Tested-by: Quentin Monnet <[email protected]> Reviewed-by: Quentin Monnet <[email protected]> Link: https://lore.kernel.org/bpf/[email protected] Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit fe879bb ] Current 'bpftool link' command does not show pids, e.g., $ tools/build/bpftool/bpftool link ... 4: tracing prog 23 prog_type lsm attach_type lsm_mac target_obj_id 1 target_btf_id 31320 Hack the following change to enable normal libbpf debug output, # --- a/tools/bpf/bpftool/pids.c # +++ b/tools/bpf/bpftool/pids.c # @@ -121,9 +121,9 @@ int build_obj_refs_table(struct hashmap **map, enum bpf_obj_type type) # /* we don't want output polluted with libbpf errors if bpf_iter is not # * supported # */ # - default_print = libbpf_set_print(libbpf_print_none); # + /* default_print = libbpf_set_print(libbpf_print_none); */ # err = pid_iter_bpf__load(skel); # - libbpf_set_print(default_print); # + /* libbpf_set_print(default_print); */ Rerun the above bpftool command: $ tools/build/bpftool/bpftool link libbpf: prog 'iter': BPF program load failed: Permission denied libbpf: prog 'iter': -- BEGIN PROG LOAD LOG -- 0: R1=ctx() R10=fp0 ; struct task_struct *task = ctx->task; @ pid_iter.bpf.c:69 0: (79) r6 = *(u64 *)(r1 +8) ; R1=ctx() R6_w=ptr_or_null_task_struct(id=1) ; struct file *file = ctx->file; @ pid_iter.bpf.c:68 ... ; struct bpf_link *link = (struct bpf_link *) file->private_data; @ pid_iter.bpf.c:103 80: (79) r3 = *(u64 *)(r8 +432) ; R3_w=scalar() R8=ptr_file() ; if (link->type == bpf_core_enum_value(enum bpf_link_type___local, @ pid_iter.bpf.c:105 81: (61) r1 = *(u32 *)(r3 +12) R3 invalid mem access 'scalar' processed 39 insns (limit 1000000) max_states_per_insn 0 total_states 3 peak_states 3 mark_read 2 -- END PROG LOAD LOG -- libbpf: prog 'iter': failed to load: -13 ... The 'file->private_data' returns a 'void' type and this caused subsequent 'link->type' (insn starfive-tech#81) failed in verification. To fix the issue, restore the previous BPF_CORE_READ so old kernels can also work. With this patch, the 'bpftool link' runs successfully with 'pids'. $ tools/build/bpftool/bpftool link ... 4: tracing prog 23 prog_type lsm attach_type lsm_mac target_obj_id 1 target_btf_id 31320 pids systemd(1) Fixes: 44ba7b3 ("bpftool: Use a local copy of BPF_LINK_TYPE_PERF_EVENT in pid_iter.bpf.c") Signed-off-by: Yonghong Song <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Tested-by: Quentin Monnet <[email protected]> Reviewed-by: Quentin Monnet <[email protected]> Link: https://lore.kernel.org/bpf/[email protected] Signed-off-by: Sasha Levin <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
zswap is currently not built, probably due to missing dependency in kernel config. /dev/mtd2 pointed to a wrong SPI storage address: https://forum.rvspace.org/t/emmc-boot-though-spi-flash/1320 starfive-tech#81 Signed-off-by: MichaIng <[email protected]>
At https://doc-en.rvspace.org/VisionFive2/Boot_UG/JH7110_SDK/boot_address_allocation.html
I find that in 16M QSPI, I can reach U-Boot fw env block by reading from
Now,
linux/arch/riscv/boot/dts/starfive/jh7110.dtsi
Line 374 in 4639179
0
. It shall be defined as:With this,
fw_printenv
from Linux succeeds, I can see/edit U-Boot config.My proposal would also be to define whole QSPI flash:
Especially with flashall, I can read/write whole QSPI if desired.
Please review this. Thank you.
The text was updated successfully, but these errors were encountered: