Platform specific Devices
Storage (Module name: ps3pf_storage)
PS3 storage devices includes HDD, Blu-ray Disc drive (BD drive) and flash ROM. These devices are connected via CBE’s companion chip. Accessing these devices is performed by dedicated hypervisor calls. These hypervisor calls consist of simple straightforward methods: open, close, read, write, ioctl.Most of all methods are asynchronous, that is, methods will return immediately after call, and then the caller must wait for its completion via other method. These completions are notified by virtualized interrupts. The status of results of these asynchronous methods can be retrieved via the specific hypervisor call. Since the BD drive is basically ATAPI device, Linux can issue ATAPI commands by ioctl. Some of ATAPI commands have been rejected by the hypervisor call because of security issues.
PS3 Linux storage driver is implemented just like the usb storage driver does. That is, the driver behaves as SCSI host controller driver and the storage devices themselves are as SCSI devices. So the HDD is accessed as SCSI disk, like /dev/sda. Because PS3 HDD and flash ROM is not actually SCSI devices, responses of SCSI commands are synthesized by this driver.
Device detection by the hypervisor is asynchronous, that is, there is chance that the hypervisor puts device information after guest OS starts. So guest OSes should wait for hypervisor’s device detection is done. That can be achieved by waiting for special virtual interrupts to notify the completion of hypervisor’s device detection. See the source of the driver to know the details