;;; -*- Mode: LISP; Base:8; Package: SI -*-

;;;                           RESTRICTED RIGHTS LEGEND

;;;Use, duplication, or disclosure by the Government is subject to
;;;restrictions as set forth in subdivision (b)(3)(ii) of the Rights in
;;;Technical Data and Computer Software clause at 52.227-7013.
;;;
;;;                     TEXAS INSTRUMENTS INCORPORATED.
;;;                              P.O. BOX 2909
;;;                           AUSTIN, TEXAS 78769
;;;                                 MS 2151
;;;
;;; Copyright (C) 1985, Texas Instruments Incorporated. All rights reserved.

;;; Crash Record Format
;;;
(DefAlternate CRASH-REC-OFFSETS (Q-CORRESPONDING-VARIABLE-LISTS SYSTEM-CONSTANT-LISTS)
   (
    ;; Progress indicates how far system has gone into boot/run  codes below
    CRO-Progress    0

    CRO-Controller   4

    ;; units and partitions used on this boot.
    CRO-Ucode-Unit  8
    CRO-Load-Unit   #x+C
   
    CRO-Ucode-Part #x10
    CRO-Load-Part  #x20
    
    ;; versions for ucode and load
    CRO-Ucode-Version #x30
    CRO-Load-Version  #x38
    CRO-Load-Revision #x40

    ;; date and time of this boot attempt or 0 if not yet initialized
    CRO-Month      #x48
    CRO-Day        #x4C
    CRO-Year       #x50

    CRO-Hour       #x54
    CRO-Minute     #x58

    CRO-Report-Flags #x5C

    ;; Halt Information
    CRO-Halt-Addr  #x60
    CRO-Halt-Kind  #x68

    CRO-Boot-Kind  #x6C

    ;; Saved Registers (usually M-1 and M-2)
    CRO-M-1        #x70
    CRO-M-2        #x80
    CRO-MD         #x90
    CRO-VMA        #x+A0

    CRASH-REC-LEN #x+B0
    ))

(DefAlternate CRASH-REC-PROGRESS-CODES (Q-CORRESPONDING-VARIABLE-LISTS SYSTEM-CONSTANT-LISTS)
   (
    CREC-Progress-Allocated 0
    CREC-Progress-Starting-Lisp 1
    CREC-Progress-Lisp-Reinitialize 2
    CREC-Progress-Start-Running-Crash-List 3
    CREC-Progress-Done-Running-Crash-List 4
    CREC-Progress-System-Initializations 5
    CREC-Progress-Cold-Initializations 6
    CREC-Progress-Warm-Initializations 7
    CREC-Progress-Lisp-Environment 10.
    CREC-Progress-Max 10.
    ))

(DefSysConst CREC-Progress-Decode
		'(0  Allocated
		  1  Starting-Lisp
		  2  Lisp-Reinitialize
		  3  Crash-List
		  4  Done-with-Crash-List
		  5  System-Initializations
		  6  Cold-Initializations
		  7  Warm-Initializations
		  10. Lisp-Environment))

(DefAlternate Report-Flags-Fields (Q-CORRESPONDING-VARIABLE-LISTS SYSTEM-CONSTANT-LISTS)
  (
   %%CREC-Reported-to-User 0001
   %%CREC-Recorded-in-Log  0101
   ))

(DefAlternate Halt-Kind-Codes (Q-CORRESPONDING-VARIABLE-LISTS SYSTEM-CONSTANT-LISTS)
   (
    CREC-No-Halt 0
    CREC-Ucode-Halt 1
    CREC-Hardware-Halt 2
    CREC-Lisp-Halt 3
    ))

(DefAlternate NVRAM-Crash-Buffer-Offsets (Q-CORRESPONDING-VARIABLE-LISTS SYSTEM-CONSTANT-LISTS)
   (NVRAM-Crash-Buff-Rec-Len #x+98
    NVRAM-Crash-Buff-Base    #x+A8
    ;; address of last record
    NVRAM-Crash-Buff-Last    #x+A0
    NVRAM-Crash-Buff-Pointer #x+90
    NVRAM-Crash-Buff-Format-Rev #x+88
    NVRAM-Crash-Buff-Format-Processor #x+80
    ))

(DefSysConst SIB-NVRAM-Offset #x+FA0000)
(DefSysConst SIB-NVRAM-Size 1024.)
(DefSysConst CRASH-REC-FORMAT-PROCESSOR-TYPE 0)
(DefSysConst CRASH-REC-FORMAT-VERSION 0)







