Volume 6: Symbolics UX1200S Embedded Architecture & SunOS Life-Support Protocol
Target Platform: Symbolics UX1200S VMEbus Coprocessor (Sun-3 & Sun-4 Host Systems)
Primary Ground-Truth Sources:
genera-original/sun/sun-ux-support/src/life.h&embed.h(Complete C protocol definitions)genera-original/sun/sun-ux-support/src/ivory.c&ivory_reset.c(VME mapping, reset, interrupt control)genera-original/sun/sun-ux-support/src/{cold.c, console.c, disk.c, network.c, message.c, signals.c}genera-original/sys.sct/embedding/defs.lisp&genera-original/sys.sct/embedding/ux/
1. UX1200S Hardware Configuration & VMEbus Dual Mapping
The Symbolics UX1200S is a single-slot 6U VMEbus Merlin-II processor board (Rev 3 / Rev 4 Ivory CPU + Weitek FPA + 4 MW or 8 MW ECC DRAM) designed to plug directly into the VMEbus backplane of a Sun-3 (Motorola 68020/68030) or Sun-4 (SPARC) host workstation or server.
- On the UX1200S,
%PROCESSOR-CONFIGURATION-REGISTER(#xFFFE0000) reports:console_present_l (<16>) = 1(no on-board monochrome framebuffer or physical console ports).vme_syscon (<17>) = 0(the Sun host CPU is the VMEbus Slot 1 System Controller).
- Instead of physical SCSI, Ethernet, or video hardware on the Merlin-II board, all I/O is performed through Embedded Life Support (
EMB)—a set of lockless ring queues and shared-memory channel structures located in the lowest 64 KWords of the UX1200S's B-Bus main DRAM (0x00000000–0x0000FFFF), serviced over the VMEbus by the SunOSgeneralife-support daemon (ivory.c).
1.1 SunOS Host VMEbus Memory Map (life.h:61-65, ivory_reset.c:45-130)
The SunOS kernel driver (/dev/ivory0) maps the UX1200S VMEbus slave address space into the SunOS life-support process using three regions:
| VME Byte Offset from Board Base | Size | Host Pointer in life.h | Ivory Hardware Target |
|---|---|---|---|
+0x00000000 | 64 MB (0x04000000) | IvoryData (int32_t *) | Ivory Data Area: IvoryData[w] reads/writes bits <31:0> (%%Q-POINTER) of Ivory physical word w (0x00000000..0x00FFFFFF). |
+0x04000000 | 64 MB (0x04000000) | IvoryTag (uint32_t *) | Ivory Tag Area: IvoryTag[w] reads/writes bits <39:32> (%%Q-TAG: CDR<1:0> in <7:6>, DTP<5:0> in <5:0>) in the low byte <7:0> of the 32-bit VME word. |
+0x05000000 | 4 KB | IvoryControl (uint32_t *) | Merlin-II VME Control Window: Allows the Sun host to halt/reset Ivory, read board status, and assert/clear VME doorbell interrupts (#x0A00000E, #x0A00000F). |
64-Bit Host (
LP64) Implementation Note:
In the original 1989 SunOS 4.x sources (embed.h),EmbWordandEmbPtrwere typedef'd aslong, which was 32 bits on ILP32 68k/SPARC compilers (sizeof(long) == 4, matching 1 Ivory word stride inIvoryData). On any 64-bit (LP64) system, allEmb*types must be defined asint32_t/uint32_t(as done inivory_hw.h) so every structure field occupies exactly 4 bytes (1 Ivory word).
2. The Embedded Communication Area (EmbCommArea)
The root data structure of the UX1200S life-support protocol is EmbCommArea, which resides at fixed physical Ivory word address 0x00000100 (#o00000400):
- Ivory Zone 31 VMA:
0xF8000100(#o37000000400) - Sun VME Data Byte Offset:
0x00000400(0x100 * 4) - Sun VME Tag Byte Offset:
0x04000400(0x04000000 + 0x100 * 4) - Every word in
EmbCommAreaand the communication memory (0x00000100..comm_memory_size - 1) is initialized with tagDTP-FIXNUM(#o10) andCDR-NEXT(0) (Tag byte = 0x08).
2.1 Complete EmbCommArea Word Offset Map (embed.h:84-169, embedding/defs.lisp)
Word Offset (from 0x100) | Ivory PMA | Field Name (struct EmbCommArea) | Type | Value & Semantics |
|---|---|---|---|---|
0x00 (0) | 0x00000100 | identifier | EmbWord | Magic constant 'EMBD' (0x454D4244 in big-endian Sun word / Ivory <31:0>). |
0x01 (1) | 0x00000101 | version | EmbWord | Protocol version number = 1. |
0x02 (2) | 0x00000102 | system_type | EmbWord | Host system type: 2 = Sun-3, 3 = Sun-4. |
0x03 (3) | 0x00000103 | number_of_slots | EmbWord | Number of VME slots / boards in configuration. |
0x04 (4) | 0x00000104 | comm_memory_size | EmbWord | Total size of Embedded Communication Area in Ivory words (typically 0x10000 = 64 KWords). |
0x05 (5) | 0x00000105 | genera_version | EmbWord | Genera major/minor version written by guest. |
0x06 (6) | 0x00000106 | osf_version_major | EmbWord | Host SunOS major version (e.g. 4). |
0x07 (7) | 0x00000107 | osf_version_minor | EmbWord | Host SunOS minor version (e.g. 1). |
0x08 (8) | 0x00000108 | life_version_major | EmbWord | Host life-support daemon major version. |
0x09 (9) | 0x00000109 | life_version_minor | EmbWord | Host life-support daemon minor version. |
0x0A (10) | 0x0000010A | channel_table | EmbPtr | Word offset (relative to 0x00000000) of the head of the EmbChannel linked list (-1 = end). |
0x0B (11) | 0x0000010B | console_channel | EmbPtr | Word offset of the primary EmbConsoleChannel. |
0x0C (12) | 0x0000010C | cold_load_channel | EmbPtr | Word offset of the EmbColdLoadChannel. |
0x0D (13) | 0x0000010D | command_channel | EmbPtr | Word offset of the EmbMessageChannel (command/control). |
0x0E (14) | 0x0000010E | virtual_memory_size | EmbWord | Configured virtual memory size in words (from swap partition size). |
0x0F (15) | 0x0000010F | world_load_size | EmbWord | Size of loaded .ilod world in words. |
0x10 (16) | 0x00000110 | bad_memory_map | EmbWord | Bad physical memory page map. |
0x11 (17) | 0x00000111 | host_buffer_start | uEmbWord | Word offset of host-allocated shared buffer pool. |
0x12 (18) | 0x00000112 | host_buffer_size | uEmbWord | Size in words of host buffer pool. |
0x13 (19) | 0x00000113 | fep_buffer_start | uEmbWord | Word offset of FEP-allocated shared buffer pool. |
0x14 (20) | 0x00000114 | fep_buffer_size | uEmbWord | Size in words of FEP buffer pool. |
0x15 (21) | 0x00000115 | guest_buffer_start | uEmbWord | Word offset of Genera guest-allocated shared buffer pool (0x00004000 typical). |
0x16 (22) | 0x00000116 | guest_buffer_size | uEmbWord | Size in words of guest buffer pool. |
0x17 (23) | 0x00000117 | fep_status | EmbWord | Low 8 bits <7:0>: 0 = NotPresent, 1 = Idle (FEP prompt), 2 = Halted, -1 (0xFF) = Running Lisp; Bit 8: nmi; Bit 9: buffer_ready. |
0x18 (24) | 0x00000118 | ivory_spy_command | EmbWord | Remote Spy command word. |
0x19 (25) | 0x00000119 | ivory_spy_status | EmbWord | Remote Spy status word. |
0x1A (26) | 0x0000011A | host_to_guest_signals | EmbSignalMask | 32-bit bitmask of active signals sent from Sun Host \(\to\) Ivory Guest. |
0x1B (27) | 0x0000011B | live_host_to_guest_signals | EmbSignalMask | 32-bit mask of enabled Host \(\to\) Guest signal bits. |
0x1C (28) | 0x0000011C | guest_to_host_signals | EmbSignalMask | 32-bit bitmask of active signals sent from Ivory Guest \(\to\) Sun Host. |
0x1D (29) | 0x0000011D | live_guest_to_host_signals | EmbSignalMask | 32-bit mask of enabled Guest \(\to\) Host signal bits. |
0x1E (30) | 0x0000011E | software_interrupt_vector | EmbWord | VME interrupt vector used by UX1200S to interrupt Sun host. |
0x1F (31) | 0x0000011F | poll_thread_attrs | EmbWord | Host polling thread state. |
0x20 (32) | 0x00000120 | clock_signal_number | EmbWord | Signal bit number (0..31) assigned to periodic clock ticks (-1 if disabled). |
0x21 (33) | 0x00000121 | clock_interval | EmbWord | Requested periodic clock interval in microseconds. |
0x22 (34) | 0x00000122 | run_lights | EmbWord | 32-bit bitmap of Genera status-line run lights (Disk, Chaos, GC, Process, Net). |
0x23 (35) | 0x00000123 | reset_request_count | EmbWord | Counter of host reset requests. |
0x24 (36) | 0x00000124 | restart_applications_count | EmbWord | Incremented when host X11/SunView display reconnects. |
0x25 (37) | 0x00000125 | stop_time | EmbWord | Timestamp for GC/stop accounting. |
0x26 (38) | 0x00000126 | elapsed_time | EmbWord | Cumulative elapsed microseconds. |
0x27 (39) | 0x00000127 | guest_status | EmbWord | Guest lifecycle state (Running, Initialized, Crashed, etc.). |
0x28 (40) | 0x00000128 | board_type | EmbWord | 2 (UXBoardType) for UX400S / UX1200S VMEbus board. |
0x29 (41) | 0x00000129 | board_serial_number | EmbWord | UX1200S hardware serial number. |
0x2A (42) | 0x0000012A | board_major_version | EmbWord | UX1200S hardware major revision. |
0x2B (43) | 0x0000012B | board_minor_version | EmbWord | UX1200S hardware minor revision. |
0x2C (44) | 0x0000012C | spy_block | EmbWord | Remote Spy communication block pointer. |
0x2E..2F | 0x0000012E..2F | mac_ether_addr[0..1] | uEmbWord[2] | 48-bit IEEE MAC address supplied by host. |
0x30 (48) | 0x00000130 | use_signal_locks | EmbWord | Non-zero if signal_lock spinlock protocol is active. |
0x31 (49) | 0x00000131 | signal_lock | EmbWord | Shared spinlock word for atomic host_to_guest_signals / guest_to_host_signals updates. |
0x32 (50) | 0x00000132 | enable_guest_to_host_signals | EmbWord | Non-zero when Sun host is ready to receive VME interrupts from Ivory. |
3. Bidirectional Signal & VME Doorbell Interrupt Protocol (signals.c)
Up to 32 independent virtual interrupt channels (signal 0 through signal 31) are multiplexed over two 32-bit bitmasks in EmbCommArea:
3.1 Host \(\to\) Guest Signaling (SendSignalToGuest)
- The Sun host sets
(1U << sig)inEmbCommArea->host_to_guest_signals(acquiringEmbCommArea->signal_lockifuse_signal_locks != 0). - If
(EmbCommArea->live_host_to_guest_signals & (1U << sig)) != 0, the Sun host triggers the UX1200S doorbell interrupt by writing to%CBUS-HOST-ASSERT-INTERRUPT(#x0A00000F) via the VME Control Window. - On Ivory, bit
<28>(PENDING-HOST-DOORBELL) of#x0A00000CassertsIRQ*, causing Ivory to enter%TRAP-VECTOR-INTERRUPT(#o0053), write#x0A00000E(%CBUS-HOST-CLEAR-INTERRUPT), atomically read-and-clearhost_to_guest_signals, and dispatch the handlers for each set signal bit.
3.2 Guest \(\to\) Host Signaling (SendSignalToHost)
- Ivory sets
(1U << sig)inEmbCommArea->guest_to_host_signals. - If
(EmbCommArea->live_guest_to_host_signals & (1U << sig)) != 0andenable_guest_to_host_signals != 0, Ivory writesEmbCommArea->software_interrupt_vectorand VME IRQ level to%CBUS-VME-INTERRUPT-REQ-VECTOR(#x0A000009), asserting a VME backplane interrupt to the Sun host. - The SunOS
/dev/ivoryinterrupt handler acknowledges the VME interrupt and wakes the life-support signal dispatcher thread, which clears each bit inguest_to_host_signalsand invokes the registered host channel handler (disk,network,console,cold_load,message).
4. Lockless Ring Queue Primitive (EmbQueue, embed.h:221-230)
All asynchronous channels communicate through unidirectional EmbQueue ring buffers allocated in shared communication memory and referenced via EmbPtr (word offset from 0x00000000):
typedef struct EmbQueue {
EmbWord element_size; /* Element size in bytes (0 = variable-length byte stream) */
EmbWord queue_size; /* Total ring buffer capacity in bytes */
EmbWord put_index; /* Producer write offset (0 .. queue_size - 1) */
EmbWord take_index; /* Consumer read offset (0 .. queue_size - 1) */
EmbWord signal; /* Signal bit (0..31) sent by producer when transitioning *
* from empty to non-empty (-1 if no signal) */
EmbWord lock; /* Optional spinlock */
EmbWord buffer[1]; /* Variable-length array of 32-bit words */
} EmbQueue;
- Empty Condition:
put_index == take_index. - Full Condition:
((put_index + step) % queue_size) == take_index. - Signaling Rule: When a producer inserts element(s) into a queue that was previously empty (
old_take_index == old_put_index) andqueue->signal >= 0, the producer assertsqueue->signaltoward the consumer.
5. UX1200S Embedded Channel Specifications (embed.h:204-859)
Every channel begins with the 5-word EmbChannel header (type, unit, next, guest_to_host_sig, host_to_guest_sig) and is linked onto EmbCommArea->channel_table.
5.1 Cold Load Stream Channel (EMB_CHAN_COLD_LOAD = 6, embed.h:590-690, cold.c)
Provides the character-cell terminal and status display used by the FEP command loop (FEP Command:) and Genera's Cold Load Stream / Debugger before the full X11 window system is active:
| Word Offset | Field Name | Type | Description |
|---|---|---|---|
+0..+4 | chan | EmbChannel | type = 6 (EMB_CHAN_COLD_LOAD), unit = 0 |
+5 | command_queue | EmbPtr | EmbQueue (element_size = 4 bytes) carrying 32-bit display commands from Ivory \(\to\) Host |
+6 | keyboard_queue | EmbPtr | EmbQueue (element_size = 4 bytes) carrying 32-bit keystrokes/mouse events from Host \(\to\) Ivory |
+7 | display_width | EmbWord | Character columns or pixel width of host cold-load window |
+8 | display_height | EmbWord | Character rows or pixel height of host cold-load window |
+9 | character_width | EmbWord | Width of fixed-pitch font cell in pixels |
+10 | character_height | EmbWord | Height of fixed-pitch font cell in pixels |
+11..+23 | progress_note | struct | Progress bar numerator, denominator, and 40-byte status string |
+24 | is_selected | EmbBoolean | Non-zero when cold-load window has input focus |
+25 | command_history_top | EmbWord | Ring index for FEP command history |
Cold Load command_queue 32-Bit Command Word Encoding (embed.h:640-675):
Bits <31:24> hold the 8-bit command opcode ((word >> 24) & 0xFF); bits <23:0> hold coordinates or character codes:
1(ColdLoadSelect): Raise/expose the Cold Load window (<23:0>= beep flag).2(ColdLoadDeselect): Hide/iconify the Cold Load window.3(ColdLoadChar): Draw single character<7:0>at current cursor and advance cursor (<15:8>= draw mode:0=ior,1=andca,2=xor,3=Copy).4(ColdLoadString): Followed by \(N\) words packing 4 ASCII characters per word (<7:0>,<15:8>,<23:16>,<31:24>).5(ColdLoadSetCursor): Set character cursor position (column = <11:0>,row = <23:12>).6(ColdLoadClearEOL): Clear from cursor to end of line.7(ColdLoadClearEOP): Clear from cursor to end of page/screen.8(ColdLoadClearScreen): Clear entire Cold Load window and home cursor to(0, 0).9(ColdLoadBeep): Ring terminal bell on Sun host.10(ColdLoadFlash): Visual bell flash.
5.2 Disk Channel (EMB_CHAN_DISK = 1, embed.h:250-349, disk.c)
Maps SunOS disk partitions or Unix world/page files (genera.world, page.disk, fep.disk) as high-speed block devices for FEP and Genera virtual memory paging:
| Word Offset | Field Name | Type | Description |
|---|---|---|---|
+0..+4 | chan | EmbChannel | type = 1 (EMB_CHAN_DISK), unit = 0..N |
+5 | number_of_cylinders | EmbWord | Virtual geometry cylinders |
+6 | number_of_heads | EmbWord | Virtual geometry heads (surfaces) |
+7 | number_of_sectors | EmbWord | Sectors per track (each sector = 256 Ivory words = 1,280 bytes [5 bytes/word with tags] or 1,024 bytes [data-only]) |
+8 | flags | uEmbWord | Read-only, removable, online status bits |
+9 | command_queue | EmbPtr | EmbQueue of EmbPtr offsets to EmbDiskCommand blocks (Ivory \(\to\) Host) |
+10 | status_queue | EmbPtr | EmbQueue of completed EmbDiskCommand EmbPtrs (Host \(\to\) Ivory) |
+11 | error_queue | EmbPtr | EmbQueue of failed EmbDiskCommand EmbPtrs |
Each EmbDiskCommand block in shared memory specifies:
result: Completion status (0= success).op: Operation code (Read = 1,Write = 2,Reset = 3,Initialize = 4).cylinder,head,sector: Starting disk address.n_addresses: Number of scatter/gather segments (EmbDiskAddressPair:{address, n_words}) pointing directly to physical Ivory memory pages (PPN << 8).
5.3 Network Channel (EMB_CHAN_NETWORK = 3, embed.h:445-510, network.c)
Bridges Ivory's Chaosnet, TCP/IP, and DECnet stacks to the Sun host's Ethernet interface via SunOS NIT (/dev/nit):
- Uses four
EmbQueues to manage zero-copy packet buffers (EmbNetPacket) in shared memory:guest_to_host_queue: Transmit packets filled by Ivory and queued for the Sun host to send on Ethernet.guest_to_host_return_queue: Completed transmit packet buffers returned by the Sun host to Ivory.host_to_guest_supply_queue: Empty receive packet buffers supplied by Ivory to the Sun host.host_to_guest_queue: Received Ethernet frames filled by the Sun host and queued for Ivory.
- Each
EmbNetPacketcontainsstatus,n_bytes(Ethernet frame length in bytes), anddata[380](1,520 bytes packed 4 bytes per Ivory word).
5.4 Console (EMB_CHAN_CONSOLE = 2), Host File (EMB_CHAN_HOST_FILE = 7), RPC (EMB_CHAN_RPC = 4) & Message (EMB_CHAN_MESSAGE = 8) Channels
EMB_CHAN_CONSOLE(console.c): Connects Genera's X11 / SunView sheet and input system (embedding/ux/) to the host display server.EMB_CHAN_MESSAGE(message.c): Multiplexed control channel referenced byEmbCommArea->command_channel(0x0D), used for dynamic channel creation, host file system access, and clean shutdown/reboot coordination.
- Weitek WTL1164/1165 (W3x64 family) —
weitek_WTL1164_1165_64bit_ieee_1986.pdf(mirror) - Weitek WTL3132/3332 (W3x64 family) —
weitek_WTL3132_3332_fpdp_1988.pdf(mirror) - Weitek WTL3167 (W3x64 core) —
weitek_WTL3167_coprocessor_1988.pdf(mirror)