Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
repository.c File Reference
#include <asm/lv1call.h>
#include "platform.h"

Go to the source code of this file.

Macros

#define dump_field(_a, _b)   _dump_field(_a, _b, __func__, __LINE__)
 
#define dump_node_name(_a, _b, _c, _d, _e)   _dump_node_name(_a, _b, _c, _d, _e, __func__, __LINE__)
 
#define dump_node(_a, _b, _c, _d, _e, _f, _g)   _dump_node(_a, _b, _c, _d, _e, _f, _g, __func__, __LINE__)
 

Enumerations

enum  ps3_vendor_id { PS3_VENDOR_ID_NONE = 0, PS3_VENDOR_ID_SONY = 0x8000000000000000UL }
 
enum  ps3_lpar_id { PS3_LPAR_ID_CURRENT = 0, PS3_LPAR_ID_PME = 1 }
 

Functions

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 __devinit 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_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_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_boot_dat_size (unsigned int *size)
 
int ps3_repository_read_vuart_av_port (unsigned int *port)
 
int ps3_repository_read_vuart_sysmgr_port (unsigned int *port)
 
int ps3_repository_read_boot_dat_info (u64 *lpar_addr, unsigned int *size)
 
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)
 

Macro Definition Documentation

#define dump_field (   _a,
  _b 
)    _dump_field(_a, _b, __func__, __LINE__)

Definition at line 35 of file repository.c.

#define dump_node (   _a,
  _b,
  _c,
  _d,
  _e,
  _f,
  _g 
)    _dump_node(_a, _b, _c, _d, _e, _f, _g, __func__, __LINE__)

Definition at line 63 of file repository.c.

#define dump_node_name (   _a,
  _b,
  _c,
  _d,
  _e 
)    _dump_node_name(_a, _b, _c, _d, _e, __func__, __LINE__)

Definition at line 51 of file repository.c.

Enumeration Type Documentation

Enumerator:
PS3_LPAR_ID_CURRENT 
PS3_LPAR_ID_PME 

Definition at line 30 of file repository.c.

Enumerator:
PS3_VENDOR_ID_NONE 
PS3_VENDOR_ID_SONY 

Definition at line 25 of file repository.c.

Function Documentation

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 __devinit 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_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_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.