[Cbe-oss-dev] PS3 harddisk access problem

James Jacobsson slowcoder at mac.com
Sat Oct 13 16:36:28 EST 2007


On Oct 12, 2007, at 11:17 AM, Geert Uytterhoeven wrote:

> On Fri, 12 Oct 2007, James Jacobsson wrote:
>> 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.
>
> What's the return value?

r = 0xfffffffffffffff5   (or, -11, or -0xB)

>
>> 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.
>
> You don't call lv1_open_device() before  
> lv1_storage_send_device_command()?

Not at this time. I can't get the lv1_open_device() to return 0 no  
matter what/when I do it.

>
>> It's probably something trivial that I'm missing here, but I just
>> can't seem to find what it is.
>
> What's the value of reg in the lv1_storage_read() call?

0xfffffffffffffff5





More information about the cbe-oss-dev mailing list