Can not use ATA PIO mode in Qemu
Posted: Thu Feb 13, 2020 4:06 am
Hi I'm following a book to write a kernel but meet problem with disk driver part of program.
My system is:
I use ATA PIO mode to access disk. However, when trying to read port 0x1F1 to detect errors, it returns 255. While in Bochs or VirtualBox, it is 0. Also interrupts are not able to react.
But, keyboard and mouse are driver works fine. And when in int 13h also works.
So I'm kind of don't know what to do, and seeking for help in here.
Hope someone can help me on this. Thanks!
My system is:
I start Qemu by:Manjaro: 18.1.5
Linux kernel: 5.5.2-1
Qemu: 4.2.0-1
Code: Select all
qemu-system-x86_64 -machine q35 -cpu Broadwell -accel kvm -m 1G Boot.disk
But, keyboard and mouse are driver works fine. And when in int 13h also works.
So I'm kind of don't know what to do, and seeking for help in here.
Hope someone can help me on this. Thanks!