From b9c72be725cb5138a59a15e7f96b2f12009d6bd2 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 3 Nov 2003 22:08:52 +0000 Subject: [PATCH] - Export doreti as a global symbol. - Don't include isa/vector.s. Each PIC driver's entry points now live in their own standalone files. --- sys/i386/i386/exception.s | 21 +------- sys/i386/isa/vector.s | 108 -------------------------------------- 2 files changed, 1 insertion(+), 128 deletions(-) delete mode 100644 sys/i386/isa/vector.s diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s index 6960dc270971..f6b48abab829 100644 --- a/sys/i386/i386/exception.s +++ b/sys/i386/i386/exception.s @@ -37,12 +37,8 @@ #include "opt_npx.h" #include -#include #include #include -#ifdef SMP -#include /** various SMP options */ -#endif #include "assym.s" @@ -77,9 +73,6 @@ * %ss segment registers, but does not mess with %ds, %es, or %fs. Thus we * must load them with appropriate values for supervisor mode operation. */ -#define IDTVEC(name) ALIGN_TEXT; .globl __CONCAT(X,name); \ - .type __CONCAT(X,name),@function; __CONCAT(X,name): -#define TRAP(a) pushl $(a) ; jmp alltraps MCOUNT_LABEL(user) MCOUNT_LABEL(btrap) @@ -233,13 +226,6 @@ ENTRY(fork_trampoline) */ #include "i386/i386/vm86bios.s" -/* - * Include what was once config+isa-dependent code. - * XXX it should be in a stand-alone file. It's still icu-dependent and - * belongs in i386/isa. - */ -#include "i386/isa/vector.s" - .data ALIGN_DATA @@ -250,6 +236,7 @@ ENTRY(fork_trampoline) */ .text SUPERALIGN_TEXT + .globl doreti .type doreti,@function doreti: FAKE_MCOUNT(bintr) /* init "from" bintr -> doreti */ @@ -334,9 +321,3 @@ doreti_popl_fs_fault: movl $0,TF_ERR(%esp) /* XXX should be the error code */ movl $T_PROTFLT,TF_TRAPNO(%esp) jmp alltraps_with_regs_pushed - -#ifdef APIC_IO -#include "i386/isa/apic_ipl.s" -#else -#include "i386/isa/icu_ipl.s" -#endif /* APIC_IO */ diff --git a/sys/i386/isa/vector.s b/sys/i386/isa/vector.s deleted file mode 100644 index 0bed76fdb083..000000000000 --- a/sys/i386/isa/vector.s +++ /dev/null @@ -1,108 +0,0 @@ -/* - * from: vector.s, 386BSD 0.1 unknown origin - * $FreeBSD$ - */ - -/* - * modified for PC98 by Kakefuda - */ - -#include "opt_auto_eoi.h" - -#include -#ifdef PC98 -#include -#else -#include -#endif -#include - -#define FAST_INTR_HANDLER_USES_ES 1 -#ifdef FAST_INTR_HANDLER_USES_ES -#define ACTUALLY_PUSHED 1 -#define MAYBE_MOVW_AX_ES movw %ax,%es -#define MAYBE_POPL_ES popl %es -#define MAYBE_PUSHL_ES pushl %es -#else -/* - * We can usually skip loading %es for fastintr handlers. %es should - * only be used for string instructions, and fastintr handlers shouldn't - * do anything slow enough to justify using a string instruction. - */ -#define ACTUALLY_PUSHED 0 -#define MAYBE_MOVW_AX_ES -#define MAYBE_POPL_ES -#define MAYBE_PUSHL_ES -#endif - - .data - ALIGN_DATA - -/* - * Interrupt counters and names for export to vmstat(8) and friends. - * - * XXX this doesn't really belong here; everything except the labels - * for the endpointers is almost machine-independent. - */ - - .globl intrcnt, eintrcnt -intrcnt: - .space INTRCNT_COUNT * 4 -eintrcnt: - - .globl intrnames, eintrnames -intrnames: - .space INTRCNT_COUNT * 16 -eintrnames: - .text - -/* - * Macros for interrupt interrupt entry, call to handler, and exit. - * - * XXX - the interrupt frame is set up to look like a trap frame. This is - * usually a waste of time. The only interrupt handlers that want a frame - * are the clock handler (it wants a clock frame), the npx handler (it's - * easier to do right all in assembler). The interrupt return routine - * needs a trap frame for rare AST's (it could easily convert the frame). - * The direct costs of setting up a trap frame are two pushl's (error - * code and trap number), an addl to get rid of these, and pushing and - * popping the call-saved regs %esi, %edi and %ebp twice, The indirect - * costs are making the driver interface nonuniform so unpending of - * interrupts is more complicated and slower (call_driver(unit) would - * be easier than ensuring an interrupt frame for all handlers. Finally, - * there are some struct copies in the npx handler and maybe in the clock - * handler that could be avoided by working more with pointers to frames - * instead of frames. - * - * XXX - should we do a cld on every system entry to avoid the requirement - * for scattered cld's? - * - * Coding notes for *.s: - * - * If possible, avoid operations that involve an operand size override. - * Word-sized operations might be smaller, but the operand size override - * makes them slower on on 486's and no faster on 386's unless perhaps - * the instruction pipeline is depleted. E.g., - * - * Use movl to seg regs instead of the equivalent but more descriptive - * movw - gas generates an irelevant (slower) operand size override. - * - * Use movl to ordinary regs in preference to movw and especially - * in preference to movz[bw]l. Use unsigned (long) variables with the - * top bits clear instead of unsigned short variables to provide more - * opportunities for movl. - * - * If possible, use byte-sized operations. They are smaller and no slower. - * - * Use (%reg) instead of 0(%reg) - gas generates larger code for the latter. - * - * If the interrupt frame is made more flexible, INTR can push %eax first - * and decide the ipending case with less overhead, e.g., by avoiding - * loading segregs. - */ - -#ifdef APIC_IO -#include "i386/isa/apic_vector.s" -#else -#include "i386/isa/icu_vector.s" -#endif /* APIC_IO */