Skip to content
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

Exposing the option to specify the second hard disk as a slave #354

Merged
merged 1 commit into from
Jun 29, 2020

Conversation

cshung
Copy link
Contributor

@cshung cshung commented Jun 27, 2020

Fix #353
This allows a second hard disk to be connected as a slave.

@copy
Copy link
Owner

copy commented Jun 28, 2020

Did you test this? For example, by booting up an OS from one hard drive and accessing a filesystem on the other? IIRC this was not working when I tested it some time ago, and I would prefer not to expose a broken feature.

@cshung
Copy link
Contributor Author

cshung commented Jun 28, 2020

Yes, I got xv6 working on v86.

As an educational OS, it oversimplifies things. The key thing it does is that it puts the kernel on a whole disk, and has the file system work on another (so that the bootloader don't need to understand the file system). That is why I needed a second disk.

With this change and a few changes on the xv6 side (mostly to get around the fact that lapic does not work), I got it to work to the point that ls and cat work to access the file system on the other disk.

xv6's file access is done through PIO, therefore my tests do not cover the DMA capabilities. If there is a bug with DMA, I wouldn't know.

@cshung
Copy link
Contributor Author

cshung commented Jun 28, 2020

Check this out to see it running:
https://www.youtube.com/watch?v=bCFhfRemzOw

@cshung cshung force-pushed the public/dev/andrewau/second-hard-disk branch from 11471b9 to ce2e794 Compare June 28, 2020 17:23
@copy copy merged commit 6ab0fa8 into copy:master Jun 29, 2020
@copy
Copy link
Owner

copy commented Jun 29, 2020

@cshung Very cool, thanks!

@cshung cshung deleted the public/dev/andrewau/second-hard-disk branch June 29, 2020 15:20
@onriv
Copy link

onriv commented Jul 28, 2020

@cshung super cool~ any tutorial to boot xv6 plz?

@cshung
Copy link
Contributor Author

cshung commented Jul 28, 2020

@cshung super cool~ any tutorial to boot xv6 plz?

Check out my blog post to see what I did to get it to work.

@onriv
Copy link

onriv commented Jul 29, 2020

@cshung super cool~ any tutorial to boot xv6 plz?

Check out my blog post to see what I did to get it to work.

I boot it up too (using your version of xv6 and the newest v86), but still got some messages like "spurious interrupt at xxxxxxx". I havent check the reason for this yet.
image

BelleNottelling added a commit to BelleNottelling/v86 that referenced this pull request Sep 6, 2020
copy added a commit that referenced this pull request Sep 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Second hard disk
3 participants