Kconfig: all outdated stuff removed.
This commit is contained in:
@@ -2,7 +2,7 @@ CC = gcc -g
|
||||
CFLAGS = -O -Wall
|
||||
YACC = byacc -d
|
||||
DESTDIR = /usr/local
|
||||
OBJS = config.o main.o lang.o mkioconf.o mkmakefile.o mkglue.o mkheaders.o \
|
||||
OBJS = config.o main.o lang.o mkioconf.o mkmakefile.o mkheaders.o \
|
||||
mkswapconf.o
|
||||
PROG = kconfig
|
||||
|
||||
|
||||
@@ -35,34 +35,22 @@
|
||||
.Dt CONFIG 8
|
||||
.Os BSD 4
|
||||
.Sh NAME
|
||||
.Nm config
|
||||
.Nm kconfig
|
||||
.Nd build system configuration files
|
||||
.Sh SYNOPSIS
|
||||
.Nm config
|
||||
.Nm kconfig
|
||||
.Op Fl p
|
||||
.Ar system_name
|
||||
.Sh DESCRIPTION
|
||||
.Pp
|
||||
This is the old version of the
|
||||
.Nm config
|
||||
program.
|
||||
It understands the old autoconfiguration scheme
|
||||
used on the HP300, DECstation, and derivative platforms.
|
||||
The new version of config is used with the
|
||||
SPARC and i386 platforms.
|
||||
Only the version of
|
||||
.Nm config
|
||||
applicable to the architecture that you are running
|
||||
will be installed on your machine.
|
||||
.Pp
|
||||
.Nm Config
|
||||
.Nm Kconfig
|
||||
builds a set of system configuration files from the file
|
||||
.Ar SYSTEM_NAME
|
||||
which describes
|
||||
the system to configure.
|
||||
A second file
|
||||
tells
|
||||
.Nm config
|
||||
.Nm kconfig
|
||||
what files are needed to generate a system and
|
||||
can be augmented by configuration specific set of files
|
||||
that give alternate files for a specific machine.
|
||||
@@ -76,8 +64,8 @@ Available option and operand:
|
||||
.It Fl p
|
||||
If the
|
||||
.Fl p
|
||||
option is supplied,
|
||||
.Nm config
|
||||
option is supplied,
|
||||
.Nm kconfig
|
||||
will configure a system for profiling; for example,
|
||||
.Xr kgmon 8
|
||||
and
|
||||
@@ -96,19 +84,15 @@ subdirectory of the system source (usually
|
||||
.Nm Config
|
||||
assumes the directory
|
||||
.Pa ../SYSTEM_NAME
|
||||
exists and places all output files there.
|
||||
exists and places all output files there.
|
||||
The output of
|
||||
.Nm config
|
||||
.Nm kconfig
|
||||
consists of a number of files; for the
|
||||
.Tn VAX ,
|
||||
they are:
|
||||
.Pa ioconf.c ,
|
||||
a description
|
||||
of what I/O devices are attached to the system;
|
||||
.Pa ubglue.s ,
|
||||
a set of interrupt service routines for devices
|
||||
attached to the
|
||||
.Tn UNIBUS ;
|
||||
.Pa ubvec.s ,
|
||||
offsets into a structure used for counting per-device interrupts;
|
||||
.Pa Makefile ,
|
||||
@@ -124,7 +108,7 @@ the disk areas to be used for swapping, the root file system,
|
||||
argument processing, and system dumps.
|
||||
.Pp
|
||||
After running
|
||||
.Nm config ,
|
||||
.Nm kconfig ,
|
||||
it is necessary to run
|
||||
.Dq Li make depend
|
||||
in the directory where the new makefile
|
||||
@@ -133,24 +117,24 @@ was created.
|
||||
prints a reminder of this when it completes.
|
||||
.Pp
|
||||
If any other error messages are produced by
|
||||
.Nm config ,
|
||||
.Nm kconfig ,
|
||||
the problems in the configuration file should be corrected and
|
||||
.Nm config
|
||||
.Nm kconfig
|
||||
should be run again.
|
||||
Attempts to compile a system that had configuration errors
|
||||
are likely to fail.
|
||||
.Sh FILES
|
||||
.Bl -tag -width /sys/conf/Makefile.vax -compact
|
||||
.It Pa /sys/conf/Makefile.vax
|
||||
.Bl -tag -width /sys/conf/Makefile.pic32 -compact
|
||||
.It Pa /sys/conf/Makefile.pic32
|
||||
generic makefile for the
|
||||
.Tn VAX
|
||||
.It Pa /sys/conf/files
|
||||
list of common files system is built from
|
||||
.It Pa /sys/conf/files.vax
|
||||
.It Pa /sys/conf/files.pic32
|
||||
list of
|
||||
.Tn VAX
|
||||
specific files
|
||||
.It Pa /sys/conf/devices.vax
|
||||
.It Pa /sys/conf/devices.pic32
|
||||
name to major device mapping file for the
|
||||
.Tn VAX
|
||||
.It Pa /sys/conf/files. Ns Em ERNIE
|
||||
@@ -161,10 +145,8 @@ system
|
||||
.Sh SEE ALSO
|
||||
The SYNOPSIS portion of each device in section 4.
|
||||
.Rs
|
||||
.%T "Building 4.3 BSD UNIX System with Config"
|
||||
.%T "Building RetroBSD Kernel with kconfig"
|
||||
.Re
|
||||
.sp
|
||||
.Xr config.new 8
|
||||
.Sh BUGS
|
||||
The line numbers reported in error messages are usually off by one.
|
||||
.Sh HISTORY
|
||||
|
||||
@@ -123,8 +123,6 @@ struct device {
|
||||
int d_irq; /* interrupt request */
|
||||
struct device *d_next; /* Next one in list */
|
||||
};
|
||||
#define TO_NEXUS (struct device *)-1
|
||||
#define TO_VBA (struct device *)-2
|
||||
|
||||
struct config {
|
||||
char *c_dev;
|
||||
@@ -133,22 +131,11 @@ struct config {
|
||||
|
||||
/*
|
||||
* Config has a global notion of which machine type is
|
||||
* being used. It uses the name of the machine in choosing
|
||||
* files and directories. Thus if the name of the machine is ``vax'',
|
||||
* it will build from ``Makefile.vax'' and use ``../vax/inline''
|
||||
* in the makerules, etc.
|
||||
* being used.
|
||||
*/
|
||||
int machine;
|
||||
char *machinename;
|
||||
#define MACHINE_VAX 1
|
||||
#define MACHINE_TAHOE 2
|
||||
#define MACHINE_HP300 3
|
||||
#define MACHINE_I386 4
|
||||
#define MACHINE_MIPS 5
|
||||
#define MACHINE_PMAX 6
|
||||
#define MACHINE_LUNA68K 7
|
||||
#define MACHINE_NEWS3400 8
|
||||
#define MACHINE_PIC32 9
|
||||
#define MACHINE_PIC32 1
|
||||
|
||||
/*
|
||||
* For each machine, a set of CPU's may be specified as supported.
|
||||
@@ -182,15 +169,6 @@ char *raise();
|
||||
|
||||
int do_trace;
|
||||
|
||||
#if MACHINE_VAX
|
||||
int seen_mba, seen_uba;
|
||||
#endif
|
||||
#if MACHINE_TAHOE
|
||||
int seen_vba;
|
||||
#endif
|
||||
#if MACHINE_I386
|
||||
int seen_isa;
|
||||
#endif
|
||||
int seen_cd;
|
||||
|
||||
struct device *connect();
|
||||
@@ -215,17 +193,7 @@ int maxusers;
|
||||
|
||||
void init_dev(register struct device *dp);
|
||||
int yyparse(void);
|
||||
void vax_ioconf(void);
|
||||
void tahoe_ioconf(void);
|
||||
void hp300_ioconf(void);
|
||||
void i386_ioconf(void);
|
||||
void pmax_ioconf(void);
|
||||
void pic32_ioconf(void);
|
||||
void news_ioconf(void);
|
||||
void ubglue(void);
|
||||
void vbglue(void);
|
||||
void hpglue(void);
|
||||
void vector(void);
|
||||
void makefile(void);
|
||||
void headers(void);
|
||||
void swapconf(void);
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
|
||||
%token AND
|
||||
%token ANY
|
||||
%token ARGS
|
||||
%token AT
|
||||
%token BIO
|
||||
%token COMMA
|
||||
%token CONFIG
|
||||
%token CONTROLLER
|
||||
@@ -18,7 +16,6 @@
|
||||
%token DEVICE
|
||||
%token DISK
|
||||
%token DRIVE
|
||||
%token DRQ
|
||||
%token DST
|
||||
%token DUMPS
|
||||
%token EQUALS
|
||||
@@ -26,9 +23,6 @@
|
||||
%token HZ
|
||||
%token IDENT
|
||||
%token INTERLEAVE
|
||||
%token IOMEM
|
||||
%token IOSIZ
|
||||
%token IRQ
|
||||
%token LDSCRIPT
|
||||
%token MACHINE
|
||||
%token MAJOR
|
||||
@@ -36,12 +30,9 @@
|
||||
%token MAXUSERS
|
||||
%token MINOR
|
||||
%token MINUS
|
||||
%token NET
|
||||
%token NEXUS
|
||||
%token ON
|
||||
%token OPTIONS
|
||||
%token MAKEOPTIONS
|
||||
%token PORT
|
||||
%token PRIORITY
|
||||
%token PSEUDO_DEVICE
|
||||
%token ROOT
|
||||
@@ -51,7 +42,6 @@
|
||||
%token SLAVE
|
||||
%token SWAP
|
||||
%token TIMEZONE
|
||||
%token TTY
|
||||
%token TRACE
|
||||
%token VECTOR
|
||||
|
||||
@@ -154,33 +144,9 @@ Spec:
|
||||
Config_spec:
|
||||
MACHINE Save_id
|
||||
= {
|
||||
if (!strcmp($2, "vax")) {
|
||||
machine = MACHINE_VAX;
|
||||
machinename = "vax";
|
||||
} else if (!strcmp($2, "tahoe")) {
|
||||
machine = MACHINE_TAHOE;
|
||||
machinename = "tahoe";
|
||||
} else if (!strcmp($2, "hp300")) {
|
||||
machine = MACHINE_HP300;
|
||||
machinename = "hp300";
|
||||
} else if (!strcmp($2, "i386")) {
|
||||
machine = MACHINE_I386;
|
||||
machinename = "i386";
|
||||
} else if (!strcmp($2, "mips")) {
|
||||
machine = MACHINE_MIPS;
|
||||
machinename = "mips";
|
||||
} else if (!strcmp($2, "pmax")) {
|
||||
machine = MACHINE_PMAX;
|
||||
machinename = "pmax";
|
||||
} else if (!strcmp($2, "pic32")) {
|
||||
if (strcmp($2, "pic32") == 0) {
|
||||
machine = MACHINE_PIC32;
|
||||
machinename = "pic32";
|
||||
} else if (!strcmp($2, "luna68k")) {
|
||||
machine = MACHINE_LUNA68K;
|
||||
machinename = "luna68k";
|
||||
} else if (!strcmp($2, "news3400")) {
|
||||
machine = MACHINE_NEWS3400;
|
||||
machinename = "news3400";
|
||||
} else
|
||||
yyerror("Unknown machine type");
|
||||
}
|
||||
@@ -272,12 +238,10 @@ System_parameter:
|
||||
root_spec
|
||||
|
|
||||
dump_spec
|
||||
|
|
||||
arg_spec
|
||||
;
|
||||
|
||||
swap_spec:
|
||||
SWAP optional_on swap_device_list
|
||||
SWAP optional_on swap_device_list
|
||||
;
|
||||
|
||||
swap_device_list:
|
||||
@@ -353,11 +317,6 @@ dump_device_spec:
|
||||
major_minor
|
||||
;
|
||||
|
||||
arg_spec:
|
||||
ARGS optional_on arg_device_spec
|
||||
= { yyerror("arg device specification obsolete, ignored"); }
|
||||
;
|
||||
|
||||
arg_device_spec:
|
||||
device_name
|
||||
= { $$ = nametodev($1, 0, 'b'); }
|
||||
@@ -576,14 +535,6 @@ Dev_name:
|
||||
Init_dev Dev NUMBER
|
||||
= {
|
||||
cur.d_name = $2;
|
||||
if (eq($2, "mba"))
|
||||
seen_mba = 1;
|
||||
else if (eq($2, "uba"))
|
||||
seen_uba = 1;
|
||||
else if (eq($2, "vba"))
|
||||
seen_vba = 1;
|
||||
else if (eq($2, "isa"))
|
||||
seen_isa = 1;
|
||||
cur.d_unit = $3;
|
||||
}
|
||||
;
|
||||
@@ -611,9 +562,6 @@ Con_info:
|
||||
}
|
||||
cur.d_conn = connect($2, $3);
|
||||
}
|
||||
|
|
||||
AT NEXUS NUMBER
|
||||
= { check_nexus(&cur, $3); cur.d_conn = TO_NEXUS; }
|
||||
;
|
||||
|
||||
Info_list:
|
||||
@@ -631,40 +579,13 @@ Info:
|
||||
|
|
||||
SLAVE NUMBER
|
||||
= {
|
||||
if (cur.d_conn != 0 && cur.d_conn != TO_NEXUS &&
|
||||
if (cur.d_conn != 0 &&
|
||||
cur.d_conn->d_type == MASTER)
|
||||
cur.d_slave = $2;
|
||||
else
|
||||
yyerror("can't specify slave--not to master");
|
||||
}
|
||||
|
|
||||
IRQ NUMBER
|
||||
= { cur.d_irq = $2; }
|
||||
|
|
||||
DRQ NUMBER
|
||||
= { cur.d_drq = $2; }
|
||||
|
|
||||
IOMEM NUMBER
|
||||
= { cur.d_maddr = $2; }
|
||||
|
|
||||
IOSIZ NUMBER
|
||||
= { cur.d_msize = $2; }
|
||||
|
|
||||
PORT device_name
|
||||
= { cur.d_port = ns($2); }
|
||||
|
|
||||
PORT NUMBER
|
||||
= { cur.d_portn = $2; }
|
||||
|
|
||||
TTY
|
||||
= { cur.d_mask = "tty"; }
|
||||
|
|
||||
BIO
|
||||
= { cur.d_mask = "bio"; }
|
||||
|
|
||||
NET
|
||||
= { cur.d_mask = "net"; }
|
||||
|
|
||||
FLAGS NUMBER
|
||||
= { cur.d_flags = $2; }
|
||||
;
|
||||
@@ -927,12 +848,12 @@ huhcon(dev)
|
||||
* Connect it to the same thing that other similar things are
|
||||
* connected to, but make sure it is a wildcard unit
|
||||
* (e.g. up connected to sc ?, here we make connect sc? to a
|
||||
* uba?). If other things like this are on the NEXUS or
|
||||
* if they aren't connected to anything, then make the same
|
||||
* uba?). If other things like this
|
||||
* aren't connected to anything, then make the same
|
||||
* connection, else call ourself to connect to another
|
||||
* unspecific device.
|
||||
*/
|
||||
if (dcp == TO_NEXUS || dcp == 0)
|
||||
if (dcp == 0)
|
||||
dp->d_conn = dcp;
|
||||
else
|
||||
dp->d_conn = connect(dcp->d_name, QUES);
|
||||
@@ -968,34 +889,7 @@ void check_nexus(dev, num)
|
||||
{
|
||||
switch (machine) {
|
||||
|
||||
case MACHINE_VAX:
|
||||
if (!eq(dev->d_name, "uba") && !eq(dev->d_name, "mba") &&
|
||||
!eq(dev->d_name, "bi"))
|
||||
yyerror("only uba's, mba's, and bi's should be connected to the nexus");
|
||||
if (num != QUES)
|
||||
yyerror("can't give specific nexus numbers");
|
||||
break;
|
||||
|
||||
case MACHINE_TAHOE:
|
||||
if (!eq(dev->d_name, "vba"))
|
||||
yyerror("only vba's should be connected to the nexus");
|
||||
break;
|
||||
|
||||
case MACHINE_HP300:
|
||||
case MACHINE_LUNA68K:
|
||||
if (num != QUES)
|
||||
dev->d_addr = num;
|
||||
break;
|
||||
|
||||
case MACHINE_I386:
|
||||
if (!eq(dev->d_name, "isa"))
|
||||
yyerror("only isa's should be connected to the nexus");
|
||||
break;
|
||||
|
||||
case MACHINE_NEWS3400:
|
||||
if (!eq(dev->d_name, "iop") && !eq(dev->d_name, "hb") &&
|
||||
!eq(dev->d_name, "vme"))
|
||||
yyerror("only iop's, hb's and vme's should be connected to the nexus");
|
||||
case MACHINE_PIC32:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,11 +52,7 @@ struct kt {
|
||||
int kt_val;
|
||||
} key_words[] = {
|
||||
{ "and", AND },
|
||||
{ "args", ARGS },
|
||||
{ "at", AT },
|
||||
#if MACHINE_I386
|
||||
{ "bio", BIO },
|
||||
#endif
|
||||
{ "config", CONFIG },
|
||||
{ "controller", CONTROLLER },
|
||||
{ "cpu", CPU },
|
||||
@@ -64,20 +60,12 @@ struct kt {
|
||||
{ "device", DEVICE },
|
||||
{ "disk", DISK },
|
||||
{ "drive", DRIVE },
|
||||
#if MACHINE_I386
|
||||
{ "drq", DRQ },
|
||||
#endif
|
||||
{ "dst", DST },
|
||||
{ "dumps", DUMPS },
|
||||
{ "flags", FLAGS },
|
||||
{ "hz", HZ },
|
||||
{ "ident", IDENT },
|
||||
{ "interleave", INTERLEAVE },
|
||||
#if MACHINE_I386
|
||||
{ "iomem", IOMEM },
|
||||
{ "iosiz", IOSIZ },
|
||||
{ "irq", IRQ },
|
||||
#endif
|
||||
{ "ldscript", LDSCRIPT },
|
||||
{ "machine", MACHINE },
|
||||
{ "major", MAJOR },
|
||||
@@ -85,29 +73,16 @@ struct kt {
|
||||
{ "master", MASTER },
|
||||
{ "maxusers", MAXUSERS },
|
||||
{ "minor", MINOR },
|
||||
#if MACHINE_I386
|
||||
{ "net", NET },
|
||||
#endif
|
||||
{ "nexus", NEXUS },
|
||||
{ "on", ON },
|
||||
{ "options", OPTIONS },
|
||||
#if MACHINE_I386
|
||||
{ "port", PORT },
|
||||
#endif
|
||||
{ "priority", PRIORITY },
|
||||
{ "pseudo-device", PSEUDO_DEVICE },
|
||||
{ "root", ROOT },
|
||||
#if MACHINE_HP300 || MACHINE_LUNA68K
|
||||
{ "scode", NEXUS },
|
||||
#endif
|
||||
{ "sequential", SEQUENTIAL },
|
||||
{ "size", SIZE },
|
||||
{ "slave", SLAVE },
|
||||
{ "swap", SWAP },
|
||||
{ "tape", DEVICE },
|
||||
#if MACHINE_I386
|
||||
{ "tty", TTY },
|
||||
#endif
|
||||
{ "timezone", TIMEZONE },
|
||||
{ "trace", TRACE },
|
||||
{ "vector", VECTOR },
|
||||
|
||||
@@ -97,44 +97,15 @@ usage: fputs("usage: config [-gp] sysname\n", stderr);
|
||||
compp = &comp_list;
|
||||
if (yyparse())
|
||||
exit(3);
|
||||
|
||||
switch (machine) {
|
||||
|
||||
case MACHINE_VAX:
|
||||
vax_ioconf(); /* Print ioconf.c */
|
||||
ubglue(); /* Create ubglue.s */
|
||||
break;
|
||||
|
||||
case MACHINE_TAHOE:
|
||||
tahoe_ioconf();
|
||||
vbglue();
|
||||
break;
|
||||
|
||||
case MACHINE_HP300:
|
||||
case MACHINE_LUNA68K:
|
||||
hp300_ioconf();
|
||||
hpglue();
|
||||
break;
|
||||
|
||||
case MACHINE_I386:
|
||||
i386_ioconf(); /* Print ioconf.c */
|
||||
vector(); /* Create vector.s */
|
||||
break;
|
||||
|
||||
case MACHINE_MIPS:
|
||||
case MACHINE_PMAX:
|
||||
pmax_ioconf();
|
||||
break;
|
||||
|
||||
case MACHINE_PIC32:
|
||||
pic32_ioconf();
|
||||
break;
|
||||
|
||||
case MACHINE_NEWS3400:
|
||||
news_ioconf();
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("Specify machine type, e.g. ``machine vax''\n");
|
||||
printf("Specify machine type, e.g. ``machine pic32''\n");
|
||||
exit(1);
|
||||
}
|
||||
makefile(); /* build Makefile */
|
||||
|
||||
@@ -1,402 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Make the bus adaptor interrupt glue files.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include "y.tab.h"
|
||||
#include <ctype.h>
|
||||
|
||||
static int cntcnt = 0; /* number of interrupt counters allocated */
|
||||
|
||||
/*
|
||||
* Print a UNIBUS interrupt vector.
|
||||
*/
|
||||
void dump_ubavec(fp, vector, number)
|
||||
register FILE *fp;
|
||||
char *vector;
|
||||
int number;
|
||||
{
|
||||
char nbuf[80];
|
||||
register char *v = nbuf;
|
||||
|
||||
(void) sprintf(v, "%s%d", vector, number);
|
||||
fprintf(fp, "\t.globl\t_X%s\n\t.align\t2\n_X%s:\n\tpushr\t$0x3f\n",
|
||||
v, v);
|
||||
fprintf(fp, "\tincl\t_fltintrcnt+(4*%d)\n", cntcnt++);
|
||||
if (strncmp(vector, "dzx", 3) == 0)
|
||||
fprintf(fp, "\tmovl\t$%d,r0\n\tjmp\tdzdma\n\n", number);
|
||||
else if (strncmp(vector, "dpx", 3) == 0)
|
||||
fprintf(fp, "\tmovl\t$%d,r0\n\tjmp\tdpxdma\n\n", number);
|
||||
else if (strncmp(vector, "dpr", 3) == 0)
|
||||
fprintf(fp, "\tmovl\t$%d,r0\n\tjmp\tdprdma\n\n", number);
|
||||
else {
|
||||
if (strncmp(vector, "uur", 3) == 0) {
|
||||
fprintf(fp, "#ifdef UUDMA\n");
|
||||
fprintf(fp, "\tmovl\t$%d,r0\n\tjsb\tuudma\n", number);
|
||||
fprintf(fp, "#endif\n");
|
||||
}
|
||||
fprintf(fp, "\tpushl\t$%d\n", number);
|
||||
fprintf(fp, "\tcalls\t$1,_%s\n\tpopr\t$0x3f\n", vector);
|
||||
fprintf(fp, "\tincl\t_cnt+V_INTR\n\trei\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
static char *vaxinames[] = {
|
||||
"clock", "cnr", "cnx", "tur", "tux",
|
||||
"mba0", "mba1", "mba2", "mba3",
|
||||
"uba0", "uba1", "uba2", "uba3"
|
||||
};
|
||||
|
||||
static char *tahoeinames[] = {
|
||||
"clock", "cnr", "cnx", "rmtr", "rmtx", "buserr",
|
||||
};
|
||||
|
||||
static struct stdintrs {
|
||||
char **si_names; /* list of standard interrupt names */
|
||||
int si_n; /* number of such names */
|
||||
} stdintrs[] = {
|
||||
{ vaxinames, sizeof (vaxinames) / sizeof (vaxinames[0]) },
|
||||
{ tahoeinames, (sizeof (tahoeinames) / sizeof (tahoeinames[0])) }
|
||||
};
|
||||
|
||||
/*
|
||||
* Start the interrupt name table with the names
|
||||
* of the standard vectors not directly associated
|
||||
* with a bus. Also, dump the defines needed to
|
||||
* reference the associated counters into a separate
|
||||
* file which is prepended to locore.s.
|
||||
*/
|
||||
void dump_std(fp, gp)
|
||||
register FILE *fp, *gp;
|
||||
{
|
||||
register struct stdintrs *si = &stdintrs[machine-1];
|
||||
register char **cpp;
|
||||
register int i;
|
||||
|
||||
fprintf(fp, "\n\t.globl\t_intrnames\n");
|
||||
fprintf(fp, "\n\t.globl\t_eintrnames\n");
|
||||
fprintf(fp, "\t.data\n");
|
||||
fprintf(fp, "_intrnames:\n");
|
||||
cpp = si->si_names;
|
||||
for (i = 0; i < si->si_n; i++) {
|
||||
register char *cp, *tp;
|
||||
char buf[80];
|
||||
|
||||
cp = *cpp;
|
||||
if (cp[0] == 'i' && cp[1] == 'n' && cp[2] == 't') {
|
||||
cp += 3;
|
||||
if (*cp == 'r')
|
||||
cp++;
|
||||
}
|
||||
for (tp = buf; *cp; cp++)
|
||||
if (islower(*cp))
|
||||
*tp++ = toupper(*cp);
|
||||
else
|
||||
*tp++ = *cp;
|
||||
*tp = '\0';
|
||||
fprintf(gp, "#define\tI_%s\t%d\n", buf, i * (int)sizeof (long));
|
||||
fprintf(fp, "\t.asciz\t\"%s\"\n", *cpp);
|
||||
cpp++;
|
||||
}
|
||||
}
|
||||
|
||||
void dump_intname(fp, vector, number)
|
||||
register FILE *fp;
|
||||
char *vector;
|
||||
int number;
|
||||
{
|
||||
register char *cp = vector;
|
||||
|
||||
fprintf(fp, "\t.asciz\t\"");
|
||||
/*
|
||||
* Skip any "int" or "intr" in the name.
|
||||
*/
|
||||
while (*cp)
|
||||
if (cp[0] == 'i' && cp[1] == 'n' && cp[2] == 't') {
|
||||
cp += 3;
|
||||
if (*cp == 'r')
|
||||
cp++;
|
||||
} else {
|
||||
putc(*cp, fp);
|
||||
cp++;
|
||||
}
|
||||
fprintf(fp, "%d\"\n", number);
|
||||
}
|
||||
|
||||
/*
|
||||
* Reserve space for the interrupt counters.
|
||||
*/
|
||||
void dump_ctrs(fp)
|
||||
register FILE *fp;
|
||||
{
|
||||
struct stdintrs *si = &stdintrs[machine-1];
|
||||
|
||||
fprintf(fp, "_eintrnames:\n");
|
||||
fprintf(fp, "\n\t.globl\t_intrcnt\n");
|
||||
fprintf(fp, "\n\t.globl\t_eintrcnt\n");
|
||||
fprintf(fp, "\t.align 2\n");
|
||||
fprintf(fp, "_intrcnt:\n");
|
||||
fprintf(fp, "\t.space\t4 * %d\n", si->si_n);
|
||||
fprintf(fp, "_fltintrcnt:\n");
|
||||
fprintf(fp, "\t.space\t4 * %d\n", cntcnt);
|
||||
fprintf(fp, "_eintrcnt:\n\n");
|
||||
fprintf(fp, "\t.text\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Create the UNIBUS interrupt vector glue file.
|
||||
*/
|
||||
void ubglue()
|
||||
{
|
||||
register FILE *fp, *gp;
|
||||
register struct device *dp, *mp;
|
||||
|
||||
fp = fopen(path("ubglue.s"), "w");
|
||||
if (fp == 0) {
|
||||
perror(path("ubglue.s"));
|
||||
exit(1);
|
||||
}
|
||||
gp = fopen(path("ubvec.s"), "w");
|
||||
if (gp == 0) {
|
||||
perror(path("ubvec.s"));
|
||||
exit(1);
|
||||
}
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
mp = dp->d_conn;
|
||||
if (mp != 0 && mp != (struct device *)-1 &&
|
||||
!eq(mp->d_name, "mba")) {
|
||||
struct idlst *id, *id2;
|
||||
|
||||
for (id = dp->d_vec; id; id = id->id_next) {
|
||||
for (id2 = dp->d_vec; id2; id2 = id2->id_next) {
|
||||
if (id2 == id) {
|
||||
dump_ubavec(fp, id->id,
|
||||
dp->d_unit);
|
||||
break;
|
||||
}
|
||||
if (!strcmp(id->id, id2->id))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dump_std(fp, gp);
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
mp = dp->d_conn;
|
||||
if (mp != 0 && mp != (struct device *)-1 &&
|
||||
!eq(mp->d_name, "mba")) {
|
||||
struct idlst *id, *id2;
|
||||
|
||||
for (id = dp->d_vec; id; id = id->id_next) {
|
||||
for (id2 = dp->d_vec; id2; id2 = id2->id_next) {
|
||||
if (id2 == id) {
|
||||
dump_intname(fp, id->id,
|
||||
dp->d_unit);
|
||||
break;
|
||||
}
|
||||
if (!strcmp(id->id, id2->id))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dump_ctrs(fp);
|
||||
(void) fclose(fp);
|
||||
(void) fclose(gp);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print a VERSAbus interrupt vector
|
||||
*/
|
||||
void dump_vbavec(fp, vector, number)
|
||||
register FILE *fp;
|
||||
char *vector;
|
||||
int number;
|
||||
{
|
||||
char nbuf[80];
|
||||
register char *v = nbuf;
|
||||
|
||||
(void) sprintf(v, "%s%d", vector, number);
|
||||
fprintf(fp, "SCBVEC(%s):\n", v);
|
||||
fprintf(fp, "\tCHECK_SFE(4)\n");
|
||||
fprintf(fp, "\tSAVE_FPSTAT(4)\n");
|
||||
fprintf(fp, "\tPUSHR\n");
|
||||
fprintf(fp, "\tincl\t_fltintrcnt+(4*%d)\n", cntcnt++);
|
||||
fprintf(fp, "\tpushl\t$%d\n", number);
|
||||
fprintf(fp, "\tcallf\t$8,_%s\n", vector);
|
||||
fprintf(fp, "\tincl\t_cnt+V_INTR\n");
|
||||
fprintf(fp, "\tPOPR\n");
|
||||
fprintf(fp, "\tREST_FPSTAT\n");
|
||||
fprintf(fp, "\trei\n\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Create the VERSAbus interrupt vector glue file.
|
||||
*/
|
||||
void vbglue()
|
||||
{
|
||||
register FILE *fp, *gp;
|
||||
register struct device *dp, *mp;
|
||||
|
||||
fp = fopen(path("vbglue.s"), "w");
|
||||
if (fp == 0) {
|
||||
perror(path("vbglue.s"));
|
||||
exit(1);
|
||||
}
|
||||
gp = fopen(path("vbvec.s"), "w");
|
||||
if (gp == 0) {
|
||||
perror(path("vbvec.s"));
|
||||
exit(1);
|
||||
}
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
struct idlst *id, *id2;
|
||||
|
||||
mp = dp->d_conn;
|
||||
if (mp == 0 || mp == (struct device *)-1 ||
|
||||
eq(mp->d_name, "mba"))
|
||||
continue;
|
||||
for (id = dp->d_vec; id; id = id->id_next)
|
||||
for (id2 = dp->d_vec; id2; id2 = id2->id_next) {
|
||||
if (id == id2) {
|
||||
dump_vbavec(fp, id->id, dp->d_unit);
|
||||
break;
|
||||
}
|
||||
if (eq(id->id, id2->id))
|
||||
break;
|
||||
}
|
||||
}
|
||||
dump_std(fp, gp);
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
mp = dp->d_conn;
|
||||
if (mp != 0 && mp != (struct device *)-1 &&
|
||||
!eq(mp->d_name, "mba")) {
|
||||
struct idlst *id, *id2;
|
||||
|
||||
for (id = dp->d_vec; id; id = id->id_next) {
|
||||
for (id2 = dp->d_vec; id2; id2 = id2->id_next) {
|
||||
if (id2 == id) {
|
||||
dump_intname(fp, id->id,
|
||||
dp->d_unit);
|
||||
break;
|
||||
}
|
||||
if (eq(id->id, id2->id))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dump_ctrs(fp);
|
||||
(void) fclose(fp);
|
||||
(void) fclose(gp);
|
||||
}
|
||||
|
||||
/*
|
||||
* HP9000/300 interrupts are auto-vectored.
|
||||
* Code is hardwired in locore.s
|
||||
*/
|
||||
void hpglue()
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Create the ISA interrupt vector glue file.
|
||||
*/
|
||||
void vector()
|
||||
{
|
||||
register FILE *fp;
|
||||
register struct device *dp, *mp;
|
||||
int count;
|
||||
|
||||
fp = fopen(path("vector.s"), "w");
|
||||
if (fp == 0) {
|
||||
perror(path("vector.s"));
|
||||
exit(1);
|
||||
}
|
||||
fprintf(fp,"\
|
||||
/*\n\
|
||||
* AT/386\n\
|
||||
* Interrupt vector routines\n\
|
||||
* Generated by config program\n\
|
||||
*/ \n\
|
||||
\n\
|
||||
#include \"i386/isa/isa.h\"\n\
|
||||
#include \"i386/isa/icu.h\"\n\
|
||||
\n\
|
||||
#define VEC(name) .align 4; .globl _V/**/name; _V/**/name:\n\n");
|
||||
|
||||
fprintf(fp,"\
|
||||
.globl _hardclock\n\
|
||||
VEC(clk)\n\
|
||||
INTR1(0, _highmask, 0)\n\
|
||||
call _hardclock \n\
|
||||
INTREXIT1\n\n\n");
|
||||
|
||||
count=0;
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
mp = dp->d_conn;
|
||||
if (mp != 0 && /* mp != (struct device *)-1 &&*/
|
||||
eq(mp->d_name, "isa")) {
|
||||
struct idlst *id, *id2;
|
||||
|
||||
for (id = dp->d_vec; id; id = id->id_next) {
|
||||
for (id2 = dp->d_vec; id2; id2 = id2->id_next) {
|
||||
if (id2 == id) {
|
||||
if(dp->d_irq == -1) continue;
|
||||
fprintf(fp,"\t.globl _%s, _%s%dmask\n\t.data\n",
|
||||
id->id, dp->d_name, dp->d_unit);
|
||||
fprintf(fp,"_%s%dmask:\t.long 0\n\t.text\n",
|
||||
dp->d_name, dp->d_unit);
|
||||
fprintf(fp,"VEC(%s%d)\n\tINTR%d(%d, ",
|
||||
dp->d_name, dp->d_unit,
|
||||
dp->d_irq / 8 + 1, dp->d_unit);
|
||||
if(eq(dp->d_mask,"null"))
|
||||
fprintf(fp,"_%s%dmask, ",
|
||||
dp->d_name, dp->d_unit);
|
||||
else
|
||||
fprintf(fp,"_%smask, ",
|
||||
dp->d_mask);
|
||||
fprintf(fp,"%d)\n\tcall\t_%s\n\tINTREXIT%d\n\n\n",
|
||||
++count, id->id, (dp->d_irq > 7)?2:1);
|
||||
break;
|
||||
}
|
||||
if (!strcmp(id->id, id2->id))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
(void) fclose(fp);
|
||||
}
|
||||
@@ -152,8 +152,7 @@ void do_count(dev, hname, search)
|
||||
hicount = dp->d_unit + 1;
|
||||
if (search) {
|
||||
mp = dp->d_conn;
|
||||
if (mp != 0 && mp != TO_NEXUS &&
|
||||
mp->d_conn != 0 && mp->d_conn != TO_NEXUS) {
|
||||
if (mp != 0 && mp->d_conn != 0) {
|
||||
do_count(mp->d_name, hname, 0);
|
||||
search = 0;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -115,14 +115,6 @@ static struct users {
|
||||
int u_min;
|
||||
int u_max;
|
||||
} users[] = {
|
||||
{ 24, 8, 1024 }, /* MACHINE_VAX */
|
||||
{ 4, 2, 128 }, /* MACHINE_TAHOE */
|
||||
{ 8, 2, 64 }, /* MACHINE_HP300 */
|
||||
{ 8, 2, 64 }, /* MACHINE_I386 */
|
||||
{ 8, 2, 64 }, /* MACHINE_MIPS */
|
||||
{ 8, 2, 64 }, /* MACHINE_PMAX */
|
||||
{ 8, 2, 64 }, /* MACHINE_LUNA68K */
|
||||
{ 8, 2, 64 }, /* MACHINE_NEWS3400 */
|
||||
{ 2, 1, 16 }, /* MACHINE_PIC32 */
|
||||
};
|
||||
#define NUSERS (sizeof (users) / sizeof (users[0]))
|
||||
@@ -395,9 +387,6 @@ void do_cfiles(fp)
|
||||
/*
|
||||
* Create the makerules for each file
|
||||
* which is part of the system.
|
||||
* Devices are processed with the special c2 option -i
|
||||
* which avoids any problem areas with i/o addressing
|
||||
* (e.g. for the VAX); assembler files are processed by as.
|
||||
*/
|
||||
void do_rules(f)
|
||||
FILE *f;
|
||||
@@ -516,8 +505,8 @@ void makefile()
|
||||
if (hadtz == 0)
|
||||
printf("timezone not specified; gmt assumed\n");
|
||||
if ((unsigned)machine > NUSERS) {
|
||||
printf("maxusers config info isn't present, using vax\n");
|
||||
up = &users[MACHINE_VAX-1];
|
||||
printf("maxusers config info isn't present, using pic32\n");
|
||||
up = &users[MACHINE_PIC32-1];
|
||||
} else
|
||||
up = &users[machine-1];
|
||||
if (maxusers == 0) {
|
||||
|
||||
@@ -1,192 +0,0 @@
|
||||
/*-
|
||||
* Copyright (c) 1980, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Make the uba interrupt file ubglue.s
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include "y.tab.h"
|
||||
|
||||
ubglue()
|
||||
{
|
||||
register FILE *fp;
|
||||
register struct device *dp, *mp;
|
||||
|
||||
fp = fopen(path("ubglue.s"), "w");
|
||||
if (fp == 0) {
|
||||
perror(path("ubglue.s"));
|
||||
exit(1);
|
||||
}
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
mp = dp->d_conn;
|
||||
if (mp != 0 && mp != (struct device *)-1 &&
|
||||
!eq(mp->d_name, "mba")) {
|
||||
struct idlst *id, *id2;
|
||||
|
||||
for (id = dp->d_vec; id; id = id->id_next) {
|
||||
for (id2 = dp->d_vec; id2; id2 = id2->id_next) {
|
||||
if (id2 == id) {
|
||||
dump_vec(fp, id->id, dp->d_unit);
|
||||
break;
|
||||
}
|
||||
if (!strcmp(id->id, id2->id))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dump_std(fp);
|
||||
for (dp = dtab; dp != 0; dp = dp->d_next) {
|
||||
mp = dp->d_conn;
|
||||
if (mp != 0 && mp != (struct device *)-1 &&
|
||||
!eq(mp->d_name, "mba")) {
|
||||
struct idlst *id, *id2;
|
||||
|
||||
for (id = dp->d_vec; id; id = id->id_next) {
|
||||
for (id2 = dp->d_vec; id2; id2 = id2->id_next) {
|
||||
if (id2 == id) {
|
||||
dump_intname(fp, id->id,
|
||||
dp->d_unit);
|
||||
break;
|
||||
}
|
||||
if (!strcmp(id->id, id2->id))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
dump_ctrs(fp);
|
||||
(void) fclose(fp);
|
||||
}
|
||||
|
||||
static int cntcnt = 0; /* number of interrupt counters allocated */
|
||||
|
||||
/*
|
||||
* print an interrupt vector
|
||||
*/
|
||||
dump_vec(fp, vector, number)
|
||||
register FILE *fp;
|
||||
char *vector;
|
||||
int number;
|
||||
{
|
||||
char nbuf[80];
|
||||
register char *v = nbuf;
|
||||
|
||||
(void) sprintf(v, "%s%d", vector, number);
|
||||
fprintf(fp, "\t.globl\t_X%s\n\t.align\t2\n_X%s:\n\tpushr\t$0x3f\n",
|
||||
v, v);
|
||||
fprintf(fp, "\tincl\t_fltintrcnt+(4*%d)\n", cntcnt++);
|
||||
if (strncmp(vector, "dzx", 3) == 0)
|
||||
fprintf(fp, "\tmovl\t$%d,r0\n\tjmp\tdzdma\n\n", number);
|
||||
else if (strncmp(vector, "dpx", 3) == 0)
|
||||
fprintf(fp, "\tmovl\t$%d,r0\n\tjmp\tdpxdma\n\n", number);
|
||||
else if (strncmp(vector, "dpr", 3) == 0)
|
||||
fprintf(fp, "\tmovl\t$%d,r0\n\tjmp\tdprdma\n\n", number);
|
||||
else {
|
||||
if (strncmp(vector, "uur", 3) == 0) {
|
||||
fprintf(fp, "#ifdef UUDMA\n");
|
||||
fprintf(fp, "\tmovl\t$%d,r0\n\tjsb\tuudma\n", number);
|
||||
fprintf(fp, "#endif\n");
|
||||
}
|
||||
fprintf(fp, "\tpushl\t$%d\n", number);
|
||||
fprintf(fp, "\tcalls\t$1,_%s\n\tpopr\t$0x3f\n", vector);
|
||||
fprintf(fp, "\tincl\t_cnt+V_INTR\n\trei\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Start the interrupt name table with the names
|
||||
* of the standard vectors not on the unibus.
|
||||
* The number and order of these names should correspond
|
||||
* with the definitions in scb.s.
|
||||
*/
|
||||
dump_std(fp)
|
||||
register FILE *fp;
|
||||
{
|
||||
fprintf(fp, "\n\t.globl\t_intrnames\n");
|
||||
fprintf(fp, "\n\t.globl\t_eintrnames\n");
|
||||
fprintf(fp, "\t.data\n");
|
||||
fprintf(fp, "_intrnames:\n");
|
||||
fprintf(fp, "\t.asciz\t\"clock\"\n");
|
||||
fprintf(fp, "\t.asciz\t\"cnr\"\n");
|
||||
fprintf(fp, "\t.asciz\t\"cnx\"\n");
|
||||
fprintf(fp, "\t.asciz\t\"tur\"\n");
|
||||
fprintf(fp, "\t.asciz\t\"tux\"\n");
|
||||
fprintf(fp, "\t.asciz\t\"mba0\"\n");
|
||||
fprintf(fp, "\t.asciz\t\"mba1\"\n");
|
||||
fprintf(fp, "\t.asciz\t\"mba2\"\n");
|
||||
fprintf(fp, "\t.asciz\t\"mba3\"\n");
|
||||
fprintf(fp, "\t.asciz\t\"uba0\"\n");
|
||||
fprintf(fp, "\t.asciz\t\"uba1\"\n");
|
||||
fprintf(fp, "\t.asciz\t\"uba2\"\n");
|
||||
fprintf(fp, "\t.asciz\t\"uba3\"\n");
|
||||
#define I_FIXED 13 /* number of names above */
|
||||
}
|
||||
|
||||
dump_intname(fp, vector, number)
|
||||
register FILE *fp;
|
||||
char *vector;
|
||||
int number;
|
||||
{
|
||||
register char *cp = vector;
|
||||
|
||||
fprintf(fp, "\t.asciz\t\"");
|
||||
/*
|
||||
* Skip any "int" or "intr" in the name.
|
||||
*/
|
||||
while (*cp)
|
||||
if (cp[0] == 'i' && cp[1] == 'n' && cp[2] == 't') {
|
||||
cp += 3;
|
||||
if (*cp == 'r')
|
||||
cp++;
|
||||
} else {
|
||||
putc(*cp, fp);
|
||||
cp++;
|
||||
}
|
||||
fprintf(fp, "%d\"\n", number);
|
||||
}
|
||||
|
||||
dump_ctrs(fp)
|
||||
register FILE *fp;
|
||||
{
|
||||
fprintf(fp, "_eintrnames:\n");
|
||||
fprintf(fp, "\n\t.globl\t_intrcnt\n");
|
||||
fprintf(fp, "\n\t.globl\t_eintrcnt\n");
|
||||
fprintf(fp, "_intrcnt:\n", I_FIXED);
|
||||
fprintf(fp, "\t.space\t4 * %d\n", I_FIXED);
|
||||
fprintf(fp, "_fltintrcnt:\n", cntcnt);
|
||||
fprintf(fp, "\t.space\t4 * %d\n", cntcnt);
|
||||
fprintf(fp, "_eintrcnt:\n\n");
|
||||
fprintf(fp, "\t.text\n");
|
||||
}
|
||||
Reference in New Issue
Block a user