Editing HV Syscall Reference
Jump to navigation
Jump to search
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 | ||
|} | |} | ||
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 785: | Line 775: | ||
=== lv1_detect_pending_interrupts === | === lv1_detect_pending_interrupts === | ||
Not used in current kernel | Not used in current kernel. | ||
===== Abstract Call ===== | ===== Abstract Call ===== | ||
Line 800: | Line 790: | ||
|- | |- | ||
|R3 | |R3 | ||
|p1 - unknown | |p1 - unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 808: | Line 798: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status? | ||
|- | |- | ||
|R4 | |R4 | ||
|v1 - | |v1 - Unknown | ||
|- | |- | ||
|R5 | |R5 | ||
|v2 - | |v2 - Unknown | ||
|- | |- | ||
|R6 | |R6 | ||
|v3 - | |v3 - Unknown | ||
|- | |- | ||
|R7 | |R7 | ||
|v4 - | |v4 - Unknown | ||
|- | |- | ||
|} | |} | ||
Notes: | Notes: | ||
Info taken from kboot-10\dl\linux-2.6.16\include\asm-powerpc\lv1calltab.h (kboot-20061208) | Info taken from kboot-10\dl\linux-2.6.16\include\asm-powerpc\lv1calltab.h (kboot-20061208) | ||
---- | ---- | ||
=== lv1_end_of_interrupt === | === lv1_end_of_interrupt === | ||
Line 1,274: | Line 1,263: | ||
|} | |} | ||
---- | ---- | ||
=== lv1_undocumented_function_62 === | === lv1_undocumented_function_62 === | ||
Exists in PAL 1.7; Returned -4 (LV1_DENIED_BY_POLICY) when passed 0 in R3 to R10. | Exists in PAL 1.7; Returned -4 (LV1_DENIED_BY_POLICY) when passed 0 in R3 to R10. | ||
---- | ---- | ||
=== lv1_undocumented_function_63 === | === lv1_undocumented_function_63 === | ||
Line 1,655: | Line 1,636: | ||
---- | ---- | ||
=== lv1_undocumented_function_89 === | === lv1_undocumented_function_89 === | ||
Exists in PAL 1.7; Returned -6 (LV1_NO_ENTRY) when passed 0 in R3 to R10. | Exists in PAL 1.7; Returned -6 (LV1_NO_ENTRY) when passed 0 in R3 to R10. | ||
---- | ---- | ||
=== lv1_create_repository_node === | === lv1_create_repository_node === | ||
Line 1,928: | Line 1,906: | ||
|00000000000000 (0) | |00000000000000 (0) | ||
|00000000000000 (0) | |00000000000000 (0) | ||
| | |– | ||
|- | |- | ||
|sys.flash.boot.#0 | |sys.flash.boot.#0 | ||
Line 2,036: | Line 2,014: | ||
|} | |} | ||
---- | ---- | ||
=== lv1_modify_repository_node_value === | === lv1_modify_repository_node_value === | ||
Line 2,174: | Line 2,151: | ||
=== lv1_set_dabr === | === lv1_set_dabr === | ||
Sets dabr ( | Sets dabr (data address breakpoint register) - an exception should be thrown upon access to data at this address (range?) | ||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = lv1_set_dabr( /*IN*/ dabr, | result = lv1_set_dabr( /*IN*/ dabr, DABR_KERNEL | DABR_USER); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 2,189: | Line 2,166: | ||
|- | |- | ||
|R3 | |R3 | ||
|dabr - | |dabr - data address | ||
|- | |- | ||
|R4 | |R4 | ||
| | |(DABR_KERNEL | DABR_USER) - see notes | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,205: | Line 2,182: | ||
Notes: | Notes: | ||
DABR_KERNEL and DABR_USER are defined in “setup.c” as follows | |||
enum {DABR_USER = 1, DABR_KERNEL = 2,}; | enum {DABR_USER = 1, DABR_KERNEL = 2,}; | ||
---- | ---- | ||
=== lv1_set_vmx_graphics_mode === | === lv1_set_vmx_graphics_mode === | ||
Line 2,263: | Line 2,224: | ||
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. | ||
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,273: | Line 2,234: | ||
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,307: | Line 2,267: | ||
Info taken from kboot-10\dl\linux-2.6.16\include\asm-powerpc\lv1calltab.h (kboot-20061208) | Info taken from kboot-10\dl\linux-2.6.16\include\asm-powerpc\lv1calltab.h (kboot-20061208) | ||
---- | ---- | ||
=== | === lv1_undocumented_function_99 === | ||
Exists in PAL 1.7; Returned -4 (LV1_DENIED_BY_POLICY) when passed 0 in R3 to R10. | Exists in PAL 1.7; Returned -4 (LV1_DENIED_BY_POLICY) when passed 0 in R3 to R10. | ||
---- | ---- | ||
=== lv1_undocumented_function_102 === | === lv1_undocumented_function_102 === | ||
Exists in PAL 1.7; Returned 0 (LV1_SUCCESS) and R4 = 0x692F5D1E7h when passed 0 in R3 to R10. | Exists in PAL 1.7; Returned 0 (LV1_SUCCESS) and R4 = 0x692F5D1E7h when passed 0 in R3 to R10. | ||
---- | ---- | ||
=== lv1_get_total_execution_time === | === lv1_get_total_execution_time === | ||
Line 2,382: | Line 2,335: | ||
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_undocumented_function_110 === | ||
===== Parameters ===== | 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]]. | ||
{| class="wikitable" | ---- | ||
|- | === lv1_undocumented_function_111 === | ||
! colspan="2" | Inputs | |||
|- | 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]]. | ||
!Register | ---- | ||
!Description | === 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 === | |||
Exists in PAL 1.7. Returns -17 (LV1_ILLEGAL_PARAMETER_VALUE) in R3, 0 in R4-R10. Passed 0 in R3 to R10. | |||
---- | |||
=== lv1_undocumented_function_115 === | |||
Exists in PAL 1.7. Returns -8 (LV1_TYPE_MISMATCH) in R3, 0 in R4-R10. Passed 0 in R3 to R10. | |||
---- | |||
=== 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 ===== | |||
{| class="wikitable" | |||
|- | |||
! colspan="2" | Inputs | |||
|- | |||
!Register | |||
!Description | |||
|- | |- | ||
|R3 | |R3 | ||
| | |ioas_id - io address space id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |segment_size - io segment size | ||
|- | |- | ||
|R5 | |R5 | ||
| | |io_page_size - io page size, 0xC, 0×10, 0×14 | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,413: | Line 2,386: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|R4 | |R4 | ||
| | |ioif_addr - io interface address | ||
|- | |- | ||
|} | |} | ||
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,432: | Line 2,418: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |ioas_id - io address space id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |ioif_addr - io interface address | ||
|- | |- | ||
! colspan="2" | Outputs | |||
! colspan="2" | Outputs | |||
|- | |- | ||
!Register | !Register | ||
Line 2,452: | Line 2,429: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|} | |} | ||
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 === | ||
Not used in current kernel. | |||
===== Abstract Call ===== | |||
result = lv1_allocate_ioid( /*IN*/ p1, /*OUT*/ &v1 ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 2,470: | Line 2,456: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |SBZ | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,481: | Line 2,464: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |Status? | ||
|- | |- | ||
|R4 | |R4 | ||
| | |the ioid | ||
|- | |- | ||
|}---- | |} | ||
=== | |||
Notes: | |||
Info taken from kboot-10\dl\linux-2.6.16\include\asm-powerpc\lv1calltab.h (kboot-20061208) | |||
---- | |||
=== lv1_release_ioid === | |||
Not used in current Kernel. | |||
===== Abstract Call ===== | |||
result = lv1_release_ioid( /*IN*/ p1, p2 ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 2,498: | Line 2,492: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |p1 - Unknown | ||
|- | |- | ||
|R4 | |R4 | ||
| | |p2 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,512: | Line 2,503: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status? | ||
|- | |- | ||
| | |} | ||
Notes: | |||
Info taken from kboot-10\dl\linux-2.6.16\include\asm-powerpc\lv1calltab.h (kboot-20061208) | |||
---- | ---- | ||
=== lv1_construct_io_irq_outlet === | |||
Construct an outlet for a non-virtualized device interrupt. | |||
===== Kernel Call ===== | |||
= | result = lv1_construct_io_irq_outlet( /*IN*/ interrupt_id, /*OUT*/ &outlet ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 2,532: | Line 2,528: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |interrupt_id - interrupt id | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,541: | Line 2,537: | ||
|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 | |||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== lv1_destruct_io_irq_outlet === | |||
Destruct a previously constructed device interrupt outlet. | |||
===== Kernel Call ===== | |||
result = lv1_destruct_io_irq_outlet( /*IN*/ outlet ); | |||
result = | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 2,564: | Line 2,560: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |outlet - interrupt outlet | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,579: | Line 2,569: | ||
|R3 | |R3 | ||
|Status - 0 = OK, Other values are unknown, but indicate failure. | |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 ===== | ===== Parameters ===== | ||
Line 2,610: | Line 2,588: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |0 - Unknown (lpid?) | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,621: | Line 2,596: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status? | ||
|- | |- | ||
|R4 | |||
|htab_addr - hash page table address | |||
|} | |} | ||
Notes: | 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 ===== | ===== Parameters ===== | ||
Line 2,648: | Line 2,623: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |htab_addr - hash page table address | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,657: | Line 2,632: | ||
|R3 | |R3 | ||
|Status? | |Status? | ||
|} | |} | ||
---- | |||
=== lv1_undocumented_function_124 === | |||
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 === | |||
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 === | ||
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_get_version_info === | |||
Returns PS3 firmware version information. | |||
===== | ===== Kernel Call ===== | ||
result = | result = lv1_get_version_info( /*OUT*/ &raw ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! colspan="2" | | ! colspan="2" | Outputs | ||
|- | |- | ||
!Register | !Register | ||
Line 2,684: | Line 2,663: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|R4 | |R4 | ||
| | |raw - firmware data (see notes) | ||
|} | |} | ||
Notes: | Notes: | ||
The firmware information is accessed using the following union: | |||
union ps3_firmware_version { | |||
u64 raw; | |||
struct { | |||
u16 pad; | |||
u16 major; | |||
u16 minor; | |||
u16 rev; | |||
}; | |||
}; | |||
---- | ---- | ||
=== | === lv1_undocumented_function_134 === | ||
Exists in PAL 1.7. Returns 0 when passed R3-R10=0. | |||
---- | |||
=== lv1_undocumented_function_135 === | |||
=== | 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_136 === | |||
result = | 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_137 === | |||
Exists in PAL 1.7. Returns -4 (LV1_DENIED_BY_POLICY) when passed 0 in R3-R10. | |||
---- | |||
=== lv1_undocumented_function_138 === | |||
Exists in PAL 1.7. Returns -4 (LV1_DENIED_BY_POLICY) when passed 0 in R3-R10. | |||
---- | |||
=== lv1_construct_lpm === | |||
Not used in current kernel. | |||
===== Abstract Call ===== | |||
result = lv1_construct_lpm( /*IN*/ p1, p2, p3, p4, p5, p6, /*OUT*/ &v1, &v2, &v3 ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 2,720: | Line 2,719: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |p1 - node_id, this is the node id of the processor, 0 is only valid value | ||
|- | |||
|R4 | |||
|p2 - tb_type, 0 is none, 1 is internal | |||
|- | |||
|R5 | |||
|p3 - Unknown, is 0 | |||
|- | |||
|R6 | |||
|p4 - Unknown, is 0 | |||
|- | |||
|R7 | |||
|p5 - tb_cache in lpar, 128 byte aligned | |||
|- | |||
|R8 | |||
|p6 - tb_cache_size | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,728: | Line 2,742: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status | ||
|- | |- | ||
|R4 | |R4 | ||
| | |v1 - lpm_id | ||
|- | |||
|R5 | |||
|v2 - outlet_id | |||
|- | |||
|R6 | |||
|v3 - tb_size | |||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_destruct_lpm === | ||
Not used in current kernel. | |||
===== | ===== Abstract Call ===== | ||
result = | result = lv1_destruct_lpm( /*IN*/ p1 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 2,752: | Line 2,772: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |p1 - lpm_id | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,760: | Line 2,780: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status - | |Status? | ||
|- | |||
|} | |} | ||
---- | ---- | ||
=== | === lv1_start_lpm === | ||
Not used in current kernel. | |||
===== | ===== Abstract Call ===== | ||
result = | result = lv1_start_lpm( /*IN*/ p1 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 2,780: | Line 2,801: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |p1 - lpm_id | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,790: | Line 2,811: | ||
|Status? | |Status? | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_stop_lpm === | ||
Not used in current kernel. | |||
===== | ===== Abstract Call ===== | ||
result = lv1_stop_lpm( /*IN*/ p1, /*OUT*/ &v1 ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 2,815: | Line 2,830: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |p1 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,824: | Line 2,839: | ||
|R3 | |R3 | ||
|Status? | |Status? | ||
|- | |||
|R4 | |||
|v1 - Unknown | |||
|- | |||
|} | |} | ||
---- | ---- | ||
=== | === lv1_copy_lpm_trace_buffer === | ||
Not used in current kernel. | |||
===== Abstract Call ===== | |||
result = lv1_copy_lpm_trace_buffer( /*IN*/ p1, p2, p3 /*OUT*/ &v1 ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 2,837: | Line 2,862: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |p1 - lpm_id | ||
|- | |- | ||
| | |R3 | ||
| | |p2 - offset | ||
|- | |- | ||
| | |R3 | ||
|p3 - request | |||
|- | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,860: | Line 2,876: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |Status | ||
|- | |- | ||
|R4 | |R4 | ||
| | |v1 - tmp | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_add_lpm_event_bookmark === | ||
Not in current kernel. | |||
===== Abstract Call ===== | |||
result = lv1_add_lpm_event_bookmark( /*IN*/ p1, p2, p3, p4, p5 ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 2,878: | Line 2,900: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |p1 - Unknown | ||
|- | |- | ||
| | |R3 | ||
| | |p2 - Unknown | ||
|- | |- | ||
| | |R3 | ||
| | |p3 - Unknown | ||
|- | |- | ||
|R6 | |R6 | ||
| | |p4 - Unknown | ||
|- | |- | ||
|R7 | |R7 | ||
| | |p5 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,901: | Line 2,920: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |Status? | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_delete_lpm_event_bookmark === | ||
Not used in current kernel. | |||
===== Abstract Call ===== | |||
result = lv1_delete_lpm_event_bookmark( /*IN*/ p1, p2, p3 ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 2,919: | Line 2,941: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |p1 - Unknown | ||
|- | |- | ||
| | |R3 | ||
| | |p2 - Unknown | ||
|- | |- | ||
| | |R3 | ||
| | |p3 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,933: | Line 2,955: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |Status? | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_set_lpm_interrupt_mask === | ||
Not used in current kernel. | |||
===== | ===== Abstract Call ===== | ||
result = | result = lv1_set_lpm_interrupt_mask( /*IN*/ p1, p2, p3, /*OUT*/ &v1 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |||
! colspan="2" | Inputs | |||
|- | |||
!Register | |||
!Description | |||
|- | |||
|R3 | |||
|p1 - Unknown | |||
|- | |||
|R3 | |||
|p2 - Unknown | |||
|- | |||
|R3 | |||
|p3 - Unknown | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 2,957: | Line 2,990: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status? | ||
|- | |- | ||
|R4 | |R4 | ||
| | |v1 - Unknown | ||
|- | |||
|} | |} | ||
---- | |||
=== lv1_get_lpm_interrupt_status === | |||
Not used in current kernel. | |||
===== Abstract Call ===== | |||
result = lv1_get_lpm_interrupt_status( /*IN*/ p1, /*OUT*/ &v1 ); | |||
===== Parameters ===== | |||
===== Parameters ===== | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
Line 3,017: | Line 3,014: | ||
|- | |- | ||
|R3 | |R3 | ||
|p1 - | |p1 - Unknown | ||
|- | |- | ||
| | ! colspan="2" | Outputs | ||
|- | |- | ||
!Register | |||
!Description | |||
|- | |- | ||
|R3 | |||
|Status? | |||
|R3 | |||
|Status | |||
|- | |- | ||
|R4 | |R4 | ||
|v1 - | |v1 - Unknown | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_set_lpm_general_control === | ||
Not used in current kernel. | Not used in current kernel. | ||
Line 3,059: | Line 3,035: | ||
===== Abstract Call ===== | ===== Abstract Call ===== | ||
result = | result = lv1_set_lpm_general_control( /*IN*/ p1, p2, p3, p4, p5, /*OUT*/ &v1, &v2 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,070: | Line 3,046: | ||
|- | |- | ||
|R3 | |R3 | ||
|p1 - | |p1 - Unknown | ||
|- | |||
|R4 | |||
|p2 - Unknown | |||
|- | |||
|R5 | |||
|p3 - Unknown | |||
|- | |||
|R6 | |||
|p4 - Unknown | |||
|- | |||
|R7 | |||
|p5 - Unknown | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,080: | Line 3,068: | ||
|Status? | |Status? | ||
|- | |- | ||
|} | |R4 | ||
---- | |v1 - Unknown | ||
=== | |- | ||
|R5 | |||
|v2 - Unknown | |||
|- | |||
|} | |||
---- | |||
=== lv1_set_lpm_interval === | |||
Not used in current kernel. | Not used in current kernel. | ||
Line 3,088: | Line 3,082: | ||
===== Abstract Call ===== | ===== Abstract Call ===== | ||
result = | result = lv1_set_lpm_interval( /*IN*/ p1, p2, p3, /*OUT*/ &v1 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,099: | Line 3,093: | ||
|- | |- | ||
|R3 | |R3 | ||
|p1 - | |p1 - Unknown | ||
|- | |||
|R4 | |||
|p2 - Unknown | |||
|- | |||
|R5 | |||
|p3 - Unknown | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,108: | Line 3,108: | ||
|R3 | |R3 | ||
|Status? | |Status? | ||
|- | |||
|R4 | |||
|v1 - Unknown | |||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_set_lpm_trigger_control === | ||
Not used in current kernel. | Not used in current kernel. | ||
Line 3,117: | Line 3,120: | ||
===== Abstract Call ===== | ===== Abstract Call ===== | ||
result = | result = lv1_set_lpm_trigger_control( /*IN*/ p1, p2, p3, /*OUT*/ &v1 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,129: | Line 3,132: | ||
|R3 | |R3 | ||
|p1 - Unknown | |p1 - Unknown | ||
|- | |||
|R4 | |||
|p2 - Unknown | |||
|- | |||
|R5 | |||
|p3 - Unknown | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,143: | Line 3,152: | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_set_lpm_counter_control === | ||
Not used in current kernel. | Not used in current kernel. | ||
Line 3,149: | Line 3,158: | ||
===== Abstract Call ===== | ===== Abstract Call ===== | ||
result = | result = lv1_set_lpm_counter_control( /*IN*/ p1, p2, p3, p4, /*OUT*/ &v1 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,160: | Line 3,169: | ||
|- | |- | ||
|R3 | |R3 | ||
|p1 - | |p1 - Unknown | ||
|- | |||
|R4 | |||
|p2 - Unknown | |||
|- | |- | ||
| | |R5 | ||
| | |p3 - Unknown | ||
|- | |- | ||
| | |R6 | ||
| | |p4 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,174: | Line 3,186: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status? | ||
|- | |- | ||
|R4 | |R4 | ||
|v1 - | |v1 - Unknown | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_set_lpm_group_control === | ||
Not in current kernel. | Not used in current kernel. | ||
===== Abstract Call ===== | ===== Abstract Call ===== | ||
result = | result = lv1_set_lpm_group_control( /*IN*/ p1, p2, p3, /*OUT*/ &v1 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,200: | Line 3,212: | ||
|p1 - Unknown | |p1 - Unknown | ||
|- | |- | ||
| | |R4 | ||
|p2 - Unknown | |p2 - Unknown | ||
|- | |- | ||
| | |R5 | ||
|p3 - Unknown | |p3 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,219: | Line 3,225: | ||
|R3 | |R3 | ||
|Status? | |Status? | ||
|- | |||
|R4 | |||
|v1 - Unknown | |||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_set_lpm_debug_bus_control === | ||
Not used in current kernel. | Not used in current kernel. | ||
Line 3,228: | Line 3,237: | ||
===== Abstract Call ===== | ===== Abstract Call ===== | ||
result = | result = lv1_set_lpm_debug_bus_control( /*IN*/ p1, p2, p3, /*OUT*/ &v1 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,241: | Line 3,250: | ||
|p1 - Unknown | |p1 - Unknown | ||
|- | |- | ||
| | |R4 | ||
|p2 - Unknown | |p2 - Unknown | ||
|- | |- | ||
| | |R5 | ||
|p3 - Unknown | |p3 - Unknown | ||
|- | |- | ||
Line 3,254: | Line 3,263: | ||
|R3 | |R3 | ||
|Status? | |Status? | ||
|- | |||
|R4 | |||
|v1 - Unknown | |||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_set_lpm_counter === | ||
Not used in current kernel. | Not used in current kernel. | ||
Line 3,263: | Line 3,275: | ||
===== Abstract Call ===== | ===== Abstract Call ===== | ||
result = | result = lv1_set_lpm_counter( /*IN*/ p1, p2, p3, p4, p5, /*OUT*/ &v1, &v2 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,276: | Line 3,288: | ||
|p1 - Unknown | |p1 - Unknown | ||
|- | |- | ||
| | |R4 | ||
|p2 - Unknown | |p2 - Unknown | ||
|- | |- | ||
| | |R5 | ||
|p3 - Unknown | |p3 - Unknown | ||
|- | |- | ||
|R6 | |||
|p4 - Unknown | |||
|- | |- | ||
!Register | |R7 | ||
|p5 - Unknown | |||
|- | |||
! colspan="2" | Outputs | |||
|- | |||
!Register | |||
!Description | !Description | ||
|- | |- | ||
Line 3,292: | Line 3,310: | ||
|R4 | |R4 | ||
|v1 - Unknown | |v1 - Unknown | ||
|- | |||
|R5 | |||
|v2 - Unknown | |||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_set_lpm_signal === | ||
Not used in current kernel. | Not used in current kernel. | ||
Line 3,301: | Line 3,322: | ||
===== Abstract Call ===== | ===== Abstract Call ===== | ||
result = | result = lv1_set_lpm_signal( /*IN*/ p1, p2, p3, p4, p5, p6, p7 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,313: | Line 3,334: | ||
|R3 | |R3 | ||
|p1 - Unknown | |p1 - Unknown | ||
|- | |||
|R4 | |||
|p2 - Unknown | |||
|- | |||
|R5 | |||
|p3 - Unknown | |||
|- | |||
|R6 | |||
|p4 - Unknown | |||
|- | |||
|R7 | |||
|p5 - Unknown | |||
|- | |||
|R8 | |||
|p6 - Unknown | |||
|- | |||
|R9 | |||
|p7 - Unknown | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,321: | Line 3,360: | ||
|R3 | |R3 | ||
|Status? | |Status? | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_set_lpm_spr_trigger === | ||
Not used in current kernel. | Not used in current kernel. | ||
Line 3,333: | Line 3,369: | ||
===== Abstract Call ===== | ===== Abstract Call ===== | ||
result = | result = lv1_set_lpm_spr_trigger( /*IN*/ p1, p2 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,348: | Line 3,384: | ||
|R4 | |R4 | ||
|p2 - Unknown | |p2 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,366: | Line 3,393: | ||
|Status? | |Status? | ||
|- | |- | ||
|} | |||
|} | |||
---- | ---- | ||
=== | === lv1_insert_htab_entry === | ||
Used in current kernel. | |||
===== | ===== Kernel Call ===== | ||
result = | result = lv1_insert_htab_entry( /*IN*/ p1, p2, p3, p4, p5, p6, /*OUT*/ &v1, &v2, &v3 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,391: | Line 3,412: | ||
|- | |- | ||
|R3 | |R3 | ||
|p1 - | |p1 - htab ID, 0 or returns -6 | ||
|- | |- | ||
|R4 | |R4 | ||
|p2 - | |p2 - hpte_group, 0 or returns -17 | ||
|- | |- | ||
|R5 | |R5 | ||
|p3 - | |p3 - hpte_v | ||
|- | |||
|R6 | |||
|p4 - hpte_r | |||
|- | |||
|R7 | |||
|p5 - Bolted flag | |||
|- | |||
|R8 | |||
|p6 - flags? | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,408: | Line 3,438: | ||
|- | |- | ||
|R4 | |R4 | ||
|v1 - | |v1 - inserted_index | ||
|- | |||
|R5 | |||
|v2 - evicted_v | |||
|- | |||
|R6 | |||
|v3 - evicted_r | |||
|- | |- | ||
|} | |} | ||
Notes: Kernel usage: | |||
result = lv1_insert_htab_entry(PS3_LPAR_VAS_ID_CURRENT, hpte_group, | |||
hpte_v, hpte_r, | |||
HPTE_V_BOLTED, 0, | |||
&inserted_index, | |||
&evicted_v, &evicted_r); | |||
---- | ---- | ||
=== | === lv1_read_virtual_uart === | ||
Read data from a VUART port into a provided buffer. | |||
===== | ===== Kernel Call ===== | ||
result = | result = lv1_read_virtual_uart( /*IN*/ port_number, buffer, bytes, /*OUT*/ bytes_read ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,429: | Line 3,472: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |port_number - VUART port number | ||
|- | |- | ||
|R4 | |R4 | ||
| | |buffer - pointer to buffer (must be address in lpar) | ||
|- | |- | ||
|R5 | |R5 | ||
| | |bytes - buffer size? | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,443: | Line 3,486: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|R4 | |R4 | ||
| | |bytes_read - number of bytes read into buffer | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_write_virtual_uart === | ||
Write a buffer of data to a VUART port. | |||
===== | ===== Kernel Call ===== | ||
result = | result = lv1_write_virtual_uart( /*IN*/ port_number, buffer, bytes, /*OUT*/ bytes_written ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,467: | Line 3,510: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |port_number - VUART port number | ||
|- | |- | ||
|R4 | |R4 | ||
| | |buffer - pointer to buffer (must be address in lpar) | ||
|- | |- | ||
|R5 | |R5 | ||
| | |bytes - buffer size? | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,484: | Line 3,524: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|R4 | |R4 | ||
| | |bytes_written - number of bytes written to VUART | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_set_virtual_uart_param === | ||
Set a parameter for a port on the VUART. | |||
===== | ===== Kernel Call ===== | ||
result = | result = lv1_set_virtual_uart_param( /*IN*/ port_number, param_id, param_value ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,508: | Line 3,548: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |port_number - VUART port number | ||
|- | |- | ||
|R4 | |R4 | ||
| | |param_id - id of parameter to set (see notes) | ||
|- | |- | ||
|R5 | |R5 | ||
| | |param_value - parameter value | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,522: | Line 3,562: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|} | |} | ||
See [[HV_Syscall_Reference#lv1_get_virtual_uart_param|lv1_get_virtual_uart_param]] for parameter information. | |||
---- | ---- | ||
=== | === lv1_get_virtual_uart_param === | ||
Get a parameter for a port on the VUART. | |||
===== | ===== Kernel Call ===== | ||
result = | result = lv1_get_virtual_uart_param( /*IN*/ port_number, param_id, /*OUT*/ ¶m_value ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,546: | Line 3,585: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |port_number - VUART port number | ||
|- | |- | ||
|R4 | |R4 | ||
| | |param_id - id of parameter to set (see notes) | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,560: | Line 3,596: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|R4 | |R4 | ||
| | |param_value - parameter value | ||
|- | |- | ||
|} | |} | ||
VUART parameters defined in vuart.c: | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! | !Parameter | ||
!param_id | |||
!Notes | |||
|- | |- | ||
|PARAM_TX_TRIGGER | |||
|0 | |||
| | |||
|- | |- | ||
| | |PARAM_RX_TRIGGER | ||
| | |1 | ||
| | |||
|- | |- | ||
| | |PARAM_INTERRUPT_MASK | ||
| | |2 | ||
| | |||
|- | |- | ||
| | |PARAM_RX_BUF_SIZE | ||
| | |3 | ||
|read only | |||
|- | |- | ||
| | |PARAM_RX_BYTES | ||
| | |4 | ||
|read only | |||
|- | |- | ||
| | |PARAM_TX_BUF_SIZE | ||
| | |5 | ||
|read only, not referenced in current Kernel | |||
|- | |- | ||
|PARAM_TX_BYTES | |||
|6 | |||
|read only, not referenced in current Kernel | |||
|- | |- | ||
|PARAM_INTERRUPT_STATUS | |||
|7 | |||
|read only | |||
| | |||
| | |||
| | |||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_configure_virtual_uart_irq === | ||
Configure the VUART IRQ. | |||
===== | ===== Kernel Call ===== | ||
result = | result = lv1_configure_virtual_uart_irq( /*IN*/ lpar_addr, /*OUT*/ &outlet ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,631: | Line 3,661: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |lpar_addr - logical partition address of virtual uart interrupt bitmap | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,657: | Line 3,669: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |||
|R4 | |||
|outlet - irq outlet | |||
|- | |- | ||
|} | |} | ||
Notes: | |||
=== | Comment from interrupt.c: | ||
/** | |||
* The system supports only a single virtual uart, so multiple calls without | |||
* freeing the interrupt will return a wrong state error. | |||
*/ | |||
---- | |||
=== lv1_undocumented_function_167 === | |||
result = | Exists on PAL 1.7. Returns -4 (LV1_DENIED_BY_POLICY) when passed 0 in R3 to R10. | ||
---- | |||
=== lv1_undocumented_function_168 === | |||
Exists on PAL 1.7. Returns -4 (LV1_DENIED_BY_POLICY) when passed 0 in R3 to R10. | |||
---- | |||
=== lv1_open_device === | |||
Open the device for a given bus and device id. | |||
===== Kernel Call ===== | |||
result = lv1_open_device( /*IN*/ bus_id, dev_id, 0 ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,678: | Line 3,709: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |bus_id - bus id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |dev_id - device id | ||
|- | |||
|R5 | |||
|0 - Unknown | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,689: | Line 3,723: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status: LV1_SUCCESS (0) - OK | ||
LV1_NO_ENTRY (-6) - invalid dev_id | |||
LV1_BUSY (-9) - device already open | |||
LV1_ILLEGAL_PARAMETER_VALUE (-17) - invalid bus_id | |||
|- | |- | ||
|} | |} | ||
Notes: | |||
Valid values for bus_id and dev_id can be obtained from the repository (see [[HV_Syscall_Reference#lv1_get_repository_node_value|lv1_get_repository_node_value]]). | |||
Once open, functions such as [[HV_Syscall_Reference#lv1_map_device_mmio_region|lv1_map_device_mmio_region]] and [[HV_Syscall_Reference#lv1_allocate_device_dma_region|lv1_allocate_device_dma_region]] can be used to map the device into memory. | |||
The value of R5 does not seem to affect the outcome of the call (powers of 2 in the 64 bit range were tested). One reason for the flag could be to indicate whether to open the device in shared mode or not (and thus prevent the LV1_BUSY return code). | |||
---- | ---- | ||
=== | === lv1_close_device === | ||
Close the device for a given bus and device id. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = lv1_close_device( /*IN*/ bus_id, dev_id ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,710: | Line 3,755: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |bus_id - bus id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |dev_id - device id | ||
|- | |- | ||
| | ! colspan="2" | Outputs | ||
|- | |- | ||
!Register | |||
!Description | |||
!Register | |||
!Description | |||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_map_device_mmio_region === | ||
Map an MMIO region to the specified device. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = | result = lv1_map_device_mmio_region( /*IN*/ bus_id, dev_id, bus_addr, size, page_size, /*OUT*/ &lpar_addr ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,770: | Line 3,787: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |bus_id - bus id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |dev_id - device id | ||
|- | |- | ||
|R5 | |R5 | ||
| | |bus_addr - address of the region | ||
|- | |||
|R6 | |||
|size - size of the region | |||
|- | |||
|R7 | |||
|page_size - page size of the region | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,787: | Line 3,810: | ||
|- | |- | ||
|R4 | |R4 | ||
| | |lpar_addr - logical partition address of the mapped region | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_unmap_device_mmio_region === | ||
Unmap an MMIO region from the specified device. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = | result = lv1_unmap_device_mmio_region( /*IN*/ bus_id, dev_id, lpar_addr ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,808: | Line 3,831: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |bus_id - bus id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |dev_id - device id | ||
|- | |- | ||
|R5 | |R5 | ||
| | |lpar_addr - logical partition address of the mapped region | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,823: | Line 3,846: | ||
|R3 | |R3 | ||
|Status - 0 = OK, Other values are unknown, but indicate failure. | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_allocate_device_dma_region === | ||
Allocate a DMA region for the specified device. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = | result = lv1_allocate_device_dma_region( /*IN*/ bus_id, dev_id, io_size, io_pagesize, flag, &dma_region ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,846: | Line 3,866: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |bus_id - bus id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |dev_id - device id | ||
|- | |- | ||
|R5 | |R5 | ||
| | |io_size - region size | ||
|- | |||
|R6 | |||
|io_pagesize - specified as a PAGE_SHIFT (i.e. n where pagesize = 2^n) | |||
|- | |||
|R7 | |||
|flag - 0=32 bit mode, 2=8 bit mode | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,861: | Line 3,887: | ||
|R3 | |R3 | ||
|Status - 0 = OK, Other values are unknown, but indicate failure. | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |||
|R4 | |||
|dma_region - dma region address | |||
|- | |- | ||
|} | |} | ||
Notes: When the device is little endian, the mode must be set to 8 bit for 8 bit DMA to work as expected, otherwise the bytes will be read/written in the wrong order. OTOH, this mode requires that 16 and 32-bit values are byte-swapped by the CPU since they will appear as little endian in memory. | |||
---- | ---- | ||
=== | === lv1_free_device_dma_region === | ||
Free a previously allocated DMA region for the specified device. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
lv1_free_device_dma_region( /*IN*/ bus_id, dev_id, dma_region ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,883: | Line 3,912: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |bus_id - bus id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |dev_id - device id | ||
|- | |||
|R5 | |||
|dma_region - dma region address | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,894: | Line 3,926: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status? | ||
|- | |- | ||
|} | |} | ||
---- | |||
=== lv1_map_device_dma_region === | |||
Map a DMA region for the specified device. | |||
===== Kernel Call ===== | |||
result = lv1_map_device_dma_region( /*IN*/ bus_id, dev_id, lpar_addr, dma_region, size, flags ); | |||
===== Parameters ===== | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! | ! colspan="2" | Inputs | ||
|- | |- | ||
!Register | |||
!Description | |||
|- | |- | ||
| | |R3 | ||
|bus_id - bus id | |||
| | |||
|- | |- | ||
| | |R4 | ||
|dev_id - device id | |||
| | |||
|- | |- | ||
| | |R5 | ||
| | |lpar_addr - logical partition address | ||
|- | |- | ||
| | |R6 | ||
| | |dma_region - dma region address | ||
| | |- | ||
|R7 | |||
|size - region size | |||
|- | |||
|R8 | |||
|flags - see notes | |||
|- | |- | ||
| | ! colspan="2" | Outputs | ||
|- | |- | ||
!Register | |||
!Description | |||
|- | |- | ||
| | |R3 | ||
| | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|} | |} | ||
Notes: | |||
In “mm.c” and “ps3_storage.c”, flags parameter is always specified as 0xf800000000000000UL. They are the same flags as the IOPTE entry ones. | |||
---- | ---- | ||
=== | === lv1_unmap_device_dma_region === | ||
Unmap a DMA region for the specified device. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = | result = lv1_unmap_device_dma_region( /*IN*/ bus_id, dev_id, dma_region, size ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 3,959: | Line 3,995: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |bus_id - bus id | ||
|- | |||
|R4 | |||
|dev_id - device id | |||
|- | |||
|R5 | |||
|dma_region - dma region address | |||
|- | |||
|R6 | |||
|size - region size | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 3,968: | Line 4,013: | ||
|R3 | |R3 | ||
|Status - 0 = OK, Other values are unknown, but indicate failure. | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|} | |} | ||
---- | |||
=== lv1_read_pci_config === | |||
Read external PCI config. ''PS3tool only?'' | |||
===== kboot Call ===== | |||
=== | |||
result = lv1_read_pci_config( /*IN*/ bus_id, pci_bus_id, dev_id, func_id, offset, size, /*OUT*/ &config_data ); | |||
result = | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,011: | Line 4,033: | ||
|- | |- | ||
|R3 | |R3 | ||
|bus_id - bus id | |bus_id - ps3 bus id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |pci_bus_id - pci bus id | ||
|- | |- | ||
|R5 | |R5 | ||
| | |dev_id - pci device id | ||
|- | |||
|R6 | |||
|func_id - pci function | |||
|- | |||
|R7 | |||
|offset - offset to store data within config_data | |||
|- | |||
|R8 | |||
|size - size of config_data | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,025: | Line 4,056: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |||
|R4 | |||
|config_data - pci config data | |||
|- | |- | ||
|} | |} | ||
Line 4,034: | Line 4,065: | ||
Notes: | Notes: | ||
Code taken from kboot-10\dl\linux-2.6.16\arch\powerpc\platforms\ps3pf\pci.c (kboot-20061208) | |||
status = lv1_read_pci_config(p->bus_id, p->bus_pci_bus, p->bus_pci_dev, p->bus_pci_func, | |||
(uint64_t)offset, size, &data); | |||
---- | ---- | ||
=== | === lv1_write_pci_config === | ||
Write external PCI config. ''PS3tool only?'' | |||
===== | ===== kboot Call ===== | ||
result = | result = lv1_write_pci_config( /*IN*/ bus_id, pci_bus_id, dev_id, func_id, offset, size, config_data ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,057: | Line 4,086: | ||
|- | |- | ||
|R3 | |R3 | ||
|bus_id - bus id | |bus_id - ps3 bus id | ||
|- | |- | ||
|R4 | |R4 | ||
|dev_id - device id | |pci_bus_id - pci bus id | ||
|- | |||
|R5 | |||
|dev_id - pci device id | |||
|- | |||
|R6 | |||
|func_id - pci function | |||
|- | |||
|R7 | |||
|offset - offset to store data within config_data | |||
|- | |||
|R8 | |||
|size - size of config_data | |||
|- | |||
|R9 | |||
|config_data - pci config data | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,071: | Line 4,115: | ||
|- | |- | ||
|} | |} | ||
Notes: | |||
===== | Code taken from kboot-10\dl\linux-2.6.16\arch\powerpc\platforms\ps3pf\pci.c (kboot-20061208) | ||
status = lv1_write_pci_config(p->bus_id, p->bus_pci_bus, p->bus_pci_dev, p->bus_pci_func, | |||
result = | (uint64_t)offset, size, (uint64_t)val); | ||
if(status) { | |||
/* lv1_write_pci_config can't write reg from 0x10 to 0x3f */ | |||
} | |||
---- | |||
=== lv1_read_pci_io === | |||
Not used in current kernel. | |||
===== Abstract Call ===== | |||
result = lv1_read_pci_io( /*IN*/ p1, p2, p3, p4, /*OUT*/ &v1 ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,089: | Line 4,142: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |p1 - Unknown | ||
|- | |- | ||
|R4 | |R4 | ||
| | |p2 - Unknown | ||
|- | |- | ||
|R5 | |R5 | ||
| | |p3 - Unknown | ||
|- | |- | ||
|R6 | |R6 | ||
| | |p4 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,109: | Line 4,159: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status? | ||
|- | |- | ||
|R4 | |R4 | ||
| | |v1 - Unknown | ||
|- | |- | ||
|} | |} | ||
Notes: | |||
Info taken from kboot-10\dl\linux-2.6.16\include\asm-powerpc\lv1calltab.h (kboot-20061208) | |||
---- | ---- | ||
=== | === lv1_write_pci_io === | ||
Not used in current kernel. | |||
===== | ===== Abstract Call ===== | ||
result = | result = lv1_write_pci_io( /*IN*/ p1, p2, p3, p4, p5 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,133: | Line 4,187: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |p1 - Unknown | ||
|- | |- | ||
|R4 | |R4 | ||
| | |p2 - Unknown | ||
|- | |- | ||
|R5 | |R5 | ||
| | |p3 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | |R6 | ||
|p4 - Unknown | |||
|- | |||
! colspan="2" | Outputs | |||
|- | |- | ||
!Register | !Register | ||
Line 4,147: | Line 4,204: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status? | ||
|- | |- | ||
|} | |} | ||
Notes: | |||
Info taken from kboot-10\dl\linux-2.6.16\include\asm-powerpc\lv1calltab.h (kboot-20061208) | |||
---- | |||
=== lv1_undocumented_function_182 === | |||
Exists in PAL 3.15. Nothing known so far. | |||
Note: probably a function that allocates or frees memory. | |||
---- | |||
=== lv1_undocumented_function_183 === | |||
Exists in PAL 3.15. Nothing known so far. | |||
Note: probably a function that allocates or frees memory. | |||
---- | ---- | ||
=== | === lv1_net_add_multicast_address === | ||
Add multicast address to the specified network device. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = | result = lv1_net_add_multicast_address( /*IN*/ bus_id, dev_id, addr, flag ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,174: | Line 4,245: | ||
|- | |- | ||
|R5 | |R5 | ||
| | |addr - see notes | ||
|- | |- | ||
|R6 | |R6 | ||
|flag - see notes | |||
|flag - | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,189: | Line 4,257: | ||
|R3 | |R3 | ||
|Status - 0 = OK, Other values are unknown, but indicate failure. | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|} | |} | ||
Notes: | Notes: | ||
From “gelic_net.c”, addr can also take special values of 0 and GELIC_NET_BROADCAST_ADDR (0xffffffff) and flag is assigned values of 0 and 1. | |||
---- | ---- | ||
=== lv1_net_remove_multicast_address === | |||
Remove multicast address on the specified network device. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = lv1_net_remove_multicast_address( /*IN*/ bus_id, dev_id, 0, 1 ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,221: | Line 4,287: | ||
|- | |- | ||
|R5 | |R5 | ||
| | |0 - Unknown | ||
|- | |||
|R6 | |||
|1 - Unknown | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,229: | Line 4,298: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_net_start_tx_dma === | ||
Start DMA transmit on the specified network device. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = | result = lv1_net_start_tx_dma( /*IN*/ bus_id, dev_id, bus_addr, 0 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,256: | Line 4,325: | ||
|- | |- | ||
|R5 | |R5 | ||
| | |bus_addr - dma address? | ||
|- | |- | ||
|R6 | |R6 | ||
| | |0 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,276: | Line 4,339: | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_net_stop_tx_dma === | ||
Stop DMA transmit on the specified network device. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = | result = lv1_net_stop_tx_dma( /*IN*/ bus_id, dev_id, 0 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,304: | Line 4,363: | ||
|- | |- | ||
|R5 | |R5 | ||
| | |0 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,319: | Line 4,375: | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_net_start_rx_dma === | ||
Start DMA receive on the specified network device. | |||
===== | ===== Kernel Call ===== | ||
result = | result = lv1_net_start_rx_dma( /*IN*/ bus_id, dev_id, bus_addr, 0 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,336: | Line 4,392: | ||
|- | |- | ||
|R3 | |R3 | ||
|bus_id - | |bus_id - bus id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |dev_id - device id | ||
|- | |- | ||
|R5 | |R5 | ||
| | |bus_addr - dma address? | ||
|- | |- | ||
|R6 | |R6 | ||
| | |0 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,360: | Line 4,410: | ||
|R3 | |R3 | ||
|Status - 0 = OK, Other values are unknown, but indicate failure. | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_net_stop_rx_dma === | ||
Stop DMA receive on the specified network device. | |||
===== | ===== Kernel Call ===== | ||
result = | result = lv1_net_stop_rx_dma( /*IN*/ bus_id, dev_id, 0 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,389: | Line 4,430: | ||
|- | |- | ||
|R3 | |R3 | ||
|bus_id - | |bus_id - bus id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |dev_id - device id | ||
|- | |- | ||
|R5 | |R5 | ||
| | |0 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,418: | Line 4,447: | ||
|- | |- | ||
|} | |} | ||
---- | |||
=== lv1_net_set_interrupt_status_indicator === | |||
Set the interrupt status indicator for the specified network device. | |||
===== Kernel Call ===== | |||
=== | |||
result = lv1_net_set_interrupt_status_indicator( /*IN*/ bus_id, dev_id, irq_status_addr, 0 ); | |||
result = | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,445: | Line 4,465: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |bus_id - bus id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |dev_id - device id | ||
|- | |- | ||
|R5 | |R5 | ||
| | |irq_status_addr - lpar address of the irq status indicator | ||
|- | |- | ||
|R6 | |R6 | ||
| | |0 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,462: | Line 4,482: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_net_set_interrupt_mask === | ||
Sets the interrupt mask for specified network device. | |||
===== | ===== Kernel Call ===== | ||
result = | result = lv1_net_set_interrupt_mask( /*IN*/ bus_id, dev_id, mask, 0 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,490: | Line 4,503: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |bus_id - bus id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |dev_id - device id | ||
|- | |- | ||
|R5 | |R5 | ||
| | |mask - interrupt mask | ||
|- | |- | ||
|R6 | |R6 | ||
| | |0 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,507: | Line 4,520: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_net_control === | ||
Send a control command to the specified network device. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = | result = lv1_net_control( /*IN*/ bus_id, dev_id, p1, p2, p3, p4, /*OUT*/ &v1, &v2 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,548: | Line 4,547: | ||
|- | |- | ||
|R5 | |R5 | ||
| | |p1 - command dependent input parameter | ||
|- | |- | ||
|R6 | |R6 | ||
| | |p2 - command dependent input parameter | ||
|- | |||
|R7 | |||
|p3 - command dependent input parameter | |||
|- | |||
|R8 | |||
|p4 - command dependent input parameter | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,560: | Line 4,565: | ||
|R3 | |R3 | ||
|Status - 0 = OK, Other values are unknown, but indicate failure. | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |||
|R4 | |||
|v1 - command dependent output parameter | |||
|- | |||
|R5 | |||
|v2 - command dependent output parameter | |||
|- | |- | ||
|} | |} | ||
---- | |||
=== lv1_undocumented_function_195 === | |||
Exists in PAL 1.7. Returns -3 (LV1_NO_PRIVILEGE) when passed 0 in R3 to R10. | |||
---- | |||
=== lv1_undocumented_function_196 === | |||
Exists in PAL 1.7. Returns -3 (LV1_NO_PRIVILEGE) when passed 0 in R3 to R10. | |||
---- | ---- | ||
=== | === lv1_connect_interrupt_event_receive_port === | ||
Assign a virtual interrupt to a system bus device. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = | result = lv1_connect_interrupt_event_receive_port( /*IN*/ bus_id, dev_id, outlet, interrupt_id ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,584: | Line 4,599: | ||
|- | |- | ||
|R3 | |R3 | ||
|bus_id - bus id | |bus_id - device bus id | ||
|- | |- | ||
|R4 | |R4 | ||
Line 4,590: | Line 4,605: | ||
|- | |- | ||
|R5 | |R5 | ||
| | |outlet - interrupt outlet | ||
|- | |- | ||
|R6 | |R6 | ||
| | |interrupt_id - interrupt id | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,605: | Line 4,620: | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_disconnect_interrupt_event_receive_port === | ||
Disconnect a virtual interrupt from a system bus device. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = | result = lv1_disconnect_interrupt_event_receive_port( /*IN*/ bus_id, dev_id, outlet, interrupt_id ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,622: | Line 4,637: | ||
|- | |- | ||
|R3 | |R3 | ||
|bus_id - bus id | |bus_id - device bus id | ||
|- | |- | ||
|R4 | |R4 | ||
Line 4,628: | Line 4,643: | ||
|- | |- | ||
|R5 | |R5 | ||
| | |outlet - interrupt outlet | ||
|- | |- | ||
|R6 | |R6 | ||
| | |interrupt_id - interrupt id | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,643: | Line 4,658: | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_get_spe_all_interrupt_statuses === | ||
Not used in current kernel. | |||
===== | ===== Abstract Call ===== | ||
result = | result = lv1_get_spe_all_interrupt_statuses( /*IN*/ p1, /*OUT*/ &v1 ); | ||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,660: | Line 4,675: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |p1 - Unknown | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,674: | Line 4,683: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status - | |Status? | ||
|- | |||
|R4 | |||
|v1 - Unknown | |||
|- | |- | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_undocumented_function_200 === | ||
Exists in PAL 1.7. Returns -4 (LV1_DENIED_BY_POLICY) when passed 0 in R3 to R10. | |||
---- | |||
=== lv1_undocumented_function_201 === | |||
Exists in PAL 1.7. Returns -4 (LV1_DENIED_BY_POLICY) when passed 0 in R3 to R10. | |||
---- | |||
=== lv1_deconfigure_virtual_uart_irq === | |||
Deconfigure the VUART IRQ. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
result = | result = lv1_deconfigure_virtual_uart_irq(); | ||
===== Parameters ===== | ===== Parameters ===== | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,716: | Line 4,719: | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_enable_logical_spe === | ||
Enables a logical SPE. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
status = lv1_enable_logical_spe( /*IN*/ spe_id, resource_id ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,733: | Line 4,736: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |spe_id - logical spe id | ||
|- | |- | ||
|R4 | |R4 | ||
| | |resource_id - spe resource id (prevously retrieved from Kernel repository) | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,751: | Line 4,751: | ||
|} | |} | ||
---- | ---- | ||
=== | === lv1_undocumented_function_209 === | ||
Exists in PAL 1.7. Returns -4 (LV1_DENIED_BY_POLICY) when passed 0 in R3 to R10. | |||
---- | |||
=== lv1_gpu_open === | |||
Open the GPU. Call [[HV_Syscall_Reference#lv1_gpu_close|lv1_gpu_close]] to close the GPU. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
status = lv1_gpu_open( /*IN*/ p1 ); | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,768: | Line 4,772: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |p1 - Unknown, Kernel only ever passes 0, though other randomly chosen values seem to succeed. | ||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,785: | Line 4,780: | ||
|- | |- | ||
|R3 | |R3 | ||
|Status | |Status: 0 = LV1_SUCCESS, -6 = LV1_NO_ENTRY | ||
|- | |- | ||
|} | |} | ||
Notes: | |||
When called from Kernel module init function, if GPU is already open, subsequent calls to lv1_gpu_open return LV1_NO_ENTRY (-6). Closing the GPU and re-opening succeeds. | |||
---- | ---- | ||
=== | === lv1_gpu_close === | ||
Closes the GPU. Must be called once for every call to [[HV_Syscall_Reference#lv1_gpu_open|lv1_gpu_open]]. | |||
===== Kernel Call ===== | ===== Kernel Call ===== | ||
status = lv1_gpu_close(); | |||
===== Parameters ===== | ===== Parameters ===== | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! colspan="2" | | ! colspan="2" | Outputs | ||
|- | |- | ||
!Register | !Register | ||
Line 4,806: | Line 4,805: | ||
|- | |- | ||
|R3 | |R3 | ||
| | |Status - 0 = OK, Other values are unknown, but indicate failure. | ||
|- | |- | ||
|} | |||
---- | |||
=== lv1_gpu_device_map === | |||
Map a device into logical address space. Address needs to be ioremapped before use. | |||
|} | |||
---- | |||
=== | |||
===== kboot Call ===== | |||
result = lv1_gpu_device_map( /*IN*/ dev_id, /*OUT*/ &lpar_addr, &lpar_size ); | |||
result = | |||
===== Parameters ===== | ===== Parameters ===== | ||
Line 4,844: | Line 4,826: | ||
|- | |- | ||
|R3 | |R3 | ||
|dev_id - device id (see notes) | |||
|dev_id - device id | |||
|- | |- | ||
! colspan="2" | Outputs | ! colspan="2" | Outputs | ||
Line 4,870: | Line 4,837: | ||
|- | |- | ||
|R4 | |R4 | ||
| | |lpar_addr - logical partition address of device block | ||
|- | |- | ||
|R5 | |R5 | ||
| | |lpar_size - size of device block | ||
|- | |- | ||
|} | |} | ||
Notes: | |||
== | Info taken from kboot-10\dl\linux-2.6.16\sound\powerpc\snd_ps3pf.c (kboot-20061208) where the audio front-end registers are mapped into memory. Two calls to lv1_gpu_device_map are performed, the first when dev_id = 1, to obtain the audio interrupt (Audio IRQ Outlet) and a second time when dev_id = 2 to obtain a mapping of the register block (Audio Registers). | ||
lpar_addr is a virtual address, created by the Hypervisor. Multiple calls to lv1_gpu_device_map with the same dev_id return successfully, but the lpar_address returned for each is different (if there have been no intermediary lv1_gpu_device_unmap calls). These various virtual lpar_addr values all alias the same physical location in memory. | |||
=== | ===== Test Results ===== | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! colspan=" | ! colspan="5" | lv1_gpu_device_map | ||
|- | |- | ||
! | !dev_id | ||
! | !result | ||
!lpar_addr | |||
!lpar_size | |||
!Comment | |||
|- | |- | ||
| | |0 | ||
| | |ffffffffffffffef | ||
|98d2f7d44da1ceae | |||
|0100000000000000 | |||
|result = LV1_ILLEGAL_PARAMETER_VALUE | |||
|- | |- | ||
| | |1 | ||
| | |0000000000000000 | ||
|0000300000022000 | |||
|0000000000001000 | |||
|Audio IRQ Outlet (map1_dump) | |||
|- | |- | ||
| | |2 | ||
| | |0000000000000000 | ||
|00003c0000128000 | |||
|0000000000008000 | |||
|Audio_Registers (map2_dump) | |||
|- | |- | ||
| | |3 | ||
| | |0000000000000000 | ||
|0000300000026000 | |||
|0000000000001000 | |||
|??? - Any attempt to dereference this lpar_addr locks up the PS3 | |||
|- | |||
|4 | |||
|ffffffffffffffef | |||
|0000300000026000 | |||
|0000000000001000 | |||
|result = LV1_ILLEGAL_PARAMETER_VALUE | |||
|- | |||
|5 | |||
|0000000000000000 | |||
|0000300000028000 | |||
|0000000000001000 | |||
|??? - (map5_dump) | |||
|- | |||
|6 | |||
|0000000000000000 | |||
|0000300000029000 | |||
|0000000000001000 | |||
|??? - (map6_dump) | |||
|- | |- | ||
|7 | |||
|0000000000000000 | |||
|00003000002A0000 | |||
|0000000000010000 | |||
|??? - (map7_dump) | |||
|- | |- | ||
|8 | |||
|0000000000000000 | |||
|000030000002B000 | |||
|0000000000001000 | |||
|video RAM at offset 0x0ff10000- (map8_dump) | |||
|- | |- | ||
| | |9-255 | ||
| | | -20 | ||
|??? | |||
|??? | |||
|result = LV1_NOT_IMPLEMENTED | |||
|- | |- | ||
|} | |} | ||
It is interesting that when dev_id = 4, LV1_ILLEGAL_PARAMETER_VALUE is returned with lpar_addr and lpar_size set to the values returned from the previous call - for the first call when dev_id = 0, values also appear to be set (though these could be garbage values) | |||
===== | ===== Devices 1 & 2 ===== | ||
dev_id 1 gives a location used to process IRQ’s from the audio and dev_id 2 gives the base address of the Audio Hardware registers. From published Sony documents (http://www.watch.impress.co.jp/game/docs/20060329/3dps303.htm), Audio is believed to be on the RSX, this call seems to confirm that. Access to the audio after this mapping call (it would appear) bypasses the Hypervisor and occurs directly on the RSX hardware. 3,5,6,7,8 are currently unknown. Presumably 0 and 4 are otherwise valid parameters blocked by the Hypervisor for OtherOS (ie, they may function for Games) otherwise I would have expected a return result of -20 for them. So rather than just being a bridge for audio into HDMI, it is for all audio. | |||
Also interesting is that the GPU version number returned by [[HV_Syscall_Reference#lv1_gpu_context_allocate|lv1_gpu_context_allocate]] appears at address 0×10 in the device 1 dump, though this of course may be complete coincidence. | |||
===== | ===== Device 7 ===== | ||
dev_id 7 appears to be a video device. It is not possible to map the entire reported memory space (0×10000), only areas 0×0000 to 0x0fff and 0×2000 to 0x2fff (discovered via laborious trial and error testing, mapping other areas causes the PS3 to hang without warning). In both mappable areas, the current screen resolution can be seen at locations 0×200 and 0×210. Changes to the ps3 video mode (e.g. using the ps3videomode utility) can be observed in the mapped areas, but modifying the values directly does not affect the screen resolution. Although both areas contain different values, there appear to be parts in common, as changing the values at 0×200 and 0×210 directly in one area also causes the same values in the other area to change. | |||
Given the screen resolution connection, it could be possible that this device is a mapping of the GPU display heads: | |||
== | *Out of 16Kb, only two areas are mappable (= number of accessible display heads) | ||
*Mappable areas are 2Kb apart → 8 total display heads (= size of display heads array returned by [[HV_Syscall_Reference#lv1_gpu_context_allocate|lv1_gpu_context_allocate]]) | |||
===== Device 8 ===== | |||
dev_id 8 appears to be a mapping of video RAM at offset 0x0ff10000. This region of video memory is referenced by RSX DMA objects but its purpose is unknown. | |||
---- | ---- | ||