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

/dev/bsp

From WiiUBrew
< /dev
Revision as of 00:25, 4 September 2018 by Rw-r-r 0644 (talk | contribs) (Add w.i.p. /dev/bsp informations)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

/dev/bsp is the IOSU device node for the Board Support Package. It provides functions to interface with the hardware and checks for access permissions.

It is subdivided in entities (e.g. SMC, USB, SDIO, SATA, ...) and each entity has a number of attributes (e.g baseAdddress, size, pin0); entities can set multiple instance to have different attributes.

List of entities and attributes (wip)

Entity Attributes
SMC ODDPower, EjectRequest, ONIndicator, CCIndicator, OFFIndicator, BTRSTPulse, WIFIRSTPulse, DWIFIRSTPulse, USBRearControl, USBFrontControl, WIFIResetPin, TimerCounter, ProgramRevision, SystemEventFlag, NotificationLED, PowerFailureState, LAPSSetting, SystemError
WIFI WIFI_ENABLED
GFX subsystem, endianness, spll, upll, vi1pll, vi2pll, DCCMPT

List of ioctls

Command Function Description
0x01 bspGetEntityVersion(entityName = &buffer_in[0..7], buffer_io[0] = version) Writes the version number for the specified entity in buffer_io.
0x02 bspMethodGetHardwareVersion(buffer_io[0] = hwVersion) Writes the hardware version in buffer_io.
0x03 bspGetConsoleMask(buffer_io[0] = mask) Writes the a mask that depends on consoleType and boardType in buffer_io.
0x04 bspMethodQuery(entityName = buffer_in[0..7], instance = buffer_in[8], attributeName = buffer_in[9..16], size = buffer_in[17], buffer_io = pData) Calls the query method for the specified entity->attribute.
0x05 bspMethodRead(entityName = buffer_in[0..7], instance = buffer_in[8], attributeName = buffer_in[9..16], size = buffer_in[17], buffer_io = pData) Calls the read method for the specified entity->attribute.
0x06 bspMethodWrite(entityName = buffer_in[0..7], instance = buffer_in[8], attributeName = buffer_in[9..16], size = buffer_in[17], pData = buffer_io[72..72+size]) Calls the write method for the specified entity->attribute.
0x07 bspMethodInit(entityName = buffer_in[0..7], instance = buffer_in[8], attributeName = buffer_in[9..16], optionSize = buffer_in[17], pOptions = buffer_io[72..72+optionSize]) Calls the init method for the specified entity->attribute.
0x08 bspMethodShutdown(entityName = buffer_in[0..7], instance = buffer_in[8], attributeName = buffer_in[9..16]) Calls the shutdown method for the specified entity->attribute.
0x09 bspGetConsoleType(buffer_io[0] = consoleType) Writes a consoleType (2 = retail/test, 3 and 4 = probably debug) in buffer_io.