OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 11:41 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: IO issues on my rust OS
PostPosted: Mon Jun 26, 2023 10:11 pm 
Offline
User avatar

Joined: Sat Jun 17, 2023 8:42 pm
Posts: 2
Hi all,

I've recently started developing my own operating system in Rust and have made some progress so far. I have been using this wiki, this series of blogs and used this blog post for my bootloader, but I have simplified it. Additionally, I've created a basic I/O library using inline assembly with the `in` and `out` instructions. Furthermore, I have a functional serial driver.

Now, I'm working on implementing a VGA driver (in drivers/vga.rs) that supports a resolution of 720x480 @ 16 colors. The driver somewhat works, but I am having issues with:
  1. The `write_regs` function: In the last for loop of this function, there is a problem with the first read operation (it's commented out in the source due to it causing triple faults). I believe the issue has the same core problem as the next issue.
  2. When I attempt to set a pixel using the `put_pixel` function with the `set_plane` function uncommented, it causes a triple fault. I suspect this might be due to running multiple outb calls within a for loop in the `set_plane` function.

I'm seeking insights into why these issues are happening and would greatly appreciate any assistance. If you'd like to review my complete source code, you can find it on GitHub: https://github.com/juls0730/toto-os.


Top
 Profile  
 
 Post subject: Re: IO issues on my rust OS
PostPosted: Tue Jun 27, 2023 6:26 am 
Offline
User avatar

Joined: Sat Jun 17, 2023 8:42 pm
Posts: 2
it appears the issue was me loading only 2 sectors from the disk and not loading the whole kernel.


Top
 Profile  
 
 Post subject: Re: IO issues on my rust OS
PostPosted: Tue Jun 27, 2023 10:41 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
I see you're using the same broken tutorial bootloader that everyone else seems to be using nowadays. You should throw it away and use something that works correctly, like Limine or the bootloader crate.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 62 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group