Commit Graph

2431 Commits

Author SHA1 Message Date
Warner Losh
f3e39d2a7b Rewrite get_pv_entry() to match expectations of the rest of the
kernel.  Rather than just kick off the page daemon, we actively retire
more mappings.  The inner loop now looks a lot like the inner loop of
pmap_remove_all.

Also, get_pv_entry can't return NULL now, so remove panic if it did.

Reviewed by:	alc@
2009-02-12 01:14:49 +00:00
Warner Losh
6bf6f10d24 pmap_kenrel() was recently deleted from pmap.h. It was still used
here, but inconsistently.  Change all instances of it to kernel_pmap
to match rest of code.
2009-02-12 01:10:53 +00:00
Alan Cox
11bd9105b6 Eliminate an unused definition. 2009-02-10 06:08:28 +00:00
Oleksandr Tymoshenko
5defb9db6b - Fix in_cksum for big-endian MIPS: use correct compile-time check. 2009-02-08 23:43:36 +00:00
Warner Losh
3beb4f7ed3 Retire NO_DMA completely. 2009-02-08 08:13:36 +00:00
Warner Losh
40a70e188b Eliminate the PMAP_INLINE macro. It isn't really used here. If we
need to bring it back, we can.
2009-01-16 08:38:03 +00:00
Warner Losh
bf969a35eb Remove unused variable.
Minor style nits.
2009-01-16 08:30:22 +00:00
Oleksandr Tymoshenko
f624d2026a - pmap_track_modified was retired in r178606. Reintroducing it was a mistake.
Spotted by: alc@
2009-01-15 23:03:27 +00:00
Warner Losh
1435181496 Reduce diffs to p4 that were the result of a mismerge on my part. 2009-01-15 19:57:45 +00:00
Oleksandr Tymoshenko
16a296f7c9 MFp4:
- Add debug output
- Fix pmap_zero_page and related places: use uncached segments and invalidate
    cache after zeroing memory.
- Do not test for modified bit if it's not neccessary
    (merged from mips-juniper p4 branch)
- Some #includes reorganization
2009-01-15 18:31:36 +00:00
Warner Losh
9703f72989 MFp4:
Remove Maxmem.  It isn't used elsewhere in the system at this point...
realmem is used instead.
2009-01-15 08:01:50 +00:00
Warner Losh
85c209c24d Call platform_reset() instead of looping forever on reboot.
# We likely need to have a default one of these that jumps to the rom boot
# address that's defined in the MIPS ISA.
2009-01-15 07:51:17 +00:00
Warner Losh
b1b26fc820 Reverse order of dumpsys and cpu_idle_wakeup to reduce diffs to p4. 2009-01-15 07:48:37 +00:00
Warner Losh
f180851318 MFp4:
Remove #if'd 0 code.  It is interfering with other diffs.
2009-01-15 07:45:40 +00:00
Oleksandr Tymoshenko
36dc08476d o Code cleanup, remove unused fields of idtpci_softc 2009-01-14 22:46:13 +00:00
Oleksandr Tymoshenko
00582be0e9 o Simplify code: trade 15 lines of case for one multiplication 2009-01-14 22:32:43 +00:00
Oleksandr Tymoshenko
8c7494de12 o Make debug output conditional 2009-01-14 20:36:58 +00:00
Oleksandr Tymoshenko
9f0e1e852e o NO_DMA is no longer required as bug with PIIX4 emulation has been fixed in GXEmul 2009-01-14 20:27:49 +00:00
Oleksandr Tymoshenko
7baa3c0132 o Move $FreeBSD$ from comment to __FBSDID macro
o Be a bit more verbose about CPU type during boot process (print
    manufacturer, chip info, MMU and cache parameters)
2009-01-14 20:16:44 +00:00
Warner Losh
703b345233 First pass at 64-bit elf support 2008-12-31 07:38:04 +00:00
Marcel Moolenaar
05002c354b Make gpart the default partitioning class on all platforms.
Both ia64 and powerpc were using gpart exclusively already
so there's no change for those two.

Discussed on: arch@
2008-12-17 17:43:22 +00:00
Warner Losh
db3cd725a5 AT_DEBUG and AT_BRK were OBE like 10 years ago, so retire them.
Reviewed by:	peter
2008-12-17 06:56:58 +00:00
Warner Losh
3bd6a14307 Start to clean up the MIPS elf machine dependent file.
o Add support for compiling elf64 for this file (the rest of the changes are
  coming later)
o Fill in some misssing relocation types.  We need to support these in
  elf_machdep.c's relocation routines eventually, but that's future work
  too.
2008-12-16 20:07:47 +00:00
Warner Losh
f6bac15e68 Mips never had /usr/libexec/ld-elf.so.1, so remove it. We don't have
any binaries that need it.  This was moved before FreeBSD 5.x.
2008-12-16 20:04:02 +00:00
Warner Losh
a87b76397e Remove redundant assignment. 2008-12-11 07:00:23 +00:00
Sam Leffler
3364462355 Switch to ath hal source code. Note this removes the ath_hal
module; the ath module now brings in the hal support.  Kernel
config files are almost backwards compatible; supplying

device ath_hal

gives you the same chip support that the binary hal did but you
must also include

options AH_SUPPORT_AR5416

to enable the extended format descriptors used by 11n parts.
It is now possible to control the chip support included in a
build by specifying exactly which chips are to be supported
in the config file; consult ath_hal(4) for information.
2008-12-01 16:53:01 +00:00
Warner Losh
55a98c0d2e On FreeBSD, printing the version is centralized, so no need to repeat
it here.  I think that gonzo@ has also made this change to p4.
2008-11-30 08:40:04 +00:00
Warner Losh
1f2c9f3b84 Unbreak mips build by taking first WAG at mb(), wmb() and rmb(). The
latter two are likely pessimal...
2008-11-29 05:16:14 +00:00
Konstantin Belousov
b4cf0e62f4 Add sv_flags field to struct sysentvec with intention to provide description
of the ABI of the currently executing image. Change some places to test
the flags instead of explicit comparing with address of known sysentvec
structures to determine ABI features.

Discussed with:	dchagin, imp, jhb, peter
2008-11-22 12:36:15 +00:00
Warner Losh
795239ebe6 Remove cardbus attachment. It likely was a cut-n-paste left over from
whatever template was used to create this driver.  It is not
necessary, and wouldn't work anyway since (a) this device will never
be in a cardbus tin-can and (b) the driver isn't even PCI, but instead
a built-in NIC on the IDT RC32434 on its internal bus.
2008-11-02 02:58:24 +00:00
Marcel Moolenaar
fd872be586 Add mips/conf/DEFAULTS and populate it with:
machine arm
        device  mem
	device  uart_ns8250
        options GEOM_BSD
        options GEOM_MBR

Remove the first three from all kernel configuration files
(sometimes commented-out) and change geom_bsd and geom_mbr
from standard to optional.
2008-10-23 02:16:38 +00:00
Bruce M Simpson
feb957b8dc Point this config at the required linker script. 2008-10-13 06:25:28 +00:00
Warner Losh
3279d247b2 opt_msgbuf.h is needed for MSGBUF_SIZE overrides, if any.
Submitted by:	alc@
2008-10-12 02:31:09 +00:00
Warner Losh
9e035bb343 Remove critical_enter() and critical_exit(): pmap_growkernel is called
with kernel_map->system_mtx held so these aren't needed.  Add an
assertion to make sure this is the case.

Also, fix a minor style(9) nit.

Reviewed by:	alc@
2008-10-01 05:47:17 +00:00
Warner Losh
e805961dde Catch up with svn r96606 (cvs rev 1.127 2002/05/14 20:35:29) of
sys/param.h and move the MI numbers out of here.  Also move the MI
defines.  Also remove a couple defines not in use (not sure if it is
age, or OpenBSD origins for thse).  Note the current values that are
overrides that appear to be odd in some way.

More cleanup could be done here: NBPG appears to be spelled PAGE_SIZE
these days.  There's new ways to spell PGOFSET and PGSHIFT too, I
think.  These constants duplicate the MI constants and are sprinkled
into the mips code only.  Further investigation is needed.
2008-09-28 19:44:38 +00:00
Marius Strobl
6f04e7b9aa Remove ipi_all() and ipi_self() as the former hasn't been used at
all to date and the latter also is only used in ia64 and powerpc
code which no longer serves a real purpose after bring-up and just
can be removed as well. Note that architectures like sun4u also
provide no means of implementing IPI'ing a CPU itself natively
in the first place.

Suggested by:	jhb
Reviewed by:	arch, grehan, jhb
2008-09-28 18:34:14 +00:00
Warner Losh
ef7d53c441 Fix comments to relate to FreeBSD's current interrupt blocking
functionality, as opposed to the legacy spl means.
2008-09-28 03:50:34 +00:00
Warner Losh
bd253e7716 Fix comment about needing to call something from splnet, which doesn't
exist in freebsd.
2008-09-28 03:48:15 +00:00
Warner Losh
5bfe05811f Remove stale comment. splhigh -> critical_enter transition happend
some time ago, and no longer needs special attention.
2008-09-28 03:47:24 +00:00
Ed Schouten
6bfa9a2d66 Replace all calls to minor() with dev2unit().
After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by:	kib
2008-09-27 08:51:18 +00:00
Warner Losh
ae7a480f1c Remove reference to machine/tlb.h. It no longer exists, and isn't
needed as this compiles fine w/o it.
2008-09-26 04:45:56 +00:00
Konstantin Belousov
a8d403e102 Change the static struct sysentvec and struct Elf_Brandinfo initializers
to the C99 style. At least, it is easier to read sysent definitions
that way, and search for the actual instances of sigcode etc.

Explicitely initialize sysentvec.sv_maxssiz that was missed in most
sysvecs.

No objection from:	jhb
MFC after:	1 month
2008-09-24 10:14:37 +00:00
David E. O'Brien
ae72afe0f2 The kernel implemented 'memcmp' is an alias for 'bcmp'. However, memcmp
and bcmp are not the same thing.  'man bcmp' states that the return is
"non-zero" if the two byte strings are not identical.  Where as,
'man memcmp' states that the return is the "difference between the
first two differing bytes (treated as unsigned char values" if the
two byte strings are not identical.

So provide a proper memcmp(9), but it is a C implementation not a tuned
assembly implementation.  Therefore bcmp(9) should be preferred over memcmp(9).
2008-09-23 14:45:10 +00:00
Warner Losh
5d99d99ff4 MFp4: Merge interrupt code from p4
Submitted by:	gonzo@
2008-09-19 04:16:13 +00:00
Warner Losh
3fbac48f38 MFp4: Update the interrupt code from perforce.
Submitted by:	gonzo@
2008-09-19 04:10:09 +00:00
Warner Losh
7c626c0c38 Merge from p4: add bpf 2008-09-19 03:47:29 +00:00
David E. O'Brien
b17e4de65f Catch up with intr_event_create() API changes. 2008-09-18 15:24:49 +00:00
David E. O'Brien
c542342568 Catch up with intr_event_create() API changes. 2008-09-18 15:15:42 +00:00
Oleksandr Tymoshenko
c30b5c7330 Fix path in all includes: remove /mips32 subdirectory 2008-09-10 03:49:08 +00:00
David E. O'Brien
7aadc92e95 style(9) 2008-09-04 17:10:52 +00:00
David E. O'Brien
9014c90537 Catch up with the move from mips32/. 2008-09-03 18:49:54 +00:00
David E. O'Brien
86102aae67 Catch up with the move from mips32/. 2008-09-03 18:40:29 +00:00
David E. O'Brien
69dda689d1 Style(9). 2008-09-03 18:40:02 +00:00
Warner Losh
c3a27a2cf5 White space nit. 2008-08-23 23:44:45 +00:00
John Baldwin
70d12a18f2 Export 'struct pcpu' to userland w/o requiring _KERNEL. A few ports
already define _KERNEL to get to this and I'm about to add hooks to
libkvm to access per-CPU data.

MFC after:	1 week
2008-08-19 19:53:52 +00:00
Tom Rhodes
942df7e765 Document a few sysctls.
Approved by:	imp
2008-08-03 14:11:06 +00:00
Alan Cox
43dcfbc191 In FreeBSD 7.0 and beyond, pmap_growkernel() should pass VM_ALLOC_INTERRUPT
to vm_page_alloc() instead of VM_ALLOC_SYSTEM.
2008-07-07 17:31:02 +00:00
Warner Losh
4d9ac6c76f As discussed on IRC and at BSDcan, move the mips32/* directories up a
level.  The distinction was artificial.  Some more movement around the
deck charis is likely depending on the fallout from this one.

Paths were corrected after the svn mv.  Hope that's OK.
2008-07-06 21:09:29 +00:00
Ed Schouten
721351876c Remove the unused major/minor numbers from iodev and memdev.
Now that st_rdev is being automatically generated by the kernel, there
is no need to define static major/minor numbers for the iodev and
memdev. We still need the minor numbers for the memdev, however, to
distinguish between /dev/mem and /dev/kmem.

Approved by:	philip (mentor)
2008-06-25 07:45:31 +00:00
Wojciech A. Koszek
70e83c4514 Fix spelling of "virtual".
There should be no visible change.

Reviewed by:	rink
2008-06-08 08:56:46 +00:00
Alan Cox
1ec1304bdb Retire pmap_addr_hint(). It is no longer used. 2008-05-18 04:16:57 +00:00
Alan Cox
2d17f90775 Add a stub for pmap_align_superpage() on machines that don't (yet)
implement pmap-level support for superpages.
2008-05-09 23:31:42 +00:00
Oleksandr Tymoshenko
956bb0e01e Add FLT_EVAL_METHOD and DECIMAL_DIG, required by C99 standard.
Approved by:	cognet (mentor)
2008-05-03 21:04:21 +00:00
Warner Losh
71a36ddcef These files are unused, so remove them for now. If they turn out to
be needed later, they can be restored.
2008-05-03 19:57:45 +00:00
Warner Losh
8710c0c16e This file is unused, so remove it for now. 2008-05-02 18:03:00 +00:00
Alan Cox
5c1eb1ac80 Eliminate an unused field from the pmap. 2008-04-30 06:05:36 +00:00
Alan Cox
d72d204094 Remove two unused declarations. These variables are now fields within
vm.h's struct kva_md_info.
2008-04-27 00:10:45 +00:00
Alan Cox
d239bfe45a Remove an XXX comment. sys/amd64/amd64/pmap.c revision 1.516 explains why
"pmap_initialized" no longer exists.
2008-04-27 00:06:01 +00:00
Alan Cox
3086a7a9b4 MFamd64 revision 1.544/i386 revision 1.549
Retire pmap_track_modified().  We no longer need it because we do not
  create managed mappings within the clean submap.  To prevent regressions,
  add assertions blocking the creation of managed mappings within the clean
  submap.

Approved by: imp
2008-04-26 22:39:58 +00:00
Jeff Roberson
6c47aaae12 - Add an integer argument to idle to indicate how likely we are to wake
from idle over the next tick.
 - Add a new MD routine, cpu_wake_idle() to wakeup idle threads who are
   suspended in cpu specific states.  This function can fail and cause the
   scheduler to fall back to another mechanism (ipi).
 - Implement support for mwait in cpu_idle() on i386/amd64 machines that
   support it.  mwait is a higher performance way to synchronize cpus
   as compared to hlt & ipis.
 - Allow selecting the idle routine by name via sysctl machdep.idle.  This
   replaces machdep.cpu_idle_hlt.  Only idle routines supported by the
   current machine are permitted.

Sponsored by:	Nokia
2008-04-25 05:18:50 +00:00
Poul-Henning Kamp
0051271e12 Make genclock standard on all platforms.
Thanks to: grehan & marcel for platform support on ia64 and ppc.
2008-04-21 10:09:55 +00:00
Sam Leffler
b032f27c36 Multi-bss (aka vap) support for 802.11 devices.
Note this includes changes to all drivers and moves some device firmware
loading to use firmware(9) and a separate module (e.g. ral).  Also there
no longer are separate wlan_scan* modules; this functionality is now
bundled into the wlan module.

Supported by:	Hobnob and Marvell
Reviewed by:	many
Obtained from:	Atheros (some bits)
2008-04-20 20:35:46 +00:00
Warner Losh
2f68261c81 This file shows signs of heavy borrowing from NetBSD's cache.c file,
so credit its authors with contributions to this file.  Remove
prototype copyright notice, although one might be warranted if someone
wanted to claim it badly enough.

Noticed by: Simon Burge.
2008-04-15 05:35:00 +00:00
Warner Losh
1e231a9a5a Add copyright notice and license to reflect origin of most of the
routines in this file.  Remove 'place holder' copyright since the
amount that's actually original is small relative to the length of the
file.  The contents of this file appear to have originated at DECWRL
by way of NetBSD.

Noticed by: Simon Burge
2008-04-15 05:31:19 +00:00
Warner Losh
c4738b2d88 This isn't used, so remove it. It isn't relevant to most mips platforms. 2008-04-15 02:50:07 +00:00
Warner Losh
b86c3f2930 Copied from amd64, where it wasn't used, into mips, where it wasn't used.
Remove it.
2008-04-15 02:11:57 +00:00
Warner Losh
ee37bddfd4 Remove $P4$ tag. Rumor has it that p4 importer hates it. 2008-04-15 02:09:28 +00:00
Warner Losh
d40afdf065 fix comments for these files.
Noticed by: stass
2008-04-13 22:04:56 +00:00
Warner Losh
93394f15ba FreeBSD/mips port. The FreeBSD/mips port targets mips32, mips64,
mips32r2 and mips64r2 (and close relatives) processors.  There
presently is support for ADMtek ADM5120, A mips 4Kc in a malta board,
the RB533 routerboard (based on IDT RC32434) and some preliminary
support for sibtye/broadcom designs.  Other hardware support will be
forthcomcing.

This port boots multiuser under gxemul emulating the malta board and
also bootstraps on the hardware whose support is forthcoming...

Oleksandr Tymoshenko, Wojciech Koszek, Warner Losh, Olivier Houchard,
Randall Stewert and others that have contributed to the mips2 and/or
mips2-jnpr perforce branches.  Juniper contirbuted a generic mips port
late in the life cycle of the misp2 branch.  Warner Losh merged the
mips2 and Juniper code bases, and others list above have worked for
the past several months to get to multiuser.

In addition, the mips2 work owe a debt to the trail blazing efforts of
the original mips branch in perforce done by Juli Mallett.
2008-04-13 07:44:55 +00:00
Warner Losh
45d426a34e FreeBSD/mips port. The FreeBSD/mips port targets mips32, mips64,
mips32r2 and mips64r2 (and close relatives) processors.  There
presently is support for ADMtek ADM5120, A mips 4Kc in a malta board,
the RB533 routerboard (based on IDT RC32434) and some preliminary
support for sibtye/broadcom designs.  Other hardware support will be
forthcomcing.

This port boots multiuser under gxemul emulating the malta board and
also bootstraps on the hardware whose support is forthcoming...

Oleksandr Tymoshenko, Wojciech Koszek, Warner Losh, Olivier Houchard,
Randall Stewert and others that have contributed to the mips2 and/or
mips2-jnpr perforce branches.  Juniper contirbuted a generic mips port
late in the life cycle of the misp2 branch.  Warner Losh merged the
mips2 and Juniper code bases, and others list above have worked for
the past several months to get to multiuser.

In addition, the mips2 work owe a debt to the trail blazing efforts of
the original mips branch in perforce done by Juli Mallett.
2008-04-13 07:27:37 +00:00
Warner Losh
2db4962425 FreeBSD/mips port. The FreeBSD/mips port targets mips32, mips64,
mips32r2 and mips64r2 (and close relatives) processors.  There
presently is support for ADMtek ADM5120, A mips 4Kc in a malta board,
the RB533 routerboard (based on IDT RC32434) and some preliminary
support for sibtye/broadcom designs.  Other hardware support will be
forthcomcing.

This port boots multiuser under gxemul emulating the malta board and
also bootstraps on the hardware whose support is forthcoming...

Oleksandr Tymoshenko, Wojciech Koszek, Warner Losh, Olivier Houchard,
Randall Stewert and others that have contributed to the mips2 and/or
mips2-jnpr perforce branches.  Juniper contirbuted a generic mips port
late in the life cycle of the misp2 branch.  Warner Losh merged the
mips2 and Juniper code bases, and others list above have worked for
the past several months to get to multiuser.

In addition, the mips2 work owe a debt to the trail blazing efforts of
the original mips branch in perforce done by Juli Mallett.
2008-04-13 07:07:57 +00:00