-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
arch/x86: make use of z_bss_zero() and z_data_copy() #19456
Comments
Think this was left in because memset()/memcpy() weren't using SSE like the handcrafted assembly does for x86.
AFAIK GCC currently isn't, would be great to remedy this. |
@andrewboie It looks like, at a minimum, the zeroing of the app_shmem stuff in |
@gnuless The code in crt0.S does the XIP copy of the app_smem data into the proper place if XIP is turned on, to copy it out of ROM. I'm assuming you're looking at around line 232 in crt0.S. This could easily use z_data_copy(). IIRC this sits right next to kernel data and the copy could probably be combined. z_app_shmem_bss_zero() is special, it goes through the subsections in the app_smem data section, which is really a set of:
And zeroes just those BSS sub-sections. |
Yep, whoops, I was mistaken there. |
For reasons that are not immediately obvious, the 32-bit x86 code does not use the kernel functions supplied to zero the BSS and initialize other data regions. This should probably be changed.
Note that at the same time, x86-optimized implementations of
memset()
memcpy()
et al. could/should be added to the minimal libc if gcc doesn't supply decent builtin implementations.The text was updated successfully, but these errors were encountered: