Commit Graph

1097 Commits

Author SHA1 Message Date
thorpej
df7c83c4a0 Rewrite pagemove() to use pmap functions, rather than frobbing PTEs
directly.  The old code was totally bogus for the new pmap.  New code
lifted from SH5 port.

Fixes panics in ffs_balloc_ufs2() seen while stress-testing a file
system on an XScale-based server platform.
2003-05-17 00:41:36 +00:00
ichiro
9bccf5da79 add CPU types
IXP425 xscale-core NetworkProcessor

later, Ill commit codes for IXP425-evaluation board
2003-05-13 11:45:52 +00:00
bsh
a6f754db03 + use system's real PCLK frequency for calculation, instead of a compile
time constant.

+ make delay() more accurate.
2003-05-13 08:07:39 +00:00
bsh
b4e06de16e use system's real PCLK frequency instead of a compile time constant for
baudrate divisor setup.
2003-05-13 06:29:53 +00:00
bsh
2b33d23a8c + fix a bug to think FIFO full as FIFO empty.
+ on rx buffer overflow case, disable error interrupt as wel as rx
  interrupt.

+ FIFO is always enabled.
2003-05-13 06:26:57 +00:00
bsh
51712a0aa1 white space nit. 2003-05-13 06:12:45 +00:00
bsh
3675ae2669 + use SWRCON register for software reset.
+ add s3c2800_clock_freq(): calculate [FHP]CLK from values in PLL
  control registers and S3C2XX0_XTAL_CLK.
2003-05-13 05:15:08 +00:00
bsh
ca05494daf add an option to set external X'tal frequency. 2003-05-13 05:10:55 +00:00
bsh
ab094d4717 add fields to hold FCLK, HCLK, and PCLK frequency. 2003-05-13 05:06:39 +00:00
kleink
776138ea69 Rename <sys/float_ieee.h> to <sys/float_ieee754.h>, following libc's
convention for these.
2003-05-12 15:22:53 +00:00
bsh
ac7984d2fd add an arg to s3c2800_intr_establish() for interrupt type. 2003-05-12 07:49:10 +00:00
bsh
a99b5e08a5 + add an arg to s3c2800_intr_establish() for interrupt type:
IST_EDGE_{FALLING,RISING,BOTH}, or IST_LEVEL_{LOW,HIGH}. This
  argument is valid only for GPIO interrupts (IRQ0..7).

+ Don't clear interrupt pending bits for IIC in interrupt handler.
  Since clearing these bits starts next IIC transmission immediately,
  IIC driver should handle these.
2003-05-12 07:48:37 +00:00
bsh
fda719999a add PLLCON register definitions. 2003-05-12 05:22:31 +00:00
thorpej
e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
thorpej
36da248c07 Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
2003-05-10 21:10:23 +00:00
thorpej
2a90e2a9c9 Remove redundant bounds_check_with_label() prototype. 2003-05-10 16:12:02 +00:00
fvdl
d88cf589cb A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.
2003-05-09 23:51:25 +00:00
thorpej
b77900c3c2 Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM.  Machine-dependent code is
responsible for initializing them before main() is called.  Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
2003-05-08 18:13:12 +00:00
reinoud
733594dd05 Some entries were missing so i'd better add them for completion. 2003-05-06 00:29:57 +00:00
thorpej
a6b1913724 Make the ARM_VECTORS_* unsigned. 2003-05-04 02:00:10 +00:00
thorpej
46ffc57a80 VM_{MIN,MAX}* are now the same for ARM32_PMAP_NEW with both new and
old VM layout, so merge the two cases.
2003-05-04 01:54:32 +00:00
thorpej
bbba90a2fb Don't expose KERNEL_TEXT_BASE outside of board-specific code. This gives
individual board start-up code more flexibility about where the kernel
starts in the kernel address space.
2003-05-03 18:25:28 +00:00
wiz
1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
thorpej
78fac054fa In db_write_bytes(), use kernel_text rather than KERNEL_TEXT_BASE. 2003-05-03 17:32:59 +00:00
thorpej
69b2e108bb Remove the non-ELF case in db_machine_init(). 2003-05-03 17:29:27 +00:00
thorpej
6923eb1e4a Fix a couple of comments. 2003-05-03 16:18:57 +00:00
bsh
2de6557e88 fix typo in an error message. reported by Jonathan Cline on port-arm. 2003-05-03 05:19:00 +00:00
bsh
00095bbed3 delete duplicated #include. reported by Jonathan Cline on port-arm. 2003-05-03 05:17:54 +00:00
thorpej
aae7e372b7 Reduce differences between ARM32_NEW_VM_LAYOUT and not; always pass
the start and end of the kernel managed virtual address space to
pmap_bootstrap() in the new pmap.
2003-05-03 03:49:03 +00:00
thorpej
38d274c953 ARM32_PMAP_NEEDS_PTE_SYNC no longer exists. 2003-05-03 00:47:42 +00:00
thorpej
79a7aff0fd Don't need to reserve a page of space before KERNEL_BASE in the
ARM32_NEW_VM_LAYOUT case.
2003-05-02 23:26:47 +00:00
thorpej
4eeee795e8 Eliminate PTE_BASE and the PT-PT completely in the ARM32_PMAP_NEW case.
Also in the ARM32_PMAP_NEW case, reclaim the USPACE-bytes of wasted space
at the top of the user address that hasn't been needed for a very very
long time.
2003-05-02 23:22:33 +00:00
thorpej
21b77f9aec Eliminate the last reference to PTE_BASE in the new pmap. 2003-05-02 21:54:38 +00:00
scw
36664b74fa Rework pmap_growkernel() to *not* use the regular pmap_alloc_l2_bucket()
for L2 allocation. This avoids potential recursive calls into
uvm_km_kmemalloc() via the pool allocator.

Bug spotted by Allen Briggs while trying to boot on a machine with 512MB
of memory.
2003-05-02 19:01:00 +00:00
dsl
d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
thorpej
5e36c42a5d Don't consider lack of disk label to be an error. This addresses
PR kern/21408 for all of the ARM ports.  Other ports should follow
this example.
2003-04-30 19:05:21 +00:00
scw
8c5c893bf7 Add a BKPT_ADDR() macro which gives MD code a chance to munge a
breakpoint address before it's used. Currently a no-op on all but sh5.

This is useful on sh5, for example, to mask off the instruction
type encoding in the bottom two address bits, and makes it possible
to do "db> break $rXX" instead of manually munging the address.
2003-04-29 17:06:03 +00:00
scw
cbf4243cd7 KERNEL_TEXT_BASE is not defined for ARM32_NEW_VM_LAYOUT. 2003-04-29 13:27:21 +00:00
thorpej
b43b1645a2 Use aprint*(). 2003-04-29 01:07:30 +00:00
bjh21
4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
scw
6b08b996ba Fix the bug reported by Richard Earnshaw in port-arm32/21349.
Make sure to check the access permissions before doing
ref/mod/domain fixups. This is particularly important
on machines with ARM_VECTORS_LOW.
2003-04-28 15:57:23 +00:00
briggs
a2f6e1f09a Add arm32 machine-specific remote kgdb support. Largely
from PR port-arm/15530 by bsh@, but with some updates from
me, including a fresh arm32/kgdb_machdep.c--ported from pc532.
2003-04-28 01:54:49 +00:00
chris
70a9a33cc8 Remove a strh. I don't think it's available on archv3 and it doesn't work
on acorn32's with an SA110 in them as the bus doesn't support halfword
transfers.
2003-04-26 17:50:21 +00:00
ragge
69a66687f8 Call ksyms_init() instead of ddb_init() in case of
NKSYMS || defined(DDB) || defined(LKM)
2003-04-26 11:05:05 +00:00
ragge
766d04f56a Add ksyms device major. 2003-04-25 21:10:46 +00:00
thorpej
d1c431c7e1 pmap_link_l2pt(): If not ARM32_NEW_VM_LAYOUT, add an assertion that
the VA that the page table maps is aligned to a 4MB boundary.
2003-04-22 13:49:48 +00:00
thorpej
bbef46a7e9 Some ARM32_PMAP_NEW-related cleanup:
* Define a new "MMU type", ARM_MMU_SA1.  While the SA-1's MMU is basically
  compatible with the generic, the SA-1 cache does not have a write-through
  mode, and it is useful to know have an indication of this.
* Add a new PMAP_NEEDS_PTE_SYNC indicator, and try to evaluate it at
  compile time.  We evaluate it like so:
  - If SA-1-style MMU is the only type configured -> 1
  - If SA-1-style MMU is not configured -> 0
  - Otherwise, defer to a run-time variable.
  If PMAP_NEEDS_PTE_SYNC might evaluate to true (SA-1 only or run-time
  check), then we also define PMAP_INCLUDE_PTE_SYNC so that e.g. assembly
  code can include the necessary run-time support.  PMAP_INCLUDE_PTE_SYNC
  largely replaces the ARM32_PMAP_NEEDS_PTE_SYNC manual setting Steve
  included with the original new pmap.
* In the new pmap, make pmap_pte_init_generic() check to see if the CPU
  has a write-back cache.  If so, init the PT cache mode to C=1,B=0 to get
  write-through mode.  Otherwise, init the PT cache mode to C=1,B=1.
* Add a new pmap_pte_init_arm8().  Old pmap, same as generic.  New pmap,
  sets page table cacheability to 0 (ARM8 has a write-back cache, but
  flushing it is quite expensive).
* In the new pmap, make pmap_pte_init_arm9() reset the PT cache mode to
  C=1,B=0, since the write-back check in generic gets it wrong for ARM9,
  since we use write-through mode all the time on ARM9 right now.  (What
  this really tells me is that the test for write-through cache is less
  than perfect, but we can fix that later.)
* Add a new pmap_pte_init_sa1().  Old pmap, same as generic.  New pmap,
  does generic initialization, then resets page table cache mode to
  C=1,B=1, since C=1,B=0 does not produce write-through on the SA-1.
2003-04-22 00:24:48 +00:00
thorpej
215580f2da Defflag XSCALE_CACHE_READ_WRITE_ALLOCATE and XSCALE_NO_COALESCE_WRITES. 2003-04-21 05:36:14 +00:00
thorpej
0f16fc12a0 #ifdef, not #if, for XSCALE_NO_COALESCE_WRITES. 2003-04-21 04:33:30 +00:00
thorpej
9884510327 Add a driver for the reset button on the ADI BECC. 2003-04-20 20:50:49 +00:00