3,011 bytes added
, 13:20, 9 December 2019
Sys is the [[:/dev/bsp]] entity that handles miscellaneous system attributes, like. There is always one instance available.
== Attributes ==
=== WorkArounds ===
'''Availability''': This attribute is always available.
'''Permissions''': <code>BSP_PERMISSIONS_IOS_SUPV</code> only.
{| class="wikitable"
! Method
! Data Size
! Values
!
|-
| Init
| 0
|
| Sets various hardware-dependent workaround registers depending on the hardware version. For Latte boards, this includes bits 10 and 11 in [[Hardware/Latte Registers#HW_SPARE1|HW_SPARE1]], bits 4 through 1 in [[Hardware/Latte Registers#HW_SPARE0|HW_SPARE0]], and bits 18 through 13 in [[Hardware/XN_Controller|AHMN_WORKAROUND]] (dev boards only).
|}
<!--note: also has BSP_AO_INIT_GLOBAL set. not sure what it means.-->
=== Misc ===
'''Availability''': This attribute is always available.
'''Permissions''': <code>BSP_PERMISSIONS_IOS_SUPV</code> only.
{| class="wikitable"
! Method
! Data Size
! Values
!
|-
| Init
| 0
|
| Sets various pin strength controls, including bits in HW_IOSTRCTRL0, HW_IOSTRCTRL1, HW_CLKSTRCTRL and LT_IOSTRCTRL2.
|}
<!--note: also has BSP_AO_INIT_GLOBAL set. not sure what it means.-->
=== ClockInfo ===
'''Availability''': This attribute is always available.
'''Permissions''': <code>BSP_PERMISSIONS_ALL</code>.
{| class="wikitable"
! Method
! Data Size
! Values
!
|-
| Read
| 8
| constant
| Returns the system bus speed in Hz (248625000 on retail consoles) in the first 4 bytes, and the same value divided by 128 in the second 4 bytes.
|}
=== ASICRevision ===
'''Availability''': This attribute is always available.
'''Permissions''': <code>BSP_PERMISSIONS_ALL</code>.
{| class="wikitable"
! Method
! Data Size
! Values
!
|-
| Read
| 8
| constant
| Returns [[Hardware/Latte Registers#HW_CHIPREVID|HW_CHIPREVID]] in the first 4 bytes, and [[Hardware/Latte Registers#LT_CHIPREVID|LT_CHIPREVID]] in the last 8 bytes (where supported).
|}
=== BoardRevision ===
'''Availability''': This attribute is always available.
'''Permissions''': <code>BSP_PERMISSIONS_ALL</code>.
{| class="wikitable"
! Method
! Data Size
! Values
!
|-
| Read
| 2
| constant
| Returns the board revision from BSP's global BoardConfig struct.
|}
=== SYSPLL ===
'''Availability''': This attribute is always available.
'''Permissions''': <code>BSP_PERMISSIONS_PPC_SUPV_READ | BSP_PERMISSIONS_IOS_USER_READ | BSP_PERMISSIONS_IOS_SUPV</code>
{| class="wikitable"
! Method
! Data Size
! Values
!
|-
| Read
| 0x36
|
| Constructs a buffer with values from ABIF.{{check}}
|-
| Write
| 0x36
|
| Sends values from the input buffer out over ABIF, wrapped by toggling values in [//wiibrew.org/wiki/Hardware/Hollywood_Registers#HW_CLOCKS HW_CLOCKS] (sets FX on entry, clears SPEED and FX on exit), conditionally setting bit 1 in [[:Hardware/Latte Registers#LT_PLLSYS|LT_PLLSYS]] and holding RSTB_SYSPLL, RSTB_MEMRSTB and RSTB_DSKPLL in reset during the operation.
|-
| Init
| 0
|
| Calls the same backend function as the Write method, using hardcoded PLL data.
|}