Commit Graph

5577 Commits

Author SHA1 Message Date
fvdl
526dd035ea Add macros for cpuid family/step, etc shifting. Moved here from
machdep.c.
2002-10-25 12:00:11 +00:00
junyoung
83f535c080 Add commented-out machfb attachment. 2002-10-24 18:22:53 +00:00
fvdl
ab08e70bd1 Make this actually compile. 2002-10-24 07:43:21 +00:00
mycroft
4b51da752c Enable Transmeta CPUs without the LongRun registers to get through
transmeta_cpu_{info,setup}().
2002-10-23 21:41:34 +00:00
jdolecek
e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
junyoung
06ad574db3 Minor optimization: movl and andl are slightly faster than movb and andb,
respectively.
2002-10-23 03:28:34 +00:00
christos
438cf3ed4d we need more/different lintstub includes. 2002-10-23 00:58:28 +00:00
christos
24cbd7bcbd add more lintstub includes. 2002-10-23 00:52:56 +00:00
perry
afc2a6e72c fix LINTSTUB for in6_cksum 2002-10-23 00:13:14 +00:00
perry
20c8324fac add Empty LINTSTUB 2002-10-23 00:12:27 +00:00
thorpej
b61c7338b7 Give the ramdisk another 12k of space. 2002-10-22 23:35:16 +00:00
christos
2e8712edaf avoid using gcc ({}) statements that contain goto's. Change into do while
loops.
2002-10-22 23:18:51 +00:00
christos
2730dd7756 void functions do not return values. 2002-10-22 21:02:09 +00:00
christos
633f1790bf parenthesize properly. 2002-10-22 20:51:43 +00:00
kanaoka
848304f890 Fix bugs in the BIOS memory probe.
- If the BIOS reports the same memory cluster multiple times,
  only allocate the extent once.

- If we fail to allocate an extent,
  don't add it to mem_clusters and don't increment mem_cluster_cnt.

- When loading the physical extents,
  make sure we don't try to add an extent with zero length (seg_start == tmp).

port-i386/13399: from maximum entropy <entropy@tappedin.com>.
2002-10-20 10:35:41 +00:00
soren
c542464dd9 CARDBUS was rotting. Make it truly GENERIC+Cardbus by including GENERIC. 2002-10-19 20:32:48 +00:00
junyoung
e4b7588c28 Add NEW_BUFQ_STRATEGY (disabled by default). 2002-10-18 15:11:08 +00:00
yamt
dcde342d09 add an entry for 0x83 to intel_cpuid_cache_info. 2002-10-18 00:51:22 +00:00
thorpej
b000f2251b * Add "struct device" to the softc.
* Add missing notice.

Problems pointed out by Jonathan Stone.
2002-10-17 22:03:40 +00:00
jdolecek
e7bc7ac4bd tsc_microtime(): use splclock() for !MULTIPROCESSOR (cosmetic, this is used
for MULTIPROCESSOR only currently)
2002-10-16 21:01:22 +00:00
mycroft
64f9a5eccd Fix a sign extension bug that caused pmap_growkernel() to fail with >2GB KVA.
Symptom observed and verified fixed by tls.
2002-10-16 18:48:05 +00:00
lukem
2da742de79 tweak the comments describing the memory disk size 2002-10-16 02:46:03 +00:00
lukem
29ba686238 crank the memory disk from 1440k to 1600k; things have Grown a bit. 2002-10-16 02:44:27 +00:00
junyoung
fb173f7efd Add (commented out) VGA_RASTERCONSOLE. 2002-10-15 18:20:58 +00:00
takemura
900b200c92 Moved MI APM definitions into dev/apm. 2002-10-14 02:08:37 +00:00
tshiozak
cb23a3a13b fix wrong uses of ACPI CA API in the last commit, and a bit cosmetic change. 2002-10-12 15:43:00 +00:00
yamt
3458b8fb93 re-do my previous commit correctly 2002-10-12 14:30:08 +00:00
yamt
663d2c5069 override KSTACK_LOWEST_ADDR and KSTACK_SIZE for redzone. 2002-10-11 17:49:11 +00:00
fvdl
65f69fe0f2 Need a pmap_update call in setredzone. From YAMAMOTO Takashi. 2002-10-11 17:31:11 +00:00
fvdl
4ab78a95c1 Remove redundant TLB entry flush from pmap_zero_page and friends.
Some of these were a merge-o from the i386 mp merge.

Pointed out by YAMAMOTO Takashi.
2002-10-11 17:30:39 +00:00
fvdl
0753142b7c Add NetBSD RCS Id. 2002-10-11 14:22:56 +00:00
thorpej
0ab79d5327 * Move config defns for the crypto algorithms into their own files.
Define an attribute for each crypto algorithm, and use that attribute
  to select the files that implement the algorithm.
* Give the "wlan" attribute a dependency on the "arc4" attribute.
* Give the "cgd" pseudo-device the "des", "blowfish", "cast128", and
  "rijndael" attributes.
* Use the new attribute-as-option-dependencies feature of config(8) to
  give the IPSEC_ESP option dependencies on the "des", "blowfish", "cast128",
  and "rijndael" attributes.
2002-10-11 01:52:04 +00:00
thorpej
f59e7010f7 Provide a useful error message if the IPKDB_NE_PCISLOT option is
omitted when IPKDB_NE_PCI is used.
2002-10-11 00:53:10 +00:00
dyoung
e57ba8d648 Introduce biosdiskreset(), and call it to reset the disk (with Int
0x13 Function 0) after a read error. This is a requirement mentioned
in most BIOS documentation.

This answers PR 18591.

Incidentally, on the Soekris Engineering net45x1 single-board
computer, this fixes a bug where the bootloader corrupts the kernel
while loading it from certain varieties of CompactFlash card
(especially varieties identified by NetBSD as <TOSHIBA THNCF064MBA>).
2002-10-10 18:52:42 +00:00
fvdl
1e51cd72a0 Delete pcb_flags. 2002-10-08 20:24:58 +00:00
fvdl
ab7f74bdca Fix USER_LDT syscall locking. It's a bit over the top for a big lock
kernel right now, a sleep lock around the entire thing would have
worked as well, but hey.

Also correct PCB_USER_LDT to PMF_USER_LDT. This was wrong but since
they had the same value, it didn't matter.
2002-10-08 20:23:27 +00:00
fvdl
1854adf2b1 Add a comment about why taking the pmap spinlock is not needed
for one particular ldt_free call.
2002-10-08 20:19:16 +00:00
fvdl
073e7f23e9 Get rid of pcb_flags; nothing was using it except for initialising it
to 0.
2002-10-08 20:17:09 +00:00
fvdl
55a1ddda46 Remove gdt_compact_slot, it was commented out already.
Expect callers to ldt_alloc and ldt_free to take the corresponding
pmap spinlock.
2002-10-08 20:16:09 +00:00
augustss
b45db92e85 Add ubsa attachment. 2002-10-08 13:09:05 +00:00
fvdl
570d69db6e Remove ifdef LOCKDEBUG, this file is only compiled when it is defined. 2002-10-07 07:58:26 +00:00
fvdl
288a0ddc5d lock_machdep.c only depends on LOCKDEBUG, in which case it's also
needed in the non-MP case (since pmap.c now calls __cpu_simple_lock
directly)
2002-10-07 07:54:31 +00:00
fvdl
fb2f78f8b5 Put DDB stubs inside ifdef DDB, PR 18563. 2002-10-07 07:11:59 +00:00
fvdl
d1cbc91464 Remove ci_lapic_ints from struct cpu_info again, it isn't needed anymore. 2002-10-06 20:40:27 +00:00
fvdl
3319c2f2dc Add cpu_id field to mp_intr_map structure. Declare mp_nintr. 2002-10-06 20:39:33 +00:00
fvdl
f493e906e6 Handle per-CPU local apic redir entries a little better. My previous
solution relied on CPU entries coming first in the table, which
isn't guaranteed. Instead, export mp_intrs to lapic.c, and scan
it for entries that match the current CPU in lapic_set_lvt().

Also, do not try to up intr_cnt by the number of IO APICs or CPUs in
the case of MPS_ALL_APICS; it isn't needed, and it also relies on
CPU and IO APIC entries being earlier in the table.
2002-10-06 20:38:37 +00:00
fvdl
be146319cd Keep size of struct cpu_info independent of DIAGNOSTIC/LOCKDEBUG
(was done in rev. 1.81, got lost in the MP merge).
2002-10-06 18:31:21 +00:00
fvdl
f8a5d4e00c Handle per-CPU local APIC redir tables in the MP BIOS. 2002-10-06 14:28:55 +00:00
fvdl
85eaacd06e Add per-CPU local apic redir table (2 pointers). 2002-10-06 14:28:17 +00:00
fvdl
a2e301721c cpu_swapin now exists, so remove the empty define. 2002-10-06 12:37:35 +00:00
fvdl
2560973204 If NOREDZONE is defined, keep UPAGES at 2 as before. 2002-10-06 12:37:12 +00:00
fvdl
5e33ec48d8 Define NOREDZONE and use it in the *_TINY config files to save a page
per process.
2002-10-06 12:36:16 +00:00
fvdl
14c70e4627 Put an unmapped page below the kernel stack (and above struct user) to
catch kernel stack overflows. This bumps UPAGES from 2 to 4 (one unmapped),
because struct user take 1 page then there's the unmapped page, and
then the 2 pages for the kernel stack. If the NOREDZONE option is
set, UPAGES is 2 as before, and no unmapped page is used.
2002-10-06 12:35:16 +00:00
fvdl
9110a093d8 Do rendezvous for TLB shootdown IPI. The sender sets a bitmask
of all CPUs it wants entries shot down on, and waits until it
clears. pmap_tlb_doshootdown clears the bit of the current CPU
in this mask.

Also, change simple_lock -> __cpu_simple_lock in IPI path.
2002-10-05 21:30:42 +00:00
fvdl
c55b2f6fa9 Define XINTR_TSS 2002-10-05 21:29:01 +00:00
fvdl
2153e9d81a Adjust callers to setgate() to match new extra parameter. 2002-10-05 21:28:34 +00:00
fvdl
1176155ea2 Protect against multiple inclusion. 2002-10-05 21:27:52 +00:00
fvdl
724f151d44 Define some masks to be able to pass information about a trap
being a TSS trap down to things like DDB.

XXX a bit of a hack.
2002-10-05 21:27:35 +00:00
fvdl
3230052ed9 Change setgate() prototype.
Define GDT entries for DDB and double fault TSS.
2002-10-05 21:26:24 +00:00
fvdl
8cea44a52a Adapt i386_send_ipi prototype. Make spllock < splipi (IPI paths
changed to use __cpu_simple_lock because of LOCKDEBUG conflict).
2002-10-05 21:25:24 +00:00
fvdl
df3dd8684d Add mask for TLB IPI rendezvous, and stackpointers + TSS structures
for TSS gates per CPU.

XXX struct cpu_info is getting to be a bit large
2002-10-05 21:22:31 +00:00
fvdl
75b1ec0ed0 Add wrapper for trap() to be used for traps that come in via a TSS. 2002-10-05 21:21:05 +00:00
fvdl
23349480e8 To be able to set up TSS gates, setgate needs another argument for the
selector.
2002-10-05 21:20:27 +00:00
fvdl
b70873cac2 Add double fault TSS stub code. 2002-10-05 21:20:00 +00:00
fvdl
4c9f03d9e5 Make i386_send_ipi return an error when it fails to send. 2002-10-05 21:19:39 +00:00
fvdl
736c720259 Deal with coming in via a TSS. 2002-10-05 21:19:16 +00:00
fvdl
d24101a133 Set up TSS gates per CPU for DDB IPI and double fault handlers. 2002-10-05 21:18:44 +00:00
fvdl
220edb92fa Add stub for DDB IPI via a TSS. 2002-10-05 21:17:35 +00:00
elric
19ac738a39 add [commented out] cgd's to generic kernel configs. 2002-10-05 16:02:38 +00:00
gmcgarry
8a6f05a3ec At least make it compile even though it doesn't make sense. 2002-10-05 05:55:46 +00:00
joda
337993c988 use the same mnemonics as linux for cpu features (this is -o linux
after all)
2002-10-04 19:39:54 +00:00
junyoung
8c56af5cb9 Don't init IDT twice. 2002-10-04 19:27:05 +00:00
junyoung
857da21d88 Correctly identify model 6, 7, and 8 of AMD Athlon and Duron processors.
Before:
cpu0: AMD Athlon Model 6 (Palomino) (686-class), 1532.11 MHz

After:
cpu0: AMD Athlon XP 1800+ (686-class), 1532.11 MHz
2002-10-04 18:42:34 +00:00
elric
d19d268a95 assign majors for raw and cooked cgd's. 2002-10-04 18:28:24 +00:00
tsutsui
714e6adf24 Add le* at isapnp? 2002-10-04 16:24:47 +00:00
simonb
a66f0d74ef This file hasn't been used in a long time. 2002-10-04 08:48:35 +00:00
simonb
dcd65411b2 Only declare and set the "step" variable in identifycpu() ifdef CPUDEBUG. 2002-10-04 08:44:08 +00:00
junyoung
acd50bf487 Back out pushl/popl -> movl change. copy_fault is also used by kcopy(9). 2002-10-04 06:43:40 +00:00
explorer
3a856ad198 use config_match() 2002-10-04 06:02:38 +00:00
junyoung
f9939562a1 Fix a mistake in previous commit. 2002-10-04 04:40:12 +00:00
junyoung
8ab9e2ef57 Use single movl instruction rather than pushl/popl pair. 2002-10-04 03:20:59 +00:00
itojun
8f0eabf697 whitespace 2002-10-04 03:17:00 +00:00
fvdl
547337a4ce FIx off by one error for brand id array index. 2002-10-03 19:39:51 +00:00
elric
70bf1b763b prepend syscall_fancy and syscall_plain with mach_ to get this to compile
again.
2002-10-03 19:17:01 +00:00
fvdl
4eb09bb2aa Make shared IRQs for the normal PIC case work again as they did before
the MP merge (i.e. treat them as having the lowest level of all registered
handlers in the chain for the IRQ).
2002-10-03 15:58:56 +00:00
uwe
50de7c9595 If we don't get record drq from pnpbios, set it to play drq.
Otherwise attaching half-duplex device will trigger panic.
NB: ad1848_isa_get_props should probably check for recdrq == -1 as well.
2002-10-03 03:02:11 +00:00
thorpej
89bf5a8f8e Add trailing ; to CFATTACH_DECL. 2002-10-02 15:52:22 +00:00
drochner
59ec26b0d3 _C_LABEL(curproc) disappeared - have cpu_info now
(still uniprocessor only)
2002-10-02 15:23:31 +00:00
drochner
5a62e785ca add kvm86_incall again which got lost in the SMP merge 2002-10-02 14:54:43 +00:00
thorpej
10e0a941aa Use ELF-safe local labels. 2002-10-02 06:18:32 +00:00
thorpej
1ad8e0ff42 Tidy up CFATTACH_DECL() formatting. 2002-10-02 05:47:08 +00:00
fvdl
6b7332c86b The local APIC registers are defined for 32bit access only, so don't
use movzbl on them.
2002-10-01 19:36:51 +00:00
fvdl
bb7657559b Don't use pool(9) for TLB shootdown queue elements. Recent pool
changes made the usage here clash with the pool code, and the
pool code is overkill for this case (fixed number of elements,
always NOWAIT).

Use a simple static freelist allocator instead (pv_list-like).
2002-10-01 19:36:06 +00:00
matt
be5fafec51 ANSI'fy the inline functions. 2002-10-01 19:08:51 +00:00
fvdl
1aca7be70a Add cpu0 at mainbus0 2002-10-01 13:29:03 +00:00
fvdl
26ab868e68 Merge Bill Sommerfeld's i386 MP branch. This code has some known
caveats, but works quite well in a lot of MP cases, and all
UP cases that I have tested. Parts of this will hopefully be
reworked in the not-too-distant future.
2002-10-01 12:56:36 +00:00
dbj
818445e944 recognize FS_APPLEUFS partitions
part of PR #17345
2002-09-28 01:17:09 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos
0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej
6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00