Commit Graph

43336 Commits

Author SHA1 Message Date
gdamore
17d8d811d5 Add <machine/locore.h>, used by some other common MIPS code. 2006-09-09 00:46:08 +00:00
gdamore
780822fb96 whitespace fix. 2006-09-09 00:14:46 +00:00
gdamore
8639b95c43 Convert code to pick remove pasteware, picking up common implementations of
delay, mips3_init_tc, etc.
2006-09-09 00:14:27 +00:00
gdamore
bf6fc8ef63 Various improvements to make the common mips3 clock handling more generally
useful.  The functions delay, cpu_initclocks, and setstatclcokrate have been
renamed to mips3_delay, mips3_initclocks, and mips3_setstatclockrate.

We provide weak aliases for the original names, so machdep code doesn't have
to provide wrapper routines.  (Giving good performance.)

I've moved mips3_clockintr, mips3_initclocks, and mips3_setstatclockrate to
their own mips3_clockintr file, because some ports may not be able to use
these, and its senseless to carry that baggage.
2006-09-08 23:39:27 +00:00
mrg
fc3c59182c make this idempotent. 2006-09-08 23:08:05 +00:00
gdamore
cc68dbd9e5 Rename init_mips3_tc to mips3_init_tc() for consistency, and make it
extern.
2006-09-08 22:14:14 +00:00
elad
5f7169ccb1 First take at security model abstraction.
- Add a few scopes to the kernel: system, network, and machdep.

- Add a few more actions/sub-actions (requests), and start using them as
  opposed to the KAUTH_GENERIC_ISSUSER place-holders.

- Introduce a basic set of listeners that implement our "traditional"
  security model, called "bsd44". This is the default (and only) model we
  have at the moment.

- Update all relevant documentation.

- Add some code and docs to help folks who want to actually use this stuff:

  * There's a sample overlay model, sitting on-top of "bsd44", for
    fast experimenting with tweaking just a subset of an existing model.

    This is pretty cool because it's *really* straightforward to do stuff
    you had to use ugly hacks for until now...

  * And of course, documentation describing how to do the above for quick
    reference, including code samples.

All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:

	http://kauth.linbsd.org/kauthwiki

NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:

  - Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
  - Checks 'securelevel' directly,
  - Checks a uid/gid directly.

(or if you feel you have to, contact me first)

This is still work in progress; It's far from being done, but now it'll
be a lot easier.

Relevant mailing list threads:

http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html

Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).

Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.

Happy birthday Randi! :)
2006-09-08 20:58:56 +00:00
he
05fe6cd270 Provide ELF64_MACHDEP_ID_CASES and ELF64_MACHDEP_ENDIANNESS patterned
after the other 32-bit ports, so that the arm ports can build
usr.sbin/lockstat/.
2006-09-08 19:09:19 +00:00
tsutsui
d7bf7d40db Remove last_clock_intr since it is only used for microtime(9). 2006-09-08 17:04:17 +00:00
martin
e9814256e8 Print the correct UPA id for non-boot CPUs 2006-09-08 15:40:45 +00:00
tsutsui
4e1adf90bc Switch ews4800mips to a MIPS3 cp0 based timecounter. From gdamore
on port-ews4800mips.

XXX: ews4800mips can't use mips/mips/mips3_clock.c for now because
     it isn't configured to use internal clock interrupt for CPU INT 5,
     i.e. mips3_clockintr() is not needed and its own cpu_initclocks(9)
     is required.
2006-09-08 13:48:11 +00:00
xtraeme
f286b0fde2 - Match CPUs with cpuid signature 0x6a0, they have a different
signature in the PST block but fid/vid match.
- Remove useless comments.
- Sync informative messages with est.c.
2006-09-08 09:55:13 +00:00
xtraeme
bdcb6691e9 - Fix Pentium M 770 table. I don't know why did work before but
the values were not correct... tested by seb@.
- Remove binary bits from struct fqlist members, why do we need them?
2006-09-07 22:50:50 +00:00
mhitch
7b2d0951ce Correct some error returns for gettod() and settod() left over from the
pre-todr code, and use actual E* return codes for any error return.
2006-09-07 20:59:47 +00:00
garbled
9f65f017a3 Now that the interrupt bug on the 7043-140 is fixed, it also fixes the
long standing issue with interrupts onthe PowerStack E1.  Remove the
quirk entry for the PowerStack E1 and revert to using the IVR.
Also, add a \n to the attachment of the mk clock printf that was missing.
2006-09-07 20:13:05 +00:00
garbled
50c16ab16f Apply the patch found in PR/28512 and PR/23801. Ok'd by a few people.
From the PR:
The cache is flushed using the bus address where the phys address
is required.  Errors would be seen only on ports where address
translation is done between the bus and physical memory.
2006-09-07 19:13:11 +00:00
rjs
69e635a534 Switch to MI todr. Mostly copied from prep. 2006-09-07 18:27:09 +00:00
rumble
561c032f4c Do not permit accesses to unmapped pci registers. 2006-09-07 18:24:05 +00:00
sanjayl
3c19528c31 Remove debug printf that got left in accidentally 2006-09-07 16:00:29 +00:00
simonb
4f4791b37f Switch pc532 to timecounters and generic TODR.
From Garrett D'Amore, with only a couple of minor tweaks by me.
2006-09-07 15:56:01 +00:00
simonb
0c05b6c17e DEBUG="-g" wasn't good enough to remove the "objcopy -x" step, the
library makefiles want the "-g" in COPTS instead.
2006-09-07 15:50:04 +00:00
itohy
7e80848271 Add njata* at cardbus? 2006-09-07 14:23:44 +00:00
itohy
0a30900857 Add PIOBM (busmastering transfer using ATA PIO mode) support.
The PIOBM is used by only one driver (will be added later,
stay tuned) and intruduce an attribute "ata_piobm" so that
it will be conditionally compiled in.
The "ata_dma" (busmastering transfer using ATA DMA mode) and
"ata_udma" (busmastering transfer using ATA Ultra DMA mode)
attributes are also added for consistency, but unused for now.
2006-09-07 12:34:41 +00:00
martin
9418521cf5 If we have not found our booted_device, tell the user and do not crash.
This seems more sensible than a simple KASSERT.
2006-09-07 12:26:37 +00:00
martin
df850dc70e Remove accidently commited debug printf when unblanking, and actually
do the unblank instead.
2006-09-07 08:39:37 +00:00
simonb
66e9a5e5c7 Print out a "\n" after calling mc146818_attach().
Pointed out by Izumi Tsutsui.
2006-09-07 04:59:30 +00:00
gdamore
5ebcd1bf4f Convert to common mips3_cp0_counter clock.
Convert to timecounters.

From Rivo Nurges (rix at estpak dot ee).  ok soren@, tested by simon@.
Note that this means we aren't using the gt clock, and maybe we should clean
that up a bit.
2006-09-07 03:38:54 +00:00
simonb
fcdc9ed735 Use a non-zero quality - 100 is an arbitrary number. 2006-09-07 03:14:22 +00:00
dogcow
f2d329dca0 remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
uwe
2abb3f0523 Use MI rs5c313 driver attached as: rs5c313rtc0 at shb0
Mark landisk port as __HAVE_GENERIC_TODR.
2006-09-07 01:55:02 +00:00
gdamore
229365fda3 Use common todr_settime_ymdhms/gettime_ymdhms.
While here, fix an incorrect test for timeset (that's in kern_todr already),
and an incorrect to time_second (instead of using the date passed in).
2006-09-07 00:18:50 +00:00
ad
6c8685b2d2 Use p_find(addr, PFIND_LOCKED) in case the proclist_lock is held. 2006-09-06 23:58:20 +00:00
garbled
3053244401 Add preliminary support for the 7025-F40. The MPIC must not be wired up
by the initial PCI_NETBSD_CONFIGURE, nor should it be manually wired by
the indirect stuff.  This is all taken care of by the prep_init() function.
7025-F40 support supports the primary pci bus only.  The second PCI bus
on the machine is still unsupported, but the machine runs and can access
everything except for the two slots the other bus covers.
2006-09-06 22:32:56 +00:00
cherry
b441b8ce45 fix unaligned vendor string array. showed up during a gcc4 compile. 2006-09-06 12:54:31 +00:00
gdamore
493d9bc7e2 pdp10 should use generic todr and timecounters. By using MI is one less
thing that needs to be implemented, and the stubs that just panic() are
removed.
2006-09-06 04:51:34 +00:00
gdamore
8da6e23a9e Cesfic converted to timecounters (clockinterrupt only ) and generic-todr
(which is meaningless, since it lacks any kind of RTC.)
2006-09-06 04:29:01 +00:00
matt
92ae0af8bc Don't include <sys/device.c> unless this is a _KERNEL 2006-09-06 00:31:50 +00:00
matt
3d1a5167c6 Define LIBCRTBEGIN/LIBCRTEND so we don't need to build userland before
building the bootloaders.
2006-09-06 00:31:22 +00:00
uwe
6cfe10b75a __db_print_symbol: don't try to be too smart with db_print_loc_and_inst.
We can have in a register an address that points to/into some variable
in the data segment, but db_print_loc_and_inst only looks for
functions, so it will misprint it as something unrelated from libkern
+ huge offset.  E.g. instead of netbsd:cpu_info_store it would print
netbsd:prop_string_create_cstring+0xdeadbeef

Worse, if the address happens to be odd (char field in a struct, an
element of char array), attempt at printing the "instruction" at that
address will cause a fault and will abort "mach frame".

Disassemly is not really that useful in "mach frame" listing anyway
and more often just clutters things by overflowing 80 columns.
2006-09-06 00:11:49 +00:00
uwe
f6bf0450b3 Cosmetics - space auxiliary defines so that they are not visually
hidden in surrounding code.
2006-09-05 22:48:40 +00:00
matt
0cbed11bde #define __HAVE_GENERIC_TODR 2006-09-05 19:33:55 +00:00
matt
27176f3722 Switch VAX over to generic TODR 2006-09-05 19:32:57 +00:00
ad
38566f3287 Add an SPLLOWER() macro. 2006-09-05 19:00:42 +00:00
tsutsui
663ffba751 Add __insn_barrier() to avoid too aggressive optimization by gcc4.
GENERIC compiled by gcc4 now works on my FUNAI's DNARD.
2006-09-05 15:50:37 +00:00
uwe
2a48f4de87 Switch dreamcast to MI todr(9).
Dreamcast does not use SuperH on-chip RTC, so do it seprately from
other sh3 ports.  Convert dreamcast rtc code into a real device
instead of searching/attaching it manually.

Tested by Nick Hudson.
2006-09-05 11:09:36 +00:00
gdamore
86352b01a2 Convert to MI todr. 2006-09-05 07:34:54 +00:00
gdamore
113dbc3b0d Update sun3 to use timecounters (interrupt clock only) and generic-todr. 2006-09-05 06:45:05 +00:00
garbled
38209f62b7 Convert prep to MI todr 2006-09-05 06:32:21 +00:00
mhitch
14c9ea00e0 Switch amiga to MI todr. 2006-09-05 05:32:30 +00:00
rumble
f30a520560 Switch sgimips to MI todr. 2006-09-05 01:38:59 +00:00