[Cbe-oss-dev] PS3 harddisk access problem
James Jacobsson
slowcoder at mac.com
Sat Oct 13 01:31:43 EST 2007
Hi All,
Long time lurker, first time poster here.
I'm experimenting with trying to port AROS to the PS3 platform, and
so-far things have gone pretty smoothly, but I am running into a
problem with accessing the hard-disk.
As the documentation for the hypervisor interface is sparse at best,
and the existing Linux source-code for this is quite heavily
intermixed with the SCSI and ATA subsystems, I have some problems
with deducing what needs to be set up for this to happen.
I've iterated through the busses, and found the hard-disk at bus #4,
device #2. When querying the device for the key "id", it also returns
2, so I'm pretty sure I'm bang on when it comes to this part.
Now, here comes the problems.
I tried doing the following immediately after the bus-iteration:
r = lv1_storage_read( 2, // DevID
reg, // RegID
0, // Start sector
1, // Num sector(s)
0, // Flags
r_buff, // Buffer
&tag);
But it returns non-zero, so something apparently needs to be done
before I can read a sector.
Doing the following works though:
r = lv1_storage_send_device_command(2, // Device ID
0x23, // LV1_STORAGE_ATA_HDDOUT
0,0,0,0,
&tag);
So at least something is working.
I've also tried doing:
r = lv1_open_device(4,2,0);
on the device before doing the lv1_storage_read() call, but the
open_device call fails as well.
It's probably something trivial that I'm missing here, but I just
can't seem to find what it is.
Hopefully you guys can help me out here.
Regards,
James
More information about the cbe-oss-dev
mailing list