Commit Graph

565 Commits

Author SHA1 Message Date
atatat 31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
bjh21 a12e90b08f Only put the CPU type into cpu_model, not the state of the control register.
Instead, print the control register state on the next line at startup.
2002-03-16 18:47:51 +00:00
bjh21 dccc5d2c67 Get rid of the #ifdef DEBUG_FAULT_CORRECTION #ifdef mess, and use a
couple of conditionally-defined macros instead.  This makes the
fault-correction code almost readable.
2002-03-16 18:26:00 +00:00
bjh21 da4eca13c2 Kill some unnecessary settings of arm_dcache_align_mask. 2002-03-16 18:11:11 +00:00
bjh21 2d05b7a7b6 For those CPUs which don't have a cache-type register, keep the details
of the cache in a static table.  Note that the table isn't complete --
contributions of cache details for CPUs whose data sheets I haven't got are
welcome.
2002-03-16 18:02:19 +00:00
martin 94881fb123 Rename ISDN devices, per discussion on tech-kern. The network devices
become ippp (ISDN ppp) and irip (ISDN raw IP). The character device now
are called: /dev/isdn (isdnd <-> kernel communication), /dev/isdnctl (dialing
and other control), /dev/isdntrc* (tracing), /dev/isdnbchan* (raw B channel
access, i.e. for user land PPP) and /dev/isdntel* (telephone devices, i.e.
for answering machines).
2002-03-16 16:55:51 +00:00
bjh21 57eb77d59f Add CPU ID for the ARM1022ES.
Also add a CPU class for ARM10E processors in general.
2002-03-16 14:41:15 +00:00
reinoud 5fd6dd1b2b Clean up cpufunc.c so you can really use it for debugging ... the
dependency on DEBUG_PMAP was useless anyway since the PMAP_DEBUG was
printing soooo much garbage cpufunc's debugging stuff was lost anyway.
2002-03-16 03:38:28 +00:00
reinoud aefe920476 Serious bug fix: a userland program could panic the kernel when it tried to
issue an instruction that caused the late abort handler to be called for
wich the kernel had no support build in for.

It now only panics when it happends in kernel but otherwise signals the
process a SEGV signal.
2002-03-15 22:19:49 +00:00
reinoud 1a19ddabcd Some cosmetic changes.... 2002-03-15 13:33:19 +00:00
ad b89e39b91a Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.
2002-03-13 15:05:13 +00:00
rjs 415c021881 Map the reset controller registers. 2002-03-13 00:02:41 +00:00
rjs 54204051f6 Add bus space handle for SA11x0 reset controller. 2002-03-12 23:57:35 +00:00
reinoud b91c20709e When ARMFPE wasn't enabled the `usearmfpe' flag was statically initialised
but not used resulting in a compiler error. By splitting the declaration
and the initialisation this is solved.

Better would be to not even declare the flag when ARMFPE isnt enabled but
that would just add to the #ifdef jungle.
2002-03-11 11:50:12 +00:00
lukem cd19d52695 * rename MINIROOTSIZE to MEMORY_DISK_SIZE, so that all md(4) options
are now consistently named
* fold opt_mdsize.h into opt_md.h
2002-03-10 19:56:37 +00:00
bjh21 a42e17ae9a __RCSID -> __KERNEL_RCSID 2002-03-10 15:47:43 +00:00
bjh21 3a0f83d390 Re-work the way that FPAs are handled. If ARMFPE isn't configured, don't
even bother probing for an FPA.  If ARMFPE is configured, always use it,
even if there's an FPA (since it provides the FPA support code).  Move all
printfs about FPAs into armfpe_init.c.

This means I can delete the last two elements from struct _cpu, so that the
structure, and the whole of <arm/cpus.h> is redundant and can be deleted.
2002-03-10 15:29:53 +00:00
bjh21 b0f4f4fe56 Add an RCSID while I'm here. 2002-03-10 11:39:58 +00:00
bjh21 9bb7807c7b Remove fpu_model from struct _cpu. Instead, have initialise_arm_fpe()
printf() the FPE version number itself.
2002-03-10 11:32:00 +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 60219ba2a6 Kill the fpu_flags element from struct _cpu. It was only ever set to 0
anyway.
2002-03-10 00:44:09 +00:00
bjh21 01b68bd7de Clean up inline assembler. Rather than saving R0, copying FPSR to R0,
copying it to the output register and then restoring R0, just copy the
FPSR straight to the output.
2002-03-10 00:09:24 +00:00
bjh21 aeece3b5bd Remove the cpu_model member from struct _cpu, and just use the cpu_model
variable directly.  While we're at it, make cpu_model rather larger.
2002-03-09 23:49:15 +00:00
bjh21 09dd49a342 Remove the cpu_class element from struct _cpu, and make it a local variable
in identify_arm_cpu(), since it's almost unused elsewhere.

Change the detection of bugged StrongARMs to use the cpu ID rather than the
class.  This turns "almost" into "entirely".
2002-03-09 23:24:11 +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 a180cee23b Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.
2002-03-08 20:48:27 +00:00
tsutsui 3c8b0446fe Change type of dumpmag to u_int32_t since it is actually
a 32bit unsigned magic number.
As per discussion on tech-kern, and fixes port-sparc64/11949.
2002-03-06 13:10:18 +00:00
chris 09b5f7b740 Mostly style changes to stop us directly referencing tqh_first, and use TAILQ_FIRST instead. Based on rev 1.130 of the i386 pmap.c. 2002-03-06 10:55:21 +00:00
thorpej 84be4d4719 Fix size/padding of .data. From Nick. 2002-03-05 21:26:11 +00:00
thorpej 5658662324 * Make pmap_is_{modified,referenced}() macros in pmap.h that just
test the attributes in the vm_page_md directly.
* Clean up pmap_clear_{modified,referenced}().
* Delete now-unused pmap_testbit().
2002-03-05 04:48:03 +00:00
thorpej a92da3d4a5 Switch back to using vm_page_md (thanks chuq for finding the bug
in the code that made it unstable before!)
2002-03-05 04:19:59 +00:00
simonb 6f0fb25121 Don't need to declare phys_map - it is declared in <uvm/uvm_extern.h>. 2002-03-04 02:43:22 +00:00
chris 1181e367e0 Implement pmap_growkernel for arm32 based ports.
Note that this has been compiled on some systems, cats, IQ80310, IPAQ, netwinder and shark (note that shark's build is currently broken due to other reasons), but only actually run on cats.
Shark doesn't make use of the functionality as I believe there has to be a correlation between OFW and the kernel tables so that calls into OFW work.
2002-03-03 11:22:58 +00:00
chris a973797a7a Remove ref to VM_MAXKERN_ADDRESS, it's not used in this file 2002-03-02 15:35:05 +00:00
chris 4fa8495ff4 Update the types, pt_entry and pd_entry should be unsigned, and fixed at 32 bits. 2002-03-02 15:30:49 +00:00
simonb 4324f37586 Use "#define<tab>". 2002-02-28 03:17:23 +00:00
christos e8116a8f5b - Use DEV_ constants, instead of documenting the numbers!
- Delete cdev_decl(mm); where appropriate, and other hand-crufting [hi powerpc!]
2002-02-27 01:20:51 +00:00
christos 6b030ee036 - define other DEV_ constants that the local port uses.
- delete cdev_decl(mm) since <sys/conf.h> does it.
2002-02-27 01:19:03 +00:00
simonb d9ab16ba2f Purge CLSIZE, CLSIZELOG2 and MCLOFSET.
Be consistant in the way that MSIZE, MCLSHIFT, MCLBYTES and NMBCLUSTERS
  are defined.
Remove old VM constants from cesfic port.
Bump MSIZE to 256 on mipsco (the only one that wasn't already 256).
2002-02-26 15:13:19 +00:00
briggs c31c5df13c Bumb NMBCLUSTER defaults to 2048 for GATEWAY and 1024 otherwise. These
match current powerpc defaults and are more reasonable for the current era.
2002-02-22 06:41:48 +00:00
thorpej bb84e85802 Change pmap_map_entry() to work like pmap_map_chunk(): take a pointer
to the L1 table and a virtual address, and no pointer to the L2 table.
The L2 table will be looked up by pmap_map_entry(), which will panic
if the there is no L2 table for the requested VA.

NOTE: IT IS EXTREMELY IMPORTANT THAT THE CORRECT VIRTUAL ADDRESS
BE PROVIDED TO pmap_map_entry()!  Notably, the code that mapped
the kernel L2 tables into the kernel PT mapping L2 table were not
passing actual virtual addresses, but rather offsets into the range
mapped by the L2 table.  I have fixed up all of these call sites,
and tested the resulting kernel on both an IQ80310 and a Shark.
Other portmasters should examine their pmap_map_entry() calls if
their new kernels fail.
2002-02-22 04:49:19 +00:00
thorpej 77e3a89912 When reporting there is no VM map for a fault, also report the
faulting address.
2002-02-22 03:24:09 +00:00
thorpej 79738a99e9 Keep track of which kernel PTs are available during bootstrap,
and let pmap_map_chunk() lookup the correct one to use for the
current VA.  Eliminate the "l2table" argument to pmap_map_chunk().

Add a second L2 table for mapping kernel text/data/bss on the
IQ80310 (fixes booting kernels with ramdisks).
2002-02-21 21:58:00 +00:00
thorpej 6d35f61035 In pmap_map_chunk(), if we can't use a section mapping, then
make sure that the L1 slot for the current VA points to an L2
table, and panic if it doesn't.
2002-02-21 06:36:11 +00:00
thorpej 15e0450397 Always pass the L1 table to pmap_map_chunk(). This allows pmap_map_chunk()
to perform some error checking.
2002-02-21 05:25:23 +00:00
thorpej 454e106a48 map_chunk() -> pmap_map_chunk(), and move it to pmap.c 2002-02-21 02:52:19 +00:00
skrll f9d21f3995 Use shell arithmetic as much as possible and reduce the number of times
that awk is used to one.

No functional change.
2002-02-20 21:54:08 +00:00
thorpej 425011f621 map_pagetable() -> pmap_link_l2pt(), and move it to pmap.c 2002-02-20 20:41:15 +00:00
thorpej c44b9117f0 Collapse map_entry{,ro,nc}() into a single pmap_map_entry() that
takes a prot and a "cacheable" indicator.
2002-02-20 02:32:56 +00:00