-
Notifications
You must be signed in to change notification settings - Fork 13
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
Earlycon fails to initialize on arcv2 properly if uncached region is below default 0xc0000000 #70
Comments
Hi @iguryanov , We definitely can configure peripheral space before earlycon initialization, no problem here. Point is that this configuration is not officially supported, see HS4x databook D.2.3.5 Total Size of External Memory Supported:
This change will require some work to make sure that kernel space does not cross this new bigger peripheral space and it can take some time to make such change. |
Hi @VVIsaev, that quote is reflecting Linux kernel implementation existed long time ago. Vineet and I worked on that section to help customers configure ARC core in Architect in some suitable way for the kernel - make sure needed extensions present, most efficient options used, etc. So customer just ignored that piece... We also wrote that for HS3x - at that time hardware did not support Limit and other new fields in AUX_VOLATILE. I agree that customer did not see or ignored that section. About kernel space crossing peripherals - that still might happen later with current implementation if it does not happen safety checks later. (read_decode_cache_bcr_arcv2() definitely does not care, I did not look into other places). Regards, |
The workaround looks good to me. I don't want to make such change because current implementation matches databook. With this change more customers will think that this configuration is supported, which is not true. So if it is OK for customer to apply the patch, lets do this. If you think it is useful for other customers to move peripheral space below 0xc000_0000, we can add support for this. I'll add border checks and do some testing to make sure it doesn't break anything. |
Databook says it for historical reasons (best reasonable performance) - we just did such implementation long time ago to make sure kernel has enough space. This is not hardware limitation - we (kernel developers) just imposed it on users long time ago |
Hi,
I've got a complaint about missing boot output (at least with 5.10.80 version).
System has UART mapped 0xac002000, and "earlycon=uart8250,mmio32,0xac002000,115200n" boot args don't help.
default perip_base is set to ARC_UNCACHED_ADDR_SPACE, i.e. 0xc0000000
That value is updated to actual value from BCR quite late in setup_arch() -> setup_processor() -> read_arc_build_cfg_regs() -> read_decode_cache_bcr() -> read_decode_cache_bcr_arcv2() .
The problem is that early_con() is configured before that step. earlycon_map() fails and returns 0.
I guess this happens because earlycon_map() -> ioremap() -> arc_unacched_addr_space() returns NULL (requested address is below default perip_base) and slab_is_available() there returns error as well because MMU is not initialized yet.
Would it make sense to call read_arc_build_cfg_regs() before configuring earlycon?
Regards,
Igor.
The text was updated successfully, but these errors were encountered: