Commit Graph

1610 Commits

Author SHA1 Message Date
tsutsui a8d2e55834 Add a workaround to handle virtual alias which may cause data corruption
on R5000/Rm52xx machines:
- Add a new global variable mips_cache_virtual_alias in mips/cache.c,
  which indicates that VIPT cache on the CPU could cause virtual alias
  and software support is required to handle it. (i.e. no VCED/VCEI)
- Add several cache flush/invalidate ops around KSEG0 access which
  might cause virtual alias if mips_cache_virtual_alias is true.
  (note checking mips_sdcache_line_size isn't valid for R5000/Rm52xx
   because only R4000/R4400 with L2 cache have VCED/VCEI)
- Remove a global variable mips_sdcache_forceinv, which is now superseded
  by new mips_cache_virtual_alias.

While here, also change some R4000/R4400 cache ops:
- Don't override mips_cache_alias_mask and mips_cache_prefer_mask with
  values based on MIPS3_MAX_PCACHE_SIZE for R4000/R4400 with L2 cache
  because it's still worth to reduce VCED/VCEI.
- Flush dcache in pmap_zero_page(9) unconditionally on all MIPS_HAS_R4K_MMU
  CPUs and remove cache flush code from cpu_lwp_fork() in vm_machdep.c.

Thanks to Markus W Kilbinger for testing patches on port-cobalt/port-mips.


XXX This fix is just a workaround because it doesn't handle all possible
XXX virtual aliases. As discussed on port-mips, maybe the real fix
XXX for virtual alias is to change MI UVM to adapt it to VIPT cache.
XXX (all VA mappings against the same PA must have the same VAC index etc.)
2005-03-26 09:51:02 +00:00
matt a6db24a485 Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create).  dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
2005-03-09 19:04:43 +00:00
simonb 3792275475 Add an extra `i' to notifes/notifed. 2005-03-09 04:23:33 +00:00
sekiya 02889050a3 Add a hint variable (mips_sdcache_forceinv, explicitly initialized to zero)
that tells pmap_zero_page() and pmap_copy_page() to unconditionally invalidate
pages for r5k-class CPUs with secondary cache.

This behavior must be explicitly enabled by setting mips_sdcache_forceinv to 1.

This is the last bit of a patch that has been kicked around since 2000 between
rafal@, tsutsui@, and myself.
2005-03-01 04:23:44 +00:00
simonb 31c385dc11 Another macro in a branch delay slot problem. Pad with a nop.
Pointed out again by Izumi Tsutsui on port-mips.
2005-02-26 13:15:47 +00:00
simonb 9dd50e019c Add some nops in branch delay slots to stop a warning because we
previously had a macro in those slots.  No side effects this time,
so we got lucky.

Pointed out by Izumi Tsutsui on port-mips.
2005-02-26 00:06:28 +00:00
simonb 3882f544c1 KNF: put "if (...)" and following statement on separate lines. 2005-02-25 07:20:10 +00:00
simonb 61e2cd2f51 Remove some errant semicolons. 2005-02-25 07:18:40 +00:00
drochner 50ed6c7cf3 -remove definition of "struct sigframe" -- haven't found a use of it
(should fix build problems w/o COMPAT_16 reported by Markus W Kilbinger
  per PR port-mips/29041 and by Havard Eidnes)
-further shuffle COMPAT_* conditionals to allow COMPAT_ULTRIX
 w/o COMPAT_16
2005-01-24 10:03:57 +00:00
drochner 18dbb8a093 restrict visibility of sigcontext* as much as it appears
sensible for now
XXX there is more cleanup needed to make COMPAT_ULTRIX build
    w/o COMPAT_16)
2005-01-20 21:14:18 +00:00
simonb 3c2980238e Now that countless UVM bugs have been fixed and the MIPS pmap_prefer()
can deal with topdown for CPUs that need to deal with cache alias
conflicts (thanks Andrew Brown!), enable "topdown" memory allocation by
default.
2005-01-17 05:26:02 +00:00
atatat 17b1390278 Teach mips pmap_prefer() to deal with topdown.
Tested by simonb.
2005-01-17 04:54:14 +00:00
atatat a076957818 Convert the PMAP_PREFER() macro from two arguments (offset and hint)
to four (adding size and direction).

In order for topdown uvm to be an option on ports using PMAP_PREFER,
they will need to "prefer" lower addresses if topdown is being used.
Additionally, at least one port also needs to know the size.
2005-01-17 04:37:20 +00:00
simonb ab2eace68f Revert the previous change of making topdown VM the default. While
topdown VM works on a MIPS64 bcm1125, it doesn't work on a Cobalt
(rm5231?) and a DEC 5000/260 (r4400).  On both of these init dies and
we panic.
2005-01-14 01:26:22 +00:00
simonb 61b633d474 Now that countless UVM bugs have been fixed, enable "topdown" memory
allocation by default.
2005-01-11 05:42:17 +00:00
simonb 0ce7001382 Provide assembly versions of the clock timing calculation loops that
aren't effected by changes in compiler optimisation.

Fixes PR port-mips/26959 from Izumi Tsutsui
2005-01-01 09:48:39 +00:00
simonb 4dab1db639 Use "NULL" instead of "(something-or-other *)0". 2005-01-01 03:25:46 +00:00
simonb 60e6b50deb Spell "available" correctly. 2005-01-01 03:24:43 +00:00
sekiya c01662e204 Add prototype for r5k_sdcache_wbinv_range_index() 2004-12-13 08:39:50 +00:00
sekiya 07b6e1e982 Implement r5k indexed writeback-invalidate, and fix usage of Page_Invalidate_S.
Originally written by rafal@ back in April 2003.  Field-tested by many
people since.

(I am not committing the pmap hack at this time; although pmap changes are
necessary to fully address the r5k panic/coma problems, the implementation
needs further thought)
2004-12-13 08:39:21 +00:00
thorpej 7a60e77293 bus_dmamap_load_mbuf(): Skip zero-length mbufs.
kern/24811
2004-11-28 17:34:45 +00:00
soren 96156c60bf Add USB device controller register names. 2004-11-11 10:11:40 +00:00
christos aefec4290d Don't use "int" to represent lengths; this is what size_t is for. This
does not change the ABI since we don't have 64 bit mips yet.
2004-11-06 23:22:43 +00:00
thorpej e9818f5b5e When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 18:08:34 +00:00
simonb 83cddbc21f Flesh out some comments in the incomplete "smart" version of
mips_user_cacheflush().
2004-10-21 03:15:13 +00:00
sekiya 1723326ecb Set LP64 default to "no". 2004-10-01 07:00:12 +00:00
sekiya 57e4e59495 Rework previous slightly, so that ld is passed the right flags for 64-bit mode. 2004-10-01 06:46:40 +00:00
sekiya d66ecfb68e Allow arguments to as/ld to be specified in the kernel config file. Provide
a mechanism to override ranlib.
2004-09-29 06:03:03 +00:00
yamt d2fe4b34bb move some per-cpu data definitions to MI place so that they can be modified
without touching all ports.  discussed on tech-kern@.
2004-09-22 11:32:02 +00:00
skrll f7155e40f6 There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).

OK'd by Jason Thorpe
2004-09-17 14:11:20 +00:00
drochner a02e2488a0 autoconf cleanup: turn xxxsubmatch() functions into the locator
passing variants
2004-09-13 14:57:31 +00:00
thorpej 6c08646cb8 Garbage-collect pagemove(); nothing use it anymore (YAY!!!) 2004-08-28 22:12:40 +00:00
jdolecek 64969161df use uvm_grow() to update stack segment size on stack page fault instead
of MD code
2004-08-28 17:53:00 +00:00
drochner a5a5473c25 remove now unnecessary "pci_enumerate_bus" definitions 2004-07-29 16:55:25 +00:00
simonb 7f2fc41e2f In cpu_{set,get}context(), copy the FP registers themselves and the FP
CSR separately (and now from the correctly sized __fpregset_t).  The
FP CSR is copied separately to avoid endianness/alignment issues.

Part of fix for PR port-mips/25942.  Thanks to Christos Zoulas and
Klaus Klein for help with debugging this.
2004-07-03 05:08:34 +00:00
simonb 7b72fd9dc6 Drop the "catchall" __fpregset_t, and use either a 32-bit or 64-bit
structure depending on the current ABI.

Part of fix for PR port-mips/25942.  Thanks to Christos Zoulas and
Klaus Klein for help with debugging this.
2004-07-03 05:06:37 +00:00
simonb f41923b7dd Fix a precedence problem setting uc_flags.
Part of fix for PR port-mips/25942.  From Christos Zoulas.
2004-07-02 12:32:16 +00:00
thorpej e33c2bb5d5 Add the %MAKEOPTIONSAPPEND token at the end of the file, after the
common Makefile.kern.inc has been included.
2004-06-04 04:45:49 +00:00
drochner 19f047f8d0 SIGTRAMP_VALID() should not pollute the user namespace 2004-05-10 21:51:49 +00:00
kleink 7b3b647647 Factor out W{CHAR,INT}_{MAX,MIN} into their own header file. 2004-05-08 21:51:47 +00:00
thorpej cdac01064e Rename the COM16650 option to COM_16650, for consistency with other
com variant options.
2004-05-01 19:03:59 +00:00
simonb f95ed9ec0f Print the address of a problem instruction when we panic. 2004-04-26 22:29:07 +00:00
simonb 24798155ac Enable top-down VM if USE_TOPDOWN_VM is defined. 2004-04-26 22:25:54 +00:00
simonb 374ed5ae2b Fix bogus gcc -Wuninitialised warning when SYSCALL_DEBUG is enabled. 2004-04-04 05:32:20 +00:00
drochner c83eb997b8 nothing cares about __HAVE_SIGINFO anymore, so nuke it 2004-03-26 21:39:57 +00:00
drochner d19f706361 all ports define __HAVE_SIGINFO now, so remove the CPP conditionals 2004-03-26 17:34:18 +00:00
atatat 19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00
cgd 6c8994da82 convert descriptor add/remove pointers to integer array indices. 2004-03-19 07:11:33 +00:00
cgd b79e782296 recognize PERIPH_REV3 DMA for BCM1250, too 2004-03-19 06:01:31 +00:00
cgd 50d45978ec bump RX and TX ring sizes to 256 entries each. would be better to make
them larger, but then i'd need to tweak the allocation mechanism so they
were *guaranteed* to be physically contiguous.
2004-03-18 06:59:30 +00:00