OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 12:40 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to debug my hard disk error handler on QEMU
PostPosted: Thu Jul 14, 2022 11:03 am 
Offline
Member
Member

Joined: Wed Jun 29, 2022 2:17 am
Posts: 27
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?

_________________
I'm a new man to develop operating system.


Top
 Profile  
 
 Post subject: Re: How to debug my hard disk error handler on QEMU
PostPosted: Thu Jul 14, 2022 5:32 pm 
Offline
Member
Member

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


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 71 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