-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
lib/libc: Enable picolibc on qemu_x86_tiny #54186
Merged
fabiobaltieri
merged 6 commits into
zephyrproject-rtos:main
from
keith-packard:picolibc-qemu-86-tiny
Jan 30, 2023
Merged
lib/libc: Enable picolibc on qemu_x86_tiny #54186
fabiobaltieri
merged 6 commits into
zephyrproject-rtos:main
from
keith-packard:picolibc-qemu-86-tiny
Jan 30, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keith-packard
requested review from
dcpleung,
andyross,
nashif and
aasthagr
as code owners
January 27, 2023 23:24
zephyrbot
added
area: Userspace
Userspace
area: X86
x86 Architecture (32-bit)
platform: X86
x86 and x86-64
area: C Library
C Standard Library
labels
Jan 27, 2023
zephyrbot
requested review from
ceolin,
cfriedt,
jhedberg,
laurenmurphyx64,
MaureenHelm,
stephanosio and
tbursztyka
January 27, 2023 23:25
This was referenced Jan 28, 2023
Use the existing bits for newlib to make sure the picolibc files are also placed in pinned memory. Signed-off-by: Keith Packard <[email protected]>
When there's no malloc heap needed for picolibc, don't reserve the page frames that would be needed. This makes sure the kernel.demand_paging tests provoke the page faults as expected. Signed-off-by: Keith Packard <[email protected]>
Add another clause in the test_ram_perms code to verify that any pinned regions have the correct flags. Signed-off-by: Keith Packard <[email protected]>
These tests don't need any libc heap and currently fail when one is available. Signed-off-by: Keith Packard <[email protected]>
This test has trouble on qemu_x86_tiny and randomly generates a Double Fault error. I couldn't get it to reliably run with picolibc as a Double Fault usually occured before the test completed. I spent a couple of hours attempting to track this down and found that it happens when code pages for the main thread get unmapped because the qemu_x86_tiny intentionally offers very few available PTEs. Work around this by just using the minimal libc for this test. Signed-off-by: Keith Packard <[email protected]>
With all of the test suite issues on this board fixed, qemu_x86_tiny should now be usable with picolibc. Signed-off-by: Keith Packard <[email protected]>
keith-packard
force-pushed
the
picolibc-qemu-86-tiny
branch
from
January 28, 2023 03:40
1798bbd
to
efba9f3
Compare
dcpleung
approved these changes
Jan 30, 2023
jhedberg
approved these changes
Jan 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: C Library
C Standard Library
area: picolibc
Picolibc C Standard Library
area: Userspace
Userspace
area: X86
x86 Architecture (32-bit)
platform: X86
x86 and x86-64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This series resolves the small number of failures when running the test suite using picolibc by default. All of them are pretty straightforward except for the change to the
kernel.memory_protection
test -- that test generates double fault errors on this board during nearly every run, even with the minimal C library, although in that case the error usually occurs after the test completes, during the cleanup code. I spent some quality time digging into it and it looks like whatever memory protection changes are made cause troubles when faulting in text pages for the main thread. I'm afraid I gave up attempting to find the actual problem and just switched to forcing that test to use the minimal C library.Fixes #54148