/dev/bsp/Sys: Difference between revisions
Start documenting BSP/Sys (incomplete) |
Add rest of bsp:Sys attributes |
||
| Line 21: | Line 21: | ||
=== Misc === | === Misc === | ||
'''Availability''': This attribute is always available. | '''Availability''': This attribute is always available. (<code>BSP_AO_INIT_GLOBAL</code>) | ||
'''Permissions''': <code>BSP_PERMISSIONS_IOS_SUPV</code> only. | '''Permissions''': <code>BSP_PERMISSIONS_IOS_SUPV</code> only. | ||
| Line 109: | Line 109: | ||
| | | | ||
| Calls the same backend function as the Write method, using hardcoded PLL data. | | Calls the same backend function as the Write method, using hardcoded PLL data. | ||
|} | |||
=== devicePresence === | |||
'''Availability''': This attribute is always available. | |||
'''Permissions''': <code>BSP_PERMISSIONS_ALL</code>. | |||
{| class="wikitable" | |||
! Method | |||
! Data Size | |||
! Values | |||
! | |||
|- | |||
| Read | |||
| 4 | |||
| constant | |||
| Returns a constant 0x07F17317; or an unknown value if the EE board revision is greater than 4. | |||
|} | |||
=== topLevel === | |||
'''Availability''': This attribute is always available. (<code>BSP_AO_INIT_GLOBAL</code>) | |||
'''Permissions''': <code>BSP_PERMISSIONS_IOS_SUPV</code>. | |||
{| class="wikitable" | |||
! Method | |||
! Data Size | |||
! Values | |||
! | |||
|- | |||
| Init | |||
| 0 | |||
| | |||
| Initialises plenty of hardware and BSP entities; including some of Sys's attributes, GPIO, USB, EE, GFX, AI, VI, SATA, SMC, CCRH, SI, DI, FLA and SDIO. | |||
|} | |||
=== iop2x === | |||
'''Availability''': This attribute is always available. (<code>BSP_AO_INIT_GLOBAL</code>) | |||
'''Permissions''': <code>BSP_PERMISSIONS_IOS_SUPV | BSP_PERMISSIONS_IOS_USER_READ</code>. | |||
{| class="wikitable" | |||
! Method | |||
! Data Size | |||
! Values | |||
! | |||
|- | |||
| Init | |||
| 1 | |||
| 1 or 2 | |||
| Calls [[IOSU_Syscalls|syscall]] 0x6c with either 0 or 1 to set the clock multiplier. | |||
|- | |||
| Read | |||
| 1 | |||
| 1 or 2 | |||
| Returns the state of the IOP clock multiplier - 1x or 2x (based on bit 3 of [[Hardware/Latte Registers#LT_IOP2X|LT_IOP2X]]) | |||
|} | |||
=== cpuUtil === | |||
'''Availability''': This attribute is always available. | |||
'''Permissions''': <code>BSP_PERMISSIONS_ALL</code>. | |||
{| class="wikitable" | |||
! Method | |||
! Data Size | |||
! Values | |||
! | |||
|- | |||
| Read | |||
| 4 | |||
| {{check}} | |||
| Returns the Starbuck's CPU utilisation (from [[IOSU_Syscalls|syscall]] 0x60). | |||
|} | |||
=== osVer === | |||
'''Availability''': This attribute is always available. | |||
'''Permissions''': <code>BSP_PERMISSIONS_ALL</code>. | |||
{| class="wikitable" | |||
! Method | |||
! Data Size | |||
! Values | |||
! | |||
|- | |||
| Read | |||
| 94 | |||
| constant | |||
| Returns a structure with data about the current OS/SDK version. This includes the "Cafe OS SDK Version x.xx.xx Build..." string often seen in IOSU logs. | |||
|} | |||
=== powerMode === | |||
'''Availability''': This attribute is always available. | |||
'''Permissions''': <code>BSP_PERMISSIONS_ALL</code>. | |||
{| class="wikitable" | |||
! Method | |||
! Data Size | |||
! Values | |||
! | |||
|- | |||
| Read | |||
| 4 | |||
| {{check}} | |||
| | |||
|} | |||
=== iopClock === | |||
'''Availability''': This attribute is always available. | |||
'''Permissions''': <code>BSP_PERMISSIONS_ALL</code>. | |||
{| class="wikitable" | |||
! Method | |||
! Data Size | |||
! Values | |||
! | |||
|- | |||
| Read | |||
| 8 | |||
| | |||
| Returns 64-bit system uptime (from IOS_GetUpTime64, [[IOSU_Syscalls|syscall]] 0x1a). | |||
|} | |} | ||
Revision as of 03:39, 27 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: BSP_PERMISSIONS_IOS_SUPV only.
| 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 HW_SPARE1, bits 4 through 1 in HW_SPARE0, and bits 18 through 13 in AHMN_WORKAROUND (dev boards only). |
Misc
Availability: This attribute is always available. (BSP_AO_INIT_GLOBAL)
Permissions: BSP_PERMISSIONS_IOS_SUPV only.
| Method | Data Size | Values | |
|---|---|---|---|
| Init | 0 | Sets various pin strength controls, including bits in HW_IOSTRCTRL0, HW_IOSTRCTRL1, HW_CLKSTRCTRL and LT_IOSTRCTRL2. |
ClockInfo
Availability: This attribute is always available.
Permissions: BSP_PERMISSIONS_ALL.
| 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: BSP_PERMISSIONS_ALL.
| Method | Data Size | Values | |
|---|---|---|---|
| Read | 8 | constant | Returns HW_CHIPREVID in the first 4 bytes, and LT_CHIPREVID in the last 8 bytes (where supported). |
BoardRevision
Availability: This attribute is always available.
Permissions: BSP_PERMISSIONS_ALL.
| 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: BSP_PERMISSIONS_PPC_SUPV_READ | BSP_PERMISSIONS_IOS_USER_READ | BSP_PERMISSIONS_IOS_SUPV
| 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 HW_CLOCKS (sets FX on entry, clears SPEED and FX on exit), conditionally setting bit 1 in 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. |
devicePresence
Availability: This attribute is always available.
Permissions: BSP_PERMISSIONS_ALL.
| Method | Data Size | Values | |
|---|---|---|---|
| Read | 4 | constant | Returns a constant 0x07F17317; or an unknown value if the EE board revision is greater than 4. |
topLevel
Availability: This attribute is always available. (BSP_AO_INIT_GLOBAL)
Permissions: BSP_PERMISSIONS_IOS_SUPV.
| Method | Data Size | Values | |
|---|---|---|---|
| Init | 0 | Initialises plenty of hardware and BSP entities; including some of Sys's attributes, GPIO, USB, EE, GFX, AI, VI, SATA, SMC, CCRH, SI, DI, FLA and SDIO. |
iop2x
Availability: This attribute is always available. (BSP_AO_INIT_GLOBAL)
Permissions: BSP_PERMISSIONS_IOS_SUPV | BSP_PERMISSIONS_IOS_USER_READ.
| Method | Data Size | Values | |
|---|---|---|---|
| Init | 1 | 1 or 2 | Calls syscall 0x6c with either 0 or 1 to set the clock multiplier. |
| Read | 1 | 1 or 2 | Returns the state of the IOP clock multiplier - 1x or 2x (based on bit 3 of LT_IOP2X) |
cpuUtil
Availability: This attribute is always available.
Permissions: BSP_PERMISSIONS_ALL.
| Method | Data Size | Values | |
|---|---|---|---|
| Read | 4 | [check] | Returns the Starbuck's CPU utilisation (from syscall 0x60). |
osVer
Availability: This attribute is always available.
Permissions: BSP_PERMISSIONS_ALL.
| Method | Data Size | Values | |
|---|---|---|---|
| Read | 94 | constant | Returns a structure with data about the current OS/SDK version. This includes the "Cafe OS SDK Version x.xx.xx Build..." string often seen in IOSU logs. |
powerMode
Availability: This attribute is always available.
Permissions: BSP_PERMISSIONS_ALL.
| Method | Data Size | Values | |
|---|---|---|---|
| Read | 4 | [check] |
iopClock
Availability: This attribute is always available.
Permissions: BSP_PERMISSIONS_ALL.
| Method | Data Size | Values | |
|---|---|---|---|
| Read | 8 | Returns 64-bit system uptime (from IOS_GetUpTime64, syscall 0x1a). |