XL1200-EMU Symbolics XL1200 Emulator

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 SunOS genera life-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 BaseSizeHost Pointer in life.hIvory Hardware Target
+0x0000000064 MB (0x04000000)IvoryData (int32_t *)Ivory Data Area: IvoryData[w] reads/writes bits <31:0> (%%Q-POINTER) of Ivory physical word w (0x00000000..0x00FFFFFF).
+0x0400000064 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.
+0x050000004 KBIvoryControl (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), EmbWord and EmbPtr were typedef'd as long, which was 32 bits on ILP32 68k/SPARC compilers (sizeof(long) == 4, matching 1 Ivory word stride in IvoryData). On any 64-bit (LP64) system, all Emb* types must be defined as int32_t / uint32_t (as done in ivory_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 EmbCommArea and the communication memory (0x00000100..comm_memory_size - 1) is initialized with tag DTP-FIXNUM (#o10) and CDR-NEXT (0) (Tag byte = 0x08).

2.1 Complete EmbCommArea Word Offset Map (embed.h:84-169, embedding/defs.lisp)

Word Offset (from 0x100)Ivory PMAField Name (struct EmbCommArea)TypeValue & Semantics
0x00 (0)0x00000100identifierEmbWordMagic constant 'EMBD' (0x454D4244 in big-endian Sun word / Ivory <31:0>).
0x01 (1)0x00000101versionEmbWordProtocol version number = 1.
0x02 (2)0x00000102system_typeEmbWordHost system type: 2 = Sun-3, 3 = Sun-4.
0x03 (3)0x00000103number_of_slotsEmbWordNumber of VME slots / boards in configuration.
0x04 (4)0x00000104comm_memory_sizeEmbWordTotal size of Embedded Communication Area in Ivory words (typically 0x10000 = 64 KWords).
0x05 (5)0x00000105genera_versionEmbWordGenera major/minor version written by guest.
0x06 (6)0x00000106osf_version_majorEmbWordHost SunOS major version (e.g. 4).
0x07 (7)0x00000107osf_version_minorEmbWordHost SunOS minor version (e.g. 1).
0x08 (8)0x00000108life_version_majorEmbWordHost life-support daemon major version.
0x09 (9)0x00000109life_version_minorEmbWordHost life-support daemon minor version.
0x0A (10)0x0000010Achannel_tableEmbPtrWord offset (relative to 0x00000000) of the head of the EmbChannel linked list (-1 = end).
0x0B (11)0x0000010Bconsole_channelEmbPtrWord offset of the primary EmbConsoleChannel.
0x0C (12)0x0000010Ccold_load_channelEmbPtrWord offset of the EmbColdLoadChannel.
0x0D (13)0x0000010Dcommand_channelEmbPtrWord offset of the EmbMessageChannel (command/control).
0x0E (14)0x0000010Evirtual_memory_sizeEmbWordConfigured virtual memory size in words (from swap partition size).
0x0F (15)0x0000010Fworld_load_sizeEmbWordSize of loaded .ilod world in words.
0x10 (16)0x00000110bad_memory_mapEmbWordBad physical memory page map.
0x11 (17)0x00000111host_buffer_startuEmbWordWord offset of host-allocated shared buffer pool.
0x12 (18)0x00000112host_buffer_sizeuEmbWordSize in words of host buffer pool.
0x13 (19)0x00000113fep_buffer_startuEmbWordWord offset of FEP-allocated shared buffer pool.
0x14 (20)0x00000114fep_buffer_sizeuEmbWordSize in words of FEP buffer pool.
0x15 (21)0x00000115guest_buffer_startuEmbWordWord offset of Genera guest-allocated shared buffer pool (0x00004000 typical).
0x16 (22)0x00000116guest_buffer_sizeuEmbWordSize in words of guest buffer pool.
0x17 (23)0x00000117fep_statusEmbWordLow 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)0x00000118ivory_spy_commandEmbWordRemote Spy command word.
0x19 (25)0x00000119ivory_spy_statusEmbWordRemote Spy status word.
0x1A (26)0x0000011Ahost_to_guest_signalsEmbSignalMask32-bit bitmask of active signals sent from Sun Host \(\to\) Ivory Guest.
0x1B (27)0x0000011Blive_host_to_guest_signalsEmbSignalMask32-bit mask of enabled Host \(\to\) Guest signal bits.
0x1C (28)0x0000011Cguest_to_host_signalsEmbSignalMask32-bit bitmask of active signals sent from Ivory Guest \(\to\) Sun Host.
0x1D (29)0x0000011Dlive_guest_to_host_signalsEmbSignalMask32-bit mask of enabled Guest \(\to\) Host signal bits.
0x1E (30)0x0000011Esoftware_interrupt_vectorEmbWordVME interrupt vector used by UX1200S to interrupt Sun host.
0x1F (31)0x0000011Fpoll_thread_attrsEmbWordHost polling thread state.
0x20 (32)0x00000120clock_signal_numberEmbWordSignal bit number (0..31) assigned to periodic clock ticks (-1 if disabled).
0x21 (33)0x00000121clock_intervalEmbWordRequested periodic clock interval in microseconds.
0x22 (34)0x00000122run_lightsEmbWord32-bit bitmap of Genera status-line run lights (Disk, Chaos, GC, Process, Net).
0x23 (35)0x00000123reset_request_countEmbWordCounter of host reset requests.
0x24 (36)0x00000124restart_applications_countEmbWordIncremented when host X11/SunView display reconnects.
0x25 (37)0x00000125stop_timeEmbWordTimestamp for GC/stop accounting.
0x26 (38)0x00000126elapsed_timeEmbWordCumulative elapsed microseconds.
0x27 (39)0x00000127guest_statusEmbWordGuest lifecycle state (Running, Initialized, Crashed, etc.).
0x28 (40)0x00000128board_typeEmbWord2 (UXBoardType) for UX400S / UX1200S VMEbus board.
0x29 (41)0x00000129board_serial_numberEmbWordUX1200S hardware serial number.
0x2A (42)0x0000012Aboard_major_versionEmbWordUX1200S hardware major revision.
0x2B (43)0x0000012Bboard_minor_versionEmbWordUX1200S hardware minor revision.
0x2C (44)0x0000012Cspy_blockEmbWordRemote Spy communication block pointer.
0x2E..2F0x0000012E..2Fmac_ether_addr[0..1]uEmbWord[2]48-bit IEEE MAC address supplied by host.
0x30 (48)0x00000130use_signal_locksEmbWordNon-zero if signal_lock spinlock protocol is active.
0x31 (49)0x00000131signal_lockEmbWordShared spinlock word for atomic host_to_guest_signals / guest_to_host_signals updates.
0x32 (50)0x00000132enable_guest_to_host_signalsEmbWordNon-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)

  1. The Sun host sets (1U << sig) in EmbCommArea->host_to_guest_signals (acquiring EmbCommArea->signal_lock if use_signal_locks != 0).
  2. 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.
  3. On Ivory, bit <28> (PENDING-HOST-DOORBELL) of #x0A00000C asserts IRQ*, causing Ivory to enter %TRAP-VECTOR-INTERRUPT (#o0053), write #x0A00000E (%CBUS-HOST-CLEAR-INTERRUPT), atomically read-and-clear host_to_guest_signals, and dispatch the handlers for each set signal bit.

3.2 Guest \(\to\) Host Signaling (SendSignalToHost)

  1. Ivory sets (1U << sig) in EmbCommArea->guest_to_host_signals.
  2. If (EmbCommArea->live_guest_to_host_signals & (1U << sig)) != 0 and enable_guest_to_host_signals != 0, Ivory writes EmbCommArea->software_interrupt_vector and VME IRQ level to %CBUS-VME-INTERRUPT-REQ-VECTOR (#x0A000009), asserting a VME backplane interrupt to the Sun host.
  3. The SunOS /dev/ivory interrupt handler acknowledges the VME interrupt and wakes the life-support signal dispatcher thread, which clears each bit in guest_to_host_signals and 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) and queue->signal >= 0, the producer asserts queue->signal toward 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 OffsetField NameTypeDescription
+0..+4chanEmbChanneltype = 6 (EMB_CHAN_COLD_LOAD), unit = 0
+5command_queueEmbPtrEmbQueue (element_size = 4 bytes) carrying 32-bit display commands from Ivory \(\to\) Host
+6keyboard_queueEmbPtrEmbQueue (element_size = 4 bytes) carrying 32-bit keystrokes/mouse events from Host \(\to\) Ivory
+7display_widthEmbWordCharacter columns or pixel width of host cold-load window
+8display_heightEmbWordCharacter rows or pixel height of host cold-load window
+9character_widthEmbWordWidth of fixed-pitch font cell in pixels
+10character_heightEmbWordHeight of fixed-pitch font cell in pixels
+11..+23progress_notestructProgress bar numerator, denominator, and 40-byte status string
+24is_selectedEmbBooleanNon-zero when cold-load window has input focus
+25command_history_topEmbWordRing 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 OffsetField NameTypeDescription
+0..+4chanEmbChanneltype = 1 (EMB_CHAN_DISK), unit = 0..N
+5number_of_cylindersEmbWordVirtual geometry cylinders
+6number_of_headsEmbWordVirtual geometry heads (surfaces)
+7number_of_sectorsEmbWordSectors per track (each sector = 256 Ivory words = 1,280 bytes [5 bytes/word with tags] or 1,024 bytes [data-only])
+8flagsuEmbWordRead-only, removable, online status bits
+9command_queueEmbPtrEmbQueue of EmbPtr offsets to EmbDiskCommand blocks (Ivory \(\to\) Host)
+10status_queueEmbPtrEmbQueue of completed EmbDiskCommand EmbPtrs (Host \(\to\) Ivory)
+11error_queueEmbPtrEmbQueue 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:
    1. guest_to_host_queue: Transmit packets filled by Ivory and queued for the Sun host to send on Ethernet.
    2. guest_to_host_return_queue: Completed transmit packet buffers returned by the Sun host to Ivory.
    3. host_to_guest_supply_queue: Empty receive packet buffers supplied by Ivory to the Sun host.
    4. host_to_guest_queue: Received Ethernet frames filled by the Sun host and queued for Ivory.
  • Each EmbNetPacket contains status, n_bytes (Ethernet frame length in bytes), and data[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 by EmbCommArea->command_channel (0x0D), used for dynamic channel creation, host file system access, and clean shutdown/reboot coordination.
Related Chip Datasheets (3)All Component Datasheets →