VAX780, VAX739, VAX759, VAX8600: Merge branch 'VAX-11-BootBlock-Fixup' - Generic VMB.EXE for *nix VAX operating systems

The native VMB.EXE program historically supported a Boot Block oriented
 boot if Bit 3 of the parameter register (R5) was set when VMB was invoked.
 This Boot Block boot operation reads sector 0 into memory and starts
 execution at offset 2 of the data block in memory.
 When portitions of VMB were migrated into ROM to support the earliest
 MicroVAX system (MicroVAX I) and all subsequent ROM based VMB versions
 the concept of Boot Block booting was extended in these ROM VMB
 implementations.  The change in boot block booting functionality included
 several features:
   1) If a normal boot attempt to a device failed (due to VMB not being
      able to locate a secondary bootstrap program), a boot block boot is
      automatically attempted.  If the Bit 3 of R5 was set, then the
      initial search for a secondary boot block was avoided and a boot
      block boot was immediately attempted.
   2) When performing a boot block boot, the sector 0 contents are examined
      and if these contents conform to the pattern defined for ROM based
      (PRA0) booting, the ROM format Offset, Size, and Starting address
      information is used directly by VMB to load a program into memory
      and control is transferred to that program.  If the contents of
      sector 0 do not fit the pattern required for ROM based booting, then
      the code in sector 0 is executed directly starting at offset 2,
      the same as was originally done with the non ROM based VMB versions.
      Note that this extended behavior allows sector 0 to contain very little
      information and quite possibly no actual boot code.
 Developers of alternate operating systems for VAX computers noticed the ROM
 based boot block behavior and changed their installation media AND the disk
 structures to only provide the minimal boot information required on the
 systems with VMB installed in ROM.

 Since, when this active development of these alternate operating systems for
 VAX computers was happening, the vast majority of development and new system
 deployments were to hardware which had ROM base VMB, no one noticed that
 older systems which booted with the non ROM based VMB could no longer boot
 from new install media or disks formatted with these operating systems.

 This patch addeds the ROM based VMB boot block boot functionality to the
 original dynamically loaded VMB.EXE used by the older systems to boot.

 The patch overwrites some VMB code which exists to support NVAX(1302) and
 Neon-V(1701) systems.  If simh simulators for these systems are ever built
 an alternate location must be found to accomodate this extended logic
This commit is contained in:
Mark Pizzolato 2014-12-27 15:21:17 -08:00
commit 5cb8f4686c
4 changed files with 168 additions and 16 deletions

152
VAX/VMB-exe-Patch.com Normal file
View file

@ -0,0 +1,152 @@
$!
$! This procedure patches the VMB.EXE provided with VAX/VMS V7.3 to
$! support the Boot Block boot functionality provided on all VAX
$! systems which run a ROM based VMB.
$!
$ PATCH /ABSOLUTE /NEW_VERSION /OUTPUT=cp$exe:VMB.EXE cp$src:VMB_orig.EXE
! The native VMB.EXE program historically supported a Boot Block oriented
! boot if Bit 3 of the parameter register (R5) was set when VMB was invoked.
! This Boot Block boot operation reads sector 0 into memory and starts
! execution at offset 2 of the data block in memory.
! When portitions of VMB were migrated into ROM to support the earliest
! MicroVAX system (MicroVAX I) and all subsequent ROM based VMB versions
! the concept of Boot Block booting was extended in these ROM VMB
! implementations. The change in boot block booting functionality included
! several features:
! 1) If a normal boot attempt to a device failed (due to VMB not being
! able to locate a secondary bootstrap program), a boot block boot is
! automatically attempted. If the Bit 3 of R5 was set, then the
! initial search for a secondary boot block was avoided and a boot
! block boot was immediately attempted.
! 2) When performing a boot block boot, the sector 0 contents are examined
! and if these contents conform to the pattern defined for ROM based
! (PRA0) booting, the ROM format Offset, Size, and Starting address
! information is used directly by VMB to load a program into memory
! and control is transferred to that program. If the contents of
! sector 0 do not fit the pattern required for ROM based booting, then
! the code in sector 0 is executed directly starting at offset 2,
! the same as was originally done with the non ROM based VMB versions.
! Note that this extended behavior allows sector 0 to contain very little
! information and quite possibly no actual boot code.
! Developers of alternate operating systems for VAX computers noticed the ROM
! based boot block behavior and changed their installation media AND the disk
! structures to only provide the minimal boot information required on the
! systems with VMB installed in ROM.
!
! Since, when this active development of these alternate operating systems for
! VAX computers was happening, the vast majority of development and new system
! deployments were to hardware which had ROM base VMB, no one noticed that
! older systems which booted with the non ROM based VMB could no longer boot
! from new install media or disks formatted with these operating systems.
!
! This patch addeds the ROM based VMB boot block boot functionality to the
! original dynamically loaded VMB.EXE used by the older systems to boot.
!
! The patch overwrites some VMB code which exists to support NVAX(1302) and
! Neon-V(1701) systems. If simh simulators for these systems are ever built
! an alternate location must be found to accomodate this extended logic
!
define PAA = 08190 ! INIT_ADP_1302 (I think!)
define NEWFIL_OPNERR = PAA+1F ! Replacement to generate File Not Found Error Message
define TRY_BBLOCK = PAA+2B
define OLDFIL_OPNERR = 69A8 ! Original File Not Found Error
define ORIG_BBLOCK_BOOT = 68B6 ! Original code that did Boot Block Boot
define RPB$V_BBLOCK = 3
define RPB$L_BOOTR5 = 30
define READFILE = 0120
define READIN_BOOT = 6A37
define START_SECOND_HALT = 00BB
define SS$_FILESTRUCT = 08C0
define SS$_BADCHKSUM = 0808
define SS$_BADFILEHDR = 0810
define SS$_BADDIRECTORY = 0828
dep /long PAA = 0
dep /long PAA+04 = 0
dep /long PAA+08 = 0
dep /long PAA+0C = 0
dep /long PAA+10 = 0
dep /long PAA+14 = 0
dep /long PAA+18 = 0
dep /long PAA+1C = 0
dep /long PAA+20 = 0
dep /long PAA+24 = 0
dep /long PAA+28 = 0
dep /long PAA+2C = 0
dep /long PAA+30 = 0
dep /long PAA+34 = 0
dep /long PAA+38 = 0
dep /long PAA+3C = 0
dep /long PAA+40 = 0
dep /long PAA+44 = 0
dep /long PAA+48 = 0
dep /long PAA+4C = 0
dep /long PAA+50 = 0
dep /long PAA+54 = 0
dep /long PAA+58 = 0
dep /long PAA+5C = 0
dep /long PAA+60 = 0
dep /long PAA+64 = 0
dep /long PAA+68 = 0
dep /long PAA+6C = 0
dep /long PAA+70 = 0
dep /long PAA+74 = 0
dep /long PAA+78 = 0
dep /long PAA+8C = 0
dep /long PAA+80 = 0
dep /long PAA+84 = 0
dep /long PAA+88 = 0
dep /long PAA+8C = 0
dep /long PAA+90 = 0
dep /long PAA+94 = 0
dep /long PAA+98 = 0
dep /long PAA+9C = 0
dep /ins OLDFIL_OPNERR = ' BRW PAA '
dep /ins PAA = ' CMPW R0, #SS$_BADCHKSUM '
dep /ins PAA+05 = ' BEQL TRY_BBLOCK '
dep /ins PAA+07 = ' CMPW R0, #SS$_FILESTRUCT '
dep /ins PAA+0C = ' BEQL TRY_BBLOCK '
dep /ins PAA+0E = ' CMPW R0, #SS$_BADFILEHDR '
dep /ins PAA+13 = ' BEQL TRY_BBLOCK '
dep /ins PAA+15 = ' CMPW R0, #SS$_BADDIRECTORY '
dep /ins PAA+1A = ' BEQL TRY_BBLOCK '
dep /ins PAA+1C = ' BRW NEWFIL_OPNERR '
dep /ins NEWFIL_OPNERR = ' PUSHAB L^000069AE '
dep /ins NEWFIL_OPNERR+6 = ' JMP L^00000294 '
dep /ins TRY_BBLOCK
' CLRL R8 ' ! Block to read
' MOVL #1,R9 ' ! Size to read
' MOVL R10,R6 ' ! Start of free memory
' JSB L^READFILE ' ! Read the block to R10
' BLBC R0,TRY_OLD_BBLOCK ' ! Br if error
!
! validate the boot block
!
' MOVZBL B^2(R10),R2 ' ! Get offset to secondary id field
' CMPB B^3(R10),#1 ' ! Next field a BR instruction
' BNEQ TRY_OLD_BBLOCK ' ! Br if no
' MOVAW (R10)[R2],R1 ' ! Address next field
' CMPW (R1),#^x18 ' ! VAX instruction set id?
' BNEQ TRY_OLD_BBLOCK ' ! Br if no, error
' ADDB3 #^x18,B^2(R1),R2 ' ! Get optional value
' MCOMB R2,R2 ' ! Ones's complement it
' CMPB R2,B^3(R1) ' ! Check the check sum byte
' BNEQ TRY_OLD_BBLOCK ' ! Continue if no match
' ADDL3 B^8(R1),B^0C(R1),R2 ' ! Check other words
' ADDL B^10(R1),R2 ' ! Get augment to load address
' CMPL R2,B^14(R1) ' ! Match?
' BNEQ TRY_OLD_BBLOCK ' ! Br if no
' ROTL #10,B^4(R10),R8 ' ! Get secondary image LBN
' MOVL B^8(R1),R9 ' ! Get image size
' ADDL B^0C(R1),R10 ' ! Compute load address
' MOVL B^10(R1),R5 ' ! Compute transfer offset
' BRW READIN_BOOT ' ! Boot block is valid, read file
'TRY_OLD_BBLOCK:BBS #RPB$V_BBLOCK,B^RPB$L_BOOTR5(R11),OLD_BBLOCK_BOOT'
' BRW NEWFIL_OPNERR ' ! Report error
'OLD_BBLOCK_BOOT:MOVL #2,R5 ' ! Transfer address from start of block
' JMP L^START_SECOND_HALT ' ! Do it.
exit
dep /ins ORIG_BBLOCK_BOOT = ' BRW TRY_BBLOCK ' ! make BOOT /R5:8 work the same way
update
exit

View file

@ -1,9 +1,9 @@
#ifndef ROM_vax_vmb_exe_H #ifndef ROM_vax_vmb_exe_H
#define ROM_vax_vmb_exe_H 0 #define ROM_vax_vmb_exe_H 0
/* /*
VAX/vax_vmb_exe.h produced at Fri Nov 09 06:40:16 2012 VAX/vax_vmb_exe.h produced at Sun Mar 24 16:38:01 2013
from VAX/vmb.exe which was last modified at Sun Oct 21 17:12:55 2012 from VAX/vmb.exe which was last modified at Sun Mar 24 12:24:51 2013
file size: 44544 (0xAE00) - checksum: 0xFFC014CC file size: 44544 (0xAE00) - checksum: 0xFFC014BB
This file is a generated file and should NOT be edited or changed by hand. This file is a generated file and should NOT be edited or changed by hand.
*/ */
#define BOOT_CODE_SIZE 0xAE00 #define BOOT_CODE_SIZE 0xAE00
@ -1685,7 +1685,7 @@ unsigned char vax_vmb_exe[] = {
0x9E,0xCA,0xD8,0x01,0x55,0xD0,0x0C,0x50,0x9E,0x40,0x65,0x51,0x90,0x71,0x52,0x13, 0x9E,0xCA,0xD8,0x01,0x55,0xD0,0x0C,0x50,0x9E,0x40,0x65,0x51,0x90,0x71,0x52,0x13,
0x05,0x91,0x20,0x52,0x12,0x05,0xF5,0x50,0xF3,0x11,0x0C,0x94,0xA1,0x01,0x7C,0x7E, 0x05,0x91,0x20,0x52,0x12,0x05,0xF5,0x50,0xF3,0x11,0x0C,0x94,0xA1,0x01,0x7C,0x7E,
0xDD,0x55,0xFB,0x03,0xCF,0x69,0xE9,0x7C,0x7E,0xDD,0x69,0xFB,0x03,0xCF,0x60,0xE9, 0xDD,0x55,0xFB,0x03,0xCF,0x69,0xE9,0x7C,0x7E,0xDD,0x69,0xFB,0x03,0xCF,0x60,0xE9,
0x05,0xE1,0x03,0xAB,0x30,0x0D,0xD0,0x02,0x55,0xD0,0xAB,0x2C,0x58,0xD0,0x01,0x59, 0x05,0xE1,0x03,0xAB,0x30,0x0D,0x31,0x02,0x19,0xD0,0xAB,0x2C,0x58,0xD0,0x01,0x59,
0x31,0x74,0x01,0xE0,0x01,0xAC,0x2C,0x03,0x30,0xCD,0x29,0xE1,0x08,0xAB,0x30,0x16, 0x31,0x74,0x01,0xE0,0x01,0xAC,0x2C,0x03,0x30,0xCD,0x29,0xE1,0x08,0xAB,0x30,0x16,
0x9F,0xAB,0x68,0xDD,0x27,0x9F,0xCF,0xA0,0x0E,0xFB,0x03,0xCF,0x32,0xE9,0xD4,0x59, 0x9F,0xAB,0x68,0xDD,0x27,0x9F,0xCF,0xA0,0x0E,0xFB,0x03,0xCF,0x32,0xE9,0xD4,0x59,
0x9E,0xAB,0x68,0x57,0x11,0x3F,0x9E,0xCF,0x33,0x0E,0x57,0xE1,0x04,0xAB,0x30,0x05, 0x9E,0xAB,0x68,0x57,0x11,0x3F,0x9E,0xCF,0x33,0x0E,0x57,0xE1,0x04,0xAB,0x30,0x05,
@ -1700,7 +1700,7 @@ unsigned char vax_vmb_exe[] = {
0x12,0x29,0x95,0xCF,0xDB,0x0D,0x13,0x0B,0x94,0xCF,0xD5,0x0D,0x91,0x30,0xCF,0xD4, 0x12,0x29,0x95,0xCF,0xDB,0x0D,0x13,0x0B,0x94,0xCF,0xD5,0x0D,0x91,0x30,0xCF,0xD4,
0x0D,0x13,0xA2,0xE1,0x08,0xAB,0x30,0x13,0x7C,0x7E,0x9F,0xCF,0x68,0x0D,0xFB,0x03, 0x0D,0x13,0xA2,0xE1,0x08,0xAB,0x30,0x13,0x7C,0x7E,0x9F,0xCF,0x68,0x0D,0xFB,0x03,
0xCF,0x7D,0xE8,0x90,0x04,0xCF,0xB9,0x0D,0x31,0x35,0xFF,0xB1,0x8F,0x08,0x09,0x50, 0xCF,0x7D,0xE8,0x90,0x04,0xCF,0xB9,0x0D,0x31,0x35,0xFF,0xB1,0x8F,0x08,0x09,0x50,
0x12,0x06,0x17,0xEF,0x58,0x97,0xFF,0xFF,0x16,0xEF,0xE6,0x98,0xFF,0xFF,0x25,0x42, 0x12,0x06,0x17,0xEF,0x58,0x97,0xFF,0xFF,0x31,0xE5,0x17,0x98,0xFF,0xFF,0x25,0x42,
0x4F,0x4F,0x54,0x2D,0x46,0x2D,0x55,0x6E,0x61,0x62,0x6C,0x65,0x20,0x74,0x6F,0x20, 0x4F,0x4F,0x54,0x2D,0x46,0x2D,0x55,0x6E,0x61,0x62,0x6C,0x65,0x20,0x74,0x6F,0x20,
0x6C,0x6F,0x63,0x61,0x74,0x65,0x20,0x42,0x4F,0x4F,0x54,0x20,0x66,0x69,0x6C,0x65, 0x6C,0x6F,0x63,0x61,0x74,0x65,0x20,0x42,0x4F,0x4F,0x54,0x20,0x66,0x69,0x6C,0x65,
0x00,0x7D,0xAB,0x3C,0x58,0xE0,0x01,0xAC,0x2C,0x2A,0xD5,0x58,0x12,0x26,0x16,0xEF, 0x00,0x7D,0xAB,0x3C,0x58,0xE0,0x01,0xAC,0x2C,0x2A,0xD5,0x58,0x12,0x26,0x16,0xEF,
@ -2083,16 +2083,16 @@ unsigned char vax_vmb_exe[] = {
0x00,0x14,0x20,0xD0,0xA0,0x10,0xA0,0x10,0xD0,0x8F,0x00,0xE0,0xFF,0x0F,0xA0,0x04, 0x00,0x14,0x20,0xD0,0xA0,0x10,0xA0,0x10,0xD0,0x8F,0x00,0xE0,0xFF,0x0F,0xA0,0x04,
0xD0,0xA0,0x10,0xA0,0x10,0xDA,0x00,0x26,0x7D,0x8E,0x50,0x17,0xBE,0x00,0xD0,0x8F, 0xD0,0xA0,0x10,0xA0,0x10,0xDA,0x00,0x26,0x7D,0x8E,0x50,0x17,0xBE,0x00,0xD0,0x8F,
0x00,0x00,0x80,0x21,0x54,0x9E,0xAF,0x8C,0x51,0x30,0x94,0xF9,0x05,0x00,0x00,0x00, 0x00,0x00,0x80,0x21,0x54,0x9E,0xAF,0x8C,0x51,0x30,0x94,0xF9,0x05,0x00,0x00,0x00,
0xDE,0x9F,0x00,0x00,0x80,0xE1,0x50,0xDE,0x9F,0x00,0x00,0x00,0xE0,0x53,0x30,0x7A, 0xB1,0x50,0x8F,0x08,0x08,0x13,0x24,0xB1,0x50,0x8F,0xC0,0x08,0x13,0x1D,0xB1,0x50,
0xFA,0x05,0xDE,0x9F,0x00,0x00,0x80,0xE1,0x52,0x30,0xA2,0xFB,0x05,0xDD,0x54,0xDE, 0x8F,0x10,0x08,0x13,0x16,0xB1,0x50,0x8F,0x28,0x08,0x13,0x0F,0x31,0x00,0x00,0x9F,
0x9F,0x00,0x00,0x00,0xE0,0x54,0x30,0x3C,0xFC,0xD0,0x8E,0x54,0x05,0xBB,0x04,0xD0, 0xEF,0xF9,0xE7,0xFF,0xFF,0x17,0xEF,0xD9,0x80,0xFF,0xFF,0xD4,0x58,0xD0,0x01,0x59,
0x8F,0x00,0x00,0x80,0xE1,0x50,0xD0,0x8F,0x00,0x00,0x00,0xE0,0x51,0x9E,0xEF,0x09, 0xD0,0x5A,0x56,0x16,0xEF,0x57,0x7F,0xFF,0xFF,0xE9,0x50,0x45,0x9A,0xAA,0x02,0x52,
0x00,0x00,0x00,0x52,0x30,0xBA,0xFA,0xBA,0x04,0x05,0x00,0x00,0xC0,0x24,0x5E,0x7D, 0x91,0xAA,0x03,0x01,0x12,0x3B,0x3E,0x42,0x6A,0x51,0xB1,0x61,0x18,0x12,0x32,0x81,
0x50,0x7E,0xEF,0x00,0x04,0x9F,0x40,0x00,0x14,0xE0,0x50,0xC4,0x8F,0x00,0x00,0x08, 0x18,0xA1,0x02,0x52,0x92,0x52,0x52,0x91,0x52,0xA1,0x03,0x12,0x24,0xC1,0xA1,0x08,
0x00,0x50,0xC0,0x8F,0x00,0x00,0x80,0xE1,0x50,0xDA,0x8F,0xE0,0x00,0x00,0x00,0x8F, 0xA1,0x0C,0x52,0xC0,0xA1,0x10,0x52,0xD1,0x52,0xA1,0x14,0x12,0x14,0x9C,0x10,0xAA,
0x7F,0x00,0x00,0x00,0xDA,0x8F,0xF6,0x01,0x00,0x00,0x8F,0x71,0x00,0x00,0x00,0xDB, 0x04,0x58,0xD0,0xA1,0x08,0x59,0xC0,0xA1,0x0C,0x5A,0xD0,0xA1,0x10,0x55,0x31,0x26,
0x8F,0x7B,0x00,0x00,0x00,0x51,0xC8,0x8F,0xFE,0x00,0x00,0x00,0x51,0xDA,0x51,0x8F, 0xE8,0xE0,0x03,0xAB,0x30,0x03,0x31,0x96,0xFF,0xD0,0x02,0x55,0x17,0xEF,0x99,0x7E,
0x7B,0x00,0x00,0x00,0xD0,0x8F,0x00,0x00,0x00,0xC0,0x9F,0x20,0x00,0x14,0xE0,0xD0, 0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x8F,0x07,0xFF,0xFF,0xEF,0xA0,0x34,0xD0,0x8F,0x00,0xA0,0xFF,0x0B,0xA0,0x04,0xDA, 0x8F,0x07,0xFF,0xFF,0xEF,0xA0,0x34,0xD0,0x8F,0x00,0xA0,0xFF,0x0B,0xA0,0x04,0xDA,
0x00,0x26,0x7D,0x8E,0x50,0x17,0xBE,0x00,0xD0,0x8F,0x00,0x00,0x80,0xE1,0x54,0x9E, 0x00,0x26,0x7D,0x8E,0x50,0x17,0xBE,0x00,0xD0,0x8F,0x00,0x00,0x80,0xE1,0x54,0x9E,
0xAF,0x8A,0x51,0x30,0xCA,0xF8,0x05,0x00,0xDE,0x9F,0x00,0x00,0x80,0xE1,0x50,0xDE, 0xAF,0x8A,0x51,0x30,0xCA,0xF8,0x05,0x00,0xDE,0x9F,0x00,0x00,0x80,0xE1,0x50,0xDE,

Binary file not shown.

View file

@ -43,7 +43,7 @@ struct ROM_File_Descriptor {
{"VAX/ka620.bin", "VAX/vax_ka620_bin.h", 65536, 0xFF7F930F, "vax_ka620_bin"}, {"VAX/ka620.bin", "VAX/vax_ka620_bin.h", 65536, 0xFF7F930F, "vax_ka620_bin"},
{"VAX/ka630.bin", "VAX/vax_ka630_bin.h", 65536, 0xFF7F73EF, "vax_ka630_bin"}, {"VAX/ka630.bin", "VAX/vax_ka630_bin.h", 65536, 0xFF7F73EF, "vax_ka630_bin"},
{"VAX/ka610.bin", "VAX/vax_ka610_bin.h", 16384, 0xFFEF3312, "vax_ka610_bin"}, {"VAX/ka610.bin", "VAX/vax_ka610_bin.h", 16384, 0xFFEF3312, "vax_ka610_bin"},
{"VAX/vmb.exe", "VAX/vax_vmb_exe.h", 44544, 0xFFC014CC, "vax_vmb_exe"}, {"VAX/vmb.exe", "VAX/vax_vmb_exe.h", 44544, 0xFFC014BB, "vax_vmb_exe"},
{"swtp6800/swtp6800/swtbug.bin", "swtp6800/swtp6800/swtp_swtbug_bin.h", 1024, 0xFFFE4FBC, "swtp_swtbug_bin"}, {"swtp6800/swtp6800/swtbug.bin", "swtp6800/swtp6800/swtp_swtbug_bin.h", 1024, 0xFFFE4FBC, "swtp_swtbug_bin"},
}; };