diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | i386/imps/Makefile.in | 66 | ||||
-rw-r--r-- | i386/imps/apic.h | 96 | ||||
-rw-r--r-- | i386/imps/cpu_number.h | 50 | ||||
-rw-r--r-- | i386/imps/cpus.h | 24 | ||||
-rw-r--r-- | i386/imps/imps.c | 51 | ||||
-rw-r--r-- | i386/imps/impsasm.sym | 29 |
7 files changed, 7 insertions, 316 deletions
@@ -4,6 +4,13 @@ `DEVELOPMENT' for details. Partly based on suggestions by Gianluca Guida <glguida@gmail.com>. + * i386/imps/Makefile.in: Remove file. + * i386/imps/apic.h: Likewise. + * i386/imps/cpu_number.h: Likewise. + * i386/imps/cpus.h: Likewise. + * i386/imps/imps.c: Likewise. + * i386/imps/impsasm.sym: Likewise. + * i386/dos/dos_buf.c: Remove file. * i386/dos/dos_check_err.c: Likewise. * i386/dos/dos_close.c: Likewise. diff --git a/i386/imps/Makefile.in b/i386/imps/Makefile.in deleted file mode 100644 index bf353f1..0000000 --- a/i386/imps/Makefile.in +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 1994 The University of Utah and -# the Computer Systems Laboratory (CSL). All rights reserved. -# -# Permission to use, copy, modify and distribute this software and its -# documentation is hereby granted, provided that both the copyright -# notice and this permission notice appear in all copies of the -# software, derivative works or modified versions, and any portions -# thereof, and that both notices appear in supporting documentation. -# -# THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS -# IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF -# ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. -# -# CSL requests users of this software to return to csl-dist@cs.utah.edu any -# improvements that they make and grant CSL redistribution rights. -# -# Author: Bryan Ford, University of Utah CSL -# - - -# This makefile creates a microkernel -# that supports Intel MP specification-compliant machines. -#### Start of configuration section #### - -GSRCDIR = @top_gsrcdir@ -MSRCDIR = @top_srcdir@ -OBJDIR = @top_objdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -include $(OBJDIR)/Makeconf - -##### End of configuration section ##### - - -# Only build an MP kernel if the user asked for one. -ifeq ($(ENABLE_MP),yes) - - -# First define what we're trying to accomplish. -TARGET = kernel-imps.bmod - - -# For Intel MP spec support add the imps directory. -SRCDIRS += $(MSRCDIR)/kernel/imps - - -# Everything else is done in here. -include $(MSRCDIR)/kernel/Makerules - - -# Be sure and build the asm symbol file before anything else. -# This is sort of a bogus dependency, but it does the job. -i386asm.h: impsasm.h -CLEAN_FILES += impsasm.h - - -else - -all: -clean: -install: - -endif diff --git a/i386/imps/apic.h b/i386/imps/apic.h deleted file mode 100644 index 24a161a..0000000 --- a/i386/imps/apic.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 1994 The University of Utah and - * the Computer Systems Laboratory at the University of Utah (CSL). - * All rights reserved. - * - * Permission to use, copy, modify and distribute this software is hereby - * granted provided that (1) source code retains these copyright, permission, - * and disclaimer notices, and (2) redistributions including binaries - * reproduce the notices in supporting documentation, and (3) all advertising - * materials mentioning features or use of this software display the following - * acknowledgement: ``This product includes software developed by the - * Computer Systems Laboratory at the University of Utah.'' - * - * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS - * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF - * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * CSL requests users of this software to return to csl-dist@cs.utah.edu any - * improvements that they make and grant CSL redistribution rights. - * - * Author: Bryan Ford, University of Utah CSL - */ -#ifndef _IMPS_APIC_ -#define _IMPS_APIC_ - -typedef struct ApicReg -{ - unsigned r; /* the actual register */ - unsigned p[3]; /* pad to the next 128-bit boundary */ -} ApicReg; - -typedef struct ApicIoUnit -{ - ApicReg select; - ApicReg window; -} ApicIoUnit; -#define APIC_IO_UNIT_ID 0x00 -#define APIC_IO_VERSION 0x01 -#define APIC_IO_REDIR_LOW(int_pin) (0x10+(int_pin)*2) -#define APIC_IO_REDIR_HIGH(int_pin) (0x11+(int_pin)*2) - -typedef struct ApicLocalUnit -{ - ApicReg reserved0; - ApicReg reserved1; - ApicReg unit_id; - ApicReg version; - ApicReg reserved4; - ApicReg reserved5; - ApicReg reserved6; - ApicReg reserved7; - ApicReg task_pri; - ApicReg reservedb; - ApicReg reservedc; - ApicReg eoi; - ApicReg remote; - ApicReg logical_dest; - ApicReg dest_format; - ApicReg spurious_vector; - ApicReg isr[8]; - ApicReg tmr[8]; - ApicReg irr[8]; - ApicReg reserved28[8]; - ApicReg int_command[2]; - ApicReg timer_vector; - ApicReg reserved33; - ApicReg reserved34; - ApicReg lint0_vector; - ApicReg lint1_vector; - ApicReg reserved37; - ApicReg init_count; - ApicReg cur_count; - ApicReg reserved3a; - ApicReg reserved3b; - ApicReg reserved3c; - ApicReg reserved3d; - ApicReg divider_config; - ApicReg reserved3f; -} ApicLocalUnit; - - -/* Address at which the local unit is mapped in kernel virtual memory. - Must be constant. */ -#define APIC_LOCAL_VA 0xc1000000 - -#define apic_local_unit (*((volatile ApicLocalUnit*)APIC_LOCAL_VA)) - - -/* Set or clear a bit in a 255-bit APIC mask register. - These registers are spread through eight 32-bit registers. */ -#define APIC_SET_MASK_BIT(reg, bit) \ - ((reg)[(bit) >> 5].r |= 1 << ((bit) & 0x1f)) -#define APIC_CLEAR_MASK_BIT(reg, bit) \ - ((reg)[(bit) >> 5].r &= ~(1 << ((bit) & 0x1f))) - -#endif _IMPS_APIC_ diff --git a/i386/imps/cpu_number.h b/i386/imps/cpu_number.h deleted file mode 100644 index cae267b..0000000 --- a/i386/imps/cpu_number.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 1994 The University of Utah and - * the Computer Systems Laboratory at the University of Utah (CSL). - * All rights reserved. - * - * Permission to use, copy, modify and distribute this software is hereby - * granted provided that (1) source code retains these copyright, permission, - * and disclaimer notices, and (2) redistributions including binaries - * reproduce the notices in supporting documentation, and (3) all advertising - * materials mentioning features or use of this software display the following - * acknowledgement: ``This product includes software developed by the - * Computer Systems Laboratory at the University of Utah.'' - * - * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS - * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF - * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * CSL requests users of this software to return to csl-dist@cs.utah.edu any - * improvements that they make and grant CSL redistribution rights. - * - * Author: Bryan Ford, University of Utah CSL - */ -#ifndef _IMPS_CPU_NUMBER_ -#define _IMPS_CPU_NUMBER_ - - -#ifndef ASSEMBLER - -#include "apic.h" - -static inline int -cpu_number() -{ - return apic_local_unit.unit_id.r >> 24; -} - -#else ASSEMBLER - -#include "impsasm.h" - -#define CPU_NUMBER(reg) \ - movzbl APIC_LOCAL_VA+APIC_LOCAL_UNIT_ID+3,reg - -#endif ASSEMBLER - - -#include "i386/cpu_number.h" - - -#endif _IMPS_CPU_NUMBER_ diff --git a/i386/imps/cpus.h b/i386/imps/cpus.h deleted file mode 100644 index f49d85e..0000000 --- a/i386/imps/cpus.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 1994 The University of Utah and - * the Computer Systems Laboratory at the University of Utah (CSL). - * All rights reserved. - * - * Permission to use, copy, modify and distribute this software is hereby - * granted provided that (1) source code retains these copyright, permission, - * and disclaimer notices, and (2) redistributions including binaries - * reproduce the notices in supporting documentation, and (3) all advertising - * materials mentioning features or use of this software display the following - * acknowledgement: ``This product includes software developed by the - * Computer Systems Laboratory at the University of Utah.'' - * - * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS - * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF - * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * CSL requests users of this software to return to csl-dist@cs.utah.edu any - * improvements that they make and grant CSL redistribution rights. - * - * Author: Bryan Ford, University of Utah CSL - */ -#define NCPUS 2 /* XXX make it unlimited */ -#define MULTIPROCESSOR 1 diff --git a/i386/imps/imps.c b/i386/imps/imps.c deleted file mode 100644 index 279ca3d..0000000 --- a/i386/imps/imps.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 1994 The University of Utah and - * the Computer Systems Laboratory at the University of Utah (CSL). - * All rights reserved. - * - * Permission to use, copy, modify and distribute this software is hereby - * granted provided that (1) source code retains these copyright, permission, - * and disclaimer notices, and (2) redistributions including binaries - * reproduce the notices in supporting documentation, and (3) all advertising - * materials mentioning features or use of this software display the following - * acknowledgement: ``This product includes software developed by the - * Computer Systems Laboratory at the University of Utah.'' - * - * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS - * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF - * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * CSL requests users of this software to return to csl-dist@cs.utah.edu any - * improvements that they make and grant CSL redistribution rights. - * - * Author: Bryan Ford, University of Utah CSL - */ - -#include <mach/kern_return.h> - -void -interrupt_processor(int which_cpu) -{ - panic("interrupt_processor"); -} - -void -start_other_cpus() -{ -printf("start other CPUs please!!!\n"); -} - -kern_return_t -cpu_control(int cpu, int *info, int count) -{ -printf("cpu_control %d\n", cpu); - return KERN_FAILURE; -} - -kern_return_t -cpu_start(int cpu) -{ -printf("cpu_start %d\n", cpu); - return KERN_FAILURE; -} - diff --git a/i386/imps/impsasm.sym b/i386/imps/impsasm.sym deleted file mode 100644 index 4093d41..0000000 --- a/i386/imps/impsasm.sym +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 1994 The University of Utah and - * the Computer Systems Laboratory at the University of Utah (CSL). - * All rights reserved. - * - * Permission to use, copy, modify and distribute this software is hereby - * granted provided that (1) source code retains these copyright, permission, - * and disclaimer notices, and (2) redistributions including binaries - * reproduce the notices in supporting documentation, and (3) all advertising - * materials mentioning features or use of this software display the following - * acknowledgement: ``This product includes software developed by the - * Computer Systems Laboratory at the University of Utah.'' - * - * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS - * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF - * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * CSL requests users of this software to return to csl-dist@cs.utah.edu any - * improvements that they make and grant CSL redistribution rights. - * - * Author: Bryan Ford, University of Utah CSL - */ - -#include "apic.h" - -expr APIC_LOCAL_VA - -offset ApicLocalUnit apic_local unit_id - |