Commit Graph

60211 Commits

Author SHA1 Message Date
scw
7a4dfd98e4 Quell an uninitialised variable warning. 2002-11-24 11:52:13 +00:00
scw
e591e98c92 Quell uninitialised variable warnings. 2002-11-24 11:50:32 +00:00
manu
1aaacd96d2 Give a second chance when vm_allocate fail, by finding another free region.
Seems to fix some problems.
2002-11-24 11:49:36 +00:00
scw
fc3c6f554f Quell an uninitialised variable warning. 2002-11-24 11:38:51 +00:00
scw
0f91ed3dfa Quell uninitialised variable warnings. 2002-11-24 11:37:54 +00:00
scw
7009056578 Quell an uninitialised variable warning. 2002-11-24 11:09:13 +00:00
scw
ba1d389688 Fix an uninitialised variable warning. 2002-11-24 11:02:57 +00:00
scw
5521093d4b Quell an uninitialised variable warning. 2002-11-24 10:52:47 +00:00
scw
5b169b8d2e Fix a genuine uninitialised variable warning. 2002-11-24 10:51:56 +00:00
scw
009e79b59b Remove some accidentally committed debug code. 2002-11-24 10:43:15 +00:00
jmc
33169df7d2 Provide a cast when setting up the interrupt handler (npxintr has a different
signature than the prototype expects)
2002-11-24 10:19:37 +00:00
yamt
eca07565c3 make sure i_lfs_fragsize is initialized.
fix panic "lfs_writefile: more than one fragment!"
PR 18974.
2002-11-24 08:43:26 +00:00
yamt
16a26d41e8 lfs_sync should wait at lfs_writer, not lfs_dirops.
PR 18973.
2002-11-24 08:37:43 +00:00
yamt
feacf34c09 lfs_reserve shouldn't block for lfs_unlockvp.
otherwise cleaner deadlocks.
PR 19134.
2002-11-24 08:32:22 +00:00
yamt
37b4f42285 blksize() macro shouldn't used for indirect blocks.
this fixes "getblk: block size invariant failed" panic.
PR 18977.
2002-11-24 08:27:00 +00:00
yamt
7d0ba73802 correct locking for lfs_rmdir. PR 18976. 2002-11-24 08:23:41 +00:00
simonb
12c35ee2d2 New generic way-aware MIPS32/64 range-index cache functions with proper
handling for phyiscally-indexed caches where the way size is greater than
the page size.
These work fine with pass 1 SB1 cores, so g/c those workarounds.

Much thanks to Chris Demetriou for many suggestions and helping me get
my head around all this.
2002-11-24 07:41:29 +00:00
simonb
3a72aadc2b Add the VI bit in config 0. 2002-11-24 07:28:42 +00:00
simonb
3682edd3d4 Move the curpcb and segbase extern decls to cpu.h to better group together
what will need to change for SMP.
Hide 'struct cpu_info' and some macros in #ifdef _KERNEL/#endif.
2002-11-24 07:26:04 +00:00
shin
79606e014b wipe out all physical memory before hibernate/reset.
otherwise, WinCE will not boot on some machine (ex. IBM z50).
2002-11-24 06:02:23 +00:00
takemura
fe56c2b22a 3.3V support for Ricoh 5C[23]96 parts from ngc@ff.iij4u.or.jp.
Preliminary bridge identification code from imp@village.org.
2002-11-24 02:46:55 +00:00
chris
01bbc5d994 Add a debug assert that wired pages provide protection flags in the flags
argument as well.

Also update a couple of debug messages to NPDEBUG.
2002-11-24 01:09:09 +00:00
chris
3dd552c1b2 Fix's DEBUG kernel's not making it into multiuser on cats. (as spotted by
nick)
When wiring a page with pmap_enter you must supply the protection in the
flags as well as in the prot.
2002-11-24 01:07:47 +00:00
fvdl
1e5d37bcda Recurse into ../i386/stand 2002-11-23 23:53:32 +00:00
fvdl
a186add0a8 If LIBKERN_ARCH is defined, use that as the architecture-specific
subdirectory. Needed for the x86_64 32bit compile case.
2002-11-23 23:35:50 +00:00
fvdl
79f52ea3a8 Some hacks to make this compile on x86_64. 2002-11-23 23:34:39 +00:00
thorpej
02c69e5261 Put interface attributes on the device, not another attribute with
the same name as the device.
2002-11-23 19:42:41 +00:00
wiz
ad774d9d77 Fix stack alignment; uses same alignment as COMPAT_LINUX.
Found by manu.
2002-11-23 17:35:06 +00:00
fvdl
589e13bd6f Define both BOOT_ELF32 and BOOT_ELF64 2002-11-23 16:05:40 +00:00
fvdl
2861429a88 Correct lowered SPL test. 2002-11-23 15:18:12 +00:00
chris
f86ab1a63e Sync arm asm libkern files with libc's asm files. 2002-11-23 14:29:29 +00:00
fvdl
9d672e72f5 Use a barrier in spl/splx. 2002-11-23 13:44:41 +00:00
fvdl
c903de3a0a Fix bogon introduced in devsw switch that made findroot() not find
a match for the root disk.
2002-11-23 13:23:41 +00:00
fvdl
4c357c783c Adapt to i386 intr changes. 2002-11-23 12:53:51 +00:00
kristerw
0e18bd2ffa Make this identical to the other m68k machine/bswap.h by including
m68k/bswap.h instead of sys/bswap.h.

Solves part of PR toolchain/18314.
2002-11-23 11:04:33 +00:00
fvdl
b31699f426 Remove duplicate definitions, include <machine/frameasm.h> instead. 2002-11-23 10:50:09 +00:00
fvdl
e5a9ffde7a Remove "ioapic.h" include, and always include the intr_find_mpmapping
prototype; it's not worth the extra bytes to avoid including this.
2002-11-23 10:37:09 +00:00
scw
2fcea657de Implemented #2: Improved TLB management 2002-11-23 09:27:03 +00:00
scw
a3885e9bdd - Change VM_MIN_KERNEL_ADDRESS to start at KSEG1 instead of KSEG0.
- Overhaul the TLB management code such that we now keep track of
   the exact TLB slot at which a mapping was inserted, both for user-
   space and kernel mappings. This addresses #2 on the TODO list.
2002-11-23 09:25:54 +00:00
scw
dbaff62d21 Make this compile again. 2002-11-23 09:14:14 +00:00
scw
7e40fdd6f9 Keep evbsh5-specific major device declarations separate from the shared
sh5 devices.
2002-11-23 09:13:18 +00:00
scw
5f18a49912 Add alphaledio.h 2002-11-23 09:05:27 +00:00
scw
a354470bbf Support for the alphanumeric LED display on the SuperH Cayman board. 2002-11-23 09:05:03 +00:00
lha
2943f5e96b install intrdefs.h so it can be used by intr.h (and libkvm) 2002-11-23 05:33:11 +00:00
oster
93e77ce121 Nuke all (but one) of the remaining RF_UTILITY's. 2002-11-23 02:44:14 +00:00
oster
ceb8b43d54 Nuke some #if 0'ed code. 2002-11-23 02:38:59 +00:00
cgd
afa17e6b22 go back to being big-endian by default; was clobbered in last commit 2002-11-23 02:35:39 +00:00
manu
1ee1245718 Add support for two Darwin sysctl 2002-11-23 02:18:53 +00:00
lha
f882e535ec deal with the .s -> .S change for i386 2002-11-23 02:15:45 +00:00
lha
e5a0293cb5 Add fix a missing CPUVAR define (copied from mach_sigcode.S). Frank
promised to a better fix when he wakes up, this just to make it
compile again.
2002-11-23 02:05:51 +00:00
oster
d8bae03774 One less goto. 2002-11-23 01:59:59 +00:00
oster
a14698a359 Bye-bye to the completely unused reconCtrlPtr->priorityList. 2002-11-23 01:58:18 +00:00
manu
0e734a6755 Libraries do not use relative addresses, they are absolute and should be
treated as such if we want the same mapping as in Darwin.

While we are there KNFify function names
2002-11-22 23:09:46 +00:00
fvdl
23fb62d8f1 Removed unused function. From kristerw. 2002-11-22 21:21:13 +00:00
oster
540f566858 rf_SelectMirrorDiskPartition() is only needed in a few cases. #if it
out in the rest.  Thanks to Krister!
2002-11-22 20:56:10 +00:00
tsutsui
f64c3cad31 - Add -msoft-float and -ffreestanding to CFLAGS.
- Add -mno-abicalls to AFLAGS.
- Set WARNS?=1
2002-11-22 16:38:22 +00:00
jmc
1db8069fe5 First pass (checkpoint checkin) for firewire scsi code.
There are a number of issues here for anyone trying to use this today:

1. On my test drive the command engine on the drive seems to stall after the
   inquire is done. So the mode sense times out for a long time before
   aborting. This obviously needs to be tracked down and fixed.

   However it does do a proper inquire:

scsibus0 at sbpscsi0: 1 target, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Maxtor, 1394 storage, 60> disk fixed

2. This code is quite ugly in places as debug code was added to test things.
   Definitly needs cleanup/documention in places where it's using command
   structures. The structure for alloc'ing orbs, running them through the
   command engine and getting state back is mostly set but implementation needs
   an overhaul in places.

3. For testing I use the following config options:

fwohci* at cardbus? dev ? function ?    # IEEE1394 Controller
fw*     at fwbus?
options FW_DEBUG
options FWNODE_DEBUG
options P1212_DEBUG
options SBP2_DEBUG
options SBPSCSI_DEBUG
fwnode* at fwbus?
sbpscsi* at fwnode?
scsibus* at sbpscsi?
2002-11-22 16:28:54 +00:00
tsutsui
fdeaca44df Add some prototype declarations. 2002-11-22 16:27:07 +00:00
jmc
77b603bc96 Change structure/usage of interface provided callbacks. (read, write, reset)
Push these up to the ieee1394 softc level and make the naming scheme
consistant.
2002-11-22 16:20:17 +00:00
fvdl
af8aa9d5df Get this to compile again in the ioapic case. 2002-11-22 16:16:56 +00:00
fvdl
ae4b76c8d3 New interrupt code. The basic idea behind it is to hide the differences
in interrupt controllers in struct pic, and try to keep as much
common code as possible. At the lowest (asm) level, this is done
with CPP macros.

The main structure is now struct intrsource, describing an established
interrupt line, of any kind (soft/hard local apic/legacy apic/IO apic).
For quick masking, there may be a maximum of 32 sources per CPU.
Sources can be assigned to any CPU in the MP case, though currently they
all go to the boot CPU.
2002-11-22 15:23:35 +00:00
fvdl
88fb7f6d27 Define a generic PIC structure, used by the interrupt code. 2002-11-22 15:07:58 +00:00
fvdl
99dccacc3c Interrupt defines that needed to be in a seperate file to avoid cyclic
includes.
2002-11-22 15:07:38 +00:00
fvdl
65d1332692 Asm macros for interrupt/trap entry/exit, used in multiple .S files. 2002-11-22 15:07:10 +00:00
fvdl
1db3b7489b New files for the changed interrupt code. i8259.c deals with some of
the old ('legacy') i8259 code, intr.c now contains the bulk of
the interrupt establish/disestablish code.
2002-11-22 15:05:23 +00:00
fvdl
0caa98d6b8 .s -> .S rename 2002-11-22 15:02:12 +00:00
fvdl
c403116289 .s -> .S rename. New files: vector.S and spl.S, they have been split
off from locore.s, plus parts of isa/vector.s and isa/icu.s
2002-11-22 15:01:15 +00:00
fvdl
71a8119df8 Renamed to .S 2002-11-22 14:57:32 +00:00
fvdl
518afbd262 Renamed to .S, locore.s was split up too. 2002-11-22 14:55:11 +00:00
fvdl
fe506424c6 Removed in the new intr world. 2002-11-22 14:53:05 +00:00
fvdl
e2b6067204 Removed, no longer needed. Defines were either dupilcates, or have been
moved to other files.
2002-11-22 14:43:32 +00:00
fvdl
45cffa1bd6 These files have been given a proper .S extension, they will come back
to life as such.
2002-11-22 14:39:26 +00:00
fvdl
e4703e808c The ioapic interrupt code has been folded together with the i8259
interrupt code.
2002-11-22 14:30:28 +00:00
simonb
fe72c084d6 Switch to using evcnt(9) to track interrupt counts. 2002-11-22 13:26:39 +00:00
wiz
0b10ce5dfc regen 2002-11-22 12:23:26 +00:00
wiz
e78e668887 Fix typo (responsiness -> responsiveness). 2002-11-22 12:20:58 +00:00
manu
f528c56f39 Check for excessive recursive Mach-O loading 2002-11-21 22:30:32 +00:00
manu
ae6b5562b1 Remove a debug message that has been committed by mistake. 2002-11-21 22:01:45 +00:00
manu
af59b63bbd We now have the exact stack initial stack layout of Darwin:
macho_hdr, argc, *argv, NULL, *envp, NULL, progname, NULL,
*progname, **argv, **envp

Where progname is a pointer to the program name as given in the first
argument to execve(), and macho_hdr a pointer to the Mach-O header at
the beginning of the executable file.
2002-11-21 19:53:40 +00:00
oster
9768cda12b Fix up locking on a call to rf_update_component_labels().
Noticed by Manuel.  Thanks Manuel!
2002-11-21 15:37:55 +00:00
jdolecek
2ca4879bd1 g/c also mips-specific linux ELF copyargs function prototype and
linux ELF defines, use generic Aux32Info instead
this also adresses kern/19047 by FUKAUMI Naoki
2002-11-21 15:32:32 +00:00
jdolecek
0a624a0c15 back previous off; port can only supply LINUX_ELF_AUX_ENTRIES if it also
overrides the ELF copyargs function
2002-11-21 15:20:28 +00:00
jdolecek
3590104898 g/c local definition of LINUX_ELF_AUX_ENTRIES 2002-11-21 15:18:37 +00:00
thorpej
89780fb9d3 Remove, with extreme prejudice. 2002-11-21 02:13:44 +00:00
chris
a7be705a3c Take the newly added kern.ldscript for handling ELF->a.out from jason, and
apply to the cats kernel build. Seems to work happily for me.
2002-11-21 02:05:08 +00:00
thorpej
75ea1c1fd8 Use a linker script to craft and ELF image that will work
when copied to a.out via objcopy.  Stop using that frightening
elf2aout.sh shell script.
2002-11-21 01:38:41 +00:00
simonb
4c350ad4fa Put back extern declaration of scn_cd so this builds again. 2002-11-21 00:23:24 +00:00
simonb
1591afc22d Include <sys/conf.h> to get the dev_type_* macros. 2002-11-21 00:22:10 +00:00
manu
1af0fa979f Better immitate Darwin startup stack layout: there is a slot for the program
name after envp, and the 0x1000 at the beginning is a pointer to the binary
mach header (we don't emulate this correctly yet).
2002-11-20 23:54:39 +00:00
bouyer
59fc067cf7 For sis_setup_channel, acer_setup_channel, hpt_setup_channel,
pdc202xx_setup_channel, pdc20268_setup_channel:
Properly compute the address of the DMA control register for channel 1.
I think the controllers ignore these bits, I suspect it's only there so that
the BIOS can tell the OS is has configured DMA, but better be correct.
Thanks to Alexander Yurchenko for pointing this out.
2002-11-20 19:20:24 +00:00
bsh
a64681f665 add a device.
sscom is a driver for built-in UART of Samsung S3C2800/24[01]0 CPU.
driver code is arch/arm/s3c2xx0/sscom.c
2002-11-20 18:20:36 +00:00
bsh
0f0e8e927f Intel PXA2X0 based and Samsung S3C2XX0 based boards. 2002-11-20 18:15:43 +00:00
bsh
e0716c9b55 add an EVBARM_BOARDTYPE constant for Samsung S3C2400X/2410X based
boards.  (not supported yet)
2002-11-20 18:14:08 +00:00
bsh
6c6460f721 add three boards.
lubbock  (PXA250, Xscale)
	g4250ebx (PXA250, Xscale)
	SMDK2800 (S3C2800, ARM920T)
2002-11-20 18:10:37 +00:00
bsh
4b28b301bb SMDK2800 is an evaluation board for Samsung S3C2800 CPU. 2002-11-20 18:06:25 +00:00
bsh
fbfb5f619c template of ldscript for some evbarm kernels.
@KERNEL_BASE_PHYS@ and @KERNEL_BASE_VIRT@ are replaced by values
defined in Makefile.evbarm.inc.
2002-11-20 18:04:55 +00:00
bsh
d6cadcdd65 Samsung S3C2800 is a CPU with ARM920T core. 2002-11-20 17:52:48 +00:00
itohy
6e73936f81 Use assembly version of bzero() and memset(). 2002-11-20 09:52:53 +00:00
itohy
5d1c87f395 Assembly version of bzero()/memset().
Written by SHIMIZU Ryo.
2002-11-20 09:51:52 +00:00
itohy
766d863c42 memcpy() and memmove() must return the first parameter.
Problem found by itohy, fixed by SHIMIZU Ryo.
2002-11-20 09:50:37 +00:00
manu
a0d341067e Added host_info(PRIORITY_INFO) 2002-11-20 07:17:11 +00:00
thorpej
6b533da5a5 Let the "link_set*" input sections be orphans again, now that
ld has been modifed to workd with them in the presence of
explicit LMAs.
2002-11-20 07:16:08 +00:00
simonb
928196073c White-space nits. 2002-11-20 04:29:31 +00:00
dyoung
9a9deae382 Squash a panic: do not try to print the name of a NULL interface. 2002-11-20 03:52:08 +00:00
christos
733d2a038f Make the OSABI and the branding optional. Tested by Ben Collver, thanks. 2002-11-19 22:38:07 +00:00
christos
eac02262d1 fix cpu_subtype XXX: HOST_BASIC_INFO still does not work. 2002-11-19 19:55:05 +00:00
christos
0b0eb68538 fix typos in cpu macros. 2002-11-19 19:54:36 +00:00
christos
63e4ec4bd7 implement mach_insert_port_right() 2002-11-19 19:54:07 +00:00
martin
9b7331f3f2 Add a comment describing why ehci_dump() has been added back despite
not being referenced.
Suggested by Perry E. Metzger.
2002-11-19 19:18:09 +00:00
christos
645fa8d600 remove stack adjustment. 2002-11-19 16:29:32 +00:00
christos
8012fc6cf2 use mach_integer_t instead of just int. 2002-11-19 16:18:43 +00:00
christos
f8dc23efb1 regen 2002-11-19 15:06:37 +00:00
christos
70d7b58096 add another GVC modem 2002-11-19 15:06:05 +00:00
junyoung
f2edc229d3 - No need to include sys/param.h and sys/types.h here.
- KNF.
2002-11-19 09:53:16 +00:00
itohy
a2bddaa5df maxpartitions 8 -> 16 (the value MAXPARTITIONS in <machine/disklabel.h>) 2002-11-19 09:37:25 +00:00
bsh
060f32c803 Regen. for additional vendor IDs for Samsung Electronics Co. Ltd. 2002-11-19 06:52:07 +00:00
bsh
98338f0df2 Two more vendor IDs for Samsung Electronics Co. Ltd. 2002-11-19 06:47:24 +00:00
atatat
15d85dcb14 Alter config so that it emits a config_time.src file (the source file
for config_time.h) that contains, for example:

/* Sun Nov 17 05:37:51 2002 GMT */
#define CONFIG_TIME     1037511471
#define CONFIG_YEAR     2002
#define CONFIG_MONTH    11
#define CONFIG_DATE     17
#define CONFIG_HOUR      5
#define CONFIG_MINS     37
#define CONFIG_SECS     51

These values represent the current time as of when config was last
run, so that functions (eg, inittodr()) can use these values instead
of being updated once every year or so with the "current" time.

The associated modification to Makefile.kern.inc makes config_time.h
depend on this depend on this and the kernel Makefile, so that
granularity of kernel builds is not reduced.
2002-11-19 04:29:19 +00:00
simonb
71ca818f3c Add COMPAT_15, mips need this. 2002-11-19 04:11:05 +00:00
oster
58ac277dd0 #if out some stuff that's only used for some distributed sparing stuff.
Shaves another 500 bytes from an i386 kernel.
2002-11-19 01:49:41 +00:00
oster
6ac4a184c4 For reconstructs, move checks for failed components to before the
kernel threads are created.
2002-11-19 01:45:28 +00:00
cgd
8935916d0a initial support for mac features in new chip revs 2002-11-19 01:44:04 +00:00
oster
61c0bdf3d3 #if 0 an unused function. Noted by Krister. Thanks! 2002-11-18 23:50:47 +00:00
oster
b43d46d578 rf_DiskReadMirrorPartitionFunc() is only needed for some of the clustering
stuff, or if we're doing DAG validation.  Thanks to Krister!
2002-11-18 23:46:28 +00:00
itojun
f2187f5675 correct panic() condition - it was backwards.
From: Rafal Boni <rafal@attbi.com>
2002-11-18 23:38:46 +00:00
dyoung
1b3451a594 Only Prism is known to support WI_RID_FRAG_THRESH. 2002-11-18 15:10:22 +00:00
chs
ab17ec89d1 add support for __MACHINE_STACK_GROWS_UP platforms. from fredette@ 2002-11-17 22:53:46 +00:00
chs
4153f58dfe move initialization of iobase to before we first use it. 2002-11-17 22:49:56 +00:00
oster
7a58f70fb2 When setting root or autoconfig status, be sure to update used_spares too! 2002-11-17 22:41:36 +00:00
manu
dc4f3b6625 Introduction of IRIX sysctl broke binary compatibility because I changed the
offset of the Linux entry. Fix this.
2002-11-17 19:54:59 +00:00
itojun
e34d5a243d more pickier packet validation, based on
draft-savola-v6ops-6to4-security-00.txt.  sync w/kame
2002-11-17 19:29:31 +00:00
chs
ab08c3ab73 support a variant of the "member" keyword where the symbol defined
is different from the actual member name.
2002-11-17 19:24:50 +00:00
manu
fe8f53c2a4 in mach_sys_map_fd, if the mapping failed because of the requested place
is already used, we want to remap to another place. The vmcmd must be
completely rebuild, else things does not work as expected, as the vmcmd has
been modified by the first mapping attempt.
2002-11-17 18:39:48 +00:00
chs
737b05a938 make this compile again. 2002-11-17 17:10:46 +00:00
chs
8cfa3366d3 increase cross-friendliness. 2002-11-17 17:10:11 +00:00
manu
55c5227095 Add vm_map and vnode locking 2002-11-17 16:51:12 +00:00
chs
4b2625143d change uvm_uarea_alloc() to indicate whether the returned uarea is already
backed by physical pages (ie. because it reused a previously-freed one),
so that we can skip a bunch of useless work in that case.
this fixes the underlying problem behind PR 18543, and also speeds up fork()
quite a bit (eg. 7% on my pc, 1% on my ultra2) when we get a cache hit.
2002-11-17 08:32:43 +00:00
takemura
fcdaf149b3 Added xi to GENERIC. (PR port-hpcmips/19059) 2002-11-17 07:21:11 +00:00
simonb
5e3d4a224c Add cache_r4k_op_8lines_{16,32} macros to perform cache ops on 8
consecutive lines.
2002-11-17 06:40:43 +00:00
itohy
ee6a196208 Add dreamcast specific device names 2002-11-17 05:56:12 +00:00
simonb
aa5595f691 Fix typo in the address of the Au1500 MAC1 enable register; 2nd MAC works
on the Au1500 cpu now.
2002-11-17 04:57:34 +00:00
simonb
ba1c8ffa9d Remove reference to mips_int5_evcnt from here; that is port-specific,
not arch-specific.
2002-11-17 04:56:57 +00:00
manu
08616982e5 regen 2002-11-17 02:48:12 +00:00
manu
9215e8d4ed regen 2002-11-17 02:48:11 +00:00
manu
7d02c9fff8 Implement mach_sys_load_shared_file. This are not complete yet, especially
wrt to the flags, but at least it does relocations.
2002-11-17 02:46:24 +00:00
manu
c6cc98345b Correctly report the CPU type in Mach host_info(BASIC_INFO) 2002-11-17 01:24:03 +00:00
manu
93df539f73 As we use one FreeBSD file for COMPAT_DARWIN, we must include file.freebsd 2002-11-17 00:59:13 +00:00
manu
a26a564e59 Implment map_fd mach trap
Fix host_info(BASIC_INFO) which was broken wrt to the number of field
returned.
2002-11-16 20:00:29 +00:00
manu
745fc5c9a0 Change a syscal name 2002-11-16 19:59:19 +00:00
rearnsha
6576c49b48 Add an assembler version of strcmp, based on example code from the ARM
ARM.  As an example of the performance difference that this provides
a Dhrystone score on my Shark goes from 213k to 261k.
2002-11-16 18:27:40 +00:00
oster
0cfd5a5b13 Cleanup more printfs. 2002-11-16 16:59:58 +00:00
oster
c00752f98a Clean up error reporting, and nuke some printf verbosity. 2002-11-16 16:49:46 +00:00
tsutsui
435b887237 Regen: Add SMC 9232DST Ether 10/100 Fast Ethernet EISA Adapter. 2002-11-16 10:04:19 +00:00
tsutsui
396a6a2863 Add SMC 9232DST Ether 10/100 Fast Ethernet EISA Adapter. 2002-11-16 10:03:32 +00:00
wdk
16364da176 Target address for jump was out of range for the assembler instruction. 2002-11-16 08:55:05 +00:00
wdk
e1445fed24 #include <lib/libkern/libkern.h> 2002-11-16 08:51:27 +00:00
wdk
c6eb5c7171 Catch up with the recent toolchain changes:
add -mno-abicalls to AFLAGS
 add -msoft-float  to CFLAGS
2002-11-16 08:48:13 +00:00
mrg
20998b4001 vnd.c
- allow vnddetach() to return EBUSY if any vnd's are currently initialised.
lkm:
- add new 'dev' directory, initially with just a 'vnd' LKM.  for now, the
vnd lkm driver requests 4 devices....

XXX: vnd should be converted to a psuedo-device that creates & deletes
instances of itself (vnd0, vnd1, etc) when vnconfig -c/-u are called,
then the vnd lkm driver can not be limited to '4' by default.
2002-11-16 08:10:48 +00:00
uebayasi
c041971257 Fix compilation errors introduced by recent trace_enter()/ktrsyscall() changes.
Provided by FUKAUMI Naoki <naoki at fukaumi dot org> in kern/19070.
2002-11-16 07:40:38 +00:00
dyoung
3a04dc2907 In wi_get_cfg, factor the code for getting the tx rate with the
IEEE 802.11 subsystem.

In wi_write_txrate, document the clever code for computing
WI_RID_TX_RATE from a bit rate.
2002-11-16 06:25:05 +00:00
dyoung
1cfe0913f5 Fix typo: IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK becomes
IEEE80211_FC0_SUBTYPE_CF_ACK_CF_POLL. This is the name the IEEE
802.11 specification indicates.
2002-11-16 06:08:31 +00:00
dyoung
f675f5f8b5 Support two new RIDs.
WI_RID_DBM_ADJUST: In preparation for capturing Prism packets
  containing received signal strength indications (RSSI), read the
  constant for conversion from RSSI to dBm (decibels relative to
  a milliwatt).

  WI_RID_FRAG_THRESH: Get/set the packet fragmentation threshold
  on Lucent/Prism.
2002-11-16 06:02:53 +00:00
manu
e7cfdc3995 Darwin skips the next instruction after a successful system call. Strange
world.
2002-11-15 23:19:22 +00:00
wdk
b0fb4471b2 Fix LINUX_ELF_AUX_ENTRIES sociability issue with Mips based ports 2002-11-15 22:44:57 +00:00
tsutsui
6cbc642fdf Regen from pcidevs rev 1.486:
> Remove an entry for AMD PCNETS_PCI.
>
> AMD Am79C974 PCnet-SCSI Ethernet and SCSI conrtoller is
> a multi-function PCI device which has two device IDs
> of Am53C974(PCscsi-PCI) and Am79C970(PCnet-PCI),
> and there is no its own ID.
2002-11-15 22:20:02 +00:00
tsutsui
1d4122d78d Remove an entry for AMD PCNETS_PCI.
AMD Am79C974 PCnet-SCSI Ethernet and SCSI conrtoller is
a multi-function PCI device which has two device IDs
of Am53C974(PCscsi-PCI) and Am79C970(PCnet-PCI),
and there is no its own ID.
2002-11-15 22:13:11 +00:00
manu
3fc8f36b8d Make it build again 2002-11-15 21:48:06 +00:00
manu
d584ed9598 Add a realcode argument to trace_enter and ktrsyscall. realcode is the
original system call number, which can be negative for a Mach trap.
We cannot just replace code by realcode, because ktrsyscall uses it as
an index in the system call table, thus crashing the kernel when the
value is negative.
2002-11-15 20:06:00 +00:00
thorpej
598200cca0 Explicitly gather "link_set*" sections into .text (after .rodata).
This is necessary because unless we do so, since we do not pass -Ttext ...
to the linker, the "link_set*" sections end up at VMA 0.
2002-11-15 19:29:22 +00:00
itojun
69a2421a71 typo 2002-11-15 17:51:33 +00:00
atatat
966f9caaed Properly free "newppref", instead of "amap->am_ppref" (oops), and
delay freeing the old am_ppref so that if we bail early due to
malloc() failures, valid ppref data hasn't been freed for no reason.

Based on comments from enami.
2002-11-15 17:30:35 +00:00
christos
7ae22e4da5 it is not kosher to include the same file twice. 2002-11-15 16:10:51 +00:00
ad
5a728ace12 Changes for SMBus/I2C:
- Move lm_readreg/lm_writereg into the front-ends. Add/use function pointers
  in the softc.
- Add a bank select function pointer to the softc and provide a generic
  version. WinBond chips accessed over serial bus present three addresses,
  two of which are used to access bank 1/2 registers.
- Mark TSENS2/3 sensor data as invalid if the the corresponding bank select
  fails.
2002-11-15 14:55:41 +00:00
ragge
f1b859f028 Fix vax_mem_read_region_{2,4} bug, by der Mouse (mouse@Rodents.Montreal.QC.CA). 2002-11-15 14:52:56 +00:00
itohy
563bcf3cdb Add mmem (Maple Bus storage device) and mlcd (Maple Bus monochrome LCD). 2002-11-15 14:15:36 +00:00
itohy
51cd3ce6c9 Maple Bus monochrome LCD device driver
Reference: US Patent 6,338,105
2002-11-15 14:10:51 +00:00
itohy
2c105f37e1 Maple Bus storage device driver
Reference: US Patent 6,338,105
2002-11-15 14:10:12 +00:00
yamt
bbbe3e07d7 genfs_compat_gop_write: set uio_iovcnt correctly. 2002-11-15 14:01:57 +00:00
ad
122b0bd68f Cosmetic changes. 2002-11-15 13:51:29 +00:00
ad
c69a4b471a Regen. 2002-11-15 13:49:28 +00:00
ad
0c39c2396f Remove dup product. 2002-11-15 13:41:27 +00:00
itohy
154b121f4b New Maple Bus driver
- interrupt driven
 - support hot swapping
 - sub-drivers can send commands
2002-11-15 13:30:21 +00:00
itohy
7710d527c5 Allow multiple event handlers to be installed to an IRL.
The IRL is specified as IPL (2nd arg of sysasic_intr_establish()).
Current mapping:
	IRL9	IPL_BIO
	IRL11	IPL_NET
	IRL13	IPL_TTY
2002-11-15 13:29:26 +00:00
wdk
5c25ee8090 No longer required - now using standard kern.ldscript from sys/arch/mips 2002-11-15 10:16:41 +00:00
wdk
76c4299861 Be toolchain friendly and use nbmips-elf2ecoff 2002-11-15 10:12:40 +00:00
oster
ad8fd01bdf After a rebuild-in-place, a reconstruct, or a copyback, we should
really be updating the component labels.
2002-11-15 03:57:48 +00:00
enami
eb0cfdb469 Cosmetic changes. 2002-11-15 03:30:26 +00:00
oster
35f6622aa7 These printf's have outlived their usefulness. *poof* 2002-11-15 03:00:12 +00:00
simonb
5bdb1a36ce Add a hack to mipsNN_pdcache_wbinv_range_index_32_4way() so that we
use the index ops at a offset of the page size as well, controlled by
an MIPS64_SB1 check.  The SB1 D-cache way size is physically indexed
and twice as big as the page size (4k), so we weren't flushing all the
addresses we needed too.

XXX: This is kinda gross; will be cleaned up and made more generic soon.
There are still other SB1-specific issues to be cleaned up too...
2002-11-15 01:23:17 +00:00
simonb
181d7f08c9 Use COP0_HAZARD_FPUENABLE instead of a hard-coded 4 NOPs when enabling
the FPU.
2002-11-15 01:16:18 +00:00
simonb
2aabe4d4e2 Define COP0_HAZARD_FPUENABLE as four nops.
Include <mips/sb1regs.h> if MIPS64_SB1 is defined.
2002-11-15 01:15:11 +00:00
simonb
383afcb5b6 Declare some CP0 hazards for the SB1 core. 2002-11-15 01:09:20 +00:00
simonb
a3458d769a Add "options MIPS64_SB1". 2002-11-15 01:03:53 +00:00
simonb
28a1083dd2 Put the MIPS64_SB1 option in opt_cputype.h. 2002-11-15 01:02:49 +00:00
simonb
3d416825dc White space nits. 2002-11-15 00:58:32 +00:00
atatat
ee27492d90 Remove t4dw at pci, since we don't have any description or code for a
device with that name.  Addresses PR port-i386/19040.
2002-11-14 22:37:18 +00:00
manu
ffc06908b6 Regen 2002-11-14 21:48:23 +00:00
manu
897d942130 Use FreeBSD emulation to get pathname lookups in /emul/darwin. These FreeBSD
emulated system call just check in /emul and call the native system call.
2002-11-14 21:47:15 +00:00
christos
09495207e1 darwin needs us. 2002-11-14 21:38:51 +00:00
christos
b165b2e229 improve on debugging. 2002-11-14 21:17:30 +00:00
ragge
adca0d86b2 Fix for a problem where an user can crash the machine via sigreturn(),
noticed by and fix from Miod Vallat <miod@openbsd.org>.

Miod's OpenBSD log message:
> Don't uvm_useracc the user sigcontext in sys_sigreturn and then access
> the user addresses directly from the kernel. copyin is faster and can
> correctly deal properly with mappings that uvm_useracc thinks are
> correct but will fault anyway (to figure out how to generate such
> mappings is left as en excercise for the reader).
>
> Blatantly stolen from art@'s similar fix to sparc.
2002-11-14 20:30:40 +00:00
christos
a5e84b23a8 retrieve host basic info. 2002-11-14 19:45:25 +00:00
christos
1a546a91c0 get the cpu basic info. 2002-11-14 19:44:36 +00:00
christos
f9ddf42b17 the host basic info belongs with the cpu.
attempt to make the semaphore traps work, by doing nothing.
2002-11-14 19:44:06 +00:00
atatat
42c2fe641b Implement backwards extension of amaps. There are three cases to deal
with:

Case #1 -- adjust offset: The slot offset in the aref can be
decremented to cover the required size addition.

Case #2 -- move pages and adjust offset: The slot offset is not large
enough, but the amap contains enough inactive space *after* the mapped
pages to make up the difference, so active slots are slid to the "end"
of the amap, and the slot offset is, again, adjusted to cover the
required size addition.  This optimizes for hitting case #1 again on
the next small extension.

Case #3 -- reallocate, move pages, and adjust offset: There is not
enough inactive space in the amap, so the arrays are reallocated, and
the active pages are copied again to the "end" of the amap, and the
slot offset is adjusted to cover the required size.  This also
optimizes for hitting case #1 on the next backwards extension.

This provides the missing piece in the "forward extension of
vm_map_entries" logic, so the merge failure counters have been
removed.

Not many applications will make any use of this at this time (except
for jvms and perhaps gcc3), but a "top-down" memory allocator will use
it extensively.
2002-11-14 17:58:48 +00:00
oster
56f6918fef rf_markalldirty() needs to update the mod_counter for used_spares too!
This bug appears as "incorrect Mod Counters" in 'raidctl -s'.  The
reason it was seen only in 'raidctl -s' is because of the conditions
needed to trigger the bug:
  a) a raid set is configured
  b) no partitions on that set are mounted or are otherwise in-use
  c) a component is failed, and subsequently rebuilt to a hot spare
  d) the machine is rebooted while something (e.g. 'raidctl -s') has
the device open (and, therefore, rf_markalldirty() has been called)
but before the final rf_update_component_labels() is done.

Needless to say, the window for this happening is *very* small, and it
was only because I was testing some obscure stuff that I even noticed it.
2002-11-14 17:11:54 +00:00
tsutsui
2388751cea Sync with copyright verbiage update of OpenBSD's iha(4). 2002-11-14 17:07:42 +00:00
tsutsui
4d00e59ba6 Correct copyright notice since this code was mostly taken from
if_ne_isapnp.c, not if_fmv.c.
2002-11-14 16:49:55 +00:00
minoura
78bfc702a8 Add support for National Semiconductor Geode(TM) familly of processors.
Thanks to Hiroshi Miura <miura AT da-cha DOT org> for testing.
2002-11-14 12:52:28 +00:00
dsainty
ad9ef28cf5 Regen. 2002-11-14 11:33:48 +00:00
dsainty
c4701e3705 Add Palm m550 (Tungsten) 2002-11-14 11:30:26 +00:00
gson
1fd621f7df eap.c 1.54 changed ES1371 specific code but failed to make the
corresponding cases to the ES1370 case, causing a panic when
attaching an ES1370.
2002-11-14 04:43:23 +00:00
wrstuden
80e7381d17 Make O_NOCTTY have the same number of leading zeros as all the other
macros in this file. Makes figuring out what bits are in use easier.
2002-11-14 04:03:35 +00:00
oster
f03dc09c94 Don't allow failing more than one component of a set, or
failing a component that has been spared, or "double-failing"
an already failed component.  XXX This isn't the right place to fix
this, but better here than no-where (and I'm hoping to move it sometime
soon).
2002-11-14 03:04:20 +00:00
matt
da584e2f99 If MULTIPROCESSOR, just accept the penalties of doing BAT flipping when
syncing the icache.
2002-11-13 21:08:50 +00:00
jdolecek
8d9855100c enable raidframe again, it apparently works fine even w/ MP now
blessed by Frank
2002-11-13 20:00:04 +00:00
christos
ce4326d8cd add COMPAT_DARWIN 2002-11-13 19:20:24 +00:00
jdolecek
cedc87712e ELF copyargs: at the time this is executed, process's ucred doesn't
contain the new uid/gid for suid/sgid binaries yet; determine AT_EUID
and AT_EGID by checking executed program vnode attributes in this case
2002-11-13 15:49:44 +00:00
jdolecek
6788e239e4 we now export information about CLK_TCK via ELF aux args, no need to
hardcode '100' for times(2) anymore; use 'hz' instead
2002-11-13 15:20:04 +00:00
jdolecek
cee43b67cc add generic linux compat ELF copyargs function
this gives:
* linux sysconf(_SC_CLK_TCK) gives correct value for linux binaries (hz)
  even if hz != 100
* glibc gets proper information on real/effective uid and enables
  secure mode for suid binaries

g/c LINUX_COPYARGS_FUNCTION, replaced by linux ELF copyargs function
g/c alpha-specific linux ELF copyargs function and linux ELF defines
2002-11-13 15:16:27 +00:00
jdolecek
9def367548 need to use Aux32Info explicitly, not AuxInfo alone, to work
within context of kern/exec_conf.c
2002-11-13 14:35:15 +00:00
msaitoh
76c101443c add some definitions for P[VR]R register 2002-11-13 14:00:27 +00:00
jdolecek
dc57bd5cb7 eliminate remaining LinuxAuxInfo 2002-11-13 13:42:06 +00:00
jdolecek
e97bb63dae need to use LINUX_ELF_AUX_ENTRIES in LINUX_ELF_AUX_ARGSIZ
how this ever could have worked?
2002-11-13 13:40:51 +00:00
jdolecek
3e8efcdd61 use generic ELF AuxInfo, no need to define a 'linux' variant here
simplify LINUX_ELF_AUX_ARGSIZ definition, LINUX_SP_WRAP is always defined here
2002-11-13 13:37:22 +00:00
matt
3a5d673363 Change syscall to bound code so that systrace and ktrace won't fall off
the end of a table.   XXX this is wrong since code does not indicate the
sysent table for which code was used as an index.
2002-11-13 09:36:10 +00:00
matt
9cf475322b Do kernel non-USER_SR pte spilling regardless of interrupt count. Only do
kernel USER_SR spillage if interrupt depth is 0.
2002-11-13 09:33:20 +00:00
jdolecek
081a94b01c linux_sys_times(): if tms is NULL, just return the number of ticks since
boot, don't error out; this matches what Linux does

Fixes problem reported in kern/19027
2002-11-13 08:27:10 +00:00
yamt
64f7cc2afc make stack trace on i386 work again.
(signed vs unsigned)
2002-11-13 05:59:28 +00:00
provos
a5883f1616 fix systrace panic that was introduced when postponing pid number allocation
approved itojun
2002-11-13 00:51:02 +00:00
manu
530968e795 The kernel now builds with COMPAT_DARWIN. 2002-11-12 23:40:19 +00:00
chris
164b37a80c Tweak a few minor things:
when looking to reenable caching, only do so if all the pages aren't already
cached.
Convert some ints to unsigned int.  (scarily this actually shows the biggest
decrease in timing for my benchmark, I guess the compiler can optimise better)
2002-11-12 22:14:21 +00:00
manu
f3eaadfead Darwin system calls skeleton 2002-11-12 22:04:07 +00:00
cgd
a9ff9eb14c to catch up with the recent gcc compiler driver changes, add -mno-abicalls
to AFLAGS.  In CFLAGS, remote -mno-half-pic (unneeded), and add -msoft-float
(needed for gcc 3.3).
2002-11-12 19:34:40 +00:00
manu
114cae0e54 Fix the stack layout on program startup. This should be:
(8 bytes boundary) PAGE_SIZE   argc    argv  .... envp
2002-11-12 19:01:18 +00:00
chs
7d8622764c when there are multiple matches for the requested media, select the first
matching instance rather than the last one.  this restores the behaviour
in the multiple-match case to what it was when all the drivers only allowed
instance 0 (and in particular, makes autonegotiation of the on-board fxp
on my DK440LX board work again by default, which has two PHYs that both
advertise "auto").  as discussed on tech-net.
2002-11-12 16:54:45 +00:00
nisimura
abad61e77f Remove o32 stack layout exposure form cpu_fork().
Tested on R4000 and R3000.
2002-11-12 14:00:41 +00:00
kleink
60e088b1a4 Oops, ENOSR: resource -> resources here, too. 2002-11-12 13:52:28 +00:00
blymn
c4774e1260 * Don't keep evaluating fingerprint if there is no fingerprints for the
device.  Should help performance when no fingerprints are loaded.
* Back down the securelevel, now securelevel of 2 will make lack of
  fingerprint or fingerprint mismatch a fatal error.  Previously this
  was done at securelevel 3 or greater.
2002-11-12 12:54:36 +00:00
fvdl
69728c4ced The kernel lock must be held around ADDUPROF. 2002-11-12 11:51:54 +00:00
chris
747fcfc089 Fix PTE_FLUSH_RANGE macro, it should have had a cnt parameter. 2002-11-12 09:46:37 +00:00
skrll
b207990164 Add the missing errno symbols that are defined in IEEE Std 1003.1-2001.
The language message files need updating.

Change reviewed and OK'd by Klaus Klein.
2002-11-12 08:20:02 +00:00
manu
f130f7a839 In mach_reply_port, don't increment the returned port for now, this confuses
the binary on the second launch.
In mach_vm_map, hack in a failure so that we fail exactly like Darwin when
mapping a page at address 0
Add vm_allocate trap
2002-11-12 06:14:39 +00:00
manu
3eb20e3576 mach_ports_lookup allocate one page of memory and returns its address.
On error, most traps return a short packet with just an error code, emulate
this correctly.
2002-11-12 05:18:31 +00:00
itohy
f2cc0d2ae5 add non-ELF .align 2002-11-12 03:03:10 +00:00
itojun
50a545a34b remove all entries in rt timer queue on ip_mtudisc change, instead of
destroying the queue.
2002-11-12 02:10:13 +00:00
itojun
6a151fcce1 ckout previous - doesn't compile 2002-11-12 01:57:07 +00:00
itojun
9a8b644578 update ip_mtudisc sysctl change handling. 2002-11-12 01:38:09 +00:00
itojun
96910acf99 add an argument to rt_timer_remove_all(), to specify if we need to call
timeout routine on removal.
2002-11-12 01:37:30 +00:00
simonb
96c9d84cda Add support for the ST M41T81 RTC found on pass 2 swarm boards.
XXX: Much of this should live in arch/sbmips instead of arch/mips/sibyte.
XXX: These should be replaced with MI SMBus drivers one day.
2002-11-12 01:22:25 +00:00