!
! runtime.inc - constants for runtime module
!
! Copyright (C) 1997-2003 Gero Kuhlmann <gero@gkminix.han.de>
!
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 2 of the License, or
! any later version.
!
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! GNU General Public License for more details.
!
! You should have received a copy of the GNU General Public License
! along with this program; if not, write to the Free Software
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
!
! $Id: runtime.inc,v 1.4 2003/01/25 23:29:44 gkminix Exp $
!
!**************************************************************************
!
! Vendor information for the boot rom image. These values have to be
! identical to those in mknbi.h.
!
#define VENDOR_MAGIC "GK-mknbi-mgl" ! vendor ID
#define VENDOR_SIZE 3 ! size of vendor ID in dwords
#define VENDOR_RUNTIME 16 ! tag for runtime segment
!
!**************************************************************************
!
! The following values have to be identical with those in the C header
! files:
!
DATAOFS equ $0008
CMD_FIRSTINT equ $0062
MAX_STR_LEN equ 255
ADDR_SERVERNAME equ $0100
ADDR_HOSTNAME equ $0200
!
!**************************************************************************
!
! Layout and magic ID of boot rom image header. These values have to
! be identical to those used by the boot rom. See SPEC.DOC of the
! boot rom source for further information.
!
BOOT_MAGIC equ $1B031336 ! boot image header magic cookie
BOOT_SIZE equ 512 ! total size of boot image header
BOOT_HD_SIZE equ 4 ! size of header in dwords
BOOT_HD_MAGIC equ 0 ! offset for header magic number
BOOT_HD_LENGTH equ 4 ! offset for header length
BOOT_HD_FLAG1 equ 5 ! offset for header flag 1
BOOT_HD_FLAG2 equ 6 ! offset for header flag 2
BOOT_HD_FLAG3 equ 7 ! offset for header flag 3
BOOT_HD_LOCN equ 8 ! offset for header location
BOOT_HD_EXEC equ 12 ! offset for execute address
BOOT_HD_VENDOR equ 16 ! offset for header vendor information
BOOT_LD_SIZE equ 4 ! size of load record in dwords
BOOT_LD_LENGTH equ 0 ! offset for load record length
BOOT_LD_TAG1 equ 1 ! offset for load record tag 1
BOOT_LD_TAG2 equ 2 ! offset for load record tag 2
BOOT_LD_FLAGS equ 3 ! offset for load record flags
BOOT_LD_ADDR equ 4 ! offset for absolute address
BOOT_LD_ILENGTH equ 8 ! offset for image length
BOOT_LD_MLENGTH equ 12 ! offset for memory length
BOOT_LD_VENDOR equ 16 ! offset for vendor information
BOOT_FLAG_B0 equ $01 ! mask for load record flag B0
BOOT_FLAG_B1 equ $02 ! mask for load record flag B1
BOOT_FLAG_EOF equ $04 ! mask for load record flag EOF
!
!**************************************************************************
!
! Layout and magic ID of bootp record. Refer to RFC 951, RFC 1048
! and RFC 1533 for further information. The BOOTP record can be
! longer than the standard length as the bootrom might be able to
! load a vendor extension file via tftp.
!
#define BOOTP_MAGIC_RFC $63, $82, $53, $63 ! RFC 1048 vendor ID
#define BOOTP_MAGIC_CMU $43, $4D, $55, $00 ! CMU vendor ID
#define BOOTP_MAGIC_STA $53, $54, $41, $4E ! Stanford vendor ID
#define BOOTP_MAGIC_LEN 4 ! length of vendor ID
BOOTP_REQUEST equ 1 ! bootp OP-code
BOOTP_REPLY equ 2
BOOTP_OP equ 0 ! offset to bootp OP-code
BOOTP_SERVER equ 20 ! offset to server address
BOOTP_SNAME equ 44 ! offset to server name
BOOTP_FNAME equ 108 ! offset to image file name
BOOTP_VEND equ 236 ! offset to vendor information
BOOTP_SIZE equ 300 ! size of complete bootp record
BOOTP_MAX_SNAME equ 64 ! max size of server name
BOOTP_MAX_FNAME equ 128 ! max size of image file name
BOOTP_MAX_SIZE equ 2048 ! max size of bootp per Spec.doc
BOOTP_RFC_NOP equ 0 ! RFC vendor tag for NO-OP
BOOTP_RFC_ROUTE equ 3 ! RFC vendor tag for gateway address
BOOTP_RFC_HOST equ 12 ! RFC vendor tag for host name
BOOTP_RFC_END equ 255 ! RFC vendor tag for end of record
syntax highlighted by Code2HTML, v. 0.9.1