Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/mopd Update mopd for 4k VAX page size and support 1...



details:   https://anonhg.NetBSD.org/src/rev/9ad40cf986ea
branches:  trunk
changeset: 945371:9ad40cf986ea
user:      abs <abs%NetBSD.org@localhost>
date:      Tue Oct 27 17:16:24 2020 +0000

description:
Update mopd for 4k VAX page size and support 1k page a.out binaries

>From dreamlayers

diffstat:

 usr.sbin/mopd/common/file.c     |  32 ++++++++++++++++++++++++++------
 usr.sbin/mopd/mopcopy/mopcopy.c |   9 ++++++---
 2 files changed, 32 insertions(+), 9 deletions(-)

diffs (126 lines):

diff -r 3f40a9a0a538 -r 9ad40cf986ea usr.sbin/mopd/common/file.c
--- a/usr.sbin/mopd/common/file.c       Tue Oct 27 17:09:09 2020 +0000
+++ b/usr.sbin/mopd/common/file.c       Tue Oct 27 17:16:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: file.c,v 1.16 2016/06/08 01:11:49 christos Exp $       */
+/*     $NetBSD: file.c,v 1.17 2020/10/27 17:16:24 abs Exp $    */
 
 /*
  * Copyright (c) 1995-96 Mats O Jansson.  All rights reserved.
@@ -26,7 +26,7 @@
 
 #include "port.h"
 #ifndef lint
-__RCSID("$NetBSD: file.c,v 1.16 2016/06/08 01:11:49 christos Exp $");
+__RCSID("$NetBSD: file.c,v 1.17 2020/10/27 17:16:24 abs Exp $");
 #endif
 
 #include "os.h"
@@ -46,7 +46,10 @@
 #  include <sys/imgact_aout.h>
 # endif
 # if !defined(MID_VAX)
-#  define MID_VAX 140
+#  define MID_VAX 150
+# endif
+# if !defined(MID_VAX1K)
+#  define MID_VAX1K 140
 # endif
 #endif /* NOAOUT */
 
@@ -328,6 +331,11 @@
                mid = MID_VAX;
                break;
 #endif
+#ifdef MID_VAX1K
+       case MID_VAX1K:
+               mid = MID_VAX1K;
+               break;
+#endif
 #ifdef MID_ALPHA
        case MID_ALPHA:
                mid = MID_ALPHA;
@@ -356,8 +364,8 @@
        int     clbytes;
 
        switch (mid) {
-#ifdef MID_VAX
-       case MID_VAX:
+#ifdef MID_VAX1K
+       case MID_VAX1K:
                clbytes = 1024;
                break;
 #endif
@@ -379,8 +387,12 @@
 #ifdef MID_ARM6
        case MID_ARM6:
 #endif
+#ifdef MID_VAX
+       case MID_VAX:
+#endif
 #if defined(MID_I386) || defined(MID_M68K4K) || defined(MID_NS32532) || \
-    defined(MID_PMAX) || defined(MID_MIPS) || defined(MID_ARM6)
+    defined(MID_PMAX) || defined(MID_MIPS) || defined(MID_ARM6) || \
+    defined(MID_VAX)
                clbytes = 4096;
                break;
 #endif
@@ -697,6 +709,9 @@
 #ifdef MID_VAX
        case MID_VAX:
 #endif
+#ifdef MID_VAX1K
+       case MID_VAX1K:
+#endif
 #ifdef MID_ALPHA
        case MID_ALPHA:
 #endif
@@ -766,6 +781,11 @@
                printf("vax");
                break;
 #endif
+#ifdef MID_VAX1K
+       case MID_VAX1K:
+               printf("vax 1k");
+               break;
+#endif
 #ifdef MID_ALPHA
        case MID_ALPHA:
                printf("alpha");
diff -r 3f40a9a0a538 -r 9ad40cf986ea usr.sbin/mopd/mopcopy/mopcopy.c
--- a/usr.sbin/mopd/mopcopy/mopcopy.c   Tue Oct 27 17:09:09 2020 +0000
+++ b/usr.sbin/mopd/mopcopy/mopcopy.c   Tue Oct 27 17:16:24 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mopcopy.c,v 1.7 2019/12/27 09:41:52 msaitoh Exp $      */
+/*     $NetBSD: mopcopy.c,v 1.8 2020/10/27 17:16:24 abs Exp $  */
 
 /* mopcopy - Convert a Unix format kernel into something that
  * can be transferred via MOP.
@@ -49,7 +49,7 @@
 
 #include "port.h"
 #ifndef lint
-__RCSID("$NetBSD: mopcopy.c,v 1.7 2019/12/27 09:41:52 msaitoh Exp $");
+__RCSID("$NetBSD: mopcopy.c,v 1.8 2020/10/27 17:16:24 abs Exp $");
 #endif
 
 #include "os.h"
@@ -69,6 +69,9 @@
 #define NOAOUT
 #endif
 #if !defined(MID_VAX)
+#define MID_VAX 150
+#endif
+#if !defined(MID_VAX1K)
 #define MID_VAX 140
 #endif
 
@@ -125,7 +128,7 @@
 
 #ifndef NOAOUT
        case IMAGE_TYPE_AOUT:
-               if (dl.a_mid != MID_VAX)
+               if (dl.a_mid != MID_VAX && dl.a_mid != MID_VAX1K)
                        printf("WARNING: `%s' is not a VAX image (mid=%d)\n",
                            argv[1], dl.a_mid);
                i = dl.a_text + dl.a_text_fill + dl.a_data + dl.a_data_fill +



Home | Main Index | Thread Index | Old Index