-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support for SATA controllers in IDE mode #90
Draft
SamuelYvon
wants to merge
49
commits into
master
Choose a base branch
from
ide-debug
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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
PCI detection of IDE controllers
… tagging that removes the important bits
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.
Introduction
Up until now, Mimosa only supported PATA drives (parallel ATA). This was mostly due to the fact that the driver would only use controllers located at the standardized addresses.
IDE controllers are available on the PCI bus: they can be detected and their configuration can be read from there. This allows us to support IDE controllers that are not located at the standard ports, but also support SATA controllers performing in IDE mode because they are not (in my experience) located at the standard addresses. Of course, the standards addresses are also supported.
SATA controllers worked in IDE compatibility mode before the introduction of AHCI, which we do not support. Most BIOSes will present the option of having the controllers operate in IDE mode, as it is a standard feature of these devices.
The C kernel will be able to detect and use these controllers to correctly load the Gambit image in memory. The Scheme kernel will also be able to interface those drives.
Quick list of changes (maybe incomplete?):
Remaining work to be done:
outl/inl
bindings in Scheme are not correctly implemented (seelow-level.scm
). Theoutl
instruction is acceptable, since it uses three parameters (high word of value, low word of value and port) and a single call. It would however be simpler to have a function in the ffi to support the 32 bits integers (tagging leaves 30 bits available). Theinl
instruction is implemented naively, by doing two(x86-inl)
in different calls, to extract the high and low word. This is bad, since(x86-inl)
is not very fast. This works to provide support for these functions, but this is something that needs to be fixed before merging. I ping @feeley for this feature, since I tried to get it working in the ffi, but I am unsure how to embed assembly inc-lambda
s.