Difference between revisions of "/dev/bsp"

From WiiUBrew
Jump to navigation Jump to search
(Add w.i.p. /dev/bsp informations)
(No difference)

Revision as of 00:25, 4 September 2018

/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.