Replace MACHINE/CHIP macros with compiler macros
This commit is contained in:
parent
5919360736
commit
6723dcfab7
27 changed files with 45 additions and 148 deletions
|
@ -356,7 +356,7 @@ int all;
|
|||
#endif
|
||||
else if (ADDA(off))
|
||||
off = ADDA_CNT(ptrace(T_GETINS, curpid, pc + 2, 0L)) + bp;
|
||||
#if (CHIP == INTEL)
|
||||
#if defined(__i386__)
|
||||
else if (INCSP2(off))
|
||||
off = bp + 2*INTSIZE;
|
||||
else if (POPBX2(off))
|
||||
|
|
|
@ -48,12 +48,10 @@
|
|||
|
||||
#undef printf /* defined as printk in <minix/const.h> */
|
||||
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if (MACHINE == IBM_PC)
|
||||
#if defined(__i386__)
|
||||
#define MINIX_PC
|
||||
#else
|
||||
#error "only the MINIX_PC 1.5.x and later versions works on *86's"
|
||||
#endif
|
||||
#error "Unsupported arch"
|
||||
#endif
|
||||
|
||||
#ifdef MINIX_ST
|
||||
|
@ -81,19 +79,11 @@
|
|||
#define CSEG 0x2E /* 8088 through 80386 */
|
||||
#define DSEG 0x3E
|
||||
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL )
|
||||
#ifdef __i86
|
||||
#define N_REG16 2
|
||||
#endif
|
||||
#ifdef __i386
|
||||
#if defined(__i386__)
|
||||
#define N_REG16 4 /* 16 bit registers at start of stackframe */
|
||||
#endif
|
||||
#ifndef N_REG16
|
||||
#error "N_REG16 not defined"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL )
|
||||
#if defined(__i386__)
|
||||
#define ADDA(l) ((u16_t) (l) == 0xC481)
|
||||
|
||||
#ifdef __i386
|
||||
|
|
|
@ -114,15 +114,12 @@ long magic;
|
|||
}
|
||||
|
||||
/* Check CPU */
|
||||
#if (CHIP == INTEL)
|
||||
#if defined(__i386__)
|
||||
#if (_WORD_SIZE == 4)
|
||||
if (hdr->a_cpu != A_I80386)
|
||||
#else
|
||||
if (hdr->a_cpu != A_I8086)
|
||||
#endif
|
||||
#endif
|
||||
#if (CHIP == M68000)
|
||||
if (hdr->a_cpu != A_M68K)
|
||||
#endif
|
||||
{
|
||||
Printf("mdb: invalid cpu in exec header - %04x\n",
|
||||
|
|
|
@ -54,7 +54,7 @@ extern char *pos_string; /* Absolute cursor positioning */
|
|||
|
||||
#define STD_OUT 1 /* File descriptor for terminal */
|
||||
|
||||
#if (CHIP == INTEL)
|
||||
#if defined(__i386__)
|
||||
#define MEMORY_SIZE (50 * 1024) /* Size of data space to malloc */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1539,50 +1539,16 @@ void XT()
|
|||
void (*escfunc(c))()
|
||||
int c;
|
||||
{
|
||||
#if (CHIP == M68000)
|
||||
#ifndef COMPAT
|
||||
int ch;
|
||||
#endif
|
||||
#endif
|
||||
if (c == '[') {
|
||||
/* Start of ASCII escape sequence. */
|
||||
c = getchar();
|
||||
#if (CHIP == M68000)
|
||||
#ifndef COMPAT
|
||||
if ((c >= '0') && (c <= '9')) ch = getchar();
|
||||
/* ch is either a tilde or a second digit */
|
||||
#endif
|
||||
#endif
|
||||
switch (c) {
|
||||
case 'H': return(HO);
|
||||
case 'A': return(UP);
|
||||
case 'B': return(DN);
|
||||
case 'C': return(RT);
|
||||
case 'D': return(LF);
|
||||
#if (CHIP == M68000)
|
||||
#ifndef COMPAT
|
||||
/* F1 = ESC [ 1 ~ */
|
||||
/* F2 = ESC [ 2 ~ */
|
||||
/* F3 = ESC [ 3 ~ */
|
||||
/* F4 = ESC [ 4 ~ */
|
||||
/* F5 = ESC [ 5 ~ */
|
||||
/* F6 = ESC [ 6 ~ */
|
||||
/* F7 = ESC [ 17 ~ */
|
||||
/* F8 = ESC [ 18 ~ */
|
||||
case '1':
|
||||
switch (ch) {
|
||||
case '~': return(SF);
|
||||
case '7': (void) getchar(); return(MA);
|
||||
case '8': (void) getchar(); return(CTL);
|
||||
}
|
||||
case '2': return(SR);
|
||||
case '3': return(PD);
|
||||
case '4': return(PU);
|
||||
case '5': return(FS);
|
||||
case '6': return(EF);
|
||||
#endif
|
||||
#endif
|
||||
#if (CHIP == INTEL)
|
||||
#if defined(__i386__)
|
||||
case 'G': return(FS);
|
||||
case 'S': return(SR);
|
||||
case 'T': return(SF);
|
||||
|
@ -1593,23 +1559,6 @@ int c;
|
|||
}
|
||||
return(I);
|
||||
}
|
||||
#if (CHIP == M68000)
|
||||
#ifdef COMPAT
|
||||
if (c == 'O') {
|
||||
/* Start of ASCII function key escape sequence. */
|
||||
switch (getchar()) {
|
||||
case 'P': return(SF);
|
||||
case 'Q': return(SR);
|
||||
case 'R': return(PD);
|
||||
case 'S': return(PU);
|
||||
case 'T': return(FS);
|
||||
case 'U': return(EF);
|
||||
case 'V': return(MA);
|
||||
case 'W': return(CTL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
return(I);
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ typedef struct rs232 {
|
|||
char *ohead; /* next free spot in output buffer */
|
||||
char *otail; /* next char to output */
|
||||
|
||||
#if (MACHINE == IBM_PC)
|
||||
#if defined(__i386__)
|
||||
port_t xmit_port; /* i/o ports */
|
||||
port_t recv_port;
|
||||
port_t div_low_port;
|
||||
|
@ -168,7 +168,7 @@ typedef struct rs232 {
|
|||
|
||||
static rs232_t rs_lines[NR_RS_LINES];
|
||||
|
||||
#if (MACHINE == IBM_PC)
|
||||
#if defined(__i386__)
|
||||
/* 8250 base addresses. */
|
||||
static port_t addr_8250[] = {
|
||||
0x3F8, /* COM1 */
|
||||
|
@ -352,7 +352,7 @@ static void rs_config(rs232_t *rs)
|
|||
speed_t speed;
|
||||
int divisor;
|
||||
} s2d[] = {
|
||||
#if (MACHINE == IBM_PC)
|
||||
#if defined(__i386__)
|
||||
{ B50, UART_FREQ / 50 },
|
||||
#endif
|
||||
{ B75, UART_FREQ / 75 },
|
||||
|
@ -363,14 +363,14 @@ static void rs_config(rs232_t *rs)
|
|||
{ B300, UART_FREQ / 300 },
|
||||
{ B600, UART_FREQ / 600 },
|
||||
{ B1200, UART_FREQ / 1200 },
|
||||
#if (MACHINE == IBM_PC)
|
||||
#if defined(__i386__)
|
||||
{ B1800, UART_FREQ / 1800 },
|
||||
#endif
|
||||
{ B2400, UART_FREQ / 2400 },
|
||||
{ B4800, UART_FREQ / 4800 },
|
||||
{ B9600, UART_FREQ / 9600 },
|
||||
{ B19200, UART_FREQ / 19200 },
|
||||
#if (MACHINE == IBM_PC)
|
||||
#if defined(__i386__)
|
||||
{ B38400, UART_FREQ / 38400 },
|
||||
{ B57600, UART_FREQ / 57600 },
|
||||
{ B115200, UART_FREQ / 115200L },
|
||||
|
|
|
@ -588,7 +588,7 @@ message *m_ptr; /* pointer to message sent to task */
|
|||
size = sizeof(struct winsize);
|
||||
break;
|
||||
|
||||
#if (MACHINE == IBM_PC)
|
||||
#if defined(__i386__)
|
||||
case KIOCSMAP: /* load keymap (Minix extension) */
|
||||
size = sizeof(keymap_t);
|
||||
break;
|
||||
|
@ -681,7 +681,7 @@ message *m_ptr; /* pointer to message sent to task */
|
|||
sigchar(tp, SIGWINCH, 0);
|
||||
break;
|
||||
|
||||
#if (MACHINE == IBM_PC)
|
||||
#if defined(__i386__)
|
||||
case KIOCSMAP:
|
||||
/* Load a new keymap (only /dev/console). */
|
||||
if (isconsole(tp)) r = kbd_loadmap(m_ptr);
|
||||
|
|
|
@ -154,7 +154,7 @@ int select_retry(struct tty *tp);
|
|||
void rs_init(struct tty *tp);
|
||||
void rs_interrupt(message *m);
|
||||
|
||||
#if (CHIP == INTEL)
|
||||
#if defined(__i386__)
|
||||
/* console.c */
|
||||
void kputc(int c);
|
||||
void cons_stop(void);
|
||||
|
@ -183,5 +183,5 @@ void pty_init(struct tty *tp);
|
|||
void select_retry_pty(struct tty *tp);
|
||||
int pty_status(message *m_ptr);
|
||||
|
||||
#endif /* (CHIP == INTEL) */
|
||||
#endif /* defined(__i386__) */
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#ifndef _INTERRUPT_H
|
||||
#define _INTERRUPT_H
|
||||
|
||||
#if (CHIP == INTEL)
|
||||
#if defined(__i386__)
|
||||
|
||||
/* 8259A interrupt controller ports. */
|
||||
#define INT_CTL 0x20 /* I/O port for interrupt controller */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#ifndef _PORTS_H
|
||||
#define _PORTS_H
|
||||
|
||||
#if (CHIP == INTEL)
|
||||
#if defined(__i386__)
|
||||
|
||||
/* Miscellaneous ports. */
|
||||
#define PCR 0x65 /* Planar Control Register */
|
||||
|
@ -12,6 +12,6 @@
|
|||
#define TIMER2 0x42 /* I/O port for timer channel 2 */
|
||||
#define TIMER_MODE 0x43 /* I/O port for timer mode control */
|
||||
|
||||
#endif /* (CHIP == INTEL) */
|
||||
#endif /* defined(__i386__) */
|
||||
|
||||
#endif /* _PORTS_H */
|
||||
|
|
|
@ -17,15 +17,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/* The MACHINE (called _MINIX_MACHINE) setting can be done
|
||||
* in <minix/machine.h>.
|
||||
*/
|
||||
#include <minix/sys_config.h>
|
||||
|
||||
#define MACHINE _MINIX_MACHINE
|
||||
|
||||
#define IBM_PC _MACHINE_IBM_PC
|
||||
|
||||
/* Number of slots in the process table for non-kernel processes. The number
|
||||
* of system processes defines how many processes with special privileges
|
||||
* there can be. User processes share the same properties and count for one.
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
#ifndef _MINIX_CONST_H
|
||||
#define _MINIX_CONST_H
|
||||
|
||||
#ifndef _MINIX_CHIP
|
||||
#error _MINIX_CHIP is not defined
|
||||
#endif
|
||||
|
||||
/* The UNUSED annotation tells the compiler or lint not to complain
|
||||
* about an unused variable or function parameter.
|
||||
*
|
||||
|
@ -79,11 +75,11 @@
|
|||
#define HAVE_SCATTERED_IO 1 /* scattered I/O is now standard */
|
||||
|
||||
/* Memory is allocated in clicks. */
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
#define CLICK_SIZE 4096 /* unit in which memory is allocated */
|
||||
#define CLICK_SHIFT 12 /* log2 of CLICK_SIZE */
|
||||
#else
|
||||
#error No reasonable CHIP setting.
|
||||
#error Unsupported arch
|
||||
#endif
|
||||
|
||||
/* Click alignment macros. */
|
||||
|
|
|
@ -4,10 +4,6 @@
|
|||
/*===========================================================================*
|
||||
* This section contains user-settable parameters *
|
||||
*===========================================================================*/
|
||||
#define _MINIX_MACHINE _MACHINE_IBM_PC
|
||||
|
||||
#define _MACHINE_IBM_PC 1 /* any 8088 or 80x86-based system */
|
||||
|
||||
/* Word size in bytes (a constant equal to sizeof(int)). */
|
||||
#if __ACK__ || __GNUC__
|
||||
#define _WORD_SIZE _EM_WSIZE
|
||||
|
@ -17,38 +13,14 @@
|
|||
#define _NR_PROCS 256
|
||||
#define _NR_SYS_PROCS 64
|
||||
|
||||
/* Set the CHIP type based on the machine selected. The symbol CHIP is actually
|
||||
* indicative of more than just the CPU. For example, machines for which
|
||||
* CHIP == INTEL are expected to have 8259A interrrupt controllers and the
|
||||
* other properties of IBM PC/XT/AT/386 types machines in general. */
|
||||
#define _CHIP_INTEL 1 /* CHIP type for PC, XT, AT, 386 and clones */
|
||||
#define _CHIP_M68000 2 /* CHIP type for Atari, Amiga, Macintosh */
|
||||
#define _CHIP_SPARC 3 /* CHIP type for SUN-4 (e.g. SPARCstation) */
|
||||
|
||||
/* Set the FP_FORMAT type based on the machine selected, either hw or sw */
|
||||
#define _FP_NONE 0 /* no floating point support */
|
||||
#define _FP_IEEE 1 /* conform IEEE floating point standard */
|
||||
|
||||
#if (_MINIX_MACHINE == _MACHINE_IBM_PC)
|
||||
#define _MINIX_CHIP _CHIP_INTEL
|
||||
#endif
|
||||
|
||||
#ifndef _MINIX_FP_FORMAT
|
||||
#define _MINIX_FP_FORMAT _FP_NONE
|
||||
#endif
|
||||
|
||||
#ifndef _MINIX_MACHINE
|
||||
error "In <minix/sys_config.h> please define _MINIX_MACHINE"
|
||||
#endif
|
||||
|
||||
#ifndef _MINIX_CHIP
|
||||
error "In <minix/sys_config.h> please define _MINIX_MACHINE to have a legal value"
|
||||
#endif
|
||||
|
||||
#if (_MINIX_MACHINE == 0)
|
||||
error "_MINIX_MACHINE has incorrect value (0)"
|
||||
#endif
|
||||
|
||||
/* Kernel debug checks */
|
||||
#define DEBUG_LOCK_CHECK 1 /* Interrupt Lock/unlock sanity checking. */
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ void system_init(void)
|
|||
map(SYS_PROFBUF, do_profbuf); /* announce locations to kernel */
|
||||
|
||||
/* i386-specific. */
|
||||
#if _MINIX_CHIP == _CHIP_INTEL
|
||||
#if defined(__i386__)
|
||||
map(SYS_READBIOS, do_readbios); /* read from BIOS locations */
|
||||
map(SYS_IOPENABLE, do_iopenable); /* Enable I/O */
|
||||
map(SYS_SDEVIO, do_sdevio); /* phys_insb, _insw, _outsb, _outsw */
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
int do_fork(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_fork(). PR_ENDPT has forked. The child is PR_SLOT. */
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
char *old_fpu_save_area_p;
|
||||
#endif
|
||||
register struct proc *rpc; /* child process pointer */
|
||||
|
@ -53,11 +53,11 @@ int do_fork(struct proc * caller, message * m_ptr)
|
|||
save_fpu(rpp);
|
||||
/* Copy parent 'proc' struct to child. And reinitialize some fields. */
|
||||
gen = _ENDPOINT_G(rpc->p_endpoint);
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
old_fpu_save_area_p = rpc->p_seg.fpu_state;
|
||||
#endif
|
||||
*rpc = *rpp; /* copy 'proc' struct */
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
rpc->p_seg.fpu_state = old_fpu_save_area_p;
|
||||
if(proc_used_fpu(rpp))
|
||||
memcpy(rpc->p_seg.fpu_state, rpp->p_seg.fpu_state, FPU_XFP_SIZE);
|
||||
|
|
|
@ -28,7 +28,7 @@ int do_getmcontext(struct proc * caller, message * m_ptr)
|
|||
if (iskerneln(proc_nr)) return(EPERM);
|
||||
rp = proc_addr(proc_nr);
|
||||
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
if (!proc_used_fpu(rp))
|
||||
return(OK); /* No state to copy */
|
||||
#endif
|
||||
|
@ -38,7 +38,7 @@ int do_getmcontext(struct proc * caller, message * m_ptr)
|
|||
(vir_bytes) &mc, (phys_bytes) sizeof(struct __mcontext))) != OK)
|
||||
return(r);
|
||||
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
/* Copy FPU state */
|
||||
mc.mc_fpu_flags = 0;
|
||||
if (proc_used_fpu(rp)) {
|
||||
|
@ -79,7 +79,7 @@ int do_setmcontext(struct proc * caller, message * m_ptr)
|
|||
(vir_bytes) &mc, (phys_bytes) sizeof(struct __mcontext))) != OK)
|
||||
return(r);
|
||||
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
/* Copy FPU state */
|
||||
if (mc.mc_fpu_flags & MF_FPU_INITIALIZED) {
|
||||
rp->p_misc_flags |= MF_FPU_INITIALIZED;
|
||||
|
|
|
@ -38,7 +38,7 @@ int do_sigreturn(struct proc * caller, message * m_ptr)
|
|||
sc.sc_psw = (sc.sc_psw & X86_FLAGS_USER) |
|
||||
(rp->p_reg.psw & ~X86_FLAGS_USER);
|
||||
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
/* Don't panic kernel if user gave bad selectors. */
|
||||
sc.sc_cs = rp->p_reg.cs;
|
||||
sc.sc_ds = rp->p_reg.ds;
|
||||
|
@ -52,7 +52,7 @@ int do_sigreturn(struct proc * caller, message * m_ptr)
|
|||
|
||||
/* Restore the registers. */
|
||||
memcpy(&rp->p_reg, &sc.sc_regs, sizeof(sigregs));
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
if(sc.sc_flags & MF_FPU_INITIALIZED)
|
||||
{
|
||||
memcpy(rp->p_seg.fpu_state, &sc.sc_fpu_state, FPU_XFP_SIZE);
|
||||
|
|
|
@ -42,7 +42,7 @@ int do_sigsend(struct proc * caller, message * m_ptr)
|
|||
|
||||
/* Copy the registers to the sigcontext structure. */
|
||||
memcpy(&sc.sc_regs, (char *) &rp->p_reg, sizeof(sigregs));
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
if(proc_used_fpu(rp)) {
|
||||
/* save the FPU context before saving it to the sig context */
|
||||
save_fpu(rp);
|
||||
|
|
|
@ -135,7 +135,7 @@ int do_trace(struct proc * caller, message * m_ptr)
|
|||
tr_addr > sizeof(struct stackframe_s) - sizeof(reg_t))
|
||||
return(EFAULT);
|
||||
i = (int) tr_addr;
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
/* Altering segment registers might crash the kernel when it
|
||||
* tries to load them prior to restarting a process, so do
|
||||
* not allow it.
|
||||
|
|
|
@ -904,7 +904,7 @@ static void data_to_user(sub_dev_t *sub_dev_ptr)
|
|||
|
||||
static int init_buffers(sub_dev_t *sub_dev_ptr)
|
||||
{
|
||||
#if (CHIP == INTEL)
|
||||
#if defined(__i386__)
|
||||
char *base;
|
||||
size_t size;
|
||||
unsigned left;
|
||||
|
@ -954,10 +954,10 @@ static int init_buffers(sub_dev_t *sub_dev_ptr)
|
|||
sub_dev_ptr->DmaSize, sub_dev_ptr->Nr);
|
||||
return OK;
|
||||
|
||||
#else /* CHIP != INTEL */
|
||||
#else /* !defined(__i386__) */
|
||||
printf("%s: init_buffers() failed, CHIP != INTEL", drv.DriverName);
|
||||
return EIO;
|
||||
#endif /* CHIP == INTEL */
|
||||
#endif /* defined(__i386__) */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ void makecontext(ucontext_t *ucp, void (*func)(void), int argc, ...)
|
|||
}
|
||||
|
||||
if (ucp->uc_mcontext.mc_magic == MCF_MAGIC) {
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
/* The caller provides a pointer to a stack that we can use to run our
|
||||
context on. When the context starts, control is given to a wrapped
|
||||
start routine, which calls a function and cleans up the stack
|
||||
|
|
|
@ -57,10 +57,10 @@ int read_header_aout(
|
|||
|
||||
/* Check magic number, cpu type, and flags. */
|
||||
if (BADMAG(*hdr)) return(ENOEXEC);
|
||||
#if (CHIP == INTEL && _WORD_SIZE == 2)
|
||||
#if (defined(__i386__) && _WORD_SIZE == 2)
|
||||
if (hdr->a_cpu != A_I8086) return(ENOEXEC);
|
||||
#endif
|
||||
#if (CHIP == INTEL && _WORD_SIZE == 4)
|
||||
#if (defined(__i386__) && _WORD_SIZE == 4)
|
||||
if (hdr->a_cpu != A_I80386) return(ENOEXEC);
|
||||
#endif
|
||||
if ((hdr->a_flags & ~(A_NSYM | A_EXEC | A_SEP)) != 0) return(ENOEXEC);
|
||||
|
|
|
@ -409,7 +409,7 @@ void *arg;
|
|||
if (stackaddr == MAP_FAILED)
|
||||
mthread_panic("Failed to allocate stack to thread");
|
||||
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
guard_start = stackaddr;
|
||||
guard_end = stackaddr + MTHREAD_GUARDSIZE;
|
||||
guarded_stacksize = stackaddr + stacksize - guard_end;
|
||||
|
|
|
@ -311,7 +311,7 @@ static char *p_rts_flags_str(int flags)
|
|||
/*===========================================================================*
|
||||
* proctab_dmp *
|
||||
*===========================================================================*/
|
||||
#if (CHIP == INTEL)
|
||||
#if defined(__i386__)
|
||||
void proctab_dmp()
|
||||
{
|
||||
/* Proc table dump */
|
||||
|
@ -339,7 +339,7 @@ void proctab_dmp()
|
|||
printf("\n");
|
||||
}
|
||||
}
|
||||
#endif /* (CHIP == INTEL) */
|
||||
#endif /* defined(__i386__) */
|
||||
|
||||
/*===========================================================================*
|
||||
* procstack_dmp *
|
||||
|
|
|
@ -285,7 +285,7 @@ static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
|||
if (sendrec(VFS_PROC_NR, &mess) != OK || mess.m_type != OK)
|
||||
panic("can't sync up with VFS");
|
||||
|
||||
#if (CHIP == INTEL)
|
||||
#if defined(__i386__)
|
||||
uts_val.machine[0] = 'i';
|
||||
strcpy(uts_val.machine + 1, itoa(getprocessor()));
|
||||
#endif
|
||||
|
|
|
@ -740,7 +740,7 @@ static void test_attributes(void)
|
|||
/* Verify stack hypothesis; we assume a stack is used from the top and grows
|
||||
* downwards.
|
||||
*/
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
#if defined(__i386__)
|
||||
if (stackp[0] != MAGIC) err(11, 66); /* End of the stack */
|
||||
for (i = no_ints - 1 - 16; i < no_ints; i++)
|
||||
if (stackp[i] != MAGIC) stack_untouched = 0;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "const.h"
|
||||
#include "type.h"
|
||||
#include "mfsdir.h"
|
||||
#if (defined(__minix) && MACHINE == IBM_PC)
|
||||
#if (defined(__minix) && defined(__i386__))
|
||||
#include <minix/partition.h>
|
||||
#include <minix/u64.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
|
Loading…
Reference in a new issue