Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ps3vram.c File Reference
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <asm/cell-regs.h>
#include <asm/firmware.h>
#include <asm/lv1call.h>
#include <asm/ps3.h>
#include <asm/ps3gpu.h>

Go to the source code of this file.

Data Structures

struct  ps3vram_tag
 
struct  ps3vram_cache
 
struct  ps3vram_priv
 

Macros

#define DEVICE_NAME   "ps3vram"
 
#define XDR_BUF_SIZE   (2 * 1024 * 1024) /* XDR buffer (must be 1MiB aligned) */
 
#define XDR_IOIF   0x0c000000
 
#define FIFO_BASE   XDR_IOIF
 
#define FIFO_SIZE   (64 * 1024)
 
#define DMA_PAGE_SIZE   (4 * 1024)
 
#define CACHE_PAGE_SIZE   (256 * 1024)
 
#define CACHE_PAGE_COUNT   ((XDR_BUF_SIZE - FIFO_SIZE) / CACHE_PAGE_SIZE)
 
#define CACHE_OFFSET   CACHE_PAGE_SIZE
 
#define FIFO_OFFSET   0
 
#define CTRL_PUT   0x10
 
#define CTRL_GET   0x11
 
#define CTRL_TOP   0x15
 
#define UPLOAD_SUBCH   1
 
#define DOWNLOAD_SUBCH   2
 
#define NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN   0x0000030c
 
#define NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY   0x00000104
 
#define CACHE_PAGE_PRESENT   1
 
#define CACHE_PAGE_DIRTY   2
 
#define DMA_NOTIFIER_HANDLE_BASE   0x66604200 /* first DMA notifier handle */
 
#define DMA_NOTIFIER_OFFSET_BASE   0x1000 /* first DMA notifier offset */
 
#define DMA_NOTIFIER_SIZE   0x40
 
#define NOTIFIER   7 /* notifier used for completion report */
 

Functions

 module_param (size, charp, 0)
 
 MODULE_PARM_DESC (size,"memory size")
 
 module_init (ps3vram_init)
 
 module_exit (ps3vram_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("PS3 Video RAM Storage Driver")
 
 MODULE_AUTHOR ("Sony Corporation")
 
 MODULE_ALIAS (PS3_MODULE_ALIAS_GPU_RAMDISK)
 

Macro Definition Documentation

#define CACHE_OFFSET   CACHE_PAGE_SIZE

Definition at line 39 of file ps3vram.c.

#define CACHE_PAGE_COUNT   ((XDR_BUF_SIZE - FIFO_SIZE) / CACHE_PAGE_SIZE)

Definition at line 37 of file ps3vram.c.

#define CACHE_PAGE_DIRTY   2

Definition at line 53 of file ps3vram.c.

#define CACHE_PAGE_PRESENT   1

Definition at line 52 of file ps3vram.c.

#define CACHE_PAGE_SIZE   (256 * 1024)

Definition at line 36 of file ps3vram.c.

#define CTRL_GET   0x11

Definition at line 43 of file ps3vram.c.

#define CTRL_PUT   0x10

Definition at line 42 of file ps3vram.c.

#define CTRL_TOP   0x15

Definition at line 44 of file ps3vram.c.

#define DEVICE_NAME   "ps3vram"

Definition at line 25 of file ps3vram.c.

#define DMA_NOTIFIER_HANDLE_BASE   0x66604200 /* first DMA notifier handle */

Definition at line 98 of file ps3vram.c.

#define DMA_NOTIFIER_OFFSET_BASE   0x1000 /* first DMA notifier offset */

Definition at line 99 of file ps3vram.c.

#define DMA_NOTIFIER_SIZE   0x40

Definition at line 100 of file ps3vram.c.

#define DMA_PAGE_SIZE   (4 * 1024)

Definition at line 34 of file ps3vram.c.

#define DOWNLOAD_SUBCH   2

Definition at line 47 of file ps3vram.c.

#define FIFO_BASE   XDR_IOIF

Definition at line 31 of file ps3vram.c.

#define FIFO_OFFSET   0

Definition at line 40 of file ps3vram.c.

#define FIFO_SIZE   (64 * 1024)

Definition at line 32 of file ps3vram.c.

#define NOTIFIER   7 /* notifier used for completion report */

Definition at line 101 of file ps3vram.c.

#define NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY   0x00000104

Definition at line 50 of file ps3vram.c.

#define NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN   0x0000030c

Definition at line 49 of file ps3vram.c.

#define UPLOAD_SUBCH   1

Definition at line 46 of file ps3vram.c.

#define XDR_BUF_SIZE   (2 * 1024 * 1024) /* XDR buffer (must be 1MiB aligned) */

Definition at line 28 of file ps3vram.c.

#define XDR_IOIF   0x0c000000

Definition at line 29 of file ps3vram.c.

Function Documentation

MODULE_ALIAS ( PS3_MODULE_ALIAS_GPU_RAMDISK  )
MODULE_AUTHOR ( "Sony Corporation"  )
MODULE_DESCRIPTION ( "PS3 Video RAM Storage Driver"  )
module_exit ( ps3vram_exit  )
module_init ( ps3vram_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( size  ,
charp  ,
 
)
MODULE_PARM_DESC ( size  ,
"memory size  
)