ARM updates
Due to the ABI we are using we have to use the earm architecture moniker for the build system to behave correctly. This involves then some headers to move around. There is also a few related Makefile updates as well as minor source code corrections.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
INCSDIR= /usr/include/arm
|
||||
|
||||
INCS= ansi.h asm.h \
|
||||
INCS= aeabi.h ansi.h asm.h \
|
||||
bswap.h byte_swap.h \
|
||||
cdefs.h cpu.h \
|
||||
disklabel.h \
|
||||
@@ -13,9 +13,9 @@ INCS= ansi.h asm.h \
|
||||
\
|
||||
limits.h lock.h \
|
||||
math.h mcontext.h mutex.h \
|
||||
param.h profile.h \
|
||||
\
|
||||
param.h profile.h rwlock.h \
|
||||
\
|
||||
rwlock.h \
|
||||
setjmp.h signal.h \
|
||||
types.h \
|
||||
\
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
/* $NetBSD: aeabi.h,v 1.2 2012/08/11 16:21:26 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2012 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
|
||||
*/
|
||||
#ifndef _ARM_AEABI_H_
|
||||
#define _ARM_AEABI_H_
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#define __value_in_regs /* nothing */
|
||||
|
||||
/*
|
||||
* Standard double precision floating-point arithmetic helper functions
|
||||
*/
|
||||
double __aeabi_dadd(double, double); // double-precision addition
|
||||
double __aeabi_ddiv(double n, double d); // double-precision division, n / d
|
||||
double __aeabi_dmul(double, double); // double-precision multiplication
|
||||
double __aeabi_drsub(double x, double y); // double-precision reverse subtraction, y - x
|
||||
double __aeabi_dsub(double x, double y); // double-precision subtraction, x - y
|
||||
double __aeabi_dneg(double); // double-precision negation (obsolete, to be removed in r2.09)
|
||||
|
||||
/*
|
||||
* Double precision floating-point comparison helper functions
|
||||
*/
|
||||
void __aeabi_cdcmpeq(double, double); // non-excepting equality comparison [1], result in PSR ZC flags
|
||||
void __aeabi_cdcmple(double, double); // 3-way (<, =, >) compare [1], result in PSR ZC flags
|
||||
void __aeabi_cdrcmple(double, double); // reversed 3-way (<, =, >) compare [1], result in PSR ZC flags
|
||||
int __aeabi_dcmpeq(double, double); // result (1, 0) denotes (=, <>) [2], use for C == and !=
|
||||
int __aeabi_dcmplt(double, double); // result (1, 0) denotes (<, >=) [2], use for C <
|
||||
int __aeabi_dcmple(double, double); // result (1, 0) denotes (<=, >) [2], use for C <=
|
||||
int __aeabi_dcmpge(double, double); // result (1, 0) denotes (>=, <) [2], use for C >=
|
||||
int __aeabi_dcmpgt(double, double); // result (1, 0) denotes (>, <=) [2], use for C >
|
||||
int __aeabi_dcmpun(double, double); // result (1, 0) denotes (?, <=>) [2], use for C99 isunordered()
|
||||
|
||||
/*
|
||||
* Standard single precision floating-point arithmetic helper functions
|
||||
*/
|
||||
float __aeabi_fadd(float, float); // single-precision addition
|
||||
float __aeabi_fdiv(float n, float d); // single-precision division, n / d
|
||||
float __aeabi_fmul(float, float); // single-precision multiplication
|
||||
float __aeabi_frsub(float x, float y); // single-precision reverse subtraction, y - x
|
||||
float __aeabi_fsub(float x, float y); // single-precision subtraction, x - y
|
||||
float __aeabi_fneg(float); // single-precision negation (obsolete, to be removed in r2.09)
|
||||
|
||||
/*
|
||||
* Standard single precision floating-point comparison helper functions
|
||||
*/
|
||||
void __aeabi_cfcmpeq(float, float); // non-excepting equality comparison [1], result in PSR ZC flags
|
||||
void __aeabi_cfcmple(float, float); // 3-way (<, =, ?>) compare [1], result in PSR ZC flags
|
||||
void __aeabi_cfrcmple(float, float); // reversed 3-way (<, =, ?>) compare [1], result in PSR ZC flags
|
||||
int __aeabi_fcmpeq(float, float); // result (1, 0) denotes (=, <>) [2], use for C == and !=
|
||||
int __aeabi_fcmplt(float, float); // result (1, 0) denotes (<, >=) [2], use for C <
|
||||
int __aeabi_fcmple(float, float); // result (1, 0) denotes (<=, >) [2], use for C <=
|
||||
int __aeabi_fcmpge(float, float); // result (1, 0) denotes (>=, <) [2], use for C >=
|
||||
int __aeabi_fcmpgt(float, float); // result (1, 0) denotes (>, <=) [2], use for C >
|
||||
int __aeabi_fcmpun(float, float); // result (1, 0) denotes (?, <=>) [2], use for C99 isunordered()
|
||||
|
||||
/*
|
||||
* Standard conversions between floating types
|
||||
*/
|
||||
float __aeabi_d2f(double); // double to float (single precision) conversion
|
||||
double __aeabi_f2d(float); // float (single precision) to double conversion
|
||||
float __aeabi_h2f(short hf); // IEEE 754 binary16 storage format (VFP half precision) to binary32 (float) conversion [4, 5]
|
||||
short __aeabi_f2h(float f); // IEEE 754 binary32 (float) to binary16 storage format (VFP half precision) conversion [4, 6]
|
||||
float __aeabi_h2f_alt(short hf); // __aeabi_h2f_alt converts from VFP alternative format [7].
|
||||
short __aeabi_f2h_alt(float f); // __aeabi_f2h_alt converts to VFP alternative format [8].
|
||||
|
||||
/*
|
||||
* Standard floating-point to integer conversions
|
||||
*/
|
||||
int __aeabi_d2iz(double); // double to integer C-style conversion [3]
|
||||
unsigned __aeabi_d2uiz(double); // double to unsigned C-style conversion [3]
|
||||
long long __aeabi_d2lz(double); // double to long long C-style conversion [3]
|
||||
unsigned long long __aeabi_d2ulz(double); // double to unsigned long long C-style conversion [3]
|
||||
int __aeabi_f2iz(float); // float (single precision) to integer C-style conversion [3]
|
||||
unsigned __aeabi_f2uiz(float); // float (single precision) to unsigned C-style conversion [3]
|
||||
long long __aeabi_f2lz(float); // float (single precision) to long long C-style conversion [3]
|
||||
unsigned long long __aeabi_f2ulz(float); // float to unsigned long long C-style conversion [3]
|
||||
|
||||
/*
|
||||
* Standard integer to floating-point conversions
|
||||
*/
|
||||
double __aeabi_i2d(int); // integer to double conversion
|
||||
double __aeabi_ui2d(unsigned); // unsigned to double conversion
|
||||
double __aeabi_l2d(long long); // long long to double conversion
|
||||
double __aeabi_ul2d(unsigned long long); // unsigned long long to double conversion
|
||||
float __aeabi_i2f(int); // integer to float (single precision) conversion
|
||||
float __aeabi_ui2f(unsigned); // unsigned to float (single precision) conversion
|
||||
float __aeabi_l2f(long long); // long long to float (single precision) conversion
|
||||
float __aeabi_ul2f(unsigned long long); // unsigned long long to float (single precision) conversion
|
||||
|
||||
/*
|
||||
* Long long functions
|
||||
*/
|
||||
long long __aeabi_lmul(long long, long long); // multiplication
|
||||
|
||||
/*
|
||||
* A pair of (unsigned) long longs is returned in {{r0, r1}, {r2, r3}},
|
||||
* the quotient in {r0, r1}, and the remainder in {r2, r3}.
|
||||
*/
|
||||
typedef struct { long long quot; long long rem; } lldiv_t;
|
||||
__value_in_regs lldiv_t __aeabi_ldivmod(long long n, long long d); // signed long long division and remainder, {q, r} = n / d [2]
|
||||
|
||||
typedef struct { unsigned long long quot; unsigned long long rem; } ulldiv_t;
|
||||
__value_in_regs ulldiv_t __aeabi_uldivmod(unsigned long long n, unsigned long long d); // unsigned signed ll division, remainder, {q, r} = n / d [2]
|
||||
|
||||
/*
|
||||
* Because of 2's complement number representation, these functions work
|
||||
* identically with long long replaced uniformly by unsigned long long.
|
||||
* Each returns its result in {r0, r1}, as specified by the [AAPCS].
|
||||
*/
|
||||
long long __aeabi_llsl(long long, int); // logical shift left [1]
|
||||
long long __aeabi_llsr(long long, int); // logical shift right [1]
|
||||
long long __aeabi_lasr(long long, int); // arithmetic shift right [1]
|
||||
|
||||
/*
|
||||
* The comparison functions return negative, zero, or a positive integer
|
||||
* according to whether the comparison result is <, ==, or >, respectively
|
||||
* (like strcmp).
|
||||
*/
|
||||
int __aeabi_lcmp(long long, long long); // signed long long comparison
|
||||
int __aeabi_ulcmp(unsigned long long, unsigned long long); // unsigned long long comparison
|
||||
|
||||
int __aeabi_idiv(int numerator, int denominator);
|
||||
unsigned __aeabi_uidiv(unsigned numerator, unsigned denominator);
|
||||
typedef struct { int quot, rem; } idiv_return;
|
||||
typedef struct { unsigned int quot, rem; } uidiv_return;
|
||||
__value_in_regs idiv_return __aeabi_idivmod(int, int);
|
||||
__value_in_regs uidiv_return __aeabi_uidivmod(unsigned int, unsigned int);
|
||||
|
||||
/*
|
||||
* Division by zero
|
||||
*
|
||||
* If an integer or long long division helper function is called upon to
|
||||
* divide by 0, it should return as quotient the value returned by a call
|
||||
* to __aeabi_idiv0 or __aeabi_ldiv0, respectively. A *divmod helper should
|
||||
* return as remainder either 0 or the original numerator.
|
||||
*/
|
||||
int __aeabi_idiv0(int);
|
||||
long long __aeabi_ldiv0(long long);
|
||||
|
||||
/*
|
||||
* These functions read and write 4-byte and 8-byte values at arbitrarily
|
||||
* aligned addresses. Write functions return the value written,
|
||||
* read functions the value read.
|
||||
*/
|
||||
int __aeabi_uread4(void *);
|
||||
int __aeabi_uwrite4(int, void *);
|
||||
long long __aeabi_uread8(void *);
|
||||
long long __aeabi_uwrite8(long long, void *);
|
||||
|
||||
/*
|
||||
* Memory copying, clearing, and setting
|
||||
*/
|
||||
void __aeabi_memcpy8(void *, const void *, size_t);
|
||||
void __aeabi_memcpy4(void *, const void *, size_t);
|
||||
void __aeabi_memcpy(void *, const void *, size_t);
|
||||
void __aeabi_memmove8(void *, const void *, size_t);
|
||||
void __aeabi_memmove4(void *, const void *, size_t);
|
||||
void __aeabi_memmove(void *, const void *, size_t);
|
||||
|
||||
/*
|
||||
* Memory clearing and setting
|
||||
*/
|
||||
void __aeabi_memset8(void *, size_t, int);
|
||||
void __aeabi_memset4(void *, size_t, int);
|
||||
void __aeabi_memset(void *, size_t, int);
|
||||
void __aeabi_memclr8(void *, size_t);
|
||||
void __aeabi_memclr4(void *, size_t);
|
||||
void __aeabi_memclr(void *, size_t);
|
||||
|
||||
void *__aeabi_read_tp(void); // return the value of $tp
|
||||
|
||||
#endif /* _ARM_AEABI_H_ */
|
||||
@@ -31,6 +31,8 @@
|
||||
* from: @(#)ansi.h 8.2 (Berkeley) 1/4/94
|
||||
*/
|
||||
|
||||
/* These types are Minix specific. */
|
||||
|
||||
#ifndef _ANSI_H_
|
||||
#define _ANSI_H_
|
||||
|
||||
@@ -47,15 +49,15 @@
|
||||
* #undef _BSD_SIZE_T_
|
||||
* #endif
|
||||
*/
|
||||
#define _BSD_CLOCK_T_ long /* clock() */
|
||||
#define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */
|
||||
#define _BSD_SIZE_T_ unsigned int /* sizeof() */
|
||||
#define _BSD_SSIZE_T_ int /* byte count or error */
|
||||
#define _BSD_TIME_T_ long /* time() */
|
||||
#define _BSD_CLOCK_T_ int /* clock() */
|
||||
#define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */
|
||||
#define _BSD_SIZE_T_ unsigned int /* sizeof() */
|
||||
#define _BSD_SSIZE_T_ int /* byte count or error */
|
||||
#define _BSD_TIME_T_ int /* time() */
|
||||
#define _BSD_CLOCKID_T_ int /* clockid_t */
|
||||
#define _BSD_TIMER_T_ int /* timer_t */
|
||||
#define _BSD_SUSECONDS_T_ long /* suseconds_t */
|
||||
#define _BSD_USECONDS_T_ long /* useconds_t */
|
||||
#define _BSD_SUSECONDS_T_ int /* suseconds_t */
|
||||
#define _BSD_USECONDS_T_ int /* useconds_t */
|
||||
#define _BSD_WCHAR_T_ int /* wchar_t */
|
||||
#define _BSD_WINT_T_ int /* wint_t */
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# $NetBSD: Makefile,v 1.2 2002/11/26 23:30:12 lukem Exp $
|
||||
|
||||
INCSDIR= /usr/include/arm/arm26
|
||||
|
||||
INCS= types.h
|
||||
|
||||
.include <bsd.kinc.mk>
|
||||
@@ -0,0 +1,47 @@
|
||||
/* $NetBSD: types.h,v 1.1 2001/11/22 17:59:57 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wasabi Systems, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Jason R. Thorpe for Wasabi Systems, Inc.
|
||||
*
|
||||
* 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 for the NetBSD Project by
|
||||
* Wasabi Systems, Inc.
|
||||
* 4. The name of Wasabi Systems, Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_ARM26_TYPES_H_
|
||||
#define _ARM_ARM26_TYPES_H_
|
||||
|
||||
#ifdef _KERNEL
|
||||
#define __PROG26 /* indicate 26-bit mode */
|
||||
#endif
|
||||
|
||||
#include <arm/types.h> /* pull in generic ARM definitions */
|
||||
|
||||
#endif /* _ARM_ARM26_TYPES_H_ */
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
INCSDIR= /usr/include/arm/arm32
|
||||
|
||||
INCS= types.h vmparam.h
|
||||
INCS= param.h types.h vmparam.h
|
||||
|
||||
.include <bsd.kinc.mk>
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
/* $NetBSD: param.h,v 1.17 2012/02/04 17:56:16 para Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994,1995 Mark Brinicombe.
|
||||
* 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 RiscBSD team.
|
||||
* 4. The name "RiscBSD" nor the name of the author may be used to
|
||||
* endorse or promote products derived from this software without specific
|
||||
* prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY RISCBSD ``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 RISCBSD 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.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_ARM32_PARAM_H_
|
||||
#define _ARM_ARM32_PARAM_H_
|
||||
|
||||
#ifdef _KERNEL
|
||||
# include <machine/cpu.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Machine dependent constants for ARM6+ processors
|
||||
*/
|
||||
/* These are defined in the Port File before it includes
|
||||
* this file. */
|
||||
|
||||
#define PGSHIFT 12 /* LOG2(NBPG) */
|
||||
#define NBPG (1 << PGSHIFT) /* bytes/page */
|
||||
#define PGOFSET (NBPG-1) /* byte offset into page */
|
||||
#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
|
||||
|
||||
|
||||
#define SSIZE 1 /* initial stack size/NBPG */
|
||||
#define SINCR 1 /* increment of stack/NBPG */
|
||||
#define UPAGES 2 /* pages of u-area */
|
||||
#define USPACE (UPAGES * NBPG) /* total size of u-area */
|
||||
|
||||
#ifndef MSGBUFSIZE
|
||||
#define MSGBUFSIZE NBPG /* default message buffer size */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
|
||||
* logical pages.
|
||||
*/
|
||||
#define NKMEMPAGES_MIN_DEFAULT ((8 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
#define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT)
|
||||
|
||||
/* Constants used to divide the USPACE area */
|
||||
|
||||
/*
|
||||
* The USPACE area contains :
|
||||
* 1. the pcb structure for the process
|
||||
* 2. the fp context for FP emulation
|
||||
* 3. the kernel (svc) stack
|
||||
*
|
||||
* The layout of the area looks like this
|
||||
*
|
||||
* | uarea | FP context | kernel stack |
|
||||
*
|
||||
* The size of the uarea is known.
|
||||
* The size of the FP context is variable depending of the FP emulator
|
||||
* in use and whether there is hardware FP support. However we can put
|
||||
* an upper limit on it.
|
||||
* The kernel stack should be at least 4K is size.
|
||||
*
|
||||
* The stack top addresses are used to set the stack pointers. The stack bottom
|
||||
* addresses at the addresses monitored by the diagnostic code for stack overflows
|
||||
*
|
||||
*/
|
||||
|
||||
#define FPCONTEXTSIZE (0x100)
|
||||
#define USPACE_SVC_STACK_TOP (USPACE)
|
||||
#define USPACE_SVC_STACK_BOTTOM (sizeof(struct pcb) + FPCONTEXTSIZE + 10)
|
||||
|
||||
#define arm_btop(x) ((x) >> PGSHIFT)
|
||||
#define arm_ptob(x) ((x) << PGSHIFT)
|
||||
#define arm_trunc_page(x) ((unsigned)(x) & ~PGOFSET)
|
||||
|
||||
#ifdef _KERNEL
|
||||
#ifndef _LOCORE
|
||||
void delay(unsigned);
|
||||
#define DELAY(x) delay(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <arm/param.h>
|
||||
|
||||
#endif /* _ARM_ARM32_PARAM_H_ */
|
||||
@@ -88,6 +88,12 @@
|
||||
#define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y))
|
||||
#define ASEND(y) _END(_ASM_LABEL(y))
|
||||
|
||||
#if defined(__minix)
|
||||
#define _LABEL(x) \
|
||||
.globl x; x:
|
||||
#define LABEL(y) _LABEL(_C_LABEL(y))
|
||||
|
||||
#endif /* defined(__minix) */
|
||||
#define ASMSTR .asciz
|
||||
|
||||
#if defined(PIC)
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef unsigned long long int __uint64_t;
|
||||
|
||||
/* 7.18.1.4 Integer types capable of holding object pointers */
|
||||
|
||||
typedef long int __intptr_t;
|
||||
typedef unsigned long int __uintptr_t;
|
||||
typedef int __intptr_t;
|
||||
typedef unsigned int __uintptr_t;
|
||||
|
||||
#endif /* !_ARM32_INT_TYPES_H_ */
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/* $NetBSD: rwlock.h,v 1.5 2008/04/28 20:23:14 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002, 2006 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Jason R. Thorpe and Andrew Doran.
|
||||
*
|
||||
* 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
|
||||
*/
|
||||
|
||||
#ifndef _ARM_RWLOCK_H_
|
||||
#define _ARM_RWLOCK_H_
|
||||
|
||||
struct krwlock {
|
||||
volatile uintptr_t rw_owner;
|
||||
};
|
||||
|
||||
#ifdef __RWLOCK_PRIVATE
|
||||
|
||||
#define __HAVE_SIMPLE_RW_LOCKS 1
|
||||
|
||||
#define RW_RECEIVE(rw) /* nothing */
|
||||
#define RW_GIVE(rw) /* nothing */
|
||||
|
||||
unsigned long _lock_cas(volatile unsigned long *,
|
||||
unsigned long, unsigned long);
|
||||
|
||||
#define RW_CAS(p, o, n) \
|
||||
(_lock_cas((volatile unsigned long *)(p), (o), (n)) == (o))
|
||||
|
||||
#endif /* __RWLOCK_PRIVATE */
|
||||
|
||||
#endif /* _ARM_RWLOCK_H_ */
|
||||
@@ -24,6 +24,7 @@ struct sigframe { /* stack frame created for signalled process */
|
||||
};
|
||||
|
||||
struct sigcontext {
|
||||
int trap_style; /* how should context be restored? KTS_* */
|
||||
int sc_flags; /* sigstack state to restore (including
|
||||
* MF_FPU_INITIALIZED)
|
||||
*/
|
||||
|
||||
@@ -87,7 +87,9 @@ typedef volatile int __cpu_simple_lock_t;
|
||||
#define __HAVE_CPU_DATA_FIRST
|
||||
#define __HAVE___LWP_GETPRIVATE_FAST
|
||||
#define __HAVE_COMMON___TLS_GET_ADDR
|
||||
#if !defined(__minix)
|
||||
#define __HAVE_TLS_VARIANT_I
|
||||
#endif /* !defined(__minix) */
|
||||
|
||||
#if defined(_KERNEL) || defined(_KMEMUSER)
|
||||
#define PCU_FPU 0
|
||||
|
||||
Reference in New Issue
Block a user