Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Enumerations | Functions
platform.h File Reference
#include <linux/rtc.h>
#include <scsi/scsi.h>
#include <asm/ps3.h>

Go to the source code of this file.

Data Structures

struct  ps3_repository_device
 

Enumerations

enum  ps3_bus_type { PS3_BUS_TYPE_SB = 4, PS3_BUS_TYPE_STORAGE = 5 }
 
enum  ps3_dev_type {
  PS3_DEV_TYPE_STOR_DISK = TYPE_DISK, PS3_DEV_TYPE_SB_GELIC = 3, PS3_DEV_TYPE_SB_USB = 4, PS3_DEV_TYPE_STOR_ROM = TYPE_ROM,
  PS3_DEV_TYPE_SB_GPIO = 6, PS3_DEV_TYPE_STOR_FLASH = TYPE_RBC
}
 
enum  ps3_interrupt_type { PS3_INTERRUPT_TYPE_EVENT_PORT = 2, PS3_INTERRUPT_TYPE_SB_OHCI = 3, PS3_INTERRUPT_TYPE_SB_EHCI = 4, PS3_INTERRUPT_TYPE_OTHER = 5 }
 
enum  ps3_reg_type { PS3_REG_TYPE_SB_OHCI = 3, PS3_REG_TYPE_SB_EHCI = 4, PS3_REG_TYPE_SB_GPIO = 5 }
 
enum  ps3_spu_resource_type { PS3_SPU_RESOURCE_TYPE_SHARED = 0, PS3_SPU_RESOURCE_TYPE_EXCLUSIVE = 0x8000000000000000UL }
 

Functions

void __init ps3_hpte_init (unsigned long htab_size)
 
void __init ps3_map_htab (void)
 
void __init ps3_mm_init (void)
 
void __init ps3_mm_vas_create (unsigned long *htab_size)
 
void ps3_mm_vas_destroy (void)
 
void ps3_mm_shutdown (void)
 
void ps3_init_IRQ (void)
 
void ps3_shutdown_IRQ (int cpu)
 
void __init ps3_register_ipi_debug_brk (unsigned int cpu, unsigned int virq)
 
void __init ps3_register_ipi_irq (unsigned int cpu, unsigned int virq)
 
void smp_init_ps3 (void)
 
void __init ps3_calibrate_decr (void)
 
unsigned long __init ps3_get_boot_time (void)
 
void ps3_get_rtc_time (struct rtc_time *time)
 
int ps3_set_rtc_time (struct rtc_time *time)
 
void __init ps3_os_area_save_params (void)
 
void __init ps3_os_area_init (void)
 
int ps3_repository_read_bus_str (unsigned int bus_index, const char *bus_str, u64 *value)
 
int ps3_repository_read_bus_id (unsigned int bus_index, u64 *bus_id)
 
int ps3_repository_read_bus_type (unsigned int bus_index, enum ps3_bus_type *bus_type)
 
int ps3_repository_read_bus_num_dev (unsigned int bus_index, unsigned int *num_dev)
 
int ps3_repository_read_dev_str (unsigned int bus_index, unsigned int dev_index, const char *dev_str, u64 *value)
 
int ps3_repository_read_dev_id (unsigned int bus_index, unsigned int dev_index, u64 *dev_id)
 
int ps3_repository_read_dev_type (unsigned int bus_index, unsigned int dev_index, enum ps3_dev_type *dev_type)
 
int ps3_repository_read_dev_intr (unsigned int bus_index, unsigned int dev_index, unsigned int intr_index, enum ps3_interrupt_type *intr_type, unsigned int *interrupt_id)
 
int ps3_repository_read_dev_reg_type (unsigned int bus_index, unsigned int dev_index, unsigned int reg_index, enum ps3_reg_type *reg_type)
 
int ps3_repository_read_dev_reg_addr (unsigned int bus_index, unsigned int dev_index, unsigned int reg_index, u64 *bus_addr, u64 *len)
 
int ps3_repository_read_dev_reg (unsigned int bus_index, unsigned int dev_index, unsigned int reg_index, enum ps3_reg_type *reg_type, u64 *bus_addr, u64 *len)
 
int ps3_repository_find_device (struct ps3_repository_device *repo)
 
int ps3_repository_find_device_by_id (struct ps3_repository_device *repo, u64 bus_id, u64 dev_id)
 
int ps3_repository_find_devices (enum ps3_bus_type bus_type, int(*callback)(const struct ps3_repository_device *repo))
 
int ps3_repository_find_bus (enum ps3_bus_type bus_type, unsigned int from, unsigned int *bus_index)
 
int ps3_repository_find_interrupt (const struct ps3_repository_device *repo, enum ps3_interrupt_type intr_type, unsigned int *interrupt_id)
 
int ps3_repository_find_reg (const struct ps3_repository_device *repo, enum ps3_reg_type reg_type, u64 *bus_addr, u64 *len)
 
int ps3_repository_read_stor_dev_port (unsigned int bus_index, unsigned int dev_index, u64 *port)
 
int ps3_repository_read_stor_dev_blk_size (unsigned int bus_index, unsigned int dev_index, u64 *blk_size)
 
int ps3_repository_read_stor_dev_num_blocks (unsigned int bus_index, unsigned int dev_index, u64 *num_blocks)
 
int ps3_repository_read_stor_dev_num_regions (unsigned int bus_index, unsigned int dev_index, unsigned int *num_regions)
 
int ps3_repository_read_stor_dev_region_id (unsigned int bus_index, unsigned int dev_index, unsigned int region_index, unsigned int *region_id)
 
int ps3_repository_read_stor_dev_region_size (unsigned int bus_index, unsigned int dev_index, unsigned int region_index, u64 *region_size)
 
int ps3_repository_read_stor_dev_region_start (unsigned int bus_index, unsigned int dev_index, unsigned int region_index, u64 *region_start)
 
int ps3_repository_read_stor_dev_info (unsigned int bus_index, unsigned int dev_index, u64 *port, u64 *blk_size, u64 *num_blocks, unsigned int *num_regions)
 
int ps3_repository_read_stor_dev_region (unsigned int bus_index, unsigned int dev_index, unsigned int region_index, unsigned int *region_id, u64 *region_start, u64 *region_size)
 
int ps3_repository_read_num_pu (u64 *num_pu)
 
int ps3_repository_read_pu_id (unsigned int pu_index, u64 *pu_id)
 
int ps3_repository_read_rm_base (unsigned int ppe_id, u64 *rm_base)
 
int ps3_repository_read_rm_size (unsigned int ppe_id, u64 *rm_size)
 
int ps3_repository_read_region_total (u64 *region_total)
 
int ps3_repository_read_mm_info (u64 *rm_base, u64 *rm_size, u64 *region_total)
 
int ps3_repository_read_highmem_region_count (unsigned int *region_count)
 
int ps3_repository_read_highmem_base (unsigned int region_index, u64 *highmem_base)
 
int ps3_repository_read_highmem_size (unsigned int region_index, u64 *highmem_size)
 
int ps3_repository_read_highmem_info (unsigned int region_index, u64 *highmem_base, u64 *highmem_size)
 
int ps3_repository_write_highmem_region_count (unsigned int region_count)
 
int ps3_repository_write_highmem_base (unsigned int region_index, u64 highmem_base)
 
int ps3_repository_write_highmem_size (unsigned int region_index, u64 highmem_size)
 
int ps3_repository_write_highmem_info (unsigned int region_index, u64 highmem_base, u64 highmem_size)
 
int ps3_repository_delete_highmem_info (unsigned int region_index)
 
int ps3_repository_read_num_be (unsigned int *num_be)
 
int ps3_repository_read_be_node_id (unsigned int be_index, u64 *node_id)
 
int ps3_repository_read_be_id (u64 node_id, u64 *be_id)
 
int ps3_repository_read_tb_freq (u64 node_id, u64 *tb_freq)
 
int ps3_repository_read_be_tb_freq (unsigned int be_index, u64 *tb_freq)
 
int ps3_repository_read_lpm_privileges (unsigned int be_index, u64 *lpar, u64 *rights)
 
int ps3_repository_read_boot_dat_addr (u64 *lpar_addr)
 
int ps3_repository_read_boot_dat_size (unsigned int *size)
 
int ps3_repository_read_boot_dat_info (u64 *lpar_addr, unsigned int *size)
 
int ps3_repository_read_num_spu_reserved (unsigned int *num_spu_reserved)
 
int ps3_repository_read_num_spu_resource_id (unsigned int *num_resource_id)
 
int ps3_repository_read_spu_resource_id (unsigned int res_index, enum ps3_spu_resource_type *resource_type, unsigned int *resource_id)
 
int ps3_repository_read_vuart_av_port (unsigned int *port)
 
int ps3_repository_read_vuart_sysmgr_port (unsigned int *port)
 

Enumeration Type Documentation

Enumerator:
PS3_BUS_TYPE_SB 
PS3_BUS_TYPE_STORAGE 

Definition at line 79 of file platform.h.

Enumerator:
PS3_DEV_TYPE_STOR_DISK 
PS3_DEV_TYPE_SB_GELIC 
PS3_DEV_TYPE_SB_USB 
PS3_DEV_TYPE_STOR_ROM 
PS3_DEV_TYPE_SB_GPIO 
PS3_DEV_TYPE_STOR_FLASH 

Definition at line 84 of file platform.h.

Enumerator:
PS3_INTERRUPT_TYPE_EVENT_PORT 
PS3_INTERRUPT_TYPE_SB_OHCI 
PS3_INTERRUPT_TYPE_SB_EHCI 
PS3_INTERRUPT_TYPE_OTHER 

Definition at line 103 of file platform.h.

Enumerator:
PS3_REG_TYPE_SB_OHCI 
PS3_REG_TYPE_SB_EHCI 
PS3_REG_TYPE_SB_GPIO 

Definition at line 110 of file platform.h.

enum spu_resource_type - Type of spu resource. : Logical spu is shared with other partions. : Logical spu is not shared with other partions.

Returned by ps3_repository_read_spu_resource_id().

Enumerator:
PS3_SPU_RESOURCE_TYPE_SHARED 
PS3_SPU_RESOURCE_TYPE_EXCLUSIVE 

Definition at line 237 of file platform.h.

Function Documentation

void __init ps3_calibrate_decr ( void  )

Definition at line 55 of file time.c.

unsigned long __init ps3_get_boot_time ( void  )

Definition at line 79 of file time.c.

void ps3_get_rtc_time ( struct rtc_time time)
void __init ps3_hpte_init ( unsigned long  htab_size)

Definition at line 193 of file htab.c.

void ps3_init_IRQ ( void  )

Definition at line 750 of file interrupt.c.

void __init ps3_map_htab ( void  )
void __init ps3_mm_init ( void  )

ps3_mm_init - initialize the address space state variables

Definition at line 1191 of file mm.c.

void ps3_mm_shutdown ( void  )

ps3_mm_shutdown - final cleanup of address space

Definition at line 1235 of file mm.c.

void __init ps3_mm_vas_create ( unsigned long htab_size)

ps3_mm_vas_create - create the virtual address space

Definition at line 150 of file mm.c.

void ps3_mm_vas_destroy ( void  )

ps3_mm_vas_destroy -

Definition at line 211 of file mm.c.

void __init ps3_os_area_init ( void  )

ps3_os_area_init - Setup os area device tree properties as needed.

Definition at line 789 of file os-area.c.

void __init ps3_os_area_save_params ( void  )

ps3_os_area_save_params - Copy data from os area mirror to .

For the convenience of the guest the HV makes a copy of the os area in flash to a high address in the boot memory region and then puts that RAM address and the byte count into the repository for retrieval by the guest. We copy the data we want into a static variable and allow the memory setup by the HV to be claimed by the memblock manager.

The os area mirror will not be available to a second stage kernel, and the header verify will fail. In this case, the saved_params values will be set from flash memory or the passed in device tree in ps3_os_area_init().

Definition at line 734 of file os-area.c.

void __init ps3_register_ipi_debug_brk ( unsigned int  cpu,
unsigned int  virq 
)

Definition at line 692 of file interrupt.c.

void __init ps3_register_ipi_irq ( unsigned int  cpu,
unsigned int  virq 
)

Definition at line 702 of file interrupt.c.

int ps3_repository_delete_highmem_info ( unsigned int  region_index)
int ps3_repository_find_bus ( enum ps3_bus_type  bus_type,
unsigned int  from,
unsigned int bus_index 
)

Definition at line 482 of file repository.c.

int ps3_repository_find_device ( struct ps3_repository_device repo)

Definition at line 314 of file repository.c.

int ps3_repository_find_device_by_id ( struct ps3_repository_device repo,
u64  bus_id,
u64  dev_id 
)

Definition at line 363 of file repository.c.

int ps3_repository_find_devices ( enum ps3_bus_type  bus_type,
int(*)(const struct ps3_repository_device *repo)  callback 
)

Definition at line 440 of file repository.c.

int ps3_repository_find_interrupt ( const struct ps3_repository_device repo,
enum ps3_interrupt_type  intr_type,
unsigned int interrupt_id 
)

Definition at line 506 of file repository.c.

int ps3_repository_find_reg ( const struct ps3_repository_device repo,
enum ps3_reg_type  reg_type,
u64 bus_addr,
u64 len 
)

Definition at line 544 of file repository.c.

int ps3_repository_read_be_id ( u64  node_id,
u64 be_id 
)

ps3_repository_read_be_id - Read the physical BE processor id. : The BE processor node id. : The BE processor id.

Definition at line 1022 of file repository.c.

int ps3_repository_read_be_node_id ( unsigned int  be_index,
u64 node_id 
)

ps3_repository_read_be_node_id - Read the physical BE processor node id. : Zero based index. : The BE processor node id.

Definition at line 1006 of file repository.c.

int ps3_repository_read_be_tb_freq ( unsigned int  be_index,
u64 tb_freq 
)

Definition at line 1042 of file repository.c.

int ps3_repository_read_boot_dat_addr ( u64 lpar_addr)
int ps3_repository_read_boot_dat_info ( u64 lpar_addr,
unsigned int size 
)

ps3_repository_read_boot_dat_info - Get address and size of cell_ext_os_area. address: lpar address of cell_ext_os_area : size of cell_ext_os_area

Definition at line 971 of file repository.c.

int ps3_repository_read_boot_dat_size ( unsigned int size)

Definition at line 920 of file repository.c.

int ps3_repository_read_bus_id ( unsigned int  bus_index,
u64 bus_id 
)

Definition at line 171 of file repository.c.

int ps3_repository_read_bus_num_dev ( unsigned int  bus_index,
unsigned int num_dev 
)

Definition at line 198 of file repository.c.

int ps3_repository_read_bus_str ( unsigned int  bus_index,
const char bus_str,
u64 value 
)

Definition at line 161 of file repository.c.

int ps3_repository_read_bus_type ( unsigned int  bus_index,
enum ps3_bus_type bus_type 
)

Definition at line 183 of file repository.c.

int ps3_repository_read_dev_id ( unsigned int  bus_index,
unsigned int  dev_index,
u64 dev_id 
)

Definition at line 224 of file repository.c.

int ps3_repository_read_dev_intr ( unsigned int  bus_index,
unsigned int  dev_index,
unsigned int  intr_index,
enum ps3_interrupt_type intr_type,
unsigned int interrupt_id 
)

Definition at line 254 of file repository.c.

int ps3_repository_read_dev_reg ( unsigned int  bus_index,
unsigned int  dev_index,
unsigned int  reg_index,
enum ps3_reg_type reg_type,
u64 bus_addr,
u64 len 
)

Definition at line 301 of file repository.c.

int ps3_repository_read_dev_reg_addr ( unsigned int  bus_index,
unsigned int  dev_index,
unsigned int  reg_index,
u64 bus_addr,
u64 len 
)

Definition at line 290 of file repository.c.

int ps3_repository_read_dev_reg_type ( unsigned int  bus_index,
unsigned int  dev_index,
unsigned int  reg_index,
enum ps3_reg_type reg_type 
)

Definition at line 273 of file repository.c.

int ps3_repository_read_dev_str ( unsigned int  bus_index,
unsigned int  dev_index,
const char dev_str,
u64 value 
)

Definition at line 213 of file repository.c.

int ps3_repository_read_dev_type ( unsigned int  bus_index,
unsigned int  dev_index,
enum ps3_dev_type dev_type 
)

Definition at line 238 of file repository.c.

int ps3_repository_read_highmem_base ( unsigned int  region_index,
u64 highmem_base 
)

Definition at line 804 of file repository.c.

int ps3_repository_read_highmem_info ( unsigned int  region_index,
u64 highmem_base,
u64 highmem_size 
)

ps3_repository_read_highmem_info - Read high memory region info : Region index, {0,..,region_count-1}. : High memory base address. : High memory size.

Bootloaders that preallocate highmem regions must place the region info into the repository at these well known nodes.

Definition at line 836 of file repository.c.

int ps3_repository_read_highmem_region_count ( unsigned int region_count)

ps3_repository_read_highmem_region_count - Read the number of highmem regions

Bootloaders must arrange the repository nodes such that regions are indexed with a region_index from 0 to region_count-1.

Definition at line 788 of file repository.c.

int ps3_repository_read_highmem_size ( unsigned int  region_index,
u64 highmem_size 
)

Definition at line 815 of file repository.c.

int ps3_repository_read_lpm_privileges ( unsigned int  be_index,
u64 lpar,
u64 rights 
)

Definition at line 1053 of file repository.c.

int ps3_repository_read_mm_info ( u64 rm_base,
u64 rm_size,
u64 region_total 
)

ps3_repository_read_mm_info - Read mm info for single pu system. : Real mode memory base address. : Real mode memory size. : Maximum memory region size.

Definition at line 769 of file repository.c.

int ps3_repository_read_num_be ( unsigned int num_be)

ps3_repository_read_num_be - Number of physical BE processors in the system.

Definition at line 985 of file repository.c.

int ps3_repository_read_num_pu ( u64 num_pu)

ps3_repository_read_num_pu - Number of logical PU processors for this lpar.

Definition at line 718 of file repository.c.

int ps3_repository_read_num_spu_reserved ( unsigned int num_spu_reserved)

ps3_repository_read_num_spu_reserved - Number of physical spus reserved. : Number of physical spus.

Definition at line 852 of file repository.c.

int ps3_repository_read_num_spu_resource_id ( unsigned int num_resource_id)

ps3_repository_read_num_spu_resource_id - Number of spu resource reservations. : Number of spu resource ids.

Definition at line 871 of file repository.c.

int ps3_repository_read_pu_id ( unsigned int  pu_index,
u64 pu_id 
)

ps3_repository_read_pu_id - Read the logical PU id. : Zero based index. : The logical PU id.

Definition at line 734 of file repository.c.

int ps3_repository_read_region_total ( u64 region_total)

Definition at line 753 of file repository.c.

int ps3_repository_read_rm_base ( unsigned int  ppe_id,
u64 rm_base 
)
int ps3_repository_read_rm_size ( unsigned int  ppe_id,
u64 rm_size 
)

Definition at line 743 of file repository.c.

int ps3_repository_read_spu_resource_id ( unsigned int  res_index,
enum ps3_spu_resource_type resource_type,
unsigned int resource_id 
)

ps3_repository_read_spu_resource_id - spu resource reservation id value. : Resource reservation index. : Resource reservation type. : Resource reservation id.

Definition at line 892 of file repository.c.

int ps3_repository_read_stor_dev_blk_size ( unsigned int  bus_index,
unsigned int  dev_index,
u64 blk_size 
)

Definition at line 594 of file repository.c.

int ps3_repository_read_stor_dev_info ( unsigned int  bus_index,
unsigned int  dev_index,
u64 port,
u64 blk_size,
u64 num_blocks,
unsigned int num_regions 
)

Definition at line 668 of file repository.c.

int ps3_repository_read_stor_dev_num_blocks ( unsigned int  bus_index,
unsigned int  dev_index,
u64 num_blocks 
)

Definition at line 604 of file repository.c.

int ps3_repository_read_stor_dev_num_regions ( unsigned int  bus_index,
unsigned int  dev_index,
unsigned int num_regions 
)

Definition at line 614 of file repository.c.

int ps3_repository_read_stor_dev_port ( unsigned int  bus_index,
unsigned int  dev_index,
u64 port 
)

Definition at line 584 of file repository.c.

int ps3_repository_read_stor_dev_region ( unsigned int  bus_index,
unsigned int  dev_index,
unsigned int  region_index,
unsigned int region_id,
u64 region_start,
u64 region_size 
)

Definition at line 693 of file repository.c.

int ps3_repository_read_stor_dev_region_id ( unsigned int  bus_index,
unsigned int  dev_index,
unsigned int  region_index,
unsigned int region_id 
)

Definition at line 629 of file repository.c.

int ps3_repository_read_stor_dev_region_size ( unsigned int  bus_index,
unsigned int  dev_index,
unsigned int  region_index,
u64 region_size 
)

Definition at line 646 of file repository.c.

int ps3_repository_read_stor_dev_region_start ( unsigned int  bus_index,
unsigned int  dev_index,
unsigned int  region_index,
u64 region_start 
)

Definition at line 657 of file repository.c.

int ps3_repository_read_tb_freq ( u64  node_id,
u64 tb_freq 
)

Definition at line 1032 of file repository.c.

int ps3_repository_read_vuart_av_port ( unsigned int port)

Definition at line 935 of file repository.c.

int ps3_repository_read_vuart_sysmgr_port ( unsigned int port)

Definition at line 950 of file repository.c.

int ps3_repository_write_highmem_base ( unsigned int  region_index,
u64  highmem_base 
)
int ps3_repository_write_highmem_info ( unsigned int  region_index,
u64  highmem_base,
u64  highmem_size 
)
int ps3_repository_write_highmem_region_count ( unsigned int  region_count)
int ps3_repository_write_highmem_size ( unsigned int  region_index,
u64  highmem_size 
)
int ps3_set_rtc_time ( struct rtc_time time)
void ps3_shutdown_IRQ ( int  cpu)

Definition at line 782 of file interrupt.c.

void smp_init_ps3 ( void  )

Definition at line 129 of file smp.c.