-
Notifications
You must be signed in to change notification settings - Fork 47
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
User-mode console support #551
Merged
Merged
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
joergroedel
force-pushed
the
user-console
branch
6 times, most recently
from
December 11, 2024 11:47
8e9203f
to
2451ac6
Compare
The file-system syscalls PR is getting closer to being merged, so review on this can be started. |
joergroedel
force-pushed
the
user-console
branch
from
December 11, 2024 14:13
2451ac6
to
a6bb3d7
Compare
Implement the console_write() function which will take a u8 slice and write it to the console. This will be used to allow user-space code to write to the console. Signed-off-by: Joerg Roedel <[email protected]>
Define a setup function which is only called for user tasks. Signed-off-by: Joerg Roedel <[email protected]>
joergroedel
force-pushed
the
user-console
branch
from
December 11, 2024 17:55
a6bb3d7
to
17961d6
Compare
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.
Just a few nits but the changes look good to me.
Tested this PR with our internal TDP branch and can successfully launch the dm
.
Add a method to struct Task to add an object with a defined handle. Signed-off-by: Joerg Roedel <[email protected]>
Add a string to struct Task representing the name of the task. Signed-off-by: Joerg Roedel <[email protected]>
Use the file name of the binary as the name of the task. Signed-off-by: Joerg Roedel <[email protected]>
Add a file type for writing to the console. This will be wired up to user-space to allow modules to write messages to the console. Signed-off-by: Joerg Roedel <[email protected]>
Implement a function to open a console and return a file handle. Signed-off-by: Joerg Roedel <[email protected]>
Attach a handle to a console file to every user task, so that they can write to the console. Signed-off-by: Joerg Roedel <[email protected]>
Create a static FSObjHandle which is used to write to the console and a function to perform the writes. Signed-off-by: Joerg Roedel <[email protected]>
Add a simple SpinLock implementation to the user library to protect access to global state. At some point this needs to be replaces with a non-busy waiting locking implementation. Signed-off-by: Joerg Roedel <[email protected]>
Implement console access and provide the the print! and println! macros. Use the new macros to print a message in the panic handler. Signed-off-by: Joerg Roedel <[email protected]>
Use the console support to print a startup message from the init process. Signed-off-by: Joerg Roedel <[email protected]>
joergroedel
force-pushed
the
user-console
branch
from
December 13, 2024 11:10
17961d6
to
f7f8bf1
Compare
vijaydhanraj
approved these changes
Dec 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR implements console output support for user-mode processes. In user-mode code the
print!
andprintln!
macros can now be used to print messages to the SVSM console.It depends on PRs #539 and #548 and is here for testing and initial review.
I will keep it in draft state until the dependencies have been merged.