I write a hard disk error handler in order to take right actions when the hard disk set the ERR bit to 1.
But I don't know how to reproduce this situation in QEMU.
Is there any way to reproduce it?
How to debug my hard disk error handler on QEMU
-
- Member
- Posts: 27
- Joined: Wed Jun 29, 2022 2:17 am
- Libera.chat IRC: theflysong
How to debug my hard disk error handler on QEMU
I'm a new man to develop operating system.
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: How to debug my hard disk error handler on QEMU
As far as I know, QEMU only reports errors on invalid commands. If you want to test your error handlers with different types of errors, you'll have to find another way.
If your driver is modular enough, you can add an interposer between it and the HBA I/O and inject fake errors that way.
You can run your driver under a debugger and use the debugger to overwrite the drive's actual response with an error response.
You can try your driver with a broken hard drive. It probably won't test all of your error handlers, but I'm sure it'll be fun.
If your driver is modular enough, you can add an interposer between it and the HBA I/O and inject fake errors that way.
You can run your driver under a debugger and use the debugger to overwrite the drive's actual response with an error response.
You can try your driver with a broken hard drive. It probably won't test all of your error handlers, but I'm sure it'll be fun.