In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
4,160 bytes added ,  03:42, 9 December 2019
Initial documentation for BSP's PPC entity
PPC is the [[:/dev/bsp]] entity responsible for managing the PowerPC cores in the [[Espresso]]. Depending on hardware version{{check}}, PPC either has one instance or three instances.

== Attributes ==

=== Exec ===
'''Availability''': This attribute is only available on the first instance (index 0).

'''Permissions''': <code>BSP_PERMISSIONS_IOS_SUPV</code> only.
{| class="wikitable"
|-
! Method
! Data Size
! Values
!
|-
| Write
| 1
| 1, 2
| Writing a 1 calls the hardware-specific method to stop execution of the PowerPC, while writing 2 does the same to start it.
|}
<syntaxhighlight lang="C">
//start the PowerPC
int8_t start = 2;
bspWrite("PPC", 0, "Exec", 1, &start);
//stop the PowerPC
int8_t stop = 1;
bspWrite("PPC", 0, "Exec", 1, &stop);
</syntaxhighlight>

=== Clock ===
'''Availability''': This attribute is only available on the first instance (index 0).

'''Permissions''': <code>BSP_PERMISSIONS_IOS_SUPV</code> only.
{| class="wikitable"
|-
! Method
! Data Size
! Values
!
|-
| Write
| 1
| 1
| Writing a 1 tweaks the [https://wiibrew.org/wiki/Hardware/Hollywood_Registers#HW_CLOCKS legacy clock registers], toggling FX and leaving the system in 162MHz/GameCube mode. Also toggles [https://wiibrew.org/wiki/Hardware/Hollywood_Registers#HW_RESETS RTSB_DSKPLL], leaving it asserted.
|}

=== EXIRegBoot ===
'''Availability''': This attribute is only available on the first instance (index 0).

'''Permissions''': <code>BSP_PERMISSIONS_IOS_SUPV</code> only.
{| class="wikitable"
|-
! Method
! Data Size
! Values
!
|-
| Write
| 48
| see code
| Enables EXI, writes up to 16 32-bit instructions to the EXI boot stub{{check}} <!--can't find docs on how the bootstub actually works, though everyone seems to know. does it take encrypted data?--> and sets [https://wiibrew.org/wiki/Hardware/Hollywood_Registers#HW_DIFLAGS PPCBOOT].
|}
<syntaxhighlight lang="C">
typedef struct {
int32_t version; //offset 0x0; must equal 3
uint32_t instructions[16]; //actual instruction data to copy; offset 0x4
size_t size; //size of instructions in bytes. last two bits ignored. offset 0x44
} BSP_PPC_EXIRegBootArgs;

BSP_PPC_EXIRegBootArgs args = {
.version = 3,
.instructions = { 0x60000000, 0x48000000 },
.size = 2 * sizeof(uint32_t),
};
bspWrite("PPC", 0, "EXIRegBoot", sizeof(args), args);
</syntaxhighlight>

=== Summary ===
'''Availability''': This attribute is available to all instances.

'''Permissions''': <code>BSP_PERMISSIONS_ALL</code>.
{| class="wikitable"
! Method
! Data Size
! Values
!
|-
| Query
| 16
| constant
| Returns a buffer filled with data calculated based on the hardware version at BSP init time. The data is identical between instances.
|}

=== CoreProperties ===
'''Availability''': This attribute is available to all instances.

'''Permissions''': <code>BSP_PERMISSIONS_ALL</code>.
{| class="wikitable"
! Method
! Data Size
! Values
!
|-
| Query
| 21
| constant
| Returns a buffer filled with data calculated based on the hardware version at BSP init time. The data is unique between instances.
|}

=== PVR ===
'''Availability''': This attribute is only available on the first instance (index 0).

'''Permissions''': <code>BSP_PERMISSIONS_ALL</code>.
{| class="wikitable"
! Method
! Data Size
! Values
!
|-
| Read
| 4
|
| Reads out unknown properties from two [[:/dev/bsp/EE|EE]] instances and concatenates them.
|-
| Write
| 4
|
| Sets [[:/dev/bsp/EE|EE]]'s first instance's control flag, then writes out the input value to two unknown EE instances.
|}

=== 60XeDataStreaming ===
'''Availability''': This attribute is only available on the first instance (index 0), and contains a hardware version check.

'''Permissions''': <code>BSP_PERMISSIONS_ALL</code>.
{| class="wikitable"
! Method
! Data Size
! Values
!
|-
| Read
| 1
| 0, 1
| Returns a boolean value: 0 indicates that bit 3 (mask 0x8) in [[Hardware/Latte_Registers|LT_60XE_CFG]] is '''set''', while 1 indicates that bit is '''clear'''.
|-
| Write
| 1
| 0, 1
| Sets bit 12 (mask 0x1000) in [[Hardware/Latte_Registers|LT_60XE_CFG]], which appears to be some kind of latch, sleeps, then sets bit 8 (when input is 0) or clears bit 8 (when input is 1).
|}

Navigation menu