AHCI can't read and write blocks

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
prcups
Posts: 10
Joined: Thu Jun 09, 2022 9:48 pm
Contact:

Re: AHCI can't read and write blocks

Post by prcups »

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.
Octocontrabass
Member
Member
Posts: 5563
Joined: Mon Mar 25, 2013 7:01 pm

Re: AHCI can't read and write blocks

Post by Octocontrabass »

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.
prcups
Posts: 10
Joined: Thu Jun 09, 2022 9:48 pm
Contact:

Re: AHCI can't read and write blocks

Post by prcups »

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
Post Reply