Editing HV Syscall Reference

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 221: Line 221:
|R4
|R4
|vas_id - virtual address space id of the PPE
|vas_id - virtual address space id of the PPE
|-
|R5
|htab_size_log2 - 18, 19 or 20 (256KB, 512KB or 1MB)
|-
|R6
|number_of_sizes - How many page sizes are specified in page_sizes
|-
|R7
|page_sizes - see lv1_construct_virtual_address_space
|}
|}


Line 236: Line 227:
Regardless of the ppe_id, when called from kernel module init function, vas_id always seems to be 11.
Regardless of the ppe_id, when called from kernel module init function, vas_id always seems to be 11.
----
----
=== lv1_query_logical_partition_address_region_info ===
=== lv1_query_logical_partition_address_region_info ===


Line 1,927: Line 1,917:
|00000000000000 (0)
|00000000000000 (0)
|00000000000000 (0)
|00000000000000 (0)
|System Debug Flag
|
|-
|-
|sys.flash.boot.#0
|sys.flash.boot.#0
Line 2,035: Line 2,025:
|}
|}
----
----
=== lv1_modify_repository_node_value ===
=== lv1_modify_repository_node_value ===


Line 2,246: Line 2,235:
The Cell Broadband Engine Programming Handbook has this to say on the subject: The first implementation of the Cell Broadband Engine Architecture (CBEA) (the CBE processor) supports instructions with a graphics rounding mode. This mode allows programs written with vector/SIMD multimedia extension instructions to produce floating-point results that are equivalent in precision to those written in the SPU instruction set. In this mode, as in the SPU environment, the default rounding mode is round to zero, denormals are treated as zero, and there are no infinities or NaNs.
The Cell Broadband Engine Programming Handbook has this to say on the subject: The first implementation of the Cell Broadband Engine Architecture (CBEA) (the CBE processor) supports instructions with a graphics rounding mode. This mode allows programs written with vector/SIMD multimedia extension instructions to produce floating-point results that are equivalent in precision to those written in the SPU instruction set. In this mode, as in the SPU environment, the default rounding mode is round to zero, denormals are treated as zero, and there are no infinities or NaNs.


This call change bit 12 (known as grap_md or grap_mode in various documents) in the HID1 register. Hardware Implementation Register 1 is a HV privileged resource, hence to change the mode from Supervisor mode requires a HV call.
To change this mode, bit 12 in the HID1 register (known as grap_md or grap_mode in various documents). HID1 is a HV privileged resource, hence to change the mode from Supervisor mode requires a HV call.


Reference Documents: Cell Broadband Engine Programming Handbook V1.1 Cell Broadband Engine Registers V1.5
Reference Documents: Cell Broadband Engine Programming Handbook V1.1 Cell Broadband Engine Registers V1.5
Line 2,256: Line 2,245:
When recompiled into Kernel module init function, accepts values of 0 and 1 for p1. All other values return -17 (LV1_ILLEGAL_PARAMETER_VALUE)
When recompiled into Kernel module init function, accepts values of 0 and 1 for p1. All other values return -17 (LV1_ILLEGAL_PARAMETER_VALUE)
----
----
=== lv1_set_thread_switch_control_register ===
=== lv1_set_thread_switch_control_register ===


Line 2,365: Line 2,353:
Exists in PAL 1.7. Returns the same as [[HV_Syscall_Reference#lv1_undocumented_function_105|lv1_undocumented_function_105]].
Exists in PAL 1.7. Returns the same as [[HV_Syscall_Reference#lv1_undocumented_function_105|lv1_undocumented_function_105]].
----
----
=== lv1_read_remote_file ===
=== lv1_undocumented_function_110 ===
 
Exists in PAL 1.7. Returns -6 (LV1_NO_ENTRY) in R3, rest same as  [[HV_Syscall_Reference#lv1_undocumented_function_105|lv1_undocumented_function_105]].
----
=== lv1_undocumented_function_111 ===
 
Exists in PAL 1.7. Returns -6 (LV1_NO_ENTRY) in R3, rest same as  [[HV_Syscall_Reference#lv1_undocumented_function_105|lv1_undocumented_function_105]].
----
=== lv1_undocumented_function_112 ===
 
Exists in PAL 1.7. Returns -6 (LV1_NO_ENTRY) in R3, rest same as  [[HV_Syscall_Reference#lv1_undocumented_function_105|lv1_undocumented_function_105]].
----
=== lv1_undocumented_function_114 ===


===== Parameters =====
===== Parameters =====
Line 2,376: Line 2,376:
|-
|-
|R3
|R3
|u32 type
|start -
|-
|-
|R4
|R4
|u32 *path
|page_size -
|-
|-
|R5
|R5
|u64 offset
|size -  
|-
|R6
|u32 *buf
|-
|R7
|u64 size
|-
|-
! colspan="2" | Outputs
! colspan="2" | Outputs
Line 2,396: Line 2,390:
|-
|-
|R3
|R3
|status
|Status - 0 = OK, Other values are unknown, but indicate failure.
|-
|-
|R4
|R4
|n_read
|lpar_addr -
|-
|-
|}
|}
----
----
=== lv1_write_remote_file ===
 
=== lv1_undocumented_function_115 ===


===== Parameters =====
===== Parameters =====
Line 2,414: Line 2,410:
|-
|-
|R3
|R3
|u32 type
|lpar_addr -  
|-
|R4
|u32 *path
|-
|R5
|u64 offset
|-
|R6
|u32 *buf
|-
|R7
|u64 size
|-
|-
! colspan="2" | Outputs
! colspan="2" | Outputs
Line 2,434: Line 2,418:
|-
|-
|R3
|R3
|status
|Status - 0 = OK, Other values are unknown, but indicate failure.
|-
|R4
|n_write
|-
|-
|}
|}
----
----
=== lv1_get_remote_file_size ===
 
=== lv1_allocate_io_segment ===
 
Allocate an io segment.
 
===== kboot Call =====
 
result = lv1_allocate_io_segment( /*IN*/ ioas_id, segment_size, io_page_size, /*OUT*/ &ioif_addr );


===== Parameters =====
===== Parameters =====
Line 2,452: Line 2,442:
|-
|-
|R3
|R3
|u32 type
|ioas_id - io address space id
|-
|-
|R4
|R4
|u32 *path
|segment_size - io segment size
|-
|R5
|io_page_size - io page size, 0xC, 0×10, 0×14
|-
|-
! colspan="2" | Outputs
! colspan="2" | Outputs
Line 2,463: Line 2,456:
|-
|-
|R3
|R3
|status
|Status - 0 = OK, Other values are unknown, but indicate failure.
|-
|-
|R4
|R4
|file_size
|ioif_addr - io interface address
|-
|-
|}----
|}
=== lv1_map_physical_address_region ===
 
Notes:
 
Code taken from kboot-10\dl\linux-2.6.16\sound\powerpc\snd_ps3pf.c (kboot-20061208)
ret64 = lv1_allocate_io_segment(0,          /* io space */
    IO_SEGMENTSIZE, /* segment size */
    IO_PAGESIZE_SHIFT, /* io page size */
    &(ioif_map_info_array[current_segment].ioif_addr));
----
=== lv1_release_io_segment ===
 
Release an io segment.
 
===== kboot Call =====
 
result = lv1_release_io_segment( /*IN*/ ioas_id, ioif_addr );


===== Parameters =====
===== Parameters =====
Line 2,480: Line 2,488:
|-
|-
|R3
|R3
|start -  
|ioas_id - io address space id
|-
|-
|R4
|R4
|page_size -
|ioif_addr - io interface address
|-
|R5
|size -  
|-
|-
! colspan="2" | Outputs
! colspan="2" | Outputs
Line 2,495: Line 2,500:
|R3
|R3
|Status - 0 = OK, Other values are unknown, but indicate failure.
|Status - 0 = OK, Other values are unknown, but indicate failure.
|-
|R4
|lpar_addr -
|-
|-
|}
|}


----
Notes:
 
 
=== lv1_unmap_physical_address_region ===
Code taken from kboot-10\dl\linux-2.6.16\sound\powerpc\snd_ps3pf.c (kboot-20061208)
ret64 = lv1_release_io_segment(0, /* io space */
    ioif_map_info_array[current_segment].ioif_addr);
----
=== lv1_allocate_ioid ===
 
Not used in current kernel.
 
===== Abstract Call =====
 
result = lv1_allocate_ioid( /*IN*/ p1, /*OUT*/ &v1 );


===== Parameters =====
===== Parameters =====
Line 2,514: Line 2,526:
|-
|-
|R3
|R3
|lpar_addr -
|SBZ
|-
|-
! colspan="2" | Outputs
! colspan="2" | Outputs
Line 2,522: Line 2,534:
|-
|-
|R3
|R3
|Status - 0 = OK, Other values are unknown, but indicate failure.
|Status?
|-
|R4
|the ioid
|-
|-
|}
|}


Notes:


Info taken from kboot-10\dl\linux-2.6.16\include\asm-powerpc\lv1calltab.h (kboot-20061208)
----
----
=== lv1_release_ioid ===


=== lv1_allocate_io_segment ===
Not used in current Kernel.


Allocate an io segment.
===== Abstract Call =====


===== kboot Call =====
  result = lv1_release_ioid( /*IN*/ p1, p2 );
 
  result = lv1_allocate_io_segment( /*IN*/ ioas_id, segment_size, io_page_size, /*OUT*/ &ioif_addr );


===== Parameters =====
===== Parameters =====
Line 2,546: Line 2,562:
|-
|-
|R3
|R3
|ioas_id - io address space id
|p1 - Unknown
|-
|-
|R4
|R4
|segment_size - io segment size
|p2 - Unknown
|-
|R5
|io_page_size - io page size, 0xC, 0×10, 0×14
|-
|-
! colspan="2" | Outputs
! colspan="2" | Outputs
Line 2,560: Line 2,573:
|-
|-
|R3
|R3
|Status - 0 = OK, Other values are unknown, but indicate failure.
|Status?
|-
|R4
|ioif_addr - io interface address
|-
|-
|}
|}
Line 2,569: Line 2,579:
Notes:
Notes:


Code taken from kboot-10\dl\linux-2.6.16\sound\powerpc\snd_ps3pf.c (kboot-20061208)
Info taken from kboot-10\dl\linux-2.6.16\include\asm-powerpc\lv1calltab.h (kboot-20061208)
ret64 = lv1_allocate_io_segment(0,          /* io space */
----
    IO_SEGMENTSIZE, /* segment size */
=== lv1_construct_io_irq_outlet ===
    IO_PAGESIZE_SHIFT, /* io page size */
    &(ioif_map_info_array[current_segment].ioif_addr));
----
=== lv1_release_io_segment ===


Release an io segment.
Construct an outlet for a non-virtualized device interrupt.


===== kboot Call =====
===== Kernel Call =====


  result = lv1_release_io_segment( /*IN*/ ioas_id, ioif_addr );
  result = lv1_construct_io_irq_outlet( /*IN*/ interrupt_id, /*OUT*/ &outlet );


===== Parameters =====
===== Parameters =====
Line 2,592: Line 2,598:
|-
|-
|R3
|R3
|ioas_id - io address space id
|interrupt_id - interrupt id
|-
|R4
|ioif_addr - io interface address
|-
|-
! colspan="2" | Outputs
! colspan="2" | Outputs
Line 2,604: Line 2,607:
|R3
|R3
|Status - 0 = OK, Other values are unknown, but indicate failure.
|Status - 0 = OK, Other values are unknown, but indicate failure.
|-
|R4
|outlet - interrupt outlet
|-
|-
|}
|}
Notes:
Code taken from kboot-10\dl\linux-2.6.16\sound\powerpc\snd_ps3pf.c (kboot-20061208)
ret64 = lv1_release_io_segment(0, /* io space */
    ioif_map_info_array[current_segment].ioif_addr);
----
----
=== lv1_allocate_ioid ===
=== lv1_destruct_io_irq_outlet ===


Not used in current kernel.
Destruct a previously constructed device interrupt outlet.


===== Abstract Call =====
===== Kernel Call =====


  result = lv1_allocate_ioid( /*IN*/ p1, /*OUT*/ &v1 );
  result = lv1_destruct_io_irq_outlet( /*IN*/ outlet );


===== Parameters =====
===== Parameters =====
Line 2,630: Line 2,630:
|-
|-
|R3
|R3
|SBZ
|outlet - interrupt outlet
|-
|-
! colspan="2" | Outputs
! colspan="2" | Outputs
Line 2,638: Line 2,638:
|-
|-
|R3
|R3
|Status?
|Status - 0 = OK, Other values are unknown, but indicate failure.
|-
|R4
|the ioid
|-
|}
|}
----
=== lv1_map_htab ===


Notes:
Map the hash page table.


Info taken from kboot-10\dl\linux-2.6.16\include\asm-powerpc\lv1calltab.h (kboot-20061208)
===== Kernel Call =====
----
=== lv1_release_ioid ===


Not used in current Kernel.
  result = lv1_map_htab( /*IN*/ 0, /*OUT*/ &htab_addr );
 
===== Abstract Call =====
 
  result = lv1_release_ioid( /*IN*/ p1, p2 );


===== Parameters =====
===== Parameters =====
Line 2,666: Line 2,658:
|-
|-
|R3
|R3
|p1 - Unknown
|0 - Unknown (lpid?)
|-
|R4
|p2 - Unknown
|-
|-
! colspan="2" | Outputs
! colspan="2" | Outputs
Line 2,679: Line 2,668:
|Status?
|Status?
|-
|-
|R4
|htab_addr - hash page table address
|}
|}


Notes:
Notes:


Info taken from kboot-10\dl\linux-2.6.16\include\asm-powerpc\lv1calltab.h (kboot-20061208)
In “htab.c” return code is assigned, but not used. Must be translated and ioremapped before it can be used in the kernel. It’s 1MB long
----
----
=== lv1_construct_io_irq_outlet ===
=== lv1_unmap_htab ===


Construct an outlet for a non-virtualized device interrupt.
Unmap the hash page table.


===== Kernel Call =====
===== Kernel Call =====


  result = lv1_construct_io_irq_outlet( /*IN*/ interrupt_id, /*OUT*/ &outlet );
  lv1_unmap_htab( /*IN*/ htab_addr );


===== Parameters =====
===== Parameters =====
Line 2,702: Line 2,693:
|-
|-
|R3
|R3
|interrupt_id - interrupt id
|htab_addr - hash page table address
|-
|-
! colspan="2" | Outputs
! colspan="2" | Outputs
Line 2,710: Line 2,701:
|-
|-
|R3
|R3
|Status - 0 = OK, Other values are unknown, but indicate failure.
|Status?
|-
|R4
|outlet - interrupt outlet
|-
|}
|}
----
----
=== lv1_destruct_io_irq_outlet ===
=== lv1_undocumented_function_124 ===


Destruct a previously constructed device interrupt outlet.
Exists in PAL 1.7. Returns -6 (LV1_NO_ENTRY) in R3, rest same as  [[HV_Syscall_Reference#lv1_undocumented_function_105|lv1_undocumented_function_105]].
----
=== lv1_undocumented_function_125 ===


===== Kernel Call =====
Exists in PAL 1.7. Returns -6 (LV1_NO_ENTRY) in R3, rest same as  [[HV_Syscall_Reference#lv1_undocumented_function_105|lv1_undocumented_function_105]].
----
=== lv1_undocumented_function_126 ===


result = lv1_destruct_io_irq_outlet( /*IN*/ outlet );
Exists in PAL 1.7. Returns -6 (LV1_NO_ENTRY) in R3, rest same as [[HV_Syscall_Reference#lv1_undocumented_function_105|lv1_undocumented_function_105]].
 
===== Parameters =====
{| class="wikitable"
|-
! colspan="2" | Inputs
|-
!Register
!Description
|-
|R3
|outlet - interrupt outlet
|-
! colspan="2" | Outputs
|-
!Register
!Description
|-
|R3
|Status - 0 = OK, Other values are unknown, but indicate failure.
|}
----
=== lv1_map_htab ===
 
Map the hash page table.
 
===== Kernel Call =====
 
result = lv1_map_htab( /*IN*/ 0, /*OUT*/ &htab_addr );
 
===== Parameters =====
{| class="wikitable"
|-
! colspan="2" | Inputs
|-
!Register
!Description
|-
|R3
|0 - Unknown (lpid?)
|-
! colspan="2" | Outputs
|-
!Register
!Description
|-
|R3
|Status?
|-
|R4
|htab_addr - hash page table address
|}
 
Notes:
 
In “htab.c” return code is assigned, but not used. Must be translated and ioremapped before it can be used in the kernel. It’s 1MB long
----
=== lv1_unmap_htab ===
 
Unmap the hash page table.
 
===== Kernel Call =====
 
  lv1_unmap_htab( /*IN*/ htab_addr );
 
===== Parameters =====
{| class="wikitable"
|-
! colspan="2" | Inputs
|-
!Register
!Description
|-
|R3
|htab_addr - hash page table address
|-
! colspan="2" | Outputs
|-
!Register
!Description
|-
|R3
|Status?
|}
----
=== lv1_read_remote_file_long_name ===
 
===== Parameters =====
{| class="wikitable"
|-
! colspan="2" | Inputs
|-
!Register
!Description
|-
|R3
|u32 type
|-
|R4
|u32 *path
|-
|R5
|u32 path_len
|-
|R6
|u64 offset
|-
|R7
|u32 *buf
|-
|R8
|u64 size
|-
! colspan="2" | Outputs
|-
!Register
!Description
|-
|R3
|status
|-
|R4
|n_read
|-
|}
----
=== lv1_write_remote_file_long_name ===
 
===== Parameters =====
{| class="wikitable"
|-
! colspan="2" | Inputs
|-
!Register
!Description
|-
|R3
|u32 type
|-
|R4
|u32 *path
|-
|R5
|u32 path_len
|-
|R6
|u64 offset
|-
|R7
|u32 *buf
|-
|R8
|u64 size
|-
! colspan="2" | Outputs
|-
!Register
!Description
|-
|R3
|status
|-
|R4
|n_write
|-
|}
----
=== lv1_get_remote_file_size_long_name ===
 
===== Parameters =====
{| class="wikitable"
|-
! colspan="2" | Inputs
|-
!Register
!Description
|-
|R3
|u32 type
|-
|R4
|u32 *path
|-
|R5
|u32 path_len
|-
! colspan="2" | Outputs
|-
!Register
!Description
|-
|R3
|status
|-
|R4
|file_size
|-
|}
----
----
=== lv1_get_version_info ===
=== lv1_get_version_info ===
Line 5,289: Line 5,083:
|-
|-
|R4
|R4
|tile_max_size in bytes. Max value 512*1024.
|0 - Unknown. Max value 512*1024.
|-
|-
|R5
|R5
|zcull_max_size in bytes. Max value 3075*1024.
|0 - Unknown. Max value 3075*1024.
|-
|-
|R6
|R6
|tile_max_areas. Max value 15.
|0 - Unknown. Max value 15.
|-
|-
|R7
|R7
|zcull_max_areas. Max value 8.
|0 - Unknown. Max value 8.
|-
|-
! colspan="2" | Outputs
! colspan="2" | Outputs
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)