Draft
Conversation
phil-opp
reviewed
Apr 29, 2019
| let iomap_addr = (&tss.iomap) as *const _ as usize; | ||
| let iomap_base = (iomap_addr - tss_addr) as u16; | ||
|
|
||
| tss.tss.get_mut().iomap_base = iomap_base; |
There was a problem hiding this comment.
I don't think that this approach works. The iomap_addr points to your local stack frame, which is no longer valid after the function returns.
Member
Author
There was a problem hiding this comment.
It does work, as the iomap base is relative to the TSS start address's. This is why it is iomap_addr - tss_addr. Otherwise yes, it wouldn't work.
There was a problem hiding this comment.
Ah sorry, I confused RefCell and Rc and thought that the tss lived on the heap.
Member
Author
There was a problem hiding this comment.
Oh, I may have forgot to add the size of the TSS. Not sure if that's needed... In testing it has worked though.
…ve -- I think)" This reverts somes lines of commit 3894986
This file contains hidden or 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
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 will add a basic userspace to flower -- just enough to jump into userspace (in code located inside the kernel) and do some things there. It will not add program loading or elf parsing,