Code: Select all
WHY THIS IS A PROBLEM: Human-interface devices (HIDs), like keyboards, LCD displays, etc. are required so that humans can use the system. But, if booting from ROM, the firmware has no way of knowing where these HIDs are located.
PROPOSED SOLUTION: Let each peripheral (optionally) support a means of identifying to the host system which kind of device it is.
IMPLICATIONS: Hardware peripherals trade some minor complexity for the flexibility of "just working" with most systems.
Configuration space is treated as a special-purpose address space. That is, you can read any byte from, and if supported, write any byte to, configuration space. Issue: should we employ existing eeprom/flash protocols to support this behavior? Having the ability to write individual bytes would be very much appreciated, for reasons I hope to illustrate below, which suggests we should instead consider RAM-based protocols instead.
Configuration space can be any size, but must be at least big enough to contain the following data structure:
Code: Select all
Address Read/Write Description
$00 R Configuration space version (= 0)
Code: Select all
Address Read/Write Description
$01 R Number of protocols this peripheral supports (0 < x < 255)
Many devices support more than one protocol. For example, by definition, all SD media are also MMC media, but the reverse is not true. Hence, an intelligent SD media device would list that it supports 2 protocols: the MMC protocol, and the SD extensions there-to.
Another example would be a PS/2 keyboard adapter which is capable of producing plain-ASCII output, raw PS/2 scancodes, or (perhaps for development purposes) USB scancodes as well.
A value of 0 or 255 is meaningless at this time; any device indicating 0 or 255 supported protocols should be considered either dumb or absent (you're just reading a byte formed from the 65SIB's pull-up or pull-down resistor on the MISO line; you'll need to take the computer operator's word that there is, in fact, a real device on this address) or defective. Use this peripheral at your own risk.
Code: Select all
Address Read/Write Description
$02 R Byte pointer to first protocol ID
Protocol IDs are UUIDs; see http://en.wikipedia.org/wiki/Universall ... identifier . I opted for this approach because I don't feel like administering a central authority doling ID ranges out. If anyone has ideas for something better, I'm open to suggestions.
For example, an array of three protocols might look like:
Code: Select all
$0080 DE AD BE EF FE ED FA CE - 01 02 03 04 05 06 07 08
$0090 01 02 03 04 05 06 07 08 - FE ED FA CE DE AD BE EF
$00A0 DE AD FA CE FE ED BE EF - AA 55 AA 55 55 AA 55 AA
Code: Select all
Address Read/Write Description
$04-$07 R Maximum device bits per second data transfer rate on 65SIB bus.
$08-$0B R Maximum configuration bits per second data transfer rate on 65SIB bus.
All 65SIB devices must be able to handle at least 1000 bits per second. Conversely, if you do not know a device's maximum throughput, you are advised to query this information at a rate not to exceed 1000bps before attempting higher data rates. (The master must learn to walk before it can run.
Code: Select all
Address Read/Write Description
$0C-$0F R Minimum latency between bus transactions for device.
$10-$13 R Maximum latency between bus transactions for device.
$14-$17 R Minimum latency between bus transactions for config.
$18-$1B R Maximum latency between bus transactions for config.
Code: Select all
Address Read/Write Description
$1C-$1F R Model ID (chosen exclusively by the vendor)
$20-$2F R Vendor UUID.
Code: Select all
Address Read/Write Description
$30-$3F R Currently unused (read as zero).
Code: Select all
WHY THIS IS A PROBLEM: For example, IBM PS/2 keyboard scancodes are completely incompatible with USB keyboard scancodes. And, sometimes, you just plain want simplicity in life, where plain-ASCII is all you need.
PROPOSED SOLUTION: Permit the master to configure the peripheral, as required, which protocol it wants to use.
IMPLICATIONS: Requires that the master be able to write into configuration space to issue commands to a configurator. The command set to use must remain stable across all classes of devices attached. All commands must end in finite time.
Code: Select all
Address Read/Write Description
$30 R/W Command Byte
Code: Select all
+---+---+---+---+---+---+---+---+
| F | command |
+---+---+---+---+---+---+---+---+
| |
| +-------------- A value between $00-$7F
| requesting the configurator
| to take some action.
|
+------------------------------ 0: Request completed (with or without error)
1: Request in progress.
Command $00 is, by definition for backward compatibility, no-operation.
Code: Select all
Address Read/Write Description
$31-$37 R Unused (read as zero)
$38-$39 R/W Start of command parameters (16-bit configuration space)
$38-$3B R/W Start of command parameters (32-bit configuration space)
$38-$3F R/W Start of command parameters (64-bit configuration space)
You can detect the size of the configuration address space by filling in $38-$3F with $FF bytes. When you read these pointers back, you may find some of the address bits set to 0, indicating unused/unsupported address bits. For example, if you read back $00000000000FFF after writing $FFFFFFFFFFFFFFFF, you know only 4K of configuration space exists.
In the context of selecting the protocol to support, I define the following:
Command $01: query current protocol. The parameter block looks like this:
Code: Select all
$00-$0F UUID of the protocol to query support for (set by master).
$10 $FF if supported; $00 otherwise (set by slave).