o) Use ABI, not ISA_* options, to determine whether to compile bits if libkern
required for the ABI the kernel is being built for. XXX This is implemented in a kind-of nasty way that involves including source files, but it's still an improvement. o) Retire ISA_* options since they're unused and were always wrong.
This commit is contained in:
parent
689d811165
commit
379663d70b
@ -56,6 +56,7 @@ mips/mips/in_cksum.c optional inet | inet6
|
||||
mips/mips/locore.S standard no-obj
|
||||
mips/mips/minidump_machdep.c standard
|
||||
mips/mips/mem.c optional mem
|
||||
mips/mips/libkern_machdep.c standard
|
||||
mips/mips/nexus.c standard
|
||||
mips/mips/stack_machdep.c optional ddb | stack
|
||||
mips/mips/support.S standard
|
||||
@ -72,18 +73,13 @@ geom/geom_mbr_enc.c optional geom_mbr
|
||||
libkern/ashldi3.c standard
|
||||
libkern/ashrdi3.c standard
|
||||
libkern/cmpdi2.c standard
|
||||
libkern/divdi3.c optional isa_mips32
|
||||
libkern/ffsl.c standard
|
||||
libkern/fls.c standard
|
||||
libkern/flsl.c standard
|
||||
libkern/lshrdi3.c standard
|
||||
libkern/memchr.c optional fdt
|
||||
libkern/memmove.c standard
|
||||
libkern/moddi3.c optional isa_mips32
|
||||
libkern/qdivrem.c optional isa_mips32
|
||||
libkern/ucmpdi2.c standard
|
||||
libkern/udivdi3.c optional isa_mips32
|
||||
libkern/umoddi3.c optional isa_mips32
|
||||
|
||||
#XXX: We can't use these versions, as strcmp.c is included conf/files
|
||||
#libkern/mips/strcmp.S standard
|
||||
|
@ -38,14 +38,6 @@ CPU_CNMIPS opt_global.h
|
||||
CPU_RMI opt_global.h
|
||||
CPU_NLM opt_global.h
|
||||
|
||||
# XXX These are bogus and should be replaced by proper ABI or ISA checks.
|
||||
ISA_MIPS1 opt_cputype.h
|
||||
ISA_MIPS3 opt_cputype.h
|
||||
ISA_MIPS32 opt_cputype.h
|
||||
ISA_MIPS32v2 opt_cputype.h
|
||||
ISA_MIPS64 opt_cputype.h
|
||||
ISA_MIPS64v2 opt_cputype.h
|
||||
|
||||
COMPAT_FREEBSD32 opt_compat.h
|
||||
|
||||
YAMON opt_global.h
|
||||
|
@ -6,7 +6,6 @@ files "../adm5120/files.adm5120"
|
||||
|
||||
machine mips mipsel
|
||||
cpu CPU_MIPS4KC
|
||||
options ISA_MIPS32
|
||||
|
||||
# device admpci
|
||||
device admsw
|
||||
|
@ -6,4 +6,3 @@ files "../alchemy/files.alchemy"
|
||||
|
||||
machine mips mipsel
|
||||
cpu CPU_MIPS4KC
|
||||
options ISA_MIPS32
|
||||
|
@ -6,4 +6,3 @@ files "../atheros/files.ar71xx"
|
||||
|
||||
machine mips mipseb
|
||||
cpu CPU_MIPS4KC
|
||||
options ISA_MIPS32
|
||||
|
@ -10,7 +10,6 @@
|
||||
machine mips mipseb
|
||||
ident AR71XX_BASE
|
||||
cpu CPU_MIPS4KC
|
||||
options ISA_MIPS32
|
||||
makeoptions TARGET_BIG_ENDIAN
|
||||
makeoptions KERNLOADADDR=0x80050000
|
||||
options HZ=1000
|
||||
|
@ -13,7 +13,6 @@
|
||||
machine mips mipseb
|
||||
ident AR91XX_BASE
|
||||
cpu CPU_MIPS4KC
|
||||
options ISA_MIPS32
|
||||
makeoptions KERNLOADADDR=0x80050000
|
||||
options HZ=1000
|
||||
|
||||
|
@ -33,8 +33,6 @@ options TICK_USE_YAMON_FREQ=defined
|
||||
|
||||
include "../malta/std.malta"
|
||||
|
||||
options ISA_MIPS32
|
||||
|
||||
hints "MALTA.hints" #Default places to look for devices.
|
||||
|
||||
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
|
@ -33,8 +33,6 @@ options TICK_USE_YAMON_FREQ=defined
|
||||
|
||||
include "../malta/std.malta"
|
||||
|
||||
options ISA_MIPS64
|
||||
|
||||
hints "MALTA.hints" #Default places to look for devices.
|
||||
|
||||
makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
|
@ -37,9 +37,6 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols
|
||||
#options OCTEON_VENDOR_LANNER # Support for Lanner boards.
|
||||
#options OCTEON_BOARD_CAPK_0100ND # Support for CAPK-0100nd.
|
||||
|
||||
# XXX This option is very nearly irrelevant.
|
||||
options ISA_MIPS64
|
||||
|
||||
options SCHED_ULE # ULE scheduler
|
||||
options PREEMPTION # Enable kernel thread preemption
|
||||
options INET # InterNETworking
|
||||
|
@ -7,7 +7,6 @@ include "std.SWARM"
|
||||
ident SWARM
|
||||
|
||||
machine mips mipseb
|
||||
options ISA_MIPS32
|
||||
|
||||
makeoptions ARCH_FLAGS="-mabi=32 -march=mips32"
|
||||
makeoptions LDSCRIPT_NAME= ldscript.mips.cfe
|
||||
|
@ -10,7 +10,6 @@ options SMP
|
||||
options PRINTF_BUFR_SIZE=128
|
||||
|
||||
machine mips mipseb
|
||||
options ISA_MIPS32
|
||||
|
||||
makeoptions ARCH_FLAGS="-mabi=32 -march=mips32"
|
||||
makeoptions LDSCRIPT_NAME= ldscript.mips.cfe
|
||||
|
@ -20,7 +20,6 @@
|
||||
machine mips mipseb
|
||||
ident XLP
|
||||
|
||||
options ISA_MIPS32
|
||||
makeoptions KERNLOADADDR=0x80100000
|
||||
|
||||
include "std.XLP"
|
||||
|
@ -20,7 +20,6 @@
|
||||
machine mips mips64eb
|
||||
ident XLP64
|
||||
|
||||
options ISA_MIPS64
|
||||
makeoptions ARCH_FLAGS="-march=mips64r2 -mabi=64"
|
||||
makeoptions KERNLOADADDR=0xffffffff80100000
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
machine mips mipsn32eb
|
||||
ident XLPN32
|
||||
|
||||
options ISA_MIPS64
|
||||
makeoptions ARCH_FLAGS="-march=mips64 -mabi=n32"
|
||||
makeoptions KERNLOADADDR=0x80100000
|
||||
|
||||
|
@ -53,7 +53,6 @@ makeoptions MODULES_OVERRIDE=""
|
||||
makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
|
||||
makeoptions KERNLOADADDR=0x80100000
|
||||
#profile 2
|
||||
options ISA_MIPS32
|
||||
|
||||
options SCHED_ULE # ULE scheduler
|
||||
#options VERBOSE_SYSINIT
|
||||
|
@ -26,8 +26,6 @@ makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
|
||||
makeoptions ARCH_FLAGS="-march=mips64 -mabi=64"
|
||||
makeoptions KERNLOADADDR=0xffffffff80100000
|
||||
|
||||
options ISA_MIPS64
|
||||
|
||||
#profile 2
|
||||
|
||||
options SCHED_ULE # ULE scheduler
|
||||
|
@ -26,7 +26,6 @@ makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
|
||||
makeoptions ARCH_FLAGS="-march=mips64 -mabi=n32"
|
||||
makeoptions KERNLOADADDR=0x80100000
|
||||
|
||||
options ISA_MIPS64
|
||||
#profile 2
|
||||
|
||||
options SCHED_ULE # ULE scheduler
|
||||
|
@ -4,4 +4,3 @@
|
||||
files "../idt/files.idt"
|
||||
|
||||
machine mips mipsel
|
||||
options ISA_MIPS32
|
||||
|
@ -31,10 +31,10 @@
|
||||
|
||||
#ifndef MIPS_INCLUDE__BUS_H
|
||||
#define MIPS_INCLUDE__BUS_H
|
||||
|
||||
/*
|
||||
* Bus address and size types
|
||||
*/
|
||||
#include "opt_cputype.h"
|
||||
#if defined(CPU_CNMIPS) && !defined(__mips_n64)
|
||||
typedef uint64_t bus_addr_t;
|
||||
#else
|
||||
|
@ -2,7 +2,6 @@
|
||||
files "../malta/files.malta"
|
||||
|
||||
cpu CPU_MIPS4KC
|
||||
#options ISA_MIPS32
|
||||
device pci
|
||||
device ata
|
||||
options ATA_CAM
|
||||
|
@ -197,7 +197,6 @@ static struct bus_space generic_space = {
|
||||
};
|
||||
|
||||
/* Ultra-gross kludge */
|
||||
#include "opt_cputype.h"
|
||||
#if defined(CPU_CNMIPS) && (defined(__mips_n32) || defined(__mips_o32))
|
||||
#include <contrib/octeon-sdk/cvmx.h>
|
||||
#define rd8(a) cvmx_read64_uint8(a)
|
||||
|
@ -73,8 +73,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/types.h>
|
||||
#include <sys/systm.h>
|
||||
|
||||
#include "opt_cputype.h"
|
||||
|
||||
#include <machine/cpuinfo.h>
|
||||
#include <machine/cache.h>
|
||||
|
||||
|
@ -38,8 +38,6 @@
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_cputype.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -27,8 +27,6 @@
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_cputype.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/module.h>
|
||||
|
@ -54,7 +54,6 @@
|
||||
* assembly language support routines.
|
||||
*/
|
||||
|
||||
#include "opt_cputype.h"
|
||||
#include "opt_ddb.h"
|
||||
#include <machine/asm.h>
|
||||
#include <machine/cpu.h>
|
||||
@ -62,8 +61,6 @@
|
||||
#include <machine/cpuregs.h>
|
||||
#include <machine/pte.h>
|
||||
|
||||
#include "opt_cputype.h"
|
||||
|
||||
#include "assym.s"
|
||||
|
||||
.set noreorder # Noreorder is default style!
|
||||
|
@ -31,7 +31,6 @@
|
||||
*/
|
||||
|
||||
#include "opt_compat.h"
|
||||
#include "opt_cputype.h"
|
||||
|
||||
#define __ELF_WORD_SIZE 32
|
||||
|
||||
|
39
sys/mips/mips/libkern_machdep.c
Normal file
39
sys/mips/mips/libkern_machdep.c
Normal file
@ -0,0 +1,39 @@
|
||||
/*-
|
||||
* Copyright (c) 2012 Juli Mallett <jmallett@FreeBSD.org>
|
||||
* 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.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include libkern support routines for 64-bit operations when building o32
|
||||
* kernels.
|
||||
*/
|
||||
#if defined(__mips_o32)
|
||||
#include <libkern/divdi3.c>
|
||||
#include <libkern/moddi3.c>
|
||||
#include <libkern/qdivrem.c>
|
||||
#include <libkern/udivdi3.c>
|
||||
#include <libkern/umoddi3.c>
|
||||
#endif
|
@ -42,7 +42,6 @@
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_cputype.h"
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_md.h"
|
||||
|
||||
|
@ -39,7 +39,6 @@
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_compat.h"
|
||||
#include "opt_cputype.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -87,7 +87,6 @@
|
||||
* assembly language support routines.
|
||||
*/
|
||||
|
||||
#include "opt_cputype.h"
|
||||
#include "opt_ddb.h"
|
||||
#include <sys/errno.h>
|
||||
#include <machine/asm.h>
|
||||
|
@ -56,7 +56,6 @@
|
||||
*/
|
||||
|
||||
#include "opt_compat.h"
|
||||
#include "opt_cputype.h"
|
||||
#include <sys/syscall.h>
|
||||
#include <machine/asm.h>
|
||||
#include <machine/cpu.h>
|
||||
|
@ -33,8 +33,6 @@
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_cputype.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
@ -42,7 +42,6 @@
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_compat.h"
|
||||
#include "opt_cputype.h"
|
||||
#include "opt_ddb.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -35,8 +35,6 @@
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_cputype.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
@ -33,8 +33,6 @@
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_cputype.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
@ -4,5 +4,4 @@
|
||||
files "../rt305x/files.rt305x"
|
||||
|
||||
cpu CPU_MIPS4KC
|
||||
options ISA_MIPS32
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
machine mips mipsel
|
||||
|
||||
cpu CPU_MIPS4KC
|
||||
options ISA_MIPS32
|
||||
options CPU_SENTRY5 # XXX should this be a
|
||||
# sub-cpu option?
|
||||
files "../sentry5/files.sentry5"
|
||||
|
Loading…
Reference in New Issue
Block a user