Commit Graph

132 Commits

Author SHA1 Message Date
matt 58438fb425 Move compat_13_machdep.c, strstr.c, copystr.S, bcopyinout.S, and
bcopy_page.S to arm/arm32 and remove port-local copies.
2001-03-04 08:25:38 +00:00
matt 4679f9115c Convert some vm_size_t to vsize_t/psize_t. Change vaddr_t to paddr_t
where appropriate.
2001-03-04 07:30:19 +00:00
matt f97f725bc9 Remove OFW hooks. Allow ports to add there own hooks via
ARM_EXTRA_DB_COMMANDS.
2001-03-04 05:40:03 +00:00
matt 4a5fdbf390 disksubr*.c are now shared. Start moving files from ../../arm32/arm32 2001-03-04 05:17:41 +00:00
matt 8655276e9a Move these from arm32/arm32 2001-03-04 05:11:41 +00:00
matt 4e6f220e99 Move these from arm32/arm32 2001-03-04 05:08:43 +00:00
matt 7d33ba27bf Move from arm32/arm32. s/vm_offset_t/vaddr_t/g 2001-03-04 05:08:09 +00:00
matt 79efd2285e These are same between arm32 & arm26. 2001-03-04 05:06:51 +00:00
matt 6755bfc8c1 s/vm_offset_t/vaddr_t/g 2001-03-04 04:15:58 +00:00
matt 7af4578cfc s/vm_offset_t/vaddr_t/g 2001-03-04 03:40:58 +00:00
bjh21 40333cf8fd Kill cpu_host and cpu_flags: they weren't having any practical effect. 2001-03-03 21:34:00 +00:00
bjh21 c32dba2092 Remove support for /dev/cpu*. This code has never done anything useful anyway. 2001-03-03 18:04:34 +00:00
bjh21 2a91058dd3 Remove spurious declaration of initialise_fpe(). 2001-03-03 17:49:58 +00:00
bjh21 2029721f3f NCPU will always be 1 if this file is being compiled at all, so don't bother
checking it.
2001-03-03 17:46:31 +00:00
bjh21 f578e88d0f Re-design identify_arm_cpu() to use a table of CPU types. This also makes
it easy for it to identify lots of CPU types, so have it do that too.
2001-03-03 17:09:25 +00:00
bjh21 5b15e666a1 ARM7100 -> ARM710A, following information from reinoud. 2001-03-01 23:45:56 +00:00
bjh21 c25aec3d9f PCB convergence, part the first:
Move the pointer to the current user trapframe from struct mdproc to struct
pcb (as on arm26).  Only tested by compiling kernels on arm32 and
hpcarm (dnard seems to be incomplete anyway).  Someone should try running one.
2001-02-28 18:15:42 +00:00
bjh21 b4e78a4e60 Large overhaul for arm26 compatibility. This file is now even more of a mess
than it was.
2001-02-28 00:17:18 +00:00
bjh21 748ec610af opt_armfpe.h isn't arm32-specific any more. 2001-02-27 17:57:55 +00:00
bjh21 4b483d7606 Move "options ARMFPE" to files.arm, so generic ARM files can use it. 2001-02-27 17:56:31 +00:00
bjh21 088fe8f336 <arm/armreg.h> isn't arm26-specific any more. 2001-02-27 17:42:16 +00:00
bjh21 22260fa7fd Tidy up ARM7500 restrictions.
Also insist on precisely one of PROG32 and PROG26's being turned on.
2001-02-27 17:35:49 +00:00
reinoud 5b52fda1e6 cpu_number() macro has no args 2001-02-27 16:00:27 +00:00
reinoud 639dd9ffea Rollback of patch ... there was a bug in the proc.h 2001-02-27 15:39:57 +00:00
bjh21 807ebaec96 Stop using #ifdef arm32, since future NetBSD/arm ports are likely
not to provide it.

For things which are historical oddities of NetBSD/arm26, use #ifndef arm26.
For things which are inherently dependent on the size of program space in use,
use #ifdef PROG32 (and include opt_progmode.h).
2001-02-27 14:11:30 +00:00
bjh21 00b8524181 KNF 2001-02-27 14:00:24 +00:00
reinoud 38fb2a9227 Due to changes in ../sys/proc.h ``cpu_wait(p)'' is now a function due to the
prototype defined it in ... added it to arm/vm_machdep.c since all ARM machines
are still single processor anyway
2001-02-27 00:16:48 +00:00
bjh21 6584a7e79d This file doesn't need <machine/cpus.h>. 2001-02-26 16:33:10 +00:00
bjh21 5a5316cafe Nothing in this file needs <sys/param.h>, so stop including it. 2001-02-26 16:04:22 +00:00
bjh21 51a131dac3 The cpu_local and cpu_cd elements of struct _cpu were utterly unused. Remove
them.
2001-02-26 14:52:11 +00:00
bjh21 2ff5d800ab Fix up indentation, and remove a spurious set of braces. Should be no
semantic change from the last revision.
2001-02-26 14:01:58 +00:00
bjh21 03737e3e40 fpe-sp, and the associated "options FPE", was deleted in 1997. G/C references
to it.
2001-02-26 13:45:07 +00:00
reinoud bb5b27eed9 Putting the param.h back into the arm32 resp. hpcarm include directories 2001-02-26 00:08:41 +00:00
bjh21 3fb058011a Move arm32 ports over to using <arm/armreg.h>, so <cpu.h> mostly contains
NetBSD-specific definitions.

This also entails some changes to the way CPU identification is done.  I hope
I've got it right.
2001-02-25 21:31:13 +00:00
bjh21 bdc357ddfa Guess a CPU ID for the ARM700 as well. 2001-02-25 19:10:28 +00:00
bjh21 c7c73cbe90 The cpu_type element of struct _cpu was only used in identify_arm_cpu().
Make it a local variable.
2001-02-25 18:40:26 +00:00
bjh21 9dcb8e583c Add possible CPU ID for ARM7500 (based on arm/cpu.h).
Add macros to distinguish the three formats of CPU ID.
2001-02-25 17:49:34 +00:00
bjh21 740551d1d1 Add PROG32 and PROG26 options.
These are intended to indicate what size of program space is in use, and hence
how to get at the PSR bits.  They're currently set automatically by the CPU
type options.
2001-02-25 17:23:11 +00:00
bjh21 716d92bdc2 COPY_SIGCODE is never referenced in the kernel, and the comment attached to it
is out of date. Assume it's obsolete and g/c it.
2001-02-25 17:04:54 +00:00
bjh21 6f2aa0d0ba Allow "cpu" to have children. In the long term, this may be the best way to
handle co-processors.  In the short term, it's a necessary hack to get arm26
kernels to configure.
2001-02-25 15:31:39 +00:00
reinoud 142f62c206 Moved the mainbus files to the arm/conf/file.arm from the arm32 and the
hpcarm/conf/files.hpcarm
2001-02-24 21:43:01 +00:00
reinoud 086a93939c Part 2 of merge.... the dissapearance of mainbus from arm32 and hpcarm;
these parts were a 100% the same and i've included the extensions made by
hpcarm in the tree.
Checked for occurence of MD parts; none found.
2001-02-24 19:38:01 +00:00
toshii f46f7e3e62 Make hpcarm kernel compile again. 2001-02-24 09:58:43 +00:00
ichiro d3ce44c170 some include files added newly write into Makefile. 2001-02-24 07:24:36 +00:00
bjh21 6b7ad3aa3e __HAVE_NWSCONS and __HAVE_DEVICE_REGISTER are MACHINE-dependent. 2001-02-23 22:02:43 +00:00
reinoud c1f753f9b4 Big patch for merging common include files of the new hpcarm tree and the old arm32
tree into the new arm substree. All moved files are relinked with a stub that included
the file from the new location; this might be done better later.
2001-02-23 21:23:45 +00:00
bjh21 352dfb6c36 Update to support VFP formats. Also a half-hearted attempt at armeb support.
Note that I'm using __VFP_FP__ to indicate compilation with VFP-format
floating-point data.  There doesn't (currently) seem to be a standard define
for this purpose.  __VFP_FP__ was suggested by Richard Earnshaw.
2001-02-21 17:43:50 +00:00
bjh21 887895c344 Add CPU_ID_CPU_MASK. Different, but (I hope) more useful definition than
arm32 currently uses.
2001-02-21 17:41:58 +00:00
bjh21 32a800e5c0 Install <arm/endian_machdep.h>. 2001-02-17 14:57:08 +00:00
bjh21 8b601afaf3 Re-introduce <arm/endian_machdep.h>, this time using GCC's idea of the target
endianness.
2001-02-17 14:55:44 +00:00
bjh21 9b6de1da90 Move cpu_coredump() from arm32/arm32/vm_machdep.c to arm/arm/vm_machdep_arm.c.
Also ANSIfy it and use it on arm26.
2001-02-13 22:54:25 +00:00
simonb e07c392eed Fix typo in header filename. 2001-02-13 14:11:30 +00:00
bjh21 284047a2b2 Move sendsig() and sys___sigreturn14() from arm26/arm26/vm_machdep.c and
arm32/arm32/machdep.c into arm/arm/sig_machdep.c, merging and ANSIfying in
the process.

The code is based on the arm32 version, so I don't think anything should break
there.
2001-02-13 13:19:52 +00:00
bjh21 a4e55e0f13 Shared ARM ptrace(2) implementation. Mostly the same as the arm32
version, but with some #ifdefs for arm26.

Also, don't define PT_STEP, since we don't implement it.  This should
reduce code size a little.
2001-02-11 17:03:04 +00:00
bjh21 9826a76781 Common <arm/reg.h> (and hence common struct reg) for ARM.
This is theoretically backward-incompatible on arm26, but GDB doesn't work there
yet anyway.
2001-02-11 14:51:55 +00:00
bjh21 1178bf4219 Initial potentially sharable <arm/armreg.h>. Used by all arm26 code. 2001-01-22 22:10:39 +00:00
bjh21 8805bd8b56 Unify arm26 and arm32 trapframe structures. The unified trapframe is the same
shape as the old arm32 one, but there are a few #defines to keep arm26 code
happy.  Anything that depends on the precise shape of the trapframe,
and especially on being able to treat it as an array of registers, has been
updated.
2001-01-20 17:14:19 +00:00
bjh21 2c20803b63 Add extra constants defined by ARM ELF revision B01. 2001-01-18 23:50:50 +00:00
bjh21 48f4b0ea72 Tidy up some comments. 2001-01-18 21:54:28 +00:00
bjh21 2c89ce7e74 Add <arm/frame.h>, for shared stack frame structures. Currently, only sigframes
are common.
2001-01-18 21:48:25 +00:00
bjh21 6b017eaa04 Add ARMv5 instructions: BLX, CLZ, BKPT, MCR2, MRC2, CDP2, LDC2, STC2.
Also correct a comment.
2001-01-18 21:41:09 +00:00
bjh21 e1e042445c A bit of extra discussion based on the latest ARM ARM. 2001-01-18 20:42:03 +00:00
bjh21 8df387473f Move <machine/signal.h> into shared directory. 2001-01-13 17:02:36 +00:00
bjh21 70d40a123c Make db_disasm_interface const. 2001-01-13 16:53:27 +00:00
bjh21 f52101bc64 Make all the disasm_interface_t arguments const, thus allowing us to
allocate them statically in the text segment.  Do so for disassemble().
2001-01-13 16:52:01 +00:00
bjh21 792b8500bc ANSIfy, un-__Pify, and in the case of disassem.c, add an RCSID. 2001-01-13 16:44:25 +00:00
bjh21 78c0ba909e Separate out sigcode into its own file, since it's shared by arm26 and arm32. 2001-01-13 00:06:50 +00:00
bjh21 e4cacac41c Storing four-byte pointers to two-character strings is silly. All the
auxilliary tables used by the disassembler are now char[][].

The main table still uses pointers because:
 - the longest instruction name, "imbrange" is >7 characters long, which would
   make the field length wasteful.
 - GCC spots that most of the formats are shared and makes them pointers to the
   same string, so turning them into char[8] would be counter-productive.
2001-01-12 23:33:07 +00:00
bjh21 ca0f6df99d Move all the nasty big tables into the text segment. This isn't much use in
the kernel at present, but maybe one day when we have a ROMmable kernel...
2001-01-12 22:44:08 +00:00
bjh21 cdae07e857 Correct comments (the code does support LDF, STF, LDC, STC).
Support BX (for completeness).
Correct spelling of SWP.
2001-01-12 22:19:15 +00:00
bjh21 e9bb2a7916 Correct immediate constant handling: bits [11:8] are a rotation, not a shift.
Also add support for the "P" modifier to TEQ, TST, CMP and CMN, and don't
bother displaying the "S" bit for these instructions.

Together, these correct the disassembly of 0xe33ff3c2 (an instruction in
arm26 irq_handler() from "teqs r15, #0x08000000" to "teqp r15, 0x08000003".
2001-01-12 21:56:18 +00:00
bjh21 d6928b5422 Prototypes for disassemble_readword() and disassemble_printaddr(). 2001-01-12 21:35:48 +00:00
bjh21 a5ef6e1f81 Move db_disasm.c into sys/arch/arm/arm. Use arm26 version, since it should
generate smaller compiled code.
2001-01-12 21:31:51 +00:00
bjh21 a4047bf10c Move the generic ARM disassembler from arm32/arm32 to arm/arm. 2001-01-12 13:43:11 +00:00
bjh21 6fa98146d5 Start merging actual code in arm32 and arm26:
arm32/arm32/in_cksum_arm32.c -> arm/arm/in_cksum_arm.c

Also move specification of other checksum stuff to files.arm, even though we
use the MI code for that.
2001-01-11 23:27:26 +00:00
bjh21 5159a10d97 Share <machine/elf_machdep.h> between arm26 and arm32. 2001-01-11 22:28:06 +00:00
bjh21 dc037466f5 Install all the headers (arm32 does). 2001-01-11 21:05:03 +00:00
bjh21 1add2fd369 Remove <arm/endian_machdep.h>, since we might get a big-endian ARM port
some time.
2001-01-11 21:03:10 +00:00
bjh21 0cc28d54b1 ... this one's utterly pointless though. 2001-01-10 19:05:46 +00:00
bjh21 29de7da78b Header files which don't differ between arm32 and arm26 and can thus be
shared.
2001-01-10 19:02:05 +00:00
bjh21 9e0af76a89 Empty file to keep config happy. 2001-01-10 18:33:47 +00:00
bjh21 f4774e6659 Skeleton ARM include infrastructure. 2001-01-10 18:23:02 +00:00