SceLowio: Difference between revisions

From Vita Development Wiki
Jump to navigation Jump to search
(Add section detailing the AutoClockDown idle loop)
 
(52 intermediate revisions by 4 users not shown)
Line 35: Line 35:
|}
|}


== ScePervasiveForDriver ==
== Miscellaneous ==
 
=== AutoClockDown idle loop ===
 
During <code>module_start</code>, SceLowio will call [[SceKernelThreadMgr#SceThreadmgrForDriver_B4A05763|SceThreadmgrForDriver_B4A05763]] to register an optimized idle loop that performs automatic clock-down of ARM when unused.
 
This loop uses the [[SceSysmem#SceSysrootForDriver_4B8C305A|AutoClockDown idle context]] from [[SceSysmem]].
 
Functionally, the new idle loop behaves as follows:
<source lang="c">
while (1) {
  __disable_irq(); /* cpsid i */
 
  /* mark this core as inactive */ 
  uint32_t num_active_cores = atomic_sub_32(&SceSysrootForDriver_4B8C305A->num_active_cores, 1);
  if (num_active_cores == 0) {
    /* No more active ARM cores: clock down ARM to 21MHz */
    SceSysrootForDriver_4B8C305A->arm_baseclk_config[0] = ScePervasiveBaseClock[0];
    SceSysrootForDriver_4B8C305A->arm_baseclk_config[1] = ScePervasiveBaseClock[1];
 
    ScePervasiveBaseClock[0] = 7;
    ScePervasiveBaseClock[0] = 1;
    ScePervasiveBaseClock[1] = 8;
 
    /* Set num_active_cores to -1, such that the first core to wake up
    * will increment to 0 and realize it needs to restore ARM clocks.
    */
  }
 
  __wfi(); /* Wait For Interrupt */


=== ScePervasiveForDriver_E0711D42 ===
  while (SceSysrootForDriver_4B8C305A->num_active_cores == 0) {
{| class="wikitable"
    /* Another core is restoring clocks - wait for it.
|-
      * Note that this check is actually integrated in the
! Version !! NID
      * atomic_add_32 below, so there's no race condition.
|-
      */
| 3.60 || 0xE0711D42
  }
|}


Calls SMC 0x110: <code>smc_bus_set_state(1, 0);</code>
  num_active_cores = atomic_add_32(&SceSysrootForDriver_4B8C305A->num_active_cores, 1);
  if (num_active_cores == 0) {
    /* We are the first core to wake up after clock down - restore full speed */
    ScePervasiveBaseClock[0] = 7;
    ScePervasiveBaseClock[1] = SceSysrootForDriver_4B8C305A->arm_baseclk_config[1];
    ScePervasiveBaseClock[0] = SceSysrootForDriver_4B8C305A->arm_baseclk_config[0];
    /* Free all other cores */
    SceSysrootForDriver_4B8C305A->num_active_cores = 1;
  }
 
  __enable_irq(); /* cpsie i */
  /* The pending interrupt is taken right after unmasking interrupts.
  * When the idle thread is scheduled again, execution resumes here,
  * which will result in the loop executing again.
  */
}
</source>


Used by [[SceEnumWakeUp]].
This explains why the <code>sceKernelSysroot*AutoClockDown</code> functions only need to atomically increment/decrement a value: if <code>num_active_cores</code> is higher than the amount of CPUs, <code>atomic_sub_32</code> always returns a non-zero value and the ARM clock is never slowed down.


<source lang="C">int ScePervasiveForDriver_E0711D42(void);</source>
== ScePervasiveForDriver ==


=== ScePervasiveForDriver_47708C03 ===
=== scePervasiveSrcClockSelectForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x47708C03
| 0.990.000-3.740.011 || 0x2FB5F88F
|}
|}


Returns address to a buffer related to Clock Frequencies and Syscon. Maybe this value is the clock multiplier/divider. See [[Pervasive#ARM_Clocks]].
Probably sets audio SouRCe mixer clock.


Used by [[ScePower]].
Used only by [[ScePower]].


<source lang="C">void *ScePervasiveForDriver_47708C03(void);</source>
<source lang="C">int scePervasiveSrcClockSelectForDriver(SceUInt32 freq_level);</source>


=== scePervasiveArmSetClockForDriver ===
=== scePervasiveArmClockSelectForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xE9D95643
| 0.990.000-3.740.011 || 0xE9D95643
|}
|}


This is a guessed name.
Temp name was scePervasiveArmSetClockForDriver.


Used only by [[ScePower]].
Used only by [[ScePower]].


<source lang="C">int scePervasiveArmSetClockForDriver(SceUInt32 freq_level1, SceUInt32 freq_level2);</source>
<source lang="C">int scePervasiveArmClockSelectForDriver(SceUInt32 freq_base, SceUInt32 freq_adjust);</source>


=== scePervasiveGpuSetClockForDriver ===
=== scePervasiveGpuClockSelectForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x6AF0196F
| 0.990.000-3.740.011 || 0x6AF0196F
|}
|}


This is a guessed name.
Temp name was scePervasiveGpuSetClockForDriver.


Maybe called on each suspend/resume.
Maybe called on each suspend/resume.


<source lang="C">
<source lang="C">
// a1: 3 (default value), 5 when DIP Switch 236 (GPU overclock) is set
// freq_level1: 3 (default value), 5 when DIP Switch 236 (GPU overclock) is set
int scePervasiveGpuSetClockForDriver(SceUInt32 freq_level1, SceUInt32 freq_level2);
int scePervasiveGpuClockSelectForDriver(SceUInt32 freq_level1, SceUInt32 freq_level2);
</source>
</source>


=== scePervasiveVeneziaSetClockForDriver ===
=== scePervasiveVeneziaClockSelectForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x725B4F59
| 0.990.000-3.740.011 || 0x725B4F59
|}
|}


This is a guessed name.
Temp name was scePervasiveVeneziaSetClockForDriver.


<source lang="C">int scePervasiveVeneziaSetClockForDriver(SceUInt32 freq_level);</source>
<source lang="C">int scePervasiveVeneziaClockSelectForDriver(SceUInt32 freq_level);</source>


=== scePervasiveVipSetClockForDriver ===
=== scePervasiveVipClockSelectForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x12D17D47
| 0.990.000-3.740.011 || 0x12D17D47
|}
|}


This is a guessed name.
Temp name was scePervasiveVipSetClockForDriver.


<source lang="C">int scePervasiveVipSetClockForDriver(SceUInt32 freq_level);</source>
<source lang="C">int scePervasiveVipClockSelectForDriver(SceUInt32 freq_level);</source>


=== scePervasiveDmac5SetClockForDriver ===
=== scePervasiveDmac5ClockSelectForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xA6832B33
| 0.990.000-3.740.011 || 0xA6832B33
|}
|}


This is a guessed name.
Temp name was scePervasiveDmac5SetClockForDriver.


<source lang="C">int scePervasiveDmac5SetClockForDriver(SceUInt32 freq_level);</source>
<source lang="C">int scePervasiveDmac5ClockSelectForDriver(SceUInt32 freq_level);</source>


=== scePervasiveBusSetClockForDriver ===
=== scePervasiveBusClockSelectForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xC0F7CC39
| 0.990.000-3.740.011 || 0xC0F7CC39
|}
|}


This is a guessed name.
Temp name was scePervasiveBusSetClockForDriver.


Requests TrustZone using [[SMC]] 0x114.
Requests ARM [[TrustZone]] using [[SMC]] 0x114.


<source lang="C">int scePervasiveBusSetClockForDriver(SceUInt32 freq_level);</source>
<source lang="C">int scePervasiveBusClockSelectForDriver(SceUInt32 freq_level);</source>


=== scePervasiveSysSetClockForDriver ===
=== scePervasiveSysClockSelectForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x98D8914A
| 0.990.000-3.740.011 || 0x98D8914A
|}
|}


This is a guessed name.
This is a guessed name. Temp name was scePervasiveSysSetClockForDriver.


<source lang="C">int scePervasiveSysSetClockForDriver(SceUInt32 freq_level);</source>
<source lang="C">int scePervasiveSysClockSelectForDriver(SceUInt32 freq_level);</source>


=== scePervasiveGetSoCRevisionForDriver ===
=== ScePervasiveForDriver_64ABE589 ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 0.940-3.60 || 0x714EEFB7
| 0.990.000-3.740.011 || 0x64ABE589
|}
|}


Returns <= 0 if Kermit revision is below 2.0. Example of return value: 0-0x19, and something higher.
A good name could be scePervasiveMsifClockSelectForDriver.


Seen values: 66 on a PCH-11xx, 277 on a PSVita Slim.
<source lang="C">int ScePervasiveForDriver_64ABE589(SceUInt32 freq_level);</source>


if val & 0x30000000 is zero, not devkit.
=== ScePervasiveForDriver_91C80C41 ===
 
if val & 0x80000000 is not zero, Disabled LPDDR2SUB.
 
<source lang="C">SceUInt32 scePervasiveGetSoCRevisionForDriver(void);</source>
 
=== scePervasiveCecClockOutEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 0.940-3.60 || 0x26B51075
| 0.990.000-3.740.011 || 0x91C80C41
|}
|}


=== scePervasiveCecClockOutDisableForDriver ===
A good name might be scePervasiveIftuDsiClockSelectForDriver. Temp name was ScePervasiveForDriver_91C80C41_set_dsi_bus_pixelclock, scePervasiveDsiSetPixelClockForDriver.
{| class="wikitable"
 
|-
Sets DSI bus (?IFTU?) pixel clock.
! Version !! NID
 
|-
<source lang="C">int ScePervasiveForDriver_91C80C41(int bus, SceUInt32 freq_level);</source>
| 0.940-3.60 || 0xD185D235
|}


=== scePervasiveCameraBusClockSelectForDriver ===
=== scePervasiveCameraBusClockSelectForDriver ===
Line 197: Line 233:
! Version !! NID
! Version !! NID
|-
|-
| 0.931-3.60 || 0x589D0291
| 0.931.010-3.740.011 || 0x589D0291
|}
|}


<source lang="C">
<source lang="C">
// bus_clock can be either 2 (DOWN) or 5 (UP)
// freq_level can be either 2 (DOWN) or 5 (UP)
int scePervasiveCameraBusClockSelectForDriver(SceUInt32 bus_clock);
int scePervasiveCameraBusClockSelectForDriver(SceUInt32 freq_level);
</source>
</source>


=== ScePervasiveForDriver_18DD8043 ===
=== scePervasiveGetSoCRevisionForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x18DD8043
| 0.931.010-3.740.011 || 0x714EEFB7
|}
|}


Turns off the clock (&= ~mask) of the device (UART) at offset <code>0x120 + 4 * device</code> with mask = 1.
Returns <= 0 if Kermit revision is below 2.0.


<source lang="C">int ScePervasiveForDriver_18DD8043(int uart_bus);</source>
Used in [[ScePower]], [[SceGpuEs4]], [[SceSdif]]. Maybe copied to [[SceSysmem]]'s sysroot structure.


=== ScePervasiveForDriver_243D0E78 ===
<source lang="C">SceUInt32 scePervasiveGetSoCRevisionForDriver(void);</source>
 
=== scePervasiveCecClockOutEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x243D0E78
| 0.931.010-3.740.011 || 0x26B51075
|}
|}


<source lang="C">int ScePervasiveForDriver_243D0E78_get_dsi_clock_info(int pixelclock, int info0[2], int info1[2]);</source>
=== scePervasiveCecClockOutDisableForDriver ===
 
=== scePervasiveIftuDsiResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 0.940-3.60 || 0xE3FC1C8D
| 0.931.010-3.740.011 || 0xD185D235
|}
|}


Temp name was ScePervasiveForDriver_E3FC1C8D_dsi_reset_enter, scePervasiveDsiResetEnableForDriver.
=== ScePervasiveForDriver_243D0E78 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0x243D0E78
|}


Device at offset <code>0x80</code>.
Gets IFTU DSI clock information.


<source lang="C">int scePervasiveIftuDsiResetEnableForDriver(int bus, int mask_maybe_unused);</source>
<source lang="C">int ScePervasiveForDriver_243D0E78(int pixelclock, int info0[2], int info1[2]);</source>


=== ScePervasiveForDriver_4AF7A01E ===
=== scePervasiveGpuResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x4AF7A01E
| 0.990.000-3.740.011 || 0x3E79D3D3
|}
|}


Same as scePervasiveIftuDsiResetEnableForDriver.
This is a guessed name.


Device at offset <code>0x90 + bus * 4</code>.
Puts the device (Gpu) at offset <code>0x10</code> in reset (|= mask) with mask = 1.


<source lang="C">int ScePervasiveForDriver_4AF7A01E(int bus, int mask_maybe_unused);</source>
<source lang="C">int scePervasiveGpuResetEnableForDriver(void);</source>


=== ScePervasiveForDriver_A3569FF1 ===
=== scePervasiveVipResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xA3569FF1
| 0.990.000-3.740.011 || 0x28731EC5
|}
|}


Temp name was scePervasiveMsifResetEnableForDriver.
This is a guessed name.


Same as scePervasiveIftuDsiResetEnableForDriver.
Puts the device (Vip) at offset <code>0x30</code> in reset (|= mask) with mask = 1.


Device at offset <code>0xB0</code>. Mask 1.
<source lang="C">int scePervasiveVipResetEnableForDriver(void);</source>


<source lang="C">int ScePervasiveForDriver_A3569FF1(void);</source>
=== ScePervasiveForDriver_31C0A98B ===
 
=== scePervasiveIftuDsiResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 0.940-3.60 || 0xFFB43AC2
| 0.990.000-3.740.011 || 0x31C0A98B
|}
|}


Temp name was scePervasiveDsiResetDisableForDriver.
Puts the device (unknown) at offset <code>0x34</code> in reset (|= mask) with mask = 1.


Device at offset <code>0x80</code>.
<source lang="C">int ScePervasiveForDriver_31C0A98B(void);</source>


<source lang="C">int scePervasiveIftuDsiResetDisableForDriver(int bus, int mask_maybe_unused);</source>
=== ScePervasiveForDriver_FF4B3CA6 ===
 
=== ScePervasiveForDriver_13CC07C9 ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x13CC07C9
| 0.990.000-3.740.011 || 0xFF4B3CA6
|}
|}


Same as scePervasiveIftuDsiResetDisableForDriver.
Puts the device (unknown) at offset <code>0x50 + device * 4</code> in reset (|= mask) with mask = 1.
 
Device at offset <code>0x90 + bus * 4</code>.


<source lang="C">int ScePervasiveForDriver_13CC07C9(int bus, int mask_maybe_unused);</source>
<source lang="C">int ScePervasiveForDriver_FF4B3CA6(int device);</source>


=== scePervasiveIftuDsiClkGateDisableForDriver ===
=== scePervasiveCsiResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 0.940-3.60 || 0x25AE181E
| 0.990.000-3.740.011 || 0x66BF2885
|}
|}


Temp name was ScePervasiveForDriver_25AE181E_dsi_clock_disable, scePervasiveDsiClockDisableForDriver.
This is a guessed name.


Device at offset <code>0x80</code>.
Puts the device (Csi) at offset <code>0x70 + head * 4</code> in reset (|= mask) with mask = 1.


<source lang="C">int scePervasiveIftuDsiClkGateDisableForDriver(int bus, int mask_maybe_unused);</source>
<source lang="C">int scePervasiveCsiResetEnableForDriver(SceDisplayHead head);</source>


=== ScePervasiveForDriver_CA0ACFC5 ===
=== scePervasiveIftuDsiResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xCA0ACFC5
| 0.931.010-3.740.011 || 0xE3FC1C8D
|}
|}


Same as scePervasiveIftuDsiClkGateDisableForDriver.
Temp name was ScePervasiveForDriver_E3FC1C8D_dsi_reset_enter, scePervasiveDsiResetEnableForDriver.


Device at offset <code>0x10</code> (? GpuEs4 related (Secure)).
Puts the device (IFTU DSI) at offset <code>0x80 + device * 4</code> in reset (|= mask).


<source lang="C">int ScePervasiveForDriver_CA0ACFC5(int mask_maybe_unused);</source>
<source lang="C">int scePervasiveIftuDsiResetEnableForDriver(int device, int mask);</source>


=== ScePervasiveForDriver_AD1E81EB ===
=== ScePervasiveForDriver_B68254AD ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xAD1E81EB
| 0.990.000-3.740.011 || 0xB68254AD
|}
|}


Same as scePervasiveIftuDsiClkGateDisableForDriver.
Puts the device (IFTU2) at offset <code>0x88</code> in reset (|= mask) with mask = 1.


Device at offset <code>0x90 + bus * 4</code>.
<source lang="C">int ScePervasiveForDriver_B68254AD(void);</source>


<source lang="C">int ScePervasiveForDriver_AD1E81EB(int bus, int mask_maybe_unused);</source>
=== ScePervasiveForDriver_7AE2F8E8 ===
 
=== scePervasiveVipClkGateDisable1ForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 1.69-3.60 || 0x2EEBE9AE
| 0.990.000-3.740.011 || 0x7AE2F8E8
|}
|}


This is a guessed name.
Puts the device (unknown) at offset <code>0x8C</code> in reset (|= mask) with mask = 1.


Same as scePervasiveIftuDsiClkGateDisableForDriver.
<source lang="C">int ScePervasiveForDriver_7AE2F8E8(void);</source>


Device at offset <code>0x30</code>. Mask 1.
=== scePervasiveUdcResetEnableForDriver ===
 
{| class="wikitable"
Used to initialize [[Venezia]] registers or SPRAM.
 
<source lang="C">int scePervasiveVipClkGateDisable1ForDriver(void);</source>
 
=== scePervasiveVipClkGateDisable2ForDriver ===
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xFBE5AA2F
| 0.990.000-3.740.011 || 0x4AF7A01E
|}
|}
Same as scePervasiveIftuDsiClkGateDisableForDriver.


This is a guessed name.
This is a guessed name.


Device at offset <code>0x30</code>. Mask 2.
Puts the device (Udc) at offset <code>0x90 + device * 4</code> in reset (|= mask).


<source lang="C">int scePervasiveVipClkGateDisable2ForDriver(void);</source>
<source lang="C">int scePervasiveUdcResetEnableForDriver(int device, int mask);</source>


=== ScePervasiveForDriver_2F195C97 ===
=== scePervasiveSdifResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x2F195C97
| 0.990.000-3.740.011 || 0x3D8A8712
|}
|}


Turns on the clock (|= mask) of the device (GPIO) at offset <code>0x100</code> with mask = 1.
This is a guessed name.


<source lang="C">int ScePervasiveForDriver_2F195C97(void);</source>
Puts the device (Sdif) at offset <code>0xA0 + device * 4</code> in reset (|= mask) with mask = 1.


=== scePervasiveRemovableMemoryGetCardInsertStateForDriver ===
<source lang="C">int scePervasiveSdifResetEnableForDriver(void);</source>
 
=== scePervasiveMsifResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x551EEE82
| 0.990.000-3.740.011 || 0xA3569FF1
|}
|}


<source lang="C">int scePervasiveRemovableMemoryGetCardInsertStateForDriver(void);</source>
This is a guessed name.
 
Puts the device (Msif) at offset <code>0xB0</code> in reset (|= mask) with mask = 1.
 
<source lang="C">int scePervasiveMsifResetEnableForDriver(void);</source>


=== ScePervasiveForDriver_64ABE589 ===
=== scePervasiveI2sResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x64ABE589
| 0.990.000-3.740.011 || 0x146108D4
|}
|}


<source lang="C">int ScePervasiveForDriver_64ABE589_msif_clock(int clock);</source>
This is a guessed name.


=== ScePervasiveForDriver_731A097D ===
Puts the device (I2s) at offset <code>0xC0 + device * 4</code> in reset (|= mask) with mask = 1.
 
<source lang="C">int scePervasiveI2sResetEnableForDriver(int device);</source>
 
=== scePervasiveSrcMixResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x731A097D
| 3.60 || 0x821AE6C7
|}
|}


Temp name was scePervasiveGpioResetEnableForDriver.
This is a guessed name.


Puts the device (GPIO) at offset <code>0x100</code> in reset (|= mask) with mask = 1.
Puts the device (SrcMix) at offset <code>0xE0 + device * 4</code> in reset (|= mask) with mask = 1.


<source lang="C">int ScePervasiveForDriver_731A097D(void);</source>
<source lang="C">int scePervasiveSrcMixResetEnableForDriver(int device);</source>


=== ScePervasiveForDriver_788B6C61 ===
=== scePervasiveSpdifResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x788B6C61
| 3.60 || 0xB8AF1249
|}
|}


Puts the device (UART) at offset <code>0x120 + 4 * device</code> in reset (|= mask) with mask = 1.
This is a guessed name.
 
Puts the device (Spdif) at offset <code>0xF0</code> in reset (|= mask) with mask = 1.


<source lang="C">int ScePervasiveForDriver_788B6C61(int uart_bus);</source>
<source lang="C">int scePervasiveSpdifResetEnableForDriver(void);</source>


=== ScePervasiveForDriver_78C34032 ===
=== scePervasiveGpioResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x78C34032
| 3.60 || 0x731A097D
|}
|}


Puts the device at offset <code>0x100</code> (GPIO) out of reset (&= ~mask) with mask = 1.
This is a guessed name.
 
Puts the device (GPIO) at offset <code>0x100</code> in reset (|= mask) with mask = 1.


<source lang="C">int ScePervasiveForDriver_78C34032(void);</source>
<source lang="C">int scePervasiveGpioResetEnableForDriver(void);</source>


=== ScePervasiveForDriver_7B16F900 ===
=== scePervasiveSpiResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 453: Line 493:
|}
|}


Puts the device (SPI) at offset <code>0x104 + 4 * device</code> in reset (|= mask) with mask = 1.
This is a guessed name.
 
Puts the device (SPI) at offset <code>0x104 + device * 4</code> in reset (|= mask) with mask = 1.


<source lang="C">int ScePervasiveForDriver_7B16F900(int device);</source>
<source lang="C">int scePervasiveSpiResetEnableForDriver(int device);</source>


=== ScePervasiveForDriver_81A155F1 ===
=== scePervasiveI2cResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x81A155F1
| 3.60 || 0x41F9E1C3
|}
|}


Returns the SceLowio's mapped ScePervasiveMisc virtual address.
This is a guessed name.


<source lang="C">void *ScePervasiveForDriver_81A155F1(void);</source>
Puts the device (I2c) at offset <code>0x110 + device * 4</code> in reset (|= mask) with mask = 1.
 
<source lang="C">int scePervasiveI2cResetEnableForDriver(int device);</source>


=== ScePervasiveForDriver_8BAB45F8 ===
=== scePervasiveUartResetEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x8BAB45F8
| 3.60 || 0x788B6C61
|}
|}


Changes UART baudrate of one of the 7 UART devices. See [[UART_Registers#SceUartClkgenReg|SceUartClkgenReg]] for more info.
This is a guessed name.


<source lang="C">int ScePervasiveForDriver_8BAB45F8(int uart_device, int baudrate);</source>
Puts the device (UART) at offset <code>0x120 + uart_bus * 4</code> in reset (|= mask) with mask = 1.


=== ScePervasiveForDriver_91C80C41 ===
<source lang="C">int scePervasiveUartResetEnableForDriver(int uart_bus);</source>
 
=== scePervasiveGpuResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x91C80C41
| 3.60 || 0x8A85E36B
|}
|}


<source lang="C">int ScePervasiveForDriver_91C80C41_set_dsi_bus_pixelclock(int bus, int pixelclock);</source>
This is a guessed name.
 
Puts the device (Gpu) at offset <code>0x10</code> out of reset (&= ~mask) with mask = 1.
 
<source lang="C">int scePervasiveGpuResetDisableForDriver(void);</source>


=== ScePervasiveForDriver_8A85E36B ===
=== scePervasiveVipResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x8A85E36B
| 0.931-3.60 || 0xA7E64C6F
|}
|}


Puts the device at offset <code>0x10</code> (? GpuEs4 related (Secure)) out of reset (&= ~mask) with mask = 1.
This is a guessed name.


<source lang="C">int ScePervasiveForDriver_8A85E36B(void);</source>
Puts the device (Vip) at offset <code>0x30</code> out of reset (&= ~mask) with mask = 1.


=== ScePervasiveForDriver_A7CE7DCC ===
Used to reset [[Venezia]].
 
<source lang="C">int scePervasiveVipResetDisableForDriver(void);</source>
 
=== ScePervasiveForDriver_E2D8F6C3 ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xA7CE7DCC
| 3.60 || 0xE2D8F6C3
|}
|}


Temp name was scePervasiveUartResetDisableForDriver.
Puts the device (unknown) at offset <code>0x34</code> out of reset (&= ~mask) with mask = 1.


Puts the device (UART) at offset <code>0x120 + 4 * device</code> out of reset (&= ~mask) with mask = 1.
<source lang="C">int ScePervasiveForDriver_E2D8F6C3(int device);</source>


<source lang="C">int ScePervasiveForDriver_A7CE7DCC(int uart_bus);</source>
=== ScePervasiveForDriver_AC475961 ===
 
=== ScePervasiveForDriver_A7E64C6F ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 1.69-3.60 || 0xA7E64C6F
| 3.60 || 0xAC475961
|}
|}


Puts the device at offset <code>0x30</code> ([[Venezia]] Vip) out of reset (&= ~mask) with mask = 1.
Puts the device (unknown) at offset <code>0x50 + device * 4</code> out of reset (&= ~mask) with mask = 1.


Used to reset [[Venezia]].
<source lang="C">int ScePervasiveForDriver_AC475961(int device);</source>


<source lang="C">int ScePervasiveForDriver_A7E64C6F(void);</source>
=== scePervasiveCsiResetDisableForDriver ===
 
=== ScePervasiveForDriver_A85BF98A ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xA85BF98A
| 3.60 || 0xD3B59C33
|}
|}


Temp name was scePervasiveSpiClockDisableForDriver.
This is a guessed name.


Turns off the clock (&= ~mask) of the device (SPI) at offset <code>0x104 + 4 * device</code> with mask = 1.
Puts the device (Csi) at offset <code>0x70 + head * 4</code> out of reset (&= ~mask) with mask = 1.


<source lang="C">int ScePervasiveForDriver_A85BF98A(int device);</source>
<source lang="C">int scePervasiveCsiResetDisableForDriver(SceDisplayHead head);</source>


=== scePervasiveIftuDsiClkGateEnableForDriver ===
=== scePervasiveIftuDsiResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 0.940-3.60 || 0xBC42C72F
| 0.931-3.60 || 0xFFB43AC2
|}
|}


Temp name was scePervasiveDsiClockEnableForDriver.
Temp name was scePervasiveDsiResetDisableForDriver.


Device at offset <code>0x80 + bus*4</code>
Puts the device (IFTU DSI) at offset <code>0x80 + device * 4</code> out of reset (&= ~mask).


<source lang="C">int scePervasiveIftuDsiClkGateEnableForDriver(int bus, int mask_maybe_unused);</source>
<source lang="C">int scePervasiveIftuDsiResetDisableForDriver(int device, int mask);</source>


=== ScePervasiveForDriver_39E51AE2 ===
=== ScePervasiveForDriver_E92E28FF ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x39E51AE2
| 3.60 || 0xE92E28FF
|}
|}


Device at offset <code>0x10</code> (? GpuEs4 related (Secure)).
Puts the device (IFTU2) at offset <code>0x88</code> out of reset (&= ~mask) with mask = 1.


<source lang="C">int ScePervasiveForDriver_39E51AE2(int mask_maybe_unused);</source>
<source lang="C">int ScePervasiveForDriver_E92E28FF(void);</source>


=== ScePervasiveForDriver_A2EFD7AF ===
=== ScePervasiveForDriver_17109C28 ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xA2EFD7AF
| 3.60 || 0x17109C28
|}
|}


Device at offset <code>0x90 + bus*4</code>.
Puts the device (unknown) at offset <code>0x8C</code> out of reset (&= ~mask) with mask = 1.


<source lang="C">int ScePervasiveForDriver_A2EFD7AF(int bus, int mask_maybe_unused);</source>
<source lang="C">int ScePervasiveForDriver_17109C28(void);</source>


=== scePervasiveVipClkGateEnable1ForDriver ===
=== scePervasiveUdcResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 1.69-3.60 || 0xFB01A2DD
| 3.60 || 0x13CC07C9
|}
|}


This is a guessed name.
This is a guessed name.


Device at offset <code>0x30</code>. Mask 1.
Puts the device (Udc) at offset <code>0x90 + device * 4</code> out of reset (&= ~mask).


Used to initialize [[Venezia]] registers or SPRAM.
<source lang="C">int scePervasiveUdcResetDisableForDriver(int device, int mask);</source>


<source lang="C">int scePervasiveVipClkGateEnable1ForDriver(void);</source>
=== scePervasiveSdifResetDisableForDriver ===
 
=== scePervasiveVipClkGateEnable2ForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xB9904983
| 3.60 || 0xD326E15F
|}
|}


This is a guessed name.
This is a guessed name.


Device at offset <code>0x30</code>. Mask 2.
Puts the device (Sdif) at offset <code>0xA0 + device * 4</code> out of reset (&= ~mask) with mask = 1.


<source lang="C">int scePervasiveVipClkGateEnable2ForDriver(void);</source>
<source lang="C">int scePervasiveSdifResetDisableForDriver(int device);</source>


=== ScePervasiveForDriver_DFD96BFC ===
=== scePervasiveMsifResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xDFD96BFC
| 3.60 || 0xCB0F15CD
|}
|}


Turns on the clock (|= mask) of the device (SPI) at offset <code>0x104 + 4 * device</code> with mask = 1.
This is a guessed name.
 
Puts the device (Msif) at offset <code>0xB0</code> out of reset (&= ~mask) with mask = 1.


<source lang="C">int ScePervasiveForDriver_DFD96BFC(int device);</source>
<source lang="C">int scePervasiveMsifResetDisableForDriver(void);</source>


=== ScePervasiveForDriver_E4B145AE ===
=== scePervasiveI2sResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xE4B145AE
| 3.60 || 0xEEE340ED
|}
|}


Puts the device (SPI) at offset <code>0x104 + 4 * device</code> out of reset (&= ~mask) with mask = 1.
This is a guessed name.


<source lang="C">int ScePervasiveForDriver_E4B145AE(int device);</source>
Puts the device (I2s) at offset <code>0xC0 + device * 4</code> out of reset (&= ~mask) with mask = 1.


=== ScePervasiveForDriver_EB176898 ===
<source lang="C">int scePervasiveI2sResetDisableForDriver(int device);</source>
 
=== scePervasiveSrcMixResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xEB176898
| 3.60 || 0x5BAFA0DC
|}
|}


Turns off the clock (&= ~mask) of the device (GPIO) at offset <code>0x100</code> with mask = 1.
This is a guessed name.
 
Puts the device (SrcMix) at offset <code>0xE0 + device * 4</code> out of reset (&= ~mask) with mask = 1.


<source lang="C">int ScePervasiveForDriver_EB176898(void);</source>
<source lang="C">int scePervasiveSrcMixResetDisableForDriver(int device);</source>


=== ScePervasiveForDriver_EFD084D8 ===
=== scePervasiveSpdifResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xEFD084D8
| 3.60 || 0x6A2FB697
|}
|}


Turns on the clock (|= mask) of the device (UART) at offset <code>0x120 + 4 * device</code> with mask = 1.
This is a guessed name.


<source lang="C">int ScePervasiveForDriver_EFD084D8(int uart_bus);</source>
Puts the device (Spdif) at offset <code>0xF0</code> out of reset (&= ~mask) with mask = 1.


=== ScePervasiveForDriver_1068C067 ===
<source lang="C">int scePervasiveSpdifResetDisableForDriver(void);</source>
 
=== scePervasiveGpioResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 0.940-3.60 || 0x1068C067
| 3.60 || 0x78C34032
|}
|}


<source lang="C">int ScePervasiveForDriver_1068C067(SceDisplayHead head);</source>
This is a guessed name.
 
Puts the device (GPIO) at offset <code>0x100</code> out of reset (&= ~mask) with mask = 1.
 
<source lang="C">int scePervasiveGpioResetDisableForDriver(void);</source>


=== scePervasiveCompatStopForDriver ===
=== scePervasiveSpiResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 0.990-3.60 || 0x4712740D
| 3.60 || 0xE4B145AE
|}
|}


Executes smc_0x110(2, 0);
This is a guessed name.


Called in [[SceCompat#sceCompatSuspend]] and [[SceCompat#sceCompatStop]].
Puts the device (SPI) at offset <code>0x104 + device * 4</code> out of reset (&= ~mask) with mask = 1.


<source lang="C">int scePervasiveCompatStopForDriver(void);</source>
<source lang="C">int scePervasiveSpiResetDisableForDriver(int device);</source>


=== scePervasiveCompatStartForDriver ===
=== scePervasiveI2cResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 0.990-3.60 || 0xB2F232E5
| 3.60 || 0x86BEA9A4
|}
|}


Executes smc_0x110(2, 1);
This is a guessed name.


Called in [[SceCompat#sceCompatResume]] and [[SceCompat#sceCompatInit]].
Puts the device (I2c) at offset <code>0x110 + device * 4</code> out of reset (&= ~mask) with mask = 1.


<source lang="C">int scePervasiveCompatStartForDriver(void);</source>
<source lang="C">int scePervasiveI2cResetDisableForDriver(int device);</source>


=== scePervasiveCompatLcdDmacInitForDriver ===
=== scePervasiveUartResetDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 0.990-3.60 || 0xA7855D3A
| 3.60 || 0xA7CE7DCC
|}
|}


Executes smc_0x110(2, 2);
This is a guessed name.


Called during PSP Emulator ([[SceCompat]]) start and resume.
Puts the device (UART) at offset <code>0x120 + uart_bus * 4</code> out of reset (&= ~mask) with mask = 1.


<source lang="C">int scePervasiveCompatLcdDmacInitForDriver(void);</source>
<source lang="C">int scePervasiveUartResetDisableForDriver(int uart_bus);</source>


== SceGpioForDriver ==
=== scePervasiveRemovableMemoryGetCardInsertStateForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x551EEE82
|}


If <code>bus</code> is <code>0</code>, the <code>SceGpio0Reg</code> registers are used, and if <code>bus</code> is <code>1</code>, the <code>SceGpio1Reg</code> registers are used.
<source lang="C">int scePervasiveRemovableMemoryGetCardInsertStateForDriver(void);</source>


=== sceGpioQueryIntrForDriver ===
=== ScePervasiveForDriver_81A155F1 ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x010DC295
| 3.60 || 0x81A155F1
|}
|}


<source lang="c">int sceGpioQueryIntrForDriver(int bus, int port);</source>
Returns SceLowio's mapped ScePervasiveMisc virtual address.


=== sceGpioSetPortModeForDriver ===
<source lang="C">void *ScePervasiveForDriver_81A155F1(void);</source>
 
=== ScePervasiveForDriver_8BAB45F8 ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x372022A4
| 3.60 || 0x8BAB45F8
|}
|}


<source lang="c">int sceGpioSetPortModeForDriver(int bus, int port, int mode);</source>
Changes UART baudrate of one of the 7 UART bus. See [[UART_Registers#SceUartClkgenReg|SceUartClkgenReg]] for more information.
 
<source lang="C">int ScePervasiveForDriver_8BAB45F8(int uart_bus, int baudrate);</source>


=== sceGpioSetIntrModeForDriver ===
=== scePervasiveGpuClkGateEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xBBEA1DDC
| 3.60 || 0x39E51AE2
|}
|}


<source lang="c">int sceGpioSetIntrModeForDriver(int bus, int intr, int mode);</source>
This is a guessed name.


=== sceGpioPortSetForDriver ===
Turns on the clock gate (|= mask) of the device (Gpu) at offset <code>0x10</code>.
 
<source lang="C">int scePervasiveGpuClkGateEnableForDriver(int mask);</source>
 
=== scePervasiveDmacClkGateEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 0.990-3.60 || 0xD454A584
| 3.60 || 0xA10583FF
|}
|}


<source lang="c">int sceGpioPortSetForDriver(int bus, int port);</source>
This is a guessed name.
 
Enables DMAC clock gate.
 
<source lang="C">int scePervasiveDmacClkGateEnableForDriver(int device);</source>


=== sceGpioPortClearForDriver ===
=== scePervasiveDmacClkGateDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 0.990-3.60 || 0xF6310435
| 3.60 || 0x15237AF8
|}
|}


<source lang="c">int sceGpioPortClearForDriver(int bus, int port);</source>
Disables DMAC clock gate.
 
<source lang="C">int scePervasiveDmacClkGateDisableForDriver(int device);</source>


=== sceGpioAcquireIntrForDriver ===
=== scePervasiveDbgSdioClkGateEnableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x35AAD77A
| 3.60 || 0xD34E74C5
|}
|}


<source lang="c">int sceGpioAcquireIntrForDriver(int bus, int intr);</source>
This is a guessed name.


== ScePwmForDriver ==
Enables [[SceDbgSdio]] clock gate.
 
          ScePwmForDriver_0374213C: 0x0374213C
          ScePwmForDriver_13161CCC: 0x13161CCC
          ScePwmForDriver_22C17D24: 0x22C17D24
          ScePwmForDriver_514773B1: 0x514773B1
          ScePwmForDriver_99911920: 0x99911920


== SceI2cForDriver ==
<source lang="C">int scePervasiveDbgSdioClkGateEnableForDriver(int device);</source>
 
=== Types ===
<source lang="c">
typedef struct SceI2cDebugHandlers {
unsigned int size;
void (*write_start)(int bus, int device, unsigned char *buffer, int size);
void (*write_error)(int bus, int error, int result);
void (*read_start)(int bus, int device, unsigned char *buffer, int size);
void (*read_error)(int bus, int error, int result);
void (*write_read_start)(int bus, int write_device, unsigned char *write_buffer, int write_size);
void (*write_read_error)(int bus, int error, int result);
} SceI2cDebugHandlers;
</source>


=== scePervasiveDbgSdioClkGateDisableForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID !! Name
! Version !! NID
|-
|-
| 3.60 || 0x0A40B7BF || <code>int sceI2cTransferWriteRead(int bus, unsigned int write_dev_id, const void *write_buffer, int write_size, unsigned int read_dev_id, void *read_buffer, int read_size);</code>
| 3.60 || 0x701D5355
|}
 
This is a guessed name.
 
Disables [[SceDbgSdio]] clock gate.
 
<source lang="C">int scePervasiveDbgSdioClkGateDisableForDriver(int device);</source>
 
=== scePervasiveVipClkGateEnable1ForDriver ===
{| class="wikitable"
|-
|-
| 3.60 || 0x30CF9469 ||
! Version !! NID
|-
|-
| 3.60 || 0x76D277AB || <code>sceI2cReset(int bus);</code>
| 1.69-3.60 || 0xFB01A2DD
|-
| 3.60 || 0x9CF8F3D6 || <code>sceI2cInit(int bus);</code>
|-
| 3.60 || 0xA2C7CE62 || <code>int sceI2cSetDebugHandlers(int bus, SceI2cDebugHandlers *debug_handlers)</code>
|-
| 3.60 || 0xCA94A759 || <code>int sceI2cTransferWrite(int bus, unsigned int device_address, const void *buffer, unsigned int size);</code>
|-
| 3.60 || 0xD1D0A9A4 || <code>int sceI2cTransferRead(int bus, unsigned int device_address, void *buffer, unsigned int size);</code>
|-
| 3.60 || 0xE449AC6E ||
|}
|}


== SceGrabForDriver ==
This is a guessed name.
 
Turns on the clock gate (|= mask) of the device (Vip) at offset <code>0x30</code> with mask = 1.
 
Used to initialize [[Venezia]] registers or SPRAM.
 
<source lang="C">int scePervasiveVipClkGateEnable1ForDriver(void);</source>


=== sceGrabCompatStartExForDriver ===
=== scePervasiveVipClkGateEnable2ForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x072B8D93
| 3.60 || 0xB9904983
|}
|}


Calls [[SceExcpmgr#SMC|SMC]] 0x11e. <code>smc(0x11E, 1, param)</code>
This is a guessed name.


Replacement for [[SceLowio#scePervasiveCompatStartForDriver]].
Turns on the clock gate (|= mask) of the device (Vip) at offset <code>0x30</code> with mask = 2.
 
<source lang="C">int scePervasiveVipClkGateEnable2ForDriver(void);</source>
 
=== ScePervasiveForDriver_B1CFA18F ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xB1CFA18F
|}
 
Turns on the clock gate (|= mask) of the device (unknown) at offset <code>0x34</code> with mask = 1.
 
<source lang="C">int ScePervasiveForDriver_B1CFA18F(void);</source>
 
=== scePervasiveCsiClkGateEnableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x1068C067
|}
 
This is a guessed name.
 
Turns on the clock gate (|= mask) of the device (Csi) at offset <code>0x70 + head * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveCsiClkGateEnableForDriver(SceDisplayHead head);</source>
 
=== scePervasiveIftuDsiClkGateEnableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xBC42C72F
|}
 
Temp name was scePervasiveDsiClockEnableForDriver.
 
Turns on the clock gate (|= mask) of the device (IFTU DSI) at offset <code>0x80 + device * 4</code>.
 
<source lang="C">int scePervasiveIftuDsiClkGateEnableForDriver(int device, int mask);</source>
 
=== ScePervasiveForDriver_07F2A738 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x07F2A738
|}
 
Turns on the clock gate (|= mask) of the device (IFTU2) at offset <code>0x88</code> with mask = 1.
 
<source lang="C">int ScePervasiveForDriver_07F2A738(void);</source>
 
=== ScePervasiveForDriver_C0C842FE ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xC0C842FE
|}
 
Turns on the clock gate (|= mask) of the device (unknown) at offset <code>0x8C</code> with mask = 1.
 
<source lang="C">int ScePervasiveForDriver_C0C842FE(void);</source>
 
=== scePervasiveUdcClkGateEnableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xA2EFD7AF
|}
 
This is a guessed name.
 
Turns on the clock gate (|= mask) of the device (Udc) at offset <code>0x90 + device * 4</code>.
 
<source lang="C">int scePervasiveUdcClkGateEnableForDriver(int device, int mask);</source>
 
=== scePervasiveSdifClkGateEnableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x3CF7A012
|}
 
This is a guessed name.
 
Turns on the clock gate (|= mask) of the device (Sdif) at offset <code>0xA0 + device * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveSdifClkGateEnableForDriver(int device);</source>
 
=== scePervasiveMsifClkGateEnableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x7704C013
|}
 
This is a guessed name. Temp name was scePervasiveMsifClockEnableForDriver.
 
Turns on the clock gate (|= mask) of the device (Msif) at offset <code>0xB0</code> with mask = 1.
 
<source lang="C">int scePervasiveMsifClkGateEnableForDriver(void);</source>
 
=== scePervasiveI2sClkGateEnableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x4235EB7D
|}
 
This is a guessed name.
 
Turns on the clock gate (|= mask) of the device (I2s) at offset <code>0xC0 + device * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveI2sClkGateEnableForDriver(int device);</source>
 
=== scePervasiveSrcMixClkGateEnableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x47F2C35C
|}
 
This is a guessed name.
 
Turns on the clock gate (|= mask) of the device (SrcMix) at offset <code>0xE0 + device * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveSrcMixClkGateEnableForDriver(int device);</source>
 
=== scePervasiveSpdifClkGateEnableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x6B5DEDA2
|}
 
This is a guessed name.
 
Turns on the clock gate (|= mask) of the device (Spdif) at offset <code>0xF0</code> with mask = 1.
 
<source lang="C">int scePervasiveSpdifClkGateEnableForDriver(void);</source>
 
=== scePervasiveGpioClkGateEnableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x2F195C97
|}
 
This is a guessed name. Temp name was scePervasiveGpioClockEnableForDriver.
 
Turns on the clock gate (|= mask) of the device (GPIO) at offset <code>0x100</code> with mask = 1.
 
<source lang="C">int scePervasiveGpioClkGateEnableForDriver(void);</source>
 
=== scePervasiveSpiClkGateEnableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xDFD96BFC
|}
 
This is a guessed name. Temp name was scePervasiveSpiClockEnableForDriver.
 
Turns on the clock gate (|= mask) of the device (SPI) at offset <code>0x104 + device * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveSpiClkGateEnableForDriver(int device);</source>
 
=== scePervasiveI2cClkGateEnableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xC37CFDFC
|}
 
This is a guessed name.
 
Turns on the clock gate (|= mask) of the device (I2c) at offset <code>0x110 + device * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveI2cClkGateEnableForDriver(int device);</source>
 
=== scePervasiveUartClkGateEnableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xEFD084D8
|}
 
This is a guessed name. Temp name was scePervasiveUartClockEnableForDriver.
 
Turns on the clock gate (|= mask) of the device (UART) at offset <code>0x120 + device * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveUartClkGateEnableForDriver(int device);</source>
 
=== scePervasiveGpuClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xCA0ACFC5
|}
 
This is a guessed name.
 
Turns off the clock gate (&= ~mask) of the device (Gpu) at offset <code>0x10</code>.
 
<source lang="C">int scePervasiveGpuClkGateDisableForDriver(int mask);</source>
 
=== scePervasiveVipClkGateDisable1ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 1.69-3.60 || 0x2EEBE9AE
|}
 
This is a guessed name.
 
Turns off the clock gate (&= ~mask) of the device (Vip) at offset <code>0x30</code> with mask = 1.
 
Used to initialize [[Venezia]] registers or SPRAM.
 
<source lang="C">int scePervasiveVipClkGateDisable1ForDriver(void);</source>
 
=== scePervasiveVipClkGateDisable2ForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xFBE5AA2F
|}
 
This is a guessed name.
 
Turns off the clock gate (&= ~mask) of the device (Vip) at offset <code>0x30</code> with mask = 2.
 
<source lang="C">int scePervasiveVipClkGateDisable2ForDriver(void);</source>
 
=== ScePervasiveForDriver_03E1FAA6 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x03E1FAA6
|}
 
Turns off the clock gate (&= ~mask) of the device (unknown) at offset <code>0x34</code> with mask = 1.
 
<source lang="C">int ScePervasiveForDriver_03E1FAA6(void);</source>
 
=== scePervasiveCsiClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x4B223AF5
|}
 
This is a guessed name.
 
Turns off the clock gate (&= ~mask) of the device (Csi) at offset <code>0x70 + head * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveCsiClkGateDisableForDriver(SceDisplayHead head);</source>
 
=== scePervasiveIftuDsiClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.931-3.60 || 0x25AE181E
|}
 
Temp name was ScePervasiveForDriver_25AE181E_dsi_clock_disable, scePervasiveDsiClockDisableForDriver.
 
Turns off the clock gate (&= ~mask) of the device (IFTU DSI) at offset <code>0x80 + device * 4</code>.
 
<source lang="C">int scePervasiveIftuDsiClkGateDisableForDriver(int device, int mask);</source>
 
=== ScePervasiveForDriver_5AFE0AF0 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0x5AFE0AF0
|}
 
Turns off the clock gate (&= ~mask) of the device (IFTU2) at offset <code>0x88</code> with mask = 1.
 
<source lang="C">int ScePervasiveForDriver_5AFE0AF0(void);</source>
 
=== ScePervasiveForDriver_9BB7B932 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0x9BB7B932
|}
 
Turns off the clock gate (&= ~mask) of the device (unknown) at offset <code>0x8C</code> with mask = 1.
 
<source lang="C">int ScePervasiveForDriver_9BB7B932(void);</source>
 
=== scePervasiveUdcClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0xAD1E81EB
|}
 
This is a guessed name.
 
Turns off the clock gate (&= ~mask) of the device (Udc) at offset <code>0x90 + device * 4</code>.
 
<source lang="C">int scePervasiveUdcClkGateDisableForDriver(int device, int mask);</source>
 
=== scePervasiveSdifClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0x4E43299D
|}
 
This is a guessed name.
 
Turns off the clock gate (&= ~mask) of the device (Sdif) at offset <code>0xA0 + device * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveSdifClkGateDisableForDriver(int device);</source>
 
=== scePervasiveMsifClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0x2A9778CD
|}
 
This is a guessed name. Temp name was scePervasiveMsifClockDisableForDriver.
 
Turns off the clock gate (&= ~mask) of the device (Msif) at offset <code>0xB0</code> with mask = 1.
 
<source lang="C">int scePervasiveMsifClkGateDisableForDriver(void);</source>
 
=== scePervasiveI2sClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0xA3CF9844
|}
 
This is a guessed name.
 
Turns off the clock gate (&= ~mask) of the device (I2s) at offset <code>0xC0 + device * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveI2sClkGateDisableForDriver(int device);</source>
 
=== scePervasiveSrcMixClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0xF861FEE4
|}
 
This is a guessed name.
 
Turns off the clock gate (&= ~mask) of the device (SrcMix) at offset <code>0xE0 + device * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveSrcMixClkGateDisableForDriver(int device);</source>
 
=== scePervasiveSpdifClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0x51981FEE
|}
 
This is a guessed name.
 
Turns off the clock gate (&= ~mask) of the device (Spdif) at offset <code>0xF0</code> with mask = 1.
 
<source lang="C">int scePervasiveSpdifClkGateDisableForDriver(void);</source>
 
=== scePervasiveGpioClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0xEB176898
|}
 
This is a guessed name. Temp name was scePervasiveGpioClockDisableForDriver.
 
Turns off the clock gate (&= ~mask) of the device (GPIO) at offset <code>0x100</code> with mask = 1.
 
<source lang="C">int scePervasiveGpioClkGateDisableForDriver(void);</source>
 
=== scePervasiveSpiClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0xA85BF98A
|}
 
This is a guessed name. Temp name was scePervasiveSpiClockDisableForDriver.
 
Turns off the clock gate (&= ~mask) of the device (SPI) at offset <code>0x104 + device * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveSpiClkGateDisableForDriver(int device);</source>
 
=== scePervasiveI2cClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0x3F3E1AEA
|}
 
This is a guessed name.
 
Turns off the clock gate (&= ~mask) of the device (I2c) at offset <code>0x110 + device * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveI2cClkGateDisableForDriver(int device);</source>
 
=== scePervasiveUartClkGateDisableForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0x18DD8043
|}
 
This is a guessed name. Temp name was scePervasiveUartClockDisableForDriver.
 
Turns off the clock gate (&= ~mask) of the device (UART) at offset <code>0x120 + device * 4</code> with mask = 1.
 
<source lang="C">int scePervasiveUartClkGateDisableForDriver(int device);</source>
 
=== ScePervasiveForDriver_4F64DEF6 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0x4F64DEF6
|}
 
Sets active bus for UDC (USB Device Controller).
 
Step 1: Puts the device (Udc) at offset <code>0x90 + bus * 4</code> in reset then disables its clock gate.
 
Step 2: Updates ScePervasiveMisc global with the selected bus.
 
Step 3: Puts the device out of reset.
 
<source lang="C">int ScePervasiveForDriver_4F64DEF6(int bus);</source>
 
=== ScePervasiveForDriver_47708C03 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0x47708C03
|}
 
Returns address to the ScePervasiveVid global buffer. What does "Vid" stands for? Video? Vendor ID?
 
It might be related to clock frequencies and [[Syscon]]. Maybe this value is the clock multiplier/divider. See [[Pervasive#ARM_Clocks]].
 
Used by [[ScePower]].
 
<source lang="C">void *ScePervasiveForDriver_47708C03(void);</source>
 
=== ScePervasiveForDriver_E0711D42 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990.000-3.740.011 || 0xE0711D42
|}
 
Calls [[SMC]] 0x110: <code>smc_bus_set_state(1, 0);</code>
 
Used by [[SceEnumWakeUp]].
 
<source lang="C">int ScePervasiveForDriver_E0711D42(void);</source>
 
=== scePervasiveCompatStopForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.931.010 || not present
|-
| 0.990.000-3.740.011 || 0x4712740D
|}
 
Calls [[SMC]] 0x110: <code>smc_bus_set_state(2, 0);</code>
 
Called in [[SceCompat#sceCompatSuspend]] and [[SceCompat#sceCompatStop]].
 
<source lang="C">int scePervasiveCompatStopForDriver(void);</source>
 
=== scePervasiveCompatStartForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.931.010 || not present
|-
| 0.990.000-3.740.011 || 0xB2F232E5
|}
 
Calls [[SMC]] 0x110: <code>smc_bus_set_state(2, 1);</code>
 
Called in [[SceCompat#sceCompatResume]] and [[SceCompat#sceCompatInit]].
 
<source lang="C">int scePervasiveCompatStartForDriver(void);</source>
 
=== scePervasiveCompatLcdDmacInitForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.931.010 || not present
|-
| 0.990.000-3.740.011 || 0xA7855D3A
|}
 
Calls [[SMC]] 0x110: <code>smc_bus_set_state(2, 2);</code>
 
Called during PSP Emulator ([[SceCompat]]) start and resume.
 
<source lang="C">int scePervasiveCompatLcdDmacInitForDriver(void);</source>
 
=== ScePervasiveForDriver_043B33F5 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.931.010-1.692.000 || not present
|-
| 1.800.071-3.740.011 || 0x043B33F5
|}
 
SDIF related. [[Pervasive#ScePervasiveMisc_.280xE3100000.29|ScePervasiveMisc]] offset <code>0x310</code>.
 
<source lang="C">int ScePervasiveForDriver_043B33F5(unsigned int device, unsigned int value);</source>
 
<source lang="C">
if ((device < 4) && (value < 7)) {
    *(uint32_t *)(ScePervasiveMisc + 0x310) = (*(uint32_t *)(ScePervasiveMisc + 0x310) & ~(7 << ((device << 3) & 0xff))) | (value << ((device << 3) & 0xff));
    dmb();
}
</source>
 
=== ScePervasiveForDriver_29E65AE1 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.931.010-2.060.011 || not present
|-
| 2.100.081-3.740.011 || 0x29E65AE1
|}
 
=== ScePervasiveForDriver_453BD2EC ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.931.010-1.692.000 || ??
|-
| 1.800.071-3.740.011 || 0x453BD2EC
|}
 
SDIF related. [[Pervasive#ScePervasiveMisc_.280xE3100000.29|ScePervasiveMisc]] offset <code>0x124</code>.
 
<source lang="C">int ScePervasiveForDriver_453BD2EC(unsigned int device, unsigned int value);</source>
 
<source lang="C">
if ((device < 4) && (value < 2)) {
    *(uint32_t *)(ScePervasiveMisc + 0x124) = (*(uint32_t *)(ScePervasiveMisc + 0x124) & ~(1 << (device & 0xff))) | (value << (device & 0xff));
    dmb();
}
</source>
 
=== ScePervasiveForDriver_9F8E589C ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.931.010-2.060.011 || ??
|-
| 2.100.081-3.740.011 || 0x9F8E589C
|}
 
SDIF related. [[Pervasive#ScePervasiveMisc_.280xE3100000.29|ScePervasiveMisc]] offsets <code>0x110</code>-<code>0x11C</code>.
 
<source lang="C">int ScePervasiveForDriver_9F8E589C(unsigned int device, unsigned int value);</source>
 
<source lang="C">
if ((device < 4) && ((param_2 & 0xfffff8ff) == 0)) {
    *(uint32_t *)(ScePervasiveMisc + 0x110 + device * 4) = value;
    dmb();
}
</source>
 
=== ScePervasiveForDriver_E3A735B9 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.931.010-2.060.011 || not present
|-
| 2.100.081-3.740.011 || 0xE3A735B9
|}
 
== SceGpioForDriver ==
 
If <code>bus</code> is <code>0</code>, the <code>SceGpio0Reg</code> registers are used, and if <code>bus</code> is <code>1</code>, the <code>SceGpio1Reg</code> registers are used.
 
=== Types ===
<source lang="C">
//For port mode
#define SCE_GPIO_PORT_MODE_OUTPUT 0
#define SCE_GPIO_PORT_MODE_INPUT  1
 
//For interrupt mode
#define SCE_GPIO_INTR_MODE_HIGH_SENSING 0  //High-level sensing
#define SCE_GPIO_INTR_MODE_LOW_SENSING  1  //Low-level sensing
#define SCE_GPIO_INTR_MODE_RISING_EDGE  2  //Rising-edge detection
#define SCE_GPIO_INTR_MODE_FALLING_EDGE 3  //Falling-edge detection
</source>
 
=== sceGpioSetPortModeForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60-3.74 || 0x372022A4
|}
 
Set the port mode (input/output) of a port.
 
<source lang="c">
//mode: one of the port mode defines
//Returns the old mode on success, <0 on error.
int sceGpioSetPortModeForDriver(int bus, int port, int mode);
</source>
 
=== sceGpioGetPortModeForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60-3.74 || 0x372022A4
|}
 
Get the current port mode (input/output) of a port.
 
<source lang="c">
//Returns one of the port mode defines on success, <0 on error.
int sceGpioGetPortModeForDriver(int bus, int port);
</source>
 
=== sceGpioSetIntrModeForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60-3.74 || 0xBBEA1DDC
|}
 
Set the interrupt mode of a port.
 
<source lang="c">
//mode: one of the interrupt mode defines
int sceGpioSetIntrModeForDriver(int bus, int port, int mode);
</source>
 
=== sceGpioGetIntrModeForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.74 || 0xE97A3B31
|}
 
Get the current interrupt mode of a port.
 
<source lang="c">
//Returns one of the interrupt modes on success, <0 on error.
int sceGpioGetIntrModeForDriver(int bus, int port);
</source>
 
=== sceGpioPortSetForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990-3.74 || 0xD454A584
|}
 
Set a GPIO port.
 
<source lang="c">int sceGpioPortSetForDriver(int bus, int port);</source>
 
=== sceGpioPortClearForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 0.990-3.74 || 0xF6310435
|}
 
Clear a GPIO port.
 
<source lang="c">int sceGpioPortClearForDriver(int bus, int port);</source>
 
=== SceGpioForDriver_129DF5AC ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.74 || 0x129DF5AC
|}
 
Read the value of a port. Both input and output ports are accepted (in the latter case, latch value is returned).
 
<source lang="c">
//Returns SCE_TRUE if the port was set, SCE_FALSE if it was clear, <0 on error.
int SceGpioForDriver_129DF5AC(int bus, int port);
</source>
 
=== SceGpioForDriver_A1B5A462 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.74 || 0xA1B5A462
|}
 
Read an input port, and "write" the opposite of its state (Clear if read as 1, Set if read as 0).
 
<source lang="c">
//Returns SCE_TRUE if the port was set, SCE_FALSE if it was clear, <0 on error.
int SceGpioForDriver_A1B5A462(int bus, int port);
</source>
 
=== sceGpioQueryIntrForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60-3.74 || 0x010DC295
|}
 
Check if interrupts are pending on a port.
 
<source lang="c">
//Returns SCE_FALSE if no interrupts are pending on port,
//SCE_TRUE if interrupts are pending, <0 on error.
int sceGpioQueryIntrForDriver(int bus, int port);
</source>
 
=== sceGpioAcquireIntrForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60-3.74 || 0x35AAD77A
|}
 
Clear all pending interrupts on a port.
 
<source lang="c">
//Returns SCE_TRUE if an interrupt was pending,
//SCE_FALSE if no interrupts were pending, <0 on error.
int sceGpioAcquireIntrForDriver(int bus, int port);
</source>
 
== ScePwmForDriver ==
 
          ScePwmForDriver_0374213C: 0x0374213C
          ScePwmForDriver_13161CCC: 0x13161CCC
          ScePwmForDriver_22C17D24: 0x22C17D24
          ScePwmForDriver_514773B1: 0x514773B1
          ScePwmForDriver_99911920: 0x99911920
 
== SceI2cForDriver ==
 
=== Types ===
<source lang="c">
typedef struct SceI2cDebugHandlers {
unsigned int size;
void (*write_start)(int bus, int device, unsigned char *buffer, int size);
void (*write_error)(int bus, int error, int result);
void (*read_start)(int bus, int device, unsigned char *buffer, int size);
void (*read_error)(int bus, int error, int result);
void (*write_read_start)(int bus, int write_device, unsigned char *write_buffer, int write_size);
void (*write_read_error)(int bus, int error, int result);
} SceI2cDebugHandlers;
</source>
 
For the following functions:
* <code>bus</code> indicate the target I²C bus
* <code>dev_id</code> seems to indicate the address of the target device, shifted left by 1 (i.e. I²C address = <code>dev_id >> 1</code>).
 
The ID <code>1</code> is handled in a specific way for bus 1 (see [[SceLowio#sceI2cReset|sceI2cReset]]).
 
=== sceI2cInit ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x9CF8F3D6
|}
 
This is a guessed name.
 
Reinitializes the I²C controller for selected bus?
 
<source lang="c">int sceI2cInit(unsigned bus);</source>
 
=== sceI2cReset ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x76D277AB
|}
 
This is a guessed name.
 
This function seems to be used for synchronisation of I2c1 transfers.
 
When calling any read/write function on I²C bus 1 with <code>dev_id == 1</code>, the function calls <code>sceKernelWaitEventFlag(/* I2c1 evf */, /* pattern = */ 0x80000000, /* ... */)</code> before performing the operation.
 
<source lang="c">
// a1 == 0 -> clear bits 0x7FFFFFFF of the synchronisation event flag pattern
// a1 != 0 -> set bit 0x80000000 of the synchronisation event flag pattern
int sceI2cReset(SceBool a1);
</source>
 
=== sceI2cMasterTransmit ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xCA94A759
|}
 
This is an official name. Temp name was sceI2cTransferWrite.
 
Writes data to I²C device on specified bus.
 
<source lang="c">int sceI2cMasterTransmit(unsigned bus, unsigned dev_id, const void *buffer, unsigned size);</source>
 
=== sceI2cMasterReceive ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xD1D0A9A4
|}
 
This is an official name. Temp name was sceI2cTransferRead.
 
Reads data from I²C device on specified bus.
 
<source lang="c">int sceI2cMasterReceive(unsigned bus, unsigned dev_id, void *buffer, unsigned size);</source>
 
=== sceI2cMasterTransmitReceive ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x0A40B7BF
|}
 
This is an official name. Temp name was sceI2cTransferWriteRead.
 
Performs a write to an I²C device followed by a read to a (potentially different) I2c device on the specified bus.
 
<source lang="c">int sceI2cMasterTransmitReceive(unsigned bus, unsigned write_dev_id, const void *write_buffer, unsigned write_size, unsigned read_dev_id, void *read_buffer, unsigned read_size);</source>
 
=== sceI2cSetDebugHandlers ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xA2C7CE62
|}
 
This is a guessed name.
 
Registers callbacks called during I²C operations.
 
<source lang="c">int sceI2cSetDebugHandlers(unsigned bus, SceI2cDebugHandlers *debug_handlers)</source>
 
=== SceI2cForDriver_30CF9469 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x30CF9469
|}
 
Writes <code>a2</code> and <code>a3</code> to some per-bus global variables that are seemingly never read, then writes a value to I2cReg->unk18 depending on [[KBL Param#Hardware_Info|Hardware Info]] mask 0x00FF0000 (motherboard main version).
 
<source lang="c">int SceI2cForDriver_30CF9469(unsigned bus, unsigned a2, unsigned a3);</source>
 
=== SceI2cForDriver_E449AC6E ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0xE449AC6E
|}
 
Writes <code>a2</code> to some per-bus global variable that is seemingly never read.
 
<source lang="c">int SceI2cForDriver_E449AC6E(unsigned bus, unsigned a2);</source>
 
== SceGrabForDriver ==
 
=== sceGrabCompatStartExForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x072B8D93
|}
 
Calls [[SceExcpmgr#SMC|SMC]] 0x11e. <code>smc(0x11E, 1, param)</code>
 
Replacement for [[SceLowio#scePervasiveCompatStartForDriver]].
 
<source lang="C">
// command: 0, 1
int sceGrabCompatStartExForDriver(int param);
</source>
 
=== SceGrabForDriver_188BBCC8 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x188BBCC8
|}
 
Calls [[SceExcpmgr#SMC|SMC]] 0x11C.
 
=== SceGrabForDriver_1F292554 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x1F292554
|}
 
Calls [[SceExcpmgr#SMC|SMC]] 0x121. <code>smc(0x121)</code>
 
=== sceGrabCompatLcdDmacInitForDriver ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x379130B2
|}
 
Calls [[SceExcpmgr#SMC|SMC]] 0x11e. <code>smc(0x11E, 2)</code>
 
Replacement for [[SceLowio#scePervasiveCompatLcdDmacInitForDriver]].
 
=== SceGrabForDriver_5F36ABC4 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x5F36ABC4
|}
 
Calls [[SceExcpmgr#SMC|SMC]] 0x11f. <code>smc(0x11f)</code>


<source lang="C">
=== SceGrabForDriver_B22EE8BC ===
// command: 0, 1
int sceGrabCompatStartExForDriver(int param);
</source>
 
=== SceGrabForDriver_188BBCC8 ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x188BBCC8
| 3.60 || 0xB22EE8BC
|}
|}


Calls [[SceExcpmgr#SMC|SMC]] 0x11C.
Calls [[SceExcpmgr#SMC|SMC]] 0x11b. <code>smc(0x11b)</code>
 
=== SceGrabForDriver_E9C25A28 ===


=== SceGrabForDriver_1F292554 ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x1F292554
| 3.60 || 0xE9C25A28
|}
|}


Calls [[SceExcpmgr#SMC|SMC]] 0x121. <code>smc(0x121)</code>
Set PSP address.
 
Calls [[SceExcpmgr#SMC|SMC]] 0x11d. <code>smc(0x11d)</code>


=== sceGrabCompatLcdDmacInitForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! bank !! Address in PSP
|-
| 0 || ?
|-
| 1 || ?
|-
| 2 || ?
|-
|-
| 3.60 || 0x379130B2
| 3 || 0xA8000000
|}
 
Calls [[SceExcpmgr#SMC|SMC]] 0x11e. <code>smc(0x11E, 2)</code>
 
Replacement for [[SceLowio#scePervasiveCompatLcdDmacInitForDriver]].
 
=== SceGrabForDriver_5F36ABC4 ===
{| class="wikitable"
|-
! Version !! NID
|-
| 3.60 || 0x5F36ABC4
|}
 
Calls [[SceExcpmgr#SMC|SMC]] 0x11f. <code>smc(0x11f)</code>
 
=== SceGrabForDriver_B22EE8BC ===
{| class="wikitable"
|-
|-
! Version !! NID
| 4 || ?
|-
|-
| 3.60 || 0xB22EE8BC
| 5 || ?
|}
 
Calls [[SceExcpmgr#SMC|SMC]] 0x11b. <code>smc(0x11b)</code>
 
=== SceGrabForDriver_E9C25A28 ===
{| class="wikitable"
|-
|-
! Version !! NID
| 6 || ?
|-
|-
| 3.60 || 0xE9C25A28
| 7 || ?
|}
|}
Calls [[SceExcpmgr#SMC|SMC]] 0x11d. <code>smc(0x11d)</code>


<source lang="C">
<source lang="C">
// bank can be from 0 to 7
// bank can be from 0 to 7
int SceGrabForDriver_E9C25A28(SceUInt32 bank, SceUInt32 paddr);
int SceGrabForDriver_E9C25A28(SceUInt32 bank, SceUIntPtr paddr);
</source>
</source>


Line 921: Line 1,967:
== SceCdramForDriver ==
== SceCdramForDriver ==


=== SceCdramForDriver_41D821F3 ===
=== sceCdramExitSelfResreshForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 930: Line 1,976:
| 3.60 || not present
| 3.60 || not present
|}
|}
Typo in name is from SCE.


Calls [[SceExcpmgr#SMC|SMC]] 0x119.
Calls [[SceExcpmgr#SMC|SMC]] 0x119.


=== SceCdramForDriver_BA81E0E3 ===
=== sceCdramEnterSelfResreshForDriver ===
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 942: Line 1,990:
| 3.60 || not present
| 3.60 || not present
|}
|}
Typo in name is from SCE.


Calls [[SceExcpmgr#SMC|SMC]] 0x118.
Calls [[SceExcpmgr#SMC|SMC]] 0x118.
Line 954: Line 2,004:
| 3.60 || 0x0657FC1B
| 3.60 || 0x0657FC1B
|}
|}
Probably <code>sceCdramExitSelfRefresh</code>.
Calls [[SceExcpmgr#SMC|SMC]] 0x119.


=== SceCdramForDriver_2D728EBF ===
=== SceCdramForDriver_2D728EBF ===
Line 964: Line 2,018:
| 3.60 || 0x2D728EBF
| 3.60 || 0x2D728EBF
|}
|}
Probably <code>sceCdramEnterSelfRefresh</code>.
Calls [[SceExcpmgr#SMC|SMC]] 0x118.


=== SceCdramForDriver_3EFA7540 ===
=== SceCdramForDriver_3EFA7540 ===
Line 1,410: Line 2,468:
<source lang="C">int SceCsiForDriver_FC165297(SceDisplayHead head, int a2);</source>
<source lang="C">int SceCsiForDriver_FC165297(SceDisplayHead head, int a2);</source>


 
[[Category:ARM]]
[[Category:Kernel]]
[[Category:Modules]]
[[Category:Modules]]
[[Category:Kernel]]
[[Category:Library]]

Latest revision as of 11:39, 18 September 2024

Module

Version World Privilege
1.69-3.65 Non-secure Kernel

Libraries

Known NIDs

Version Name World Visibility NID
1.69 ScePervasiveForDriver Non-secure Kernel 0xE692C727
1.69 SceGpioForDriver Non-secure Kernel 0xF0EF5743
1.69 ScePwmForDriver Non-secure Kernel 0xECEAE2D0
1.69 SceI2cForDriver Non-secure Kernel 0xE14BEF6E
1.69 SceGrabForDriver Non-secure Kernel 0x81C54BED
1.69 SceCdramForDriver Non-secure Kernel 0xC8CD941E
1.69 SceDsiForDriver Non-secure Kernel 0xEC897883
1.69 SceIftuForDriver Non-secure Kernel 0xCAFCFE50
1.69 SceCsiForDriver Non-secure Kernel 0xD85C8E44

Miscellaneous

AutoClockDown idle loop

During module_start, SceLowio will call SceThreadmgrForDriver_B4A05763 to register an optimized idle loop that performs automatic clock-down of ARM when unused.

This loop uses the AutoClockDown idle context from SceSysmem.

Functionally, the new idle loop behaves as follows:

while (1) {
  __disable_irq(); /* cpsid i */

  /* mark this core as inactive */  
  uint32_t num_active_cores = atomic_sub_32(&SceSysrootForDriver_4B8C305A->num_active_cores, 1);
  if (num_active_cores == 0) {
    /* No more active ARM cores: clock down ARM to 21MHz */
    SceSysrootForDriver_4B8C305A->arm_baseclk_config[0] = ScePervasiveBaseClock[0];
    SceSysrootForDriver_4B8C305A->arm_baseclk_config[1] = ScePervasiveBaseClock[1];

    ScePervasiveBaseClock[0] = 7;
    ScePervasiveBaseClock[0] = 1;
    ScePervasiveBaseClock[1] = 8;

    /* Set num_active_cores to -1, such that the first core to wake up
     * will increment to 0 and realize it needs to restore ARM clocks.
     */
  }

  __wfi(); /* Wait For Interrupt */

  while (SceSysrootForDriver_4B8C305A->num_active_cores == 0) {
     /* Another core is restoring clocks - wait for it.
      * Note that this check is actually integrated in the
      * atomic_add_32 below, so there's no race condition.
      */
  }

  num_active_cores = atomic_add_32(&SceSysrootForDriver_4B8C305A->num_active_cores, 1);
  if (num_active_cores == 0) {
    /* We are the first core to wake up after clock down - restore full speed */
    ScePervasiveBaseClock[0] = 7;
    ScePervasiveBaseClock[1] = SceSysrootForDriver_4B8C305A->arm_baseclk_config[1];
    ScePervasiveBaseClock[0] = SceSysrootForDriver_4B8C305A->arm_baseclk_config[0];
    /* Free all other cores */
    SceSysrootForDriver_4B8C305A->num_active_cores = 1;
  }
  
  __enable_irq(); /* cpsie i */
  /* The pending interrupt is taken right after unmasking interrupts.
   * When the idle thread is scheduled again, execution resumes here,
   * which will result in the loop executing again.
   */
}

This explains why the sceKernelSysroot*AutoClockDown functions only need to atomically increment/decrement a value: if num_active_cores is higher than the amount of CPUs, atomic_sub_32 always returns a non-zero value and the ARM clock is never slowed down.

ScePervasiveForDriver

scePervasiveSrcClockSelectForDriver

Version NID
0.990.000-3.740.011 0x2FB5F88F

Probably sets audio SouRCe mixer clock.

Used only by ScePower.

int scePervasiveSrcClockSelectForDriver(SceUInt32 freq_level);

scePervasiveArmClockSelectForDriver

Version NID
0.990.000-3.740.011 0xE9D95643

Temp name was scePervasiveArmSetClockForDriver.

Used only by ScePower.

int scePervasiveArmClockSelectForDriver(SceUInt32 freq_base, SceUInt32 freq_adjust);

scePervasiveGpuClockSelectForDriver

Version NID
0.990.000-3.740.011 0x6AF0196F

Temp name was scePervasiveGpuSetClockForDriver.

Maybe called on each suspend/resume.

// freq_level1: 3 (default value), 5 when DIP Switch 236 (GPU overclock) is set
int scePervasiveGpuClockSelectForDriver(SceUInt32 freq_level1, SceUInt32 freq_level2);

scePervasiveVeneziaClockSelectForDriver

Version NID
0.990.000-3.740.011 0x725B4F59

Temp name was scePervasiveVeneziaSetClockForDriver.

int scePervasiveVeneziaClockSelectForDriver(SceUInt32 freq_level);

scePervasiveVipClockSelectForDriver

Version NID
0.990.000-3.740.011 0x12D17D47

Temp name was scePervasiveVipSetClockForDriver.

int scePervasiveVipClockSelectForDriver(SceUInt32 freq_level);

scePervasiveDmac5ClockSelectForDriver

Version NID
0.990.000-3.740.011 0xA6832B33

Temp name was scePervasiveDmac5SetClockForDriver.

int scePervasiveDmac5ClockSelectForDriver(SceUInt32 freq_level);

scePervasiveBusClockSelectForDriver

Version NID
0.990.000-3.740.011 0xC0F7CC39

Temp name was scePervasiveBusSetClockForDriver.

Requests ARM TrustZone using SMC 0x114.

int scePervasiveBusClockSelectForDriver(SceUInt32 freq_level);

scePervasiveSysClockSelectForDriver

Version NID
0.990.000-3.740.011 0x98D8914A

This is a guessed name. Temp name was scePervasiveSysSetClockForDriver.

int scePervasiveSysClockSelectForDriver(SceUInt32 freq_level);

ScePervasiveForDriver_64ABE589

Version NID
0.990.000-3.740.011 0x64ABE589

A good name could be scePervasiveMsifClockSelectForDriver.

int ScePervasiveForDriver_64ABE589(SceUInt32 freq_level);

ScePervasiveForDriver_91C80C41

Version NID
0.990.000-3.740.011 0x91C80C41

A good name might be scePervasiveIftuDsiClockSelectForDriver. Temp name was ScePervasiveForDriver_91C80C41_set_dsi_bus_pixelclock, scePervasiveDsiSetPixelClockForDriver.

Sets DSI bus (?IFTU?) pixel clock.

int ScePervasiveForDriver_91C80C41(int bus, SceUInt32 freq_level);

scePervasiveCameraBusClockSelectForDriver

Version NID
0.931.010-3.740.011 0x589D0291
// freq_level can be either 2 (DOWN) or 5 (UP)
int scePervasiveCameraBusClockSelectForDriver(SceUInt32 freq_level);

scePervasiveGetSoCRevisionForDriver

Version NID
0.931.010-3.740.011 0x714EEFB7

Returns <= 0 if Kermit revision is below 2.0.

Used in ScePower, SceGpuEs4, SceSdif. Maybe copied to SceSysmem's sysroot structure.

SceUInt32 scePervasiveGetSoCRevisionForDriver(void);

scePervasiveCecClockOutEnableForDriver

Version NID
0.931.010-3.740.011 0x26B51075

scePervasiveCecClockOutDisableForDriver

Version NID
0.931.010-3.740.011 0xD185D235

ScePervasiveForDriver_243D0E78

Version NID
0.990.000-3.740.011 0x243D0E78

Gets IFTU DSI clock information.

int ScePervasiveForDriver_243D0E78(int pixelclock, int info0[2], int info1[2]);

scePervasiveGpuResetEnableForDriver

Version NID
0.990.000-3.740.011 0x3E79D3D3

This is a guessed name.

Puts the device (Gpu) at offset 0x10 in reset (|= mask) with mask = 1.

int scePervasiveGpuResetEnableForDriver(void);

scePervasiveVipResetEnableForDriver

Version NID
0.990.000-3.740.011 0x28731EC5

This is a guessed name.

Puts the device (Vip) at offset 0x30 in reset (|= mask) with mask = 1.

int scePervasiveVipResetEnableForDriver(void);

ScePervasiveForDriver_31C0A98B

Version NID
0.990.000-3.740.011 0x31C0A98B

Puts the device (unknown) at offset 0x34 in reset (|= mask) with mask = 1.

int ScePervasiveForDriver_31C0A98B(void);

ScePervasiveForDriver_FF4B3CA6

Version NID
0.990.000-3.740.011 0xFF4B3CA6

Puts the device (unknown) at offset 0x50 + device * 4 in reset (|= mask) with mask = 1.

int ScePervasiveForDriver_FF4B3CA6(int device);

scePervasiveCsiResetEnableForDriver

Version NID
0.990.000-3.740.011 0x66BF2885

This is a guessed name.

Puts the device (Csi) at offset 0x70 + head * 4 in reset (|= mask) with mask = 1.

int scePervasiveCsiResetEnableForDriver(SceDisplayHead head);

scePervasiveIftuDsiResetEnableForDriver

Version NID
0.931.010-3.740.011 0xE3FC1C8D

Temp name was ScePervasiveForDriver_E3FC1C8D_dsi_reset_enter, scePervasiveDsiResetEnableForDriver.

Puts the device (IFTU DSI) at offset 0x80 + device * 4 in reset (|= mask).

int scePervasiveIftuDsiResetEnableForDriver(int device, int mask);

ScePervasiveForDriver_B68254AD

Version NID
0.990.000-3.740.011 0xB68254AD

Puts the device (IFTU2) at offset 0x88 in reset (|= mask) with mask = 1.

int ScePervasiveForDriver_B68254AD(void);

ScePervasiveForDriver_7AE2F8E8

Version NID
0.990.000-3.740.011 0x7AE2F8E8

Puts the device (unknown) at offset 0x8C in reset (|= mask) with mask = 1.

int ScePervasiveForDriver_7AE2F8E8(void);

scePervasiveUdcResetEnableForDriver

Version NID
0.990.000-3.740.011 0x4AF7A01E

This is a guessed name.

Puts the device (Udc) at offset 0x90 + device * 4 in reset (|= mask).

int scePervasiveUdcResetEnableForDriver(int device, int mask);

scePervasiveSdifResetEnableForDriver

Version NID
0.990.000-3.740.011 0x3D8A8712

This is a guessed name.

Puts the device (Sdif) at offset 0xA0 + device * 4 in reset (|= mask) with mask = 1.

int scePervasiveSdifResetEnableForDriver(void);

scePervasiveMsifResetEnableForDriver

Version NID
0.990.000-3.740.011 0xA3569FF1

This is a guessed name.

Puts the device (Msif) at offset 0xB0 in reset (|= mask) with mask = 1.

int scePervasiveMsifResetEnableForDriver(void);

scePervasiveI2sResetEnableForDriver

Version NID
0.990.000-3.740.011 0x146108D4

This is a guessed name.

Puts the device (I2s) at offset 0xC0 + device * 4 in reset (|= mask) with mask = 1.

int scePervasiveI2sResetEnableForDriver(int device);

scePervasiveSrcMixResetEnableForDriver

Version NID
3.60 0x821AE6C7

This is a guessed name.

Puts the device (SrcMix) at offset 0xE0 + device * 4 in reset (|= mask) with mask = 1.

int scePervasiveSrcMixResetEnableForDriver(int device);

scePervasiveSpdifResetEnableForDriver

Version NID
3.60 0xB8AF1249

This is a guessed name.

Puts the device (Spdif) at offset 0xF0 in reset (|= mask) with mask = 1.

int scePervasiveSpdifResetEnableForDriver(void);

scePervasiveGpioResetEnableForDriver

Version NID
3.60 0x731A097D

This is a guessed name.

Puts the device (GPIO) at offset 0x100 in reset (|= mask) with mask = 1.

int scePervasiveGpioResetEnableForDriver(void);

scePervasiveSpiResetEnableForDriver

Version NID
3.60 0x7B16F900

This is a guessed name.

Puts the device (SPI) at offset 0x104 + device * 4 in reset (|= mask) with mask = 1.

int scePervasiveSpiResetEnableForDriver(int device);

scePervasiveI2cResetEnableForDriver

Version NID
3.60 0x41F9E1C3

This is a guessed name.

Puts the device (I2c) at offset 0x110 + device * 4 in reset (|= mask) with mask = 1.

int scePervasiveI2cResetEnableForDriver(int device);

scePervasiveUartResetEnableForDriver

Version NID
3.60 0x788B6C61

This is a guessed name.

Puts the device (UART) at offset 0x120 + uart_bus * 4 in reset (|= mask) with mask = 1.

int scePervasiveUartResetEnableForDriver(int uart_bus);

scePervasiveGpuResetDisableForDriver

Version NID
3.60 0x8A85E36B

This is a guessed name.

Puts the device (Gpu) at offset 0x10 out of reset (&= ~mask) with mask = 1.

int scePervasiveGpuResetDisableForDriver(void);

scePervasiveVipResetDisableForDriver

Version NID
0.931-3.60 0xA7E64C6F

This is a guessed name.

Puts the device (Vip) at offset 0x30 out of reset (&= ~mask) with mask = 1.

Used to reset Venezia.

int scePervasiveVipResetDisableForDriver(void);

ScePervasiveForDriver_E2D8F6C3

Version NID
3.60 0xE2D8F6C3

Puts the device (unknown) at offset 0x34 out of reset (&= ~mask) with mask = 1.

int ScePervasiveForDriver_E2D8F6C3(int device);

ScePervasiveForDriver_AC475961

Version NID
3.60 0xAC475961

Puts the device (unknown) at offset 0x50 + device * 4 out of reset (&= ~mask) with mask = 1.

int ScePervasiveForDriver_AC475961(int device);

scePervasiveCsiResetDisableForDriver

Version NID
3.60 0xD3B59C33

This is a guessed name.

Puts the device (Csi) at offset 0x70 + head * 4 out of reset (&= ~mask) with mask = 1.

int scePervasiveCsiResetDisableForDriver(SceDisplayHead head);

scePervasiveIftuDsiResetDisableForDriver

Version NID
0.931-3.60 0xFFB43AC2

Temp name was scePervasiveDsiResetDisableForDriver.

Puts the device (IFTU DSI) at offset 0x80 + device * 4 out of reset (&= ~mask).

int scePervasiveIftuDsiResetDisableForDriver(int device, int mask);

ScePervasiveForDriver_E92E28FF

Version NID
3.60 0xE92E28FF

Puts the device (IFTU2) at offset 0x88 out of reset (&= ~mask) with mask = 1.

int ScePervasiveForDriver_E92E28FF(void);

ScePervasiveForDriver_17109C28

Version NID
3.60 0x17109C28

Puts the device (unknown) at offset 0x8C out of reset (&= ~mask) with mask = 1.

int ScePervasiveForDriver_17109C28(void);

scePervasiveUdcResetDisableForDriver

Version NID
3.60 0x13CC07C9

This is a guessed name.

Puts the device (Udc) at offset 0x90 + device * 4 out of reset (&= ~mask).

int scePervasiveUdcResetDisableForDriver(int device, int mask);

scePervasiveSdifResetDisableForDriver

Version NID
3.60 0xD326E15F

This is a guessed name.

Puts the device (Sdif) at offset 0xA0 + device * 4 out of reset (&= ~mask) with mask = 1.

int scePervasiveSdifResetDisableForDriver(int device);

scePervasiveMsifResetDisableForDriver

Version NID
3.60 0xCB0F15CD

This is a guessed name.

Puts the device (Msif) at offset 0xB0 out of reset (&= ~mask) with mask = 1.

int scePervasiveMsifResetDisableForDriver(void);

scePervasiveI2sResetDisableForDriver

Version NID
3.60 0xEEE340ED

This is a guessed name.

Puts the device (I2s) at offset 0xC0 + device * 4 out of reset (&= ~mask) with mask = 1.

int scePervasiveI2sResetDisableForDriver(int device);

scePervasiveSrcMixResetDisableForDriver

Version NID
3.60 0x5BAFA0DC

This is a guessed name.

Puts the device (SrcMix) at offset 0xE0 + device * 4 out of reset (&= ~mask) with mask = 1.

int scePervasiveSrcMixResetDisableForDriver(int device);

scePervasiveSpdifResetDisableForDriver

Version NID
3.60 0x6A2FB697

This is a guessed name.

Puts the device (Spdif) at offset 0xF0 out of reset (&= ~mask) with mask = 1.

int scePervasiveSpdifResetDisableForDriver(void);

scePervasiveGpioResetDisableForDriver

Version NID
3.60 0x78C34032

This is a guessed name.

Puts the device (GPIO) at offset 0x100 out of reset (&= ~mask) with mask = 1.

int scePervasiveGpioResetDisableForDriver(void);

scePervasiveSpiResetDisableForDriver

Version NID
3.60 0xE4B145AE

This is a guessed name.

Puts the device (SPI) at offset 0x104 + device * 4 out of reset (&= ~mask) with mask = 1.

int scePervasiveSpiResetDisableForDriver(int device);

scePervasiveI2cResetDisableForDriver

Version NID
3.60 0x86BEA9A4

This is a guessed name.

Puts the device (I2c) at offset 0x110 + device * 4 out of reset (&= ~mask) with mask = 1.

int scePervasiveI2cResetDisableForDriver(int device);

scePervasiveUartResetDisableForDriver

Version NID
3.60 0xA7CE7DCC

This is a guessed name.

Puts the device (UART) at offset 0x120 + uart_bus * 4 out of reset (&= ~mask) with mask = 1.

int scePervasiveUartResetDisableForDriver(int uart_bus);

scePervasiveRemovableMemoryGetCardInsertStateForDriver

Version NID
3.60 0x551EEE82
int scePervasiveRemovableMemoryGetCardInsertStateForDriver(void);

ScePervasiveForDriver_81A155F1

Version NID
3.60 0x81A155F1

Returns SceLowio's mapped ScePervasiveMisc virtual address.

void *ScePervasiveForDriver_81A155F1(void);

ScePervasiveForDriver_8BAB45F8

Version NID
3.60 0x8BAB45F8

Changes UART baudrate of one of the 7 UART bus. See SceUartClkgenReg for more information.

int ScePervasiveForDriver_8BAB45F8(int uart_bus, int baudrate);

scePervasiveGpuClkGateEnableForDriver

Version NID
3.60 0x39E51AE2

This is a guessed name.

Turns on the clock gate (|= mask) of the device (Gpu) at offset 0x10.

int scePervasiveGpuClkGateEnableForDriver(int mask);

scePervasiveDmacClkGateEnableForDriver

Version NID
3.60 0xA10583FF

This is a guessed name.

Enables DMAC clock gate.

int scePervasiveDmacClkGateEnableForDriver(int device);

scePervasiveDmacClkGateDisableForDriver

Version NID
3.60 0x15237AF8

Disables DMAC clock gate.

int scePervasiveDmacClkGateDisableForDriver(int device);

scePervasiveDbgSdioClkGateEnableForDriver

Version NID
3.60 0xD34E74C5

This is a guessed name.

Enables SceDbgSdio clock gate.

int scePervasiveDbgSdioClkGateEnableForDriver(int device);

scePervasiveDbgSdioClkGateDisableForDriver

Version NID
3.60 0x701D5355

This is a guessed name.

Disables SceDbgSdio clock gate.

int scePervasiveDbgSdioClkGateDisableForDriver(int device);

scePervasiveVipClkGateEnable1ForDriver

Version NID
1.69-3.60 0xFB01A2DD

This is a guessed name.

Turns on the clock gate (|= mask) of the device (Vip) at offset 0x30 with mask = 1.

Used to initialize Venezia registers or SPRAM.

int scePervasiveVipClkGateEnable1ForDriver(void);

scePervasiveVipClkGateEnable2ForDriver

Version NID
3.60 0xB9904983

This is a guessed name.

Turns on the clock gate (|= mask) of the device (Vip) at offset 0x30 with mask = 2.

int scePervasiveVipClkGateEnable2ForDriver(void);

ScePervasiveForDriver_B1CFA18F

Version NID
3.60 0xB1CFA18F

Turns on the clock gate (|= mask) of the device (unknown) at offset 0x34 with mask = 1.

int ScePervasiveForDriver_B1CFA18F(void);

scePervasiveCsiClkGateEnableForDriver

Version NID
3.60 0x1068C067

This is a guessed name.

Turns on the clock gate (|= mask) of the device (Csi) at offset 0x70 + head * 4 with mask = 1.

int scePervasiveCsiClkGateEnableForDriver(SceDisplayHead head);

scePervasiveIftuDsiClkGateEnableForDriver

Version NID
3.60 0xBC42C72F

Temp name was scePervasiveDsiClockEnableForDriver.

Turns on the clock gate (|= mask) of the device (IFTU DSI) at offset 0x80 + device * 4.

int scePervasiveIftuDsiClkGateEnableForDriver(int device, int mask);

ScePervasiveForDriver_07F2A738

Version NID
3.60 0x07F2A738

Turns on the clock gate (|= mask) of the device (IFTU2) at offset 0x88 with mask = 1.

int ScePervasiveForDriver_07F2A738(void);

ScePervasiveForDriver_C0C842FE

Version NID
3.60 0xC0C842FE

Turns on the clock gate (|= mask) of the device (unknown) at offset 0x8C with mask = 1.

int ScePervasiveForDriver_C0C842FE(void);

scePervasiveUdcClkGateEnableForDriver

Version NID
3.60 0xA2EFD7AF

This is a guessed name.

Turns on the clock gate (|= mask) of the device (Udc) at offset 0x90 + device * 4.

int scePervasiveUdcClkGateEnableForDriver(int device, int mask);

scePervasiveSdifClkGateEnableForDriver

Version NID
3.60 0x3CF7A012

This is a guessed name.

Turns on the clock gate (|= mask) of the device (Sdif) at offset 0xA0 + device * 4 with mask = 1.

int scePervasiveSdifClkGateEnableForDriver(int device);

scePervasiveMsifClkGateEnableForDriver

Version NID
3.60 0x7704C013

This is a guessed name. Temp name was scePervasiveMsifClockEnableForDriver.

Turns on the clock gate (|= mask) of the device (Msif) at offset 0xB0 with mask = 1.

int scePervasiveMsifClkGateEnableForDriver(void);

scePervasiveI2sClkGateEnableForDriver

Version NID
3.60 0x4235EB7D

This is a guessed name.

Turns on the clock gate (|= mask) of the device (I2s) at offset 0xC0 + device * 4 with mask = 1.

int scePervasiveI2sClkGateEnableForDriver(int device);

scePervasiveSrcMixClkGateEnableForDriver

Version NID
3.60 0x47F2C35C

This is a guessed name.

Turns on the clock gate (|= mask) of the device (SrcMix) at offset 0xE0 + device * 4 with mask = 1.

int scePervasiveSrcMixClkGateEnableForDriver(int device);

scePervasiveSpdifClkGateEnableForDriver

Version NID
3.60 0x6B5DEDA2

This is a guessed name.

Turns on the clock gate (|= mask) of the device (Spdif) at offset 0xF0 with mask = 1.

int scePervasiveSpdifClkGateEnableForDriver(void);

scePervasiveGpioClkGateEnableForDriver

Version NID
3.60 0x2F195C97

This is a guessed name. Temp name was scePervasiveGpioClockEnableForDriver.

Turns on the clock gate (|= mask) of the device (GPIO) at offset 0x100 with mask = 1.

int scePervasiveGpioClkGateEnableForDriver(void);

scePervasiveSpiClkGateEnableForDriver

Version NID
3.60 0xDFD96BFC

This is a guessed name. Temp name was scePervasiveSpiClockEnableForDriver.

Turns on the clock gate (|= mask) of the device (SPI) at offset 0x104 + device * 4 with mask = 1.

int scePervasiveSpiClkGateEnableForDriver(int device);

scePervasiveI2cClkGateEnableForDriver

Version NID
3.60 0xC37CFDFC

This is a guessed name.

Turns on the clock gate (|= mask) of the device (I2c) at offset 0x110 + device * 4 with mask = 1.

int scePervasiveI2cClkGateEnableForDriver(int device);

scePervasiveUartClkGateEnableForDriver

Version NID
3.60 0xEFD084D8

This is a guessed name. Temp name was scePervasiveUartClockEnableForDriver.

Turns on the clock gate (|= mask) of the device (UART) at offset 0x120 + device * 4 with mask = 1.

int scePervasiveUartClkGateEnableForDriver(int device);

scePervasiveGpuClkGateDisableForDriver

Version NID
3.60 0xCA0ACFC5

This is a guessed name.

Turns off the clock gate (&= ~mask) of the device (Gpu) at offset 0x10.

int scePervasiveGpuClkGateDisableForDriver(int mask);

scePervasiveVipClkGateDisable1ForDriver

Version NID
1.69-3.60 0x2EEBE9AE

This is a guessed name.

Turns off the clock gate (&= ~mask) of the device (Vip) at offset 0x30 with mask = 1.

Used to initialize Venezia registers or SPRAM.

int scePervasiveVipClkGateDisable1ForDriver(void);

scePervasiveVipClkGateDisable2ForDriver

Version NID
3.60 0xFBE5AA2F

This is a guessed name.

Turns off the clock gate (&= ~mask) of the device (Vip) at offset 0x30 with mask = 2.

int scePervasiveVipClkGateDisable2ForDriver(void);

ScePervasiveForDriver_03E1FAA6

Version NID
3.60 0x03E1FAA6

Turns off the clock gate (&= ~mask) of the device (unknown) at offset 0x34 with mask = 1.

int ScePervasiveForDriver_03E1FAA6(void);

scePervasiveCsiClkGateDisableForDriver

Version NID
3.60 0x4B223AF5

This is a guessed name.

Turns off the clock gate (&= ~mask) of the device (Csi) at offset 0x70 + head * 4 with mask = 1.

int scePervasiveCsiClkGateDisableForDriver(SceDisplayHead head);

scePervasiveIftuDsiClkGateDisableForDriver

Version NID
0.931-3.60 0x25AE181E

Temp name was ScePervasiveForDriver_25AE181E_dsi_clock_disable, scePervasiveDsiClockDisableForDriver.

Turns off the clock gate (&= ~mask) of the device (IFTU DSI) at offset 0x80 + device * 4.

int scePervasiveIftuDsiClkGateDisableForDriver(int device, int mask);

ScePervasiveForDriver_5AFE0AF0

Version NID
0.990.000-3.740.011 0x5AFE0AF0

Turns off the clock gate (&= ~mask) of the device (IFTU2) at offset 0x88 with mask = 1.

int ScePervasiveForDriver_5AFE0AF0(void);

ScePervasiveForDriver_9BB7B932

Version NID
0.990.000-3.740.011 0x9BB7B932

Turns off the clock gate (&= ~mask) of the device (unknown) at offset 0x8C with mask = 1.

int ScePervasiveForDriver_9BB7B932(void);

scePervasiveUdcClkGateDisableForDriver

Version NID
0.990.000-3.740.011 0xAD1E81EB

This is a guessed name.

Turns off the clock gate (&= ~mask) of the device (Udc) at offset 0x90 + device * 4.

int scePervasiveUdcClkGateDisableForDriver(int device, int mask);

scePervasiveSdifClkGateDisableForDriver

Version NID
0.990.000-3.740.011 0x4E43299D

This is a guessed name.

Turns off the clock gate (&= ~mask) of the device (Sdif) at offset 0xA0 + device * 4 with mask = 1.

int scePervasiveSdifClkGateDisableForDriver(int device);

scePervasiveMsifClkGateDisableForDriver

Version NID
0.990.000-3.740.011 0x2A9778CD

This is a guessed name. Temp name was scePervasiveMsifClockDisableForDriver.

Turns off the clock gate (&= ~mask) of the device (Msif) at offset 0xB0 with mask = 1.

int scePervasiveMsifClkGateDisableForDriver(void);

scePervasiveI2sClkGateDisableForDriver

Version NID
0.990.000-3.740.011 0xA3CF9844

This is a guessed name.

Turns off the clock gate (&= ~mask) of the device (I2s) at offset 0xC0 + device * 4 with mask = 1.

int scePervasiveI2sClkGateDisableForDriver(int device);

scePervasiveSrcMixClkGateDisableForDriver

Version NID
0.990.000-3.740.011 0xF861FEE4

This is a guessed name.

Turns off the clock gate (&= ~mask) of the device (SrcMix) at offset 0xE0 + device * 4 with mask = 1.

int scePervasiveSrcMixClkGateDisableForDriver(int device);

scePervasiveSpdifClkGateDisableForDriver

Version NID
0.990.000-3.740.011 0x51981FEE

This is a guessed name.

Turns off the clock gate (&= ~mask) of the device (Spdif) at offset 0xF0 with mask = 1.

int scePervasiveSpdifClkGateDisableForDriver(void);

scePervasiveGpioClkGateDisableForDriver

Version NID
0.990.000-3.740.011 0xEB176898

This is a guessed name. Temp name was scePervasiveGpioClockDisableForDriver.

Turns off the clock gate (&= ~mask) of the device (GPIO) at offset 0x100 with mask = 1.

int scePervasiveGpioClkGateDisableForDriver(void);

scePervasiveSpiClkGateDisableForDriver

Version NID
0.990.000-3.740.011 0xA85BF98A

This is a guessed name. Temp name was scePervasiveSpiClockDisableForDriver.

Turns off the clock gate (&= ~mask) of the device (SPI) at offset 0x104 + device * 4 with mask = 1.

int scePervasiveSpiClkGateDisableForDriver(int device);

scePervasiveI2cClkGateDisableForDriver

Version NID
0.990.000-3.740.011 0x3F3E1AEA

This is a guessed name.

Turns off the clock gate (&= ~mask) of the device (I2c) at offset 0x110 + device * 4 with mask = 1.

int scePervasiveI2cClkGateDisableForDriver(int device);

scePervasiveUartClkGateDisableForDriver

Version NID
0.990.000-3.740.011 0x18DD8043

This is a guessed name. Temp name was scePervasiveUartClockDisableForDriver.

Turns off the clock gate (&= ~mask) of the device (UART) at offset 0x120 + device * 4 with mask = 1.

int scePervasiveUartClkGateDisableForDriver(int device);

ScePervasiveForDriver_4F64DEF6

Version NID
0.990.000-3.740.011 0x4F64DEF6

Sets active bus for UDC (USB Device Controller).

Step 1: Puts the device (Udc) at offset 0x90 + bus * 4 in reset then disables its clock gate.

Step 2: Updates ScePervasiveMisc global with the selected bus.

Step 3: Puts the device out of reset.

int ScePervasiveForDriver_4F64DEF6(int bus);

ScePervasiveForDriver_47708C03

Version NID
0.990.000-3.740.011 0x47708C03

Returns address to the ScePervasiveVid global buffer. What does "Vid" stands for? Video? Vendor ID?

It might be related to clock frequencies and Syscon. Maybe this value is the clock multiplier/divider. See Pervasive#ARM_Clocks.

Used by ScePower.

void *ScePervasiveForDriver_47708C03(void);

ScePervasiveForDriver_E0711D42

Version NID
0.990.000-3.740.011 0xE0711D42

Calls SMC 0x110: smc_bus_set_state(1, 0);

Used by SceEnumWakeUp.

int ScePervasiveForDriver_E0711D42(void);

scePervasiveCompatStopForDriver

Version NID
0.931.010 not present
0.990.000-3.740.011 0x4712740D

Calls SMC 0x110: smc_bus_set_state(2, 0);

Called in SceCompat#sceCompatSuspend and SceCompat#sceCompatStop.

int scePervasiveCompatStopForDriver(void);

scePervasiveCompatStartForDriver

Version NID
0.931.010 not present
0.990.000-3.740.011 0xB2F232E5

Calls SMC 0x110: smc_bus_set_state(2, 1);

Called in SceCompat#sceCompatResume and SceCompat#sceCompatInit.

int scePervasiveCompatStartForDriver(void);

scePervasiveCompatLcdDmacInitForDriver

Version NID
0.931.010 not present
0.990.000-3.740.011 0xA7855D3A

Calls SMC 0x110: smc_bus_set_state(2, 2);

Called during PSP Emulator (SceCompat) start and resume.

int scePervasiveCompatLcdDmacInitForDriver(void);

ScePervasiveForDriver_043B33F5

Version NID
0.931.010-1.692.000 not present
1.800.071-3.740.011 0x043B33F5

SDIF related. ScePervasiveMisc offset 0x310.

int ScePervasiveForDriver_043B33F5(unsigned int device, unsigned int value);
if ((device < 4) && (value < 7)) {
    *(uint32_t *)(ScePervasiveMisc + 0x310) = (*(uint32_t *)(ScePervasiveMisc + 0x310) & ~(7 << ((device << 3) & 0xff))) | (value << ((device << 3) & 0xff));
    dmb();
}

ScePervasiveForDriver_29E65AE1

Version NID
0.931.010-2.060.011 not present
2.100.081-3.740.011 0x29E65AE1

ScePervasiveForDriver_453BD2EC

Version NID
0.931.010-1.692.000 ??
1.800.071-3.740.011 0x453BD2EC

SDIF related. ScePervasiveMisc offset 0x124.

int ScePervasiveForDriver_453BD2EC(unsigned int device, unsigned int value);
if ((device < 4) && (value < 2)) {
    *(uint32_t *)(ScePervasiveMisc + 0x124) = (*(uint32_t *)(ScePervasiveMisc + 0x124) & ~(1 << (device & 0xff))) | (value << (device & 0xff));
    dmb();
}

ScePervasiveForDriver_9F8E589C

Version NID
0.931.010-2.060.011 ??
2.100.081-3.740.011 0x9F8E589C

SDIF related. ScePervasiveMisc offsets 0x110-0x11C.

int ScePervasiveForDriver_9F8E589C(unsigned int device, unsigned int value);
if ((device < 4) && ((param_2 & 0xfffff8ff) == 0)) {
    *(uint32_t *)(ScePervasiveMisc + 0x110 + device * 4) = value;
    dmb();
}

ScePervasiveForDriver_E3A735B9

Version NID
0.931.010-2.060.011 not present
2.100.081-3.740.011 0xE3A735B9

SceGpioForDriver

If bus is 0, the SceGpio0Reg registers are used, and if bus is 1, the SceGpio1Reg registers are used.

Types

//For port mode
#define SCE_GPIO_PORT_MODE_OUTPUT 0
#define SCE_GPIO_PORT_MODE_INPUT  1

//For interrupt mode
#define SCE_GPIO_INTR_MODE_HIGH_SENSING 0  //High-level sensing
#define SCE_GPIO_INTR_MODE_LOW_SENSING  1  //Low-level sensing
#define SCE_GPIO_INTR_MODE_RISING_EDGE  2  //Rising-edge detection
#define SCE_GPIO_INTR_MODE_FALLING_EDGE 3  //Falling-edge detection

sceGpioSetPortModeForDriver

Version NID
3.60-3.74 0x372022A4

Set the port mode (input/output) of a port.

//mode: one of the port mode defines
//Returns the old mode on success, <0 on error.
int sceGpioSetPortModeForDriver(int bus, int port, int mode);

sceGpioGetPortModeForDriver

Version NID
3.60-3.74 0x372022A4

Get the current port mode (input/output) of a port.

//Returns one of the port mode defines on success, <0 on error.
int sceGpioGetPortModeForDriver(int bus, int port);

sceGpioSetIntrModeForDriver

Version NID
3.60-3.74 0xBBEA1DDC

Set the interrupt mode of a port.

//mode: one of the interrupt mode defines
int sceGpioSetIntrModeForDriver(int bus, int port, int mode);

sceGpioGetIntrModeForDriver

Version NID
3.74 0xE97A3B31

Get the current interrupt mode of a port.

//Returns one of the interrupt modes on success, <0 on error.
int sceGpioGetIntrModeForDriver(int bus, int port);

sceGpioPortSetForDriver

Version NID
0.990-3.74 0xD454A584

Set a GPIO port.

int sceGpioPortSetForDriver(int bus, int port);

sceGpioPortClearForDriver

Version NID
0.990-3.74 0xF6310435

Clear a GPIO port.

int sceGpioPortClearForDriver(int bus, int port);

SceGpioForDriver_129DF5AC

Version NID
3.74 0x129DF5AC

Read the value of a port. Both input and output ports are accepted (in the latter case, latch value is returned).

//Returns SCE_TRUE if the port was set, SCE_FALSE if it was clear, <0 on error.
int SceGpioForDriver_129DF5AC(int bus, int port);

SceGpioForDriver_A1B5A462

Version NID
3.74 0xA1B5A462

Read an input port, and "write" the opposite of its state (Clear if read as 1, Set if read as 0).

//Returns SCE_TRUE if the port was set, SCE_FALSE if it was clear, <0 on error.
int SceGpioForDriver_A1B5A462(int bus, int port);

sceGpioQueryIntrForDriver

Version NID
3.60-3.74 0x010DC295

Check if interrupts are pending on a port.

//Returns SCE_FALSE if no interrupts are pending on port,
//SCE_TRUE if interrupts are pending, <0 on error.
int sceGpioQueryIntrForDriver(int bus, int port);

sceGpioAcquireIntrForDriver

Version NID
3.60-3.74 0x35AAD77A

Clear all pending interrupts on a port.

//Returns SCE_TRUE if an interrupt was pending,
//SCE_FALSE if no interrupts were pending, <0 on error.
int sceGpioAcquireIntrForDriver(int bus, int port);

ScePwmForDriver

         ScePwmForDriver_0374213C: 0x0374213C
         ScePwmForDriver_13161CCC: 0x13161CCC
         ScePwmForDriver_22C17D24: 0x22C17D24
         ScePwmForDriver_514773B1: 0x514773B1
         ScePwmForDriver_99911920: 0x99911920

SceI2cForDriver

Types

typedef struct SceI2cDebugHandlers {
	unsigned int size;
	void (*write_start)(int bus, int device, unsigned char *buffer, int size);
	void (*write_error)(int bus, int error, int result);
	void (*read_start)(int bus, int device, unsigned char *buffer, int size);
	void (*read_error)(int bus, int error, int result);
	void (*write_read_start)(int bus, int write_device, unsigned char *write_buffer, int write_size);
	void (*write_read_error)(int bus, int error, int result);
} SceI2cDebugHandlers;

For the following functions:

  • bus indicate the target I²C bus
  • dev_id seems to indicate the address of the target device, shifted left by 1 (i.e. I²C address = dev_id >> 1).

The ID 1 is handled in a specific way for bus 1 (see sceI2cReset).

sceI2cInit

Version NID
3.60 0x9CF8F3D6

This is a guessed name.

Reinitializes the I²C controller for selected bus?

int sceI2cInit(unsigned bus);

sceI2cReset

Version NID
3.60 0x76D277AB

This is a guessed name.

This function seems to be used for synchronisation of I2c1 transfers.

When calling any read/write function on I²C bus 1 with dev_id == 1, the function calls sceKernelWaitEventFlag(/* I2c1 evf */, /* pattern = */ 0x80000000, /* ... */) before performing the operation.

// a1 == 0 -> clear bits 0x7FFFFFFF of the synchronisation event flag pattern
// a1 != 0 -> set bit 0x80000000 of the synchronisation event flag pattern
int sceI2cReset(SceBool a1);

sceI2cMasterTransmit

Version NID
3.60 0xCA94A759

This is an official name. Temp name was sceI2cTransferWrite.

Writes data to I²C device on specified bus.

int sceI2cMasterTransmit(unsigned bus, unsigned dev_id, const void *buffer, unsigned size);

sceI2cMasterReceive

Version NID
3.60 0xD1D0A9A4

This is an official name. Temp name was sceI2cTransferRead.

Reads data from I²C device on specified bus.

int sceI2cMasterReceive(unsigned bus, unsigned dev_id, void *buffer, unsigned size);

sceI2cMasterTransmitReceive

Version NID
3.60 0x0A40B7BF

This is an official name. Temp name was sceI2cTransferWriteRead.

Performs a write to an I²C device followed by a read to a (potentially different) I2c device on the specified bus.

int sceI2cMasterTransmitReceive(unsigned bus, unsigned write_dev_id, const void *write_buffer, unsigned write_size, unsigned read_dev_id, void *read_buffer, unsigned read_size);

sceI2cSetDebugHandlers

Version NID
3.60 0xA2C7CE62

This is a guessed name.

Registers callbacks called during I²C operations.

int sceI2cSetDebugHandlers(unsigned bus, SceI2cDebugHandlers *debug_handlers)

SceI2cForDriver_30CF9469

Version NID
3.60 0x30CF9469

Writes a2 and a3 to some per-bus global variables that are seemingly never read, then writes a value to I2cReg->unk18 depending on Hardware Info mask 0x00FF0000 (motherboard main version).

int SceI2cForDriver_30CF9469(unsigned bus, unsigned a2, unsigned a3);

SceI2cForDriver_E449AC6E

Version NID
3.60 0xE449AC6E

Writes a2 to some per-bus global variable that is seemingly never read.

int SceI2cForDriver_E449AC6E(unsigned bus, unsigned a2);

SceGrabForDriver

sceGrabCompatStartExForDriver

Version NID
3.60 0x072B8D93

Calls SMC 0x11e. smc(0x11E, 1, param)

Replacement for SceLowio#scePervasiveCompatStartForDriver.

// command: 0, 1
int sceGrabCompatStartExForDriver(int param);

SceGrabForDriver_188BBCC8

Version NID
3.60 0x188BBCC8

Calls SMC 0x11C.

SceGrabForDriver_1F292554

Version NID
3.60 0x1F292554

Calls SMC 0x121. smc(0x121)

sceGrabCompatLcdDmacInitForDriver

Version NID
3.60 0x379130B2

Calls SMC 0x11e. smc(0x11E, 2)

Replacement for SceLowio#scePervasiveCompatLcdDmacInitForDriver.

SceGrabForDriver_5F36ABC4

Version NID
3.60 0x5F36ABC4

Calls SMC 0x11f. smc(0x11f)

SceGrabForDriver_B22EE8BC

Version NID
3.60 0xB22EE8BC

Calls SMC 0x11b. smc(0x11b)

SceGrabForDriver_E9C25A28

Version NID
3.60 0xE9C25A28

Set PSP address.

Calls SMC 0x11d. smc(0x11d)

bank Address in PSP
0 ?
1 ?
2 ?
3 0xA8000000
4 ?
5 ?
6 ?
7 ?
// bank can be from 0 to 7
int SceGrabForDriver_E9C25A28(SceUInt32 bank, SceUIntPtr paddr);

sceGrabCompatStopForDriver

Version NID
3.60 0xF13C63DD

Calls SMC 0x11e. smc(0x11E, 0)

Replacement for SceLowio#scePervasiveCompatStopForDriver.

SceCdramForDriver

sceCdramExitSelfResreshForDriver

Version NID
0.940 0x41D821F3
3.60 not present

Typo in name is from SCE.

Calls SMC 0x119.

sceCdramEnterSelfResreshForDriver

Version NID
0.940 0xBA81E0E3
3.60 not present

Typo in name is from SCE.

Calls SMC 0x118.

SceCdramForDriver_0657FC1B

Version NID
0.940 not present
3.60 0x0657FC1B

Probably sceCdramExitSelfRefresh.

Calls SMC 0x119.

SceCdramForDriver_2D728EBF

Version NID
0.940 not present
3.60 0x2D728EBF

Probably sceCdramEnterSelfRefresh.

Calls SMC 0x118.

SceCdramForDriver_3EFA7540

Version NID
0.940 not present
3.60 0x3EFA7540

SceDsiForDriver

sceDsiStopMasterForDriver

Version NID
0.940-3.60 0x114D1413

Temp name was sceDsiDisableHeadForDriver.

int sceDsiStopMasterForDriver(SceDisplayHead head);

sceDsiDcsReadForDriver

Version NID
3.60 0x3FB0DF1F
int sceDsiDcsReadForDriver(SceDisplayHead head, unsigned short param, void *buf, SceSize size);

MIPI DSI DCS Read (0x06)

sceDsiGetPixelClockForDriver

Version NID
3.60 0x4DF9E924
int sceDsiGetPixelClockForDriver(SceDisplayHead head);

sceDsiStartMasterForDriver

Version NID
0.940-3.60 0x5BE5AA9B

Temp name was sceDsiEnableHeadForDriver.

int sceDsiStartMasterForDriver(SceDisplayHead head);

SceDsiForDriver_6F8029A1

Version NID
3.60 0x6F8029A1
int SceDsiForDriver_6F8029A1(SceDisplayHead head);

Returns the current Vcount, read from ((*(u32 *)(SceDsiReg + 0x4C) >> 16) & 0x1FFF) - 1.

sceDsiStopDisplayForDriver

Version NID
0.940-3.60 0x7640F607
int sceDsiStopDisplayForDriver(SceDisplayHead head);

sceDsiSetDisplayModeForDriver

Version NID
3.60 0x78E6E3CF

Temp name was sceDsiSetLanesAndPixelSizeForDriver.

For head == SCE_DISPLAY_HEAD_MAIN_LCD_OLED, lanes must be 2 and pixelsize 24.

For head == SCE_DISPLAY_HEAD_HDMI, lanes can be 2 or 3 and pixelsize can be 24 or 30.

int sceDsiSetDisplayModeForDriver(SceDisplayHead head, int lanes, int pixelsize);

SceDsiForDriver_8610B795

Version NID
3.60 0x8610B795

Sets internal struct member struct[head].unk1C = mul * struct[head].unk18 / div.

int SceDsiForDriver_8610B795(SceDisplayHead head, int mul, int div);

sceDsiGenericShortWriteForDriver

Version NID
3.60 0x89C00D2F

Performs a MIPI DSI Generic Short Write, no parameters (0x03), MIPI DSI Generic Short Write, 1 parameter (0x13) or MIPI DSI Generic Short Write, 2 parameters (0x23) depending on the whether parami is negative or not (bit 31 set).

int int sceDsiGenericShortWriteForDriver(SceDisplayHead head, int param0, int param1, int param2);

sceDsiSetScreenModeForDriver

Version NID
3.60 0x97BFEA76

Temp name was sceDsiSetVicForDriver.

int sceDsiSetScreenModeForDriver(SceDisplayHead head, SceDisplayScreenMode screenMode);

sceDsiGenericReadRequestForDriver

Version NID
3.60 0x98120684

Performs a MIPI DSI Generic Read Request, no parameters (0x04), or MIPI DSI Generic Read Request, 1 parameter (0x14) depending on the whether param is negative or not (bit 31 set).

int sceDsiGenericReadRequestForDriver(SceDisplayHead head, int param, void *buff, SceSize size);

sceDsiDcsShortWriteForDriver

Version NID
3.60 0xBA6BC89F

If param1 is negative (bit 31 set), MIPI DSI DCS Short Write, no parameters (0x05) is performed. MIPI DSI DCS Short Write, 1 parameter (0x15) is performed otherwise.

int sceDsiDcsShortWriteForDriver(SceDisplayHead head, SceUInt16 param0, SceUInt32 param1);

sceDsiStartDisplayForDriver

Version NID
0.940-3.60 0xC2E85919
int sceDsiStartDisplayForDriver(SceDisplayHead head, SceUInt32 control);

SceDsiForDriver_F2921E29

Version NID
3.60 0xF2921E29
int SceDsiForDriver_F2921E29(SceDisplayHead head, SceUInt32 unk);

sceDsiQeuryResolutionSizeForDriver

Version NID
0.940 0xFA9E2DC5
3.60 sceDsiQueryResolutionSizeForDriver

The typo in the function name was fixed since an unknown FW, and so the NID was updated. See also sceDsiQueryResolutionSizeForDriver.

sceDsiQueryResolutionSizeForDriver

Version NID
0.940 sceDsiQeuryResolutionSizeForDriver
3.60 0xB3A70C05

Temp name was sceDsiGetVicResolutionForDriver.

For progressive modes, V_total = V_active + VFP + VSW + VBP. For interlaced modes, V_total = V_active + 2 * (VFP + VSW + VBP) - 1.

int sceDsiQueryResolutionSizeForDriver(SceDisplayScreenMode screenMode, int *width, int *height);

SceIftuForDriver

typedef struct SceIftuFrameBuf {
	unsigned int pixelformat;
	unsigned int width; /* Aligned to 16 */
	unsigned int height; /* Aligned to 8 */
	unsigned int leftover_stride; /* (pitch - aligned_w) * bpp */
	unsigned int leftover_align; /* if YCbCr: (width >> 1) & 0xF [chroma align?] */
	unsigned int paddr0;
	unsigned int paddr1;
	unsigned int paddr2;
} SceIftuFrameBuf; /* size = 0x20 */

typedef struct SceIftuPlaneState {
	SceIftuFrameBuf fb;
	unsigned int unk20;               // not observed to be non-zero
	unsigned int unk24;               // not observed to be non-zero
	unsigned int unk28;               // not observed to be non-zero
	unsigned int src_w;               // inverse scaling factor in 16.16 fixed point
	unsigned int src_h;               // inverse scaling factor in 16.16 fixed point
	unsigned int dst_x;               // offset into the destination buffer
	unsigned int dst_y;               // offset into the destination buffer
	unsigned int src_x;               // offset into the source buffer in 8.8 fixed point
	unsigned int src_y;               // offset into the source buffer in 8.8 fixed point
	unsigned int crop_top;
	unsigned int crop_bot;
	unsigned int crop_left;
	unsigned int crop_right;
} SceIftuPlaneState; /* size = 0x54 */

typedef struct SceIftuCscParams {
	unsigned int post_add_0; /* 10-bit integer */
	unsigned int post_add_1_2; /* 10-bit integer */
	unsigned int post_clamp_max_0; /* 10-bit integer */
	unsigned int post_clamp_min_0; /* 10-bit integer */
	unsigned int post_clamp_max_1_2; /* 10-bit integer */
	unsigned int post_clamp_min_1_2; /* 10-bit integer */
	unsigned int ctm[3][3]; /* S3.9 fixed point format */
} SceIftuCscParams; /* size = 0x3C */

typedef struct SceIftuConvParams {
	unsigned int size;
	unsigned int unk04;
	SceIftuCscParams *csc_params1; // +0x08
	SceIftuCscParams *csc_params2; // +0x0C
	unsigned int csc_control; // +0x10
	unsigned int unk14;
	unsigned int unk18;
	unsigned int unk1C;
	unsigned int alpha;
	unsigned int unk24;
} SceIftuConvParams; /* size = 0x28 */

sceIftuEnableForDriver

Version NID
0.940-3.60 0x0D7C02F7

Temp name was SceIftuForDriver_0D7C02F7_plane_enable.

// plane must be between 0 and 3
int sceIftuEnableForDriver(unsigned int plane);

SceIftuForDriver_0FCBF457

Version NID
3.60 0x0FCBF457

Set plane CSC (Color Space Conversion) information.

int SceIftuForDriver_0FCBF457_set_plane_csc2(unsigned int plane, SceIftuCscParams *param);

SceIftuForDriver_357EAE24

Version NID
3.60 0x357EAE24

Sets plane alpha value. Only planes 1 and 3 support alpha blending. Supported alpha values are 0-0x100 where 0x100 is no transparency (alpha blending disable).

int SceIftuForDriver_357EAE24_set_plane_alpha(unsigned int plane, int alpha);

sceIftuSetInputFrameBufferForDriver

Version NID
0.940-3.60 0x7CE0C4DA

Set bilinear to 0 for nearest neighbour, set to 1 for bilinear filtering, set to -1 when plane_state is a zero struct.

int sceIftuSetInputFrameBufferForDriver(unsigned int plane_index, SceIftuPlaneState *plane_state, int bilinear, int sync);

sceIftuConvertForDriver

Version NID
0.940-3.60 0x67E37EFC

Temp name was sceIftuCscForDriver.

Performs Color Space Conversion (by using SceIftu2Reg).

int sceIftuConvertForDriver(SceIftuFrameBuf *dst_fb, SceIftuPlaneState *src_plane_state, SceIftuConvParams *conv_params);

sceIftuSetMergeSettingForDriver

Version NID
0.940-3.60 0xAF19FD85

Temp name was SceIftuForDriver_AF19FD85_set_global_blending_control.

int sceIftuSetMergeSettingForDriver(unsigned int plane, int control);

sceIftuDisableForDriver

Version NID
0.940-3.60 0xC11F30B3

Temp name was SceIftuForDriver_C11F30B3_plane_disable.

int sceIftuDisableForDriver(unsigned int plane);

SceIftuForDriver_D64F4C6B

Version NID
3.60 0xD64F4C6B

Set plane CSC (Color Space Conversion) information.

int SceIftuForDriver_D64F4C6B_set_plane_csc(unsigned int plane, SceIftuCscParams *param);

sceIftuSetOutputFormatForDriver

Version NID
0.940-3.60 0xE6EE2C6B
int sceIftuSetOutputFormatForDriver(int plane, int width, int height, int pixel_format, int interlaced);

SceCsiForDriver

SceCsiForDriver_10545393

Version NID
0.940-3.60 0x10545393

Copies buf to memory.

// buf size is 0x2C
int SceCsiForDriver_10545393(SceDisplayHead head, void *buf);

SceCsiForDriver_2AFEA1B0

Version NID
0.940-3.60 0x2AFEA1B0
int SceCsiForDriver_2AFEA1B0(SceDisplayHead head, SceUInt a2);

SceCsiForDriver_4AE39F26

Version NID
0.940-3.60 0x4AE39F26

Maybe CSI stop.

int SceCsiForDriver_4AE39F26(SceDisplayHead head);

SceCsiForDriver_A1D1805D

Version NID
0.940-3.60 0xA1D1805D

Maybe CSI start.

int SceCsiForDriver_A1D1805D(SceDisplayHead head);

SceCsiForDriver_B508822B

Version NID
0.940-3.60 0xB508822B

Sets a2 and a3 in memory.

int SceCsiForDriver_B508822B(SceDisplayHead head, int a2, int a3);

SceCsiForDriver_FC165297

Version NID
0.940-3.60 0xFC165297

Sets a2 in memory.

int SceCsiForDriver_FC165297(SceDisplayHead head, int a2);