Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Component Mapper

James Coonradt edited this page Oct 14, 2017 · 6 revisions

The Component Mapper is used to map and unmap components as well as list available components. The second half of this device exposes information about memory configuration.

Address Name
$E010 Command Status
$E011 Info/Selector
$E012 Buffer I/O
$E013 Command Flag
$E018 [L] Available Memory Banks
$E019 [H] Available Memory Banks
$E01A Memory Bank Mask

Command Status:
Read: Retrieve the status of the last executed command
Write: Execute command:

Commands:
0: Map Component (String or UUID)
Status: 0=Mapped, 1=Map Failed, 2=Bad I/O
Maps a component into a Component Access area.

1: Unmap Component (String, UUID, or no input)
Status: 0=Unmapped, 1=Bad I/O
Info: Number of components unmapped
Removes a component mapping from the Component Access area.

2: Reset Mappings (buffer ignored)
Info: Number of components unmapped

3: Component List (String, UUID, number, or no input)
Status: 0=Listed, 1=Bad I/O
Info: Number of components found
Searches for and lists components available in the computer. Returns UUID (address) + String (name) pairs.

Strings will search via name
UUID will search via address
number will return info about the component in the respective access slot
no input will list all components in the system.

4: Destroy Value Object (Value object)
Status: 0=Destroyed, 1=Bad I/O
Disposes and Removes a Value Object from the computer. Note that all Value Objects will be Disposed and removed on poweroff/reboot.

Commands that take a String refer to the name of a component while UUIDs refer to the address of the Component. Commands that take no input (as in, nothing in buffer) will refer to whatever device exists in the currently select component

Info/Selector:
Read: Get Command Info
Write: Set Component Selector
A selector value which indicates where to map components or what component to use when no argument has been given, depending on the respective command.

Command Flag
Read: Get Component Mapping Flag
Write: Set Component Mapping Flag
The Mapping Flag is used to choose between the Generic Component Wrapper and any available Specialized Wrapper. Set to 0 for Generic and 1 for Specific. If no Specific Wrapper is available, then the mapper falls back to the Generic Wrapper.

Buffer I/O:
Read: Read bytes from command result buffer
Write: Write TSF serialized data into command arguments buffer

Available Memory Banks
Read: Get available memory count
A unsigned 16bit value indicating how many 4KB banks of memory are available

Memory Bank Mask:
Read: Get current bank mask
Write: Modify memory bank masking
A bitmask describing how memory should be masked for shared banks. Set bits to 0 to show devices and 1 to show memory.

[00000001] Memory Bank 10 (Components 48-63)
[00000010] Memory Bank 11 (Components 32-47)
[00000100] Memory Bank 12 (Components 16-31)
[00001000] Memory Bank 13 (Components 0-15)
[00010000] Memory Bank 15 (EEPROM Code Access)

Clone this wiki locally