Commit Graph

27 Commits

Author SHA1 Message Date
thorpej 7d3e137a0c Hard-wire CLKF_BASEPRI() to 0 on the ARM, since spllowersoftclock() might
not actually be able to unblock the interrupt, which would cause us
to run the softclock interrupts with hardclock blocked.

Per discussion w/ Charles Hannum.
2002-05-08 22:22:46 +00:00
thorpej 32a0860797 Centralize ARM CPU configuration information by adding a new header
file, <arm/cpuconf.h>, which pulls in "opt_cputypes.h" and then defines
the following:
* CPU_NTYPES -- now many CPU types are configured into the kernel.  What
  you really want to know is "== 1" or "> 1".
* Defines ARM_ARCH_2, ARM_ARCH_3, ARM_ARCH_4, ARM_ARCH_5, depending
  on which ARM architecture versions are configured (based on CPU_*
  options).  Also defines ARM_NARCH to determins how many architecture
  versions are configured.
* Defines ARM_MMU_MEMC, ARM_MMU_GENERIC, ARM_MMU_XSCALE depending on
  which classes of ARM MMUs are configured into the kernel, and ARM_NMMUS
  to determine how many MMU classes are configured.

Remove the needless inclusion of "opt_cputypes.h" in several places.
Convert remaining users to <arm/cpuconf.h>.
2002-04-12 18:50:29 +00:00
thorpej 20b1bb2655 Clean up handling of the vector page on 32-bit ARM systems:
* Don't refer to VA 0, instead refer to a new variable: vector_page
* Delete the old zero_page_*() functions, replacing them with a new
  one: vector_page_setprot().
* When manipulating vector page mappings in user pmaps, only do so if
  the vector page is below KERNEL_BASE (if it's above KERNEL_BASE, the
  vector page is mapped by the kernel pmap).
* Add a new function, arm32_vector_init(), which takes the virtual
  address of the vector page (which MUST be valid when the function
  is called) and a bitmask of vectors the kernel is going to take
  over, and performs all vector page initialization, including setting
  the V bit in the CPU Control register ("relocate vectors to high
  address"), if necessary.
2002-04-03 23:33:26 +00:00
thorpej ea553e2681 Cache the cpu type and cpu revision in cpu_info. 2002-03-24 22:02:58 +00:00
bjh21 99ba40c188 arm26->acorn26 transition. 2002-03-24 15:49:38 +00:00
bjh21 63231772e8 Add a ci_dev element to struct cpu_info, pointing to the device that
corresponds to the CPU.
2002-03-10 11:06:01 +00:00
bjh21 1c1e3f8439 Replace cpu_id and cpu_ctrl in struct _cpu with ci_cpuid and ci_ctrl in
struct cpu_info.  Also kill the cpuctrl global while we're here, and make
identify_arm_cpu() take a struct cpu_info * as an argument alongside the CPU
number.
2002-03-09 21:30:57 +00:00
bjh21 20917f120c Move arm700bugcount into stuct cpu_info, and attach it in
identify_master_cpu().
2002-03-09 19:11:20 +00:00
thorpej e594c94727 Some prototype cleanup. 2002-01-20 03:41:47 +00:00
bjh21 00bd2cbdac Merge ast() and userret() between arm32 and arm26. The implementation used
is the arm32 one.
2001-12-21 22:56:16 +00:00
thorpej 67fd41ddbf Add 26-bit and 32-bit types.h files, which indicate the programming
model in use for a given platform (__PROG26 vs __PROG32), then pulls
in <arm/types.h>.  Change each ARM port to pull in <arm/arm26/types.h>
or <arm/arm32/types.h> as appropriate.  Change all references to PROG26
and PROG32 to __PROG26 and __PROG32.  Eliminate the opt_progmode.h
header file.
2001-11-22 17:59:57 +00:00
thorpej 42a10f6cd4 Implement a badaddr_read() routine which performs a load of the
specified size for the caller, and returns true or false indicating
whether or not a Data Abort occurred (i.e. the address was "bad").
2001-11-09 17:58:00 +00:00
bjh21 ea353a48e1 Purge CPU_ARM7500. Thanks to Reinoud's work, it's no longer needed. 2001-07-10 20:43:57 +00:00
reinoud 8ca7d6ec9c Initial commit for merging A7000/NC with the RISCPC in order to get _one_
bootable GENERAL kernel for the 3 machines.

This is done by integrating the ARM7500 in a better way. In various places
the IOMD ID is checked and action is taken at runtime compared to
compiletime.

The small piece of assembler that is changed now uses the flag
`arm7500_ioc_found' that is set up by iomd.c at startup. When this chip
isnt found at startup it will skip reading the ARM7500 extended IRQ
registers and wont clear them either.

The next step will be getting the mode-definition files to the bootloader.
Currently they are compiled in.
2001-07-09 21:46:19 +00:00
thorpej 8eb3b954f1 Don't need to prototype child_return() here, it's in <sys/proc.h>. 2001-06-14 22:56:55 +00:00
bjh21 b9ded015f4 strstr() is no longer used in the kernel. G/C it. 2001-05-13 14:17:36 +00:00
bjh21 63692f5771 Rather large overhaul. Mostly cosmetic, but also:
Provide PROC_PC on arm26.
Provide working CLKF_INTR on arm26.
Make setsoftast a macro everywhere.
2001-04-24 18:20:21 +00:00
matt 1a5fe5b583 Split cpu from mainbus so that cpu can attached to other buses (like ofbus). 2001-04-20 18:08:48 +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 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
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 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 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
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