OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Aug 17, 2022 7:41 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: AHCI can't read and write blocks
PostPosted: Sun Jun 26, 2022 5:14 pm 
Offline

Joined: Thu Jun 09, 2022 9:48 pm
Posts: 10
Octocontrabass wrote:
Really? It successfully reads the disk when I do that. Where are you allocating this memory area?

Have you tried using debug tracing? For example, try adding "-d trace:handle_cmd_*" to your QEMU command line. There's a list of available trace events here.

How do you allocating memory to AHCI_BASE?I didn't design malloc and free functions, and these in std will produce an linking error. So I create an array of uint8 and transfer its address to AHCI_BASE.


Top
 Profile  
 
 Post subject: Re: AHCI can't read and write blocks
PostPosted: Sun Jun 26, 2022 6:50 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 4029
Since you don't have an allocator yet, I picked an unused address in my VM's memory map.

How big is your array? It needs to be around 300kB since the wiki driver doesn't use any dynamic allocation.


Top
 Profile  
 
 Post subject: Re: AHCI can't read and write blocks
PostPosted: Mon Jun 27, 2022 10:26 am 
Offline

Joined: Thu Jun 09, 2022 9:48 pm
Posts: 10
Octocontrabass wrote:
Since you don't have an allocator yet, I picked an unused address in my VM's memory map.

How big is your array? It needs to be around 300kB since the wiki driver doesn't use any dynamic allocation.


The problem has been solved. I carelessly forgot to delete AHCI_BASE macro. Thanks for your help these days. :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], PetalBot [Bot] and 10 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