Commit Graph

8573 Commits

Author SHA1 Message Date
peter
e1112c77a0 Make this compile with gcc-3.1, which objects to the multi-line string. 2002-05-19 06:42:29 +00:00
marcel
42058b50b4 Hook up the new linux_ptrace implementation.
PR: 33299
Submitted by: Alexander N. Kabaev <ak03@gte.com>
2002-05-19 01:27:14 +00:00
marcel
2cf568059c Regen (linux_ptrace)
PR: 33299
2002-05-19 01:23:33 +00:00
marcel
3913850ecd Sparkling new implementation of linux_ptrace. Slight tweaking by
yours truly.

PR: 33299
Submitted by: Alexander N. Kabaev <ak03@gte.com>
2002-05-19 01:21:55 +00:00
phk
f957e47fe3 Move MI stuff out of MD param.h files.
It can all still be overridden in the MD files should need suddenly arise.
2002-05-14 20:35:29 +00:00
phk
15562e8000 Move a few ancient minor-number definitions for tapedrives to the
only driver which uses them.  Remove the rest.
2002-05-14 06:57:02 +00:00
bde
d6ab52d0b4 Fixed a semantic error. va_arg(ap, u_short) is nonsense except on i386's
with 16-bit ints, since u_short is promoted when it is passed to a
varargs function.  gcc now warns about this.  We always pass small
integers (this is well obuscated), so there are no conversion problems.

Fixed a related style bug (bogus cast).
2002-05-13 14:34:47 +00:00
bde
f5fcb305ee Fixed a syntax error (a label not followed by a statement). 2002-05-13 11:53:40 +00:00
jake
fbb890cb8c These were repo-copied to dump_machdep.c. 2002-05-13 02:52:35 +00:00
obrien
c9b119433a I reorganized a little bit too much in the backwards case. 2002-05-10 03:24:06 +00:00
obrien
707b0b13a6 Gcc 3.1 varargs support. 2002-05-10 02:02:54 +00:00
jedgar
0954c8c56e s/sysctl -w/sysctl/ 2002-05-06 00:45:27 +00:00
bde
e129a7f152 Fixed checking for VM86 mode in doreti which I broke in rev.1.30. Only
the case of VM86 calls from the kernel was broken, so this bug was not
a security hole.

PR:		36710
Submitted by:	David Xu <davidx@viasoft.com.cn> (version for RELENG_4)
MFC after:	3 days
2002-05-05 03:19:48 +00:00
fenner
4a04ef1ff8 Restore the ability interrupt dumps on i386, based on
the old kern_shutdown.c .  Other archs might be able to
use similar code but I don't have anything to test on.
2002-05-04 17:45:48 +00:00
jmallett
e977af0eb9 Typo fix: detects -> detect.
Reviewed by:	phk
2002-05-03 17:59:25 +00:00
peter
eee1c0968b Retire makeLINT.pl 2002-05-02 22:20:40 +00:00
peter
91d051e18d Makefile uses genwakecode.sh now. 2002-05-02 22:17:35 +00:00
obrien
083e8c7872 Revert rev 1.1018. rp(4) and dgb(4) are deemed MI, while the rest of the
drivers for simular hardware are i386-specific.  That is why I did not
find the information here.
2002-05-02 19:42:38 +00:00
des
afc18879ad Join the pissing contest: generate LINT with a single sed(1) command.
Smaller script, smaller (though equivalent) output.
2002-05-02 16:34:47 +00:00
kuriyama
56adfc1b25 Use shell script version (using awk and sed) of makeLINT.pl. 2002-05-02 06:10:09 +00:00
obrien
d779b4edb0 Add some NOTES on the Comtrol Rocketport and the Digiboard drivers. 2002-05-01 23:03:31 +00:00
peter
5b777bef20 Try using genwakecode.sh instead of the perl version. 2002-05-01 21:54:07 +00:00
peter
ab5403ca0f Add a shell script to do what genwakecode.pl does.
Obtained from:	ade
2002-05-01 21:52:34 +00:00
phk
26ffc19d1e Don't export timecounter structures under debug. with sysctl, they
contain no truly interesting data anymore.
2002-04-30 19:34:31 +00:00
peter
c0e3147cc6 Tidy up some loose ends.
i386/ia64/alpha - catch up to sparc64/ppc:
- replace pmap_kernel() with refs to kernel_pmap
- change kernel_pmap pointer to (&kernel_pmap_store)
  (this is a speedup since ld can set these at compile/link time)
all platforms (as suggested by jake):
- gc unused pmap_reference
- gc unused pmap_destroy
- gc unused struct pmap.pm_count
(we never used pm_count - we track address space sharing at the vmspace)
2002-04-29 07:43:16 +00:00
alc
b4f776aff8 For what it's worth, fix the compilation of an I386_CPU-only kernel
now that certain warnings are fatal.
2002-04-27 18:13:35 +00:00
alc
5feddc83ac Don't call vm_map_growstack() from trapwrite() as vm_fault() now performs
this automatically.
2002-04-27 17:07:15 +00:00
scottl
cab9acb79f Add a CAM interface to the aac driver. This is useful in case you should
ever connect a SCSI Cdrom/Tape/Jukebox/Scanner/Printer/kitty-litter-scooper
to your high-end RAID controller.  The interface to the arrays is still
via the block interface; this merely provides a way to circumvent the
RAID functionality and access the SCSI buses directly.  Note that for
somewhat obvious reasons, hard drives are not exposed to the da driver
through this interface, though you can still talk to them via the pass
driver.  Be the first on your block to low-level format unsuspecting
drives that are part of an array!

To enable this, add the 'aacp' device to your kernel config.

MFC after:	3 days
2002-04-27 01:31:17 +00:00
phk
f227fb83e6 Remove the tc_update() function. Any frequency change to the
timecounter will be used starting at the next second, which is
good enough for sysctl purposes.  If better adjustment is needed
the NTP PLL should be used.
2002-04-26 10:06:26 +00:00
marcel
56d625090e Don't use the symbol name to lookup the symbol value when we can use
the symbol index defined by the relocation. The elf_lookup() support
function is to be used by elf_reloc() when symbol lookups need to be
done. The elf_lookup() function operates on the symbol index and
will do a symbol name based lookup when such is required, otherwise
it uses the symbol index directly. This solves the problem seen on
ia64 where the symbol hash table does not contain local symbols and
a symbol name based lookup would fail for those symbols.

Don't pass the symbol name to elf_reloc(), as it isn't used any more.
2002-04-25 01:22:16 +00:00
imp
85bb92b615 o Work around bugs in the powerof2 macro: It thinks that 0 is a power of
2, but that's not the case.  This fixes the case where there were slots
  in the PIR table that had no bits set, but we assumed they did and used
  strange results as a result.
o Map invalid INTLINE registers to 255 in pci_cfgreg.c.  This should allow
  us to remove the bogus checks in MI code for non-255 values.

I put these changes out for review a while ago, but no one responded
to them, so into current they go.

This should help us work better on machines that don't route
interrupts in the traditional way.

MFC After: 4286 millifortnights
2002-04-24 15:30:11 +00:00
imp
17b84c592b Fix a PNPID in a comment
Submitted by: David Xu
2002-04-24 15:22:53 +00:00
phk
6a45f19d90 Don't free(9) a pointer which has been modified.
Chapeau de pointe:	mux
2002-04-23 18:52:39 +00:00
markm
8801cf491a Stylify (mainly line up macro EOL-continuation \'s), and add a dummy
alternative for lint.
2002-04-21 10:49:00 +00:00
alfred
0375b27808 Clean up:
Comment run_filter() to explain what it does.

Remove chatty comments.

void busdma_swi() { }  -> void busdma_swi(void) { }
2002-04-19 22:58:09 +00:00
rwatson
0e75d83778 Since WITNESS doesn't just do mutexes, remove "mutex" from the WITNESS
comment in GENERIC config files of appropriate platforms.  For whatever
reason, powerpc didn't use WITNESS in GENERIC.
2002-04-18 03:44:44 +00:00
alc
50de418295 o Call vm_map_growstack() from vm_fault() if vm_map_lookup() has failed
due to conditions that suggest the possible need for stack growth.
   This has two beneficial effects: (1) we can
   now remove calls to vm_map_growstack() from the MD trap handlers and (2)
   simple page faults are faster because we no longer unnecessarily perform
   vm_map_growstack() on every page fault.
 o Remove vm_map_growstack() from the i386's trap_pfault().
 o Remove the acquisition and release of Giant from i386's trap_pfault().
   (vm_fault() still acquires it.)
2002-04-18 03:28:27 +00:00
tegge
59deaddc60 Fix typo in adjusted panic message.
Submitted by:	cokane
2002-04-17 22:41:58 +00:00
tegge
79f7500829 Update io_apic_ints array properly when revoking an irq mapping.
Adjust panic message.

Submitted by:	David Xu <bsddiy@yahoo.com>
2002-04-17 18:27:10 +00:00
mux
a207e41bef Rework the kernel environment subsystem. We now convert the static
environment needed at boot time to a dynamic subsystem when VM is
up.  The dynamic kernel environment is protected by an sx lock.

This adds some new functions to manipulate the kernel environment :
freeenv(), setenv(), unsetenv() and testenv().  freeenv() has to be
called after every getenv() when you have finished using the string.
testenv() only tests if an environment variable is present, and
doesn't require a freeenv() call. setenv() and unsetenv() are self
explanatory.

The kenv(2) syscall exports these new functionalities to userland,
mainly for kenv(1).

Reviewed by:	peter
2002-04-17 13:06:36 +00:00
peter
3d8c7d4cab Pass vm_page_t instead of physical addresses to pmap_zero_page[_area]()
and pmap_copy_page().  This gets rid of a couple more physical addresses
in upper layers, with the eventual aim of supporting PAE and dealing with
the physical addressing mostly within pmap.  (We will need either 64 bit
physical addresses or page indexes, possibly both depending on the
circumstances.  Leaving this to pmap itself gives more flexibilitly.)

Reviewed by:	jake
Tested on:	i386, ia64 and (I believe) sparc64. (my alpha was hosed)
2002-04-15 16:00:03 +00:00
dwmalone
e5b0116c2a Make the MTRR code a bit more defensive - this should help people
trying to run X on some Athlon systems where the BIOS does odd things
(mines an ASUS A7A266, but it seems to also help on other systems).

Here's a description of the problem and my fix:

	The problem with the old MTRR code is that it only expects
	to find documented values in the bytes of MTRR registers.
	To convert the MTRR byte into a FreeBSD "Memory Range Type"
	(mrt) it uses the byte value and looks it up in an array.
	If the value is not in range then the mrt value ends up
	containing random junk.

	This isn't an immediate problem. The mrt value is only used
	later when rewriting the MTRR registers. When we finally
	go to write a value back again, the function i686_mtrrtype()
	searches for the junk value and returns -1 when it fails
	to find it. This is converted to a byte (0xff) and written
	back to the register, causing a GPF as 0xff is an illegal
	value for a MTRR byte.

	To work around this problem I've added a new mrt flag
	MDF_UNKNOWN.  We set this when we read a MTRR byte which
	we do not understand.  If we try to convert a MDF_UNKNOWN
	back into a MTRR value, then the new function, i686_mrt2mtrr,
	just returns the old value of the MTRR byte. This leaves
	the memory range type unchanged.

I'd like to merge this before the 4.6 code freeze, so if people
can test this with XFree 4 that would be very useful.

PR:		28418, 25958
Tested by:	jkh, Christopher Masto <chris@netmonger.net>
MFC after:	2 weeks
2002-04-14 20:13:08 +00:00
dwmalone
a1416e3bd8 Move do_cpuid into the correct place in this file and make
the indentation more like the other multi-line assembley in
this file.

Someone who understands gcc constraints could update the
constraints for do_cpuid.
2002-04-10 21:18:46 +00:00
alc
0357dd9269 o In osigreturn(), restore all of the registers in one place.
o Recent changes to osigreturn() and sigreturn() have made them MPSAFE.  Add
   a comment to this effect.

Submitted by:	bde (bullet #1)
Reviewed by:	jhb (bullet #2)
2002-04-10 20:08:07 +00:00
mike
24420c8af5 Remove the hack for segsz_t from <sys/types.h>; use the normal
_BSD_FOO_T_ method for defining segsz_t.
2002-04-10 15:58:13 +00:00
mike
7fb662578d Add manifest constants: _LITTLE_ENDIAN, _BIG_ENDIAN, _PDP_ENDIAN, and
_BYTE_ORDER.  These are far more useful than their non-underscored
equivalents as these can be used in restricted namespace environments.
Mark the non-underscored variants as deprecated.
2002-04-10 14:39:14 +00:00
jhb
f7565e52d7 Round 2 of munging the MI/MD split in NOTES. Put almost all the device
drivers with MI portions into the MI notes.  Device drivers such as busses
like the isa, eisa, and pci devices are now in the MD NOTES section even
though they have some MI code.  This will ensure that only the proper bits
of device drivers will be included due to the optional bits dependent on
the busses in sys/conf/files.  This commit also takes the stance that since
hints are ignored in NOTES anyways, it is ok to include hints for a bus
that may not be present.

Advice from:    bde
2002-04-09 18:26:58 +00:00
phk
77e3582887 GC various bits and pieces of USERCONFIG from all over the place. 2002-04-09 11:18:46 +00:00
phk
de75742522 machine/uc_device.h was only here for USERCONFIG and kget(1).
We have neither anymore.
2002-04-09 11:04:42 +00:00
bde
ea5eccaded Removed ispc98 sysctl completely. Applications should understand that
ispc98 isn't set if its sysctl doesn't exist.  At least make(1) already
understands this.

Approved by:	nyan
2002-04-08 10:34:57 +00:00