summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* Make the style a little bit more consistant by removing parametermarkm2002-02-031-3/+2
| | | | | names from some prototypes. (Other prototypes here already have these removed).
* Use osigreturn(2) instead of sigreturn(2) plus broken magic for returningbde2002-02-032-11/+6
| | | | | | | | | | | | | | | | | | from old signal handlers. This is simpler and faster, and fixes (new) sigreturn(2) when %eip in the new signal context happens to match the magic value (0x1d516). 0x1d516 is below the default ELF text section, so this probably never broken anything in practice. locore.s: In addition, don't build the signal trampoline for old signal handlers when it is not used. alpha: Not fixed, but seems to be even less broken in practice due to more advanced magic. A false match occurs for register #32 in mc_regs[]. Since there is no hardware register #32, a false match is only possible for direct calls to sigreturn(2) that happen to have the magic number in the spare mc_regs[32] field.
* Improve the change in the previous commit: use a stub for osigreturn()bde2002-02-031-0/+4
| | | | when it is not really used instead of unconditionalizing all of it.
* Compile osigreturn() unconditionally since it will always be needed onbde2002-02-011-2/+0
| | | | | | | | | | | | | | | | | | some arches and the syscall table is machine-independent. It was (bogusly) conditional on COMPAT_43, so this usually makes no difference. ia64: in addition: - replace the bogus cloned comment before osigreturn() by a correct one. osigreturn() is just a stub fo ia64's. - fix the formatting of cloned comment before sigreturn(). - fix the return code. use nosys() instead of returning ENOSYS to get the same semantics as if the syscall is not in the syscall table. Generating SIGSYS is actually correct here. - fix style bugs. powerpc: copy the cleaned up ia64 stub. This mainly fixes a bogus comment. sparc64: copy the cleaned up the ia64 stub, since there was no stub before.
* Finish revs.1.23 and 1.24 so that MCOUNT_ENTER really actually compilesbde2002-01-311-0/+1
| | | | | | | | | for SMP in the plain profiling case. It seems to work too. This error was not detected by LINT because LINT only compiles the GUPROF profiling case, which is is a superset of the plain profiling case for !SMP but which is so broken for SMP that the buggy code is not compiled.
* Backed out the main part of revs.1.14-16. Don't disable interrupts inbde2002-01-301-10/+3
| | | | | | | | the packet transfer routines, since rev.1.468 of machdep.c does this better. I'm surprised that disabling interrupts helped much. Disabling them in the packet receive routine is too late. Fixed some minor style bugs in rev.1.14.
* Backed out the last vestiges of rev.1.51. Don't enter a criticalbde2002-01-301-10/+1
| | | | | region in Debugger(), since rev.1.468 of machdep.c does this better. Other cosmetic backouts.
* Cleaned up the 0ldSiG magic check before removing it. Just use fuword()bde2002-01-301-13/+8
| | | | | | | | | | | | | | | to fetch the magic word instead of useracc() plus a direct access. This is more efficient as well as simpler and less incorrect: - it was inefficent because useracc() takes much longer than just accessing the data using a correct access method, at least on i386's. - it was incorrect because direct access is incorrect unless the address has been mapped. This and nearby direct accesses are mostly handled better for other arches because they have to be (direct accesses don't work). - using magic in sigreturn is still fundamentally broken because false matches are possible. On i386's, a false match occurs when %eip in a new signal context happens to equal the magic value. This is not handled better for other arches.
* Don't include <isa/isavar.h> or compile code depending on it when isabde2002-01-308-1/+37
| | | | | | | | is not configured. Including <isa/isavar.h> when it is not used is harmful as well as bogus, since it includes "isa_if.h" which is not generated when isa is not configured. This was fixed in 1999 but was broken by unconditionalizing PNPBIOS.
* Removed unused includes. In particular, don't include <isa/isavar.h> sincebde2002-01-301-24/+2
| | | | | | its only effect is to break the optionality of the isa option. Sorted includes.
* Unbreak pcvt, it suffered from common variables. Whoever added thejoerg2002-01-271-8/+14
| | | | | -fno-common could not have possibly compiled LINT afterwards with this...
* Add support for the Netgear GA302T 10/100/1000 adapter. Given thatjdp2002-01-271-3/+3
| | | | | | it's a 32-bit card, it's quite nice for $75. MFC after: 3 days
* Add missing destroy_dev().wes2002-01-231-10/+13
| | | | | | Submitted by: Maxime Henrion <mux@sneakerz.org> Reviewed by: msmith@ MFC after: 3 weeks
* List bit 18 (reserved, apparently present on thunderbird cpus)peter2002-01-221-2/+2
| | | | | | and bit 19 (athlon XP/MP rev 0x662 and later) for amd_features. Submitted by: dwcjr
* Add the 'iir' driver, for the Intel Integrated RAID controllers andmsmith2002-01-202-0/+11
| | | | | | | | prior ICP Vortex models. This driver was developed by Achim Leubner of Intel (previously with ICP Vortex) and Boji Kannanthanam of Intel. Submitted by: "Kannanthanam, Boji T" <boji.t.kannanthanam@intel.com> MFC after: 2 weeks
* The Libretto L series has no $PIR table, but does have a _PIR table.imp2002-01-202-26/+44
| | | | | | | | | | | | | This typo keeps us from properly routing an interrupt for CardBus bridges on this machine. So, now we look for $PIR and then _PIR to cope. With these changes, the Libretto L1 now works properly. Evidentally, the idea comes from patch that the Japanese version of RedHat (or against a Japanese version of Red Hat), but my Japanese isn't good enough to to know for sure. Reported by: Hiroyuki Aizu-san <eyes@navi.org> # This may be an MFC candidate, but I'm not yet sure.
* Avoid __func__ string concatenationpeter2002-01-183-12/+12
|
* Garbage-collect an unused variable left by rev.1.61.bde2002-01-171-3/+1
|
* Changed the type of pcb_flags from u_char to u_int and adjusted things.bde2002-01-172-6/+4
| | | | | This removes the only atomic operation on a char type in the entire kernel.
* Change <b28> to HTT (Hyperthreading technology). If this flag is set thenpeter2002-01-161-3/+3
| | | | | | | cpuid with %eax=1 will return a logical cpu count in bits 16-23 of %ebx. Bit 29 is actually 'TM' according to AP-485. This signifies the presence of the thermal control circuit (which I believe can slow the clock down to reduce core temperature).
* Ensure that we set all the %cr0 bits to a known state for the AP's beforepeter2002-01-163-0/+30
| | | | | | they make it through to userland. This should fix the p5-smp problem without affecting the other cpus (eg: cyrix, see initcpu.c and the special cache handling for these cpu types).
* Sync to GENERIC: add UFS_DIRHASHimp2002-01-151-0/+1
| | | | Submitted by: Anders Andersson <anders@hack.org>
* Replace ffind_* with fget calls.alfred2002-01-142-4/+4
| | | | | | | | Make fget MPsafe. Make fgetvp and fgetsock use the fget subsystem to reduce code bloat. Push giant down in fpathconf().
* SMP Lock struct file, filedesc and the global file list.alfred2002-01-134-68/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seigo Tanimura (tanimura) posted the initial delta. I've polished it quite a bit reducing the need for locking and adapting it for KSE. Locks: 1 mutex in each filedesc protects all the fields. protects "struct file" initialization, while a struct file is being changed from &badfileops -> &pipeops or something the filedesc should be locked. 1 mutex in each struct file protects the refcount fields. doesn't protect anything else. the flags used for garbage collection have been moved to f_gcflag which was the FILLER short, this doesn't need locking because the garbage collection is a single threaded container. could likely be made to use a pool mutex. 1 sx lock for the global filelist. struct file * fhold(struct file *fp); /* increments reference count on a file */ struct file * fhold_locked(struct file *fp); /* like fhold but expects file to locked */ struct file * ffind_hold(struct thread *, int fd); /* finds the struct file in thread, adds one reference and returns it unlocked */ struct file * ffind_lock(struct thread *, int fd); /* ffind_hold, but returns file locked */ I still have to smp-safe the fget cruft, I'll get to that asap.
* Clear the single-step flag for signal handlers. This fixes bogus tracebde2002-01-104-9/+10
| | | | | | | | | | | | | | | | traps on the first instruction of signal handlers. In trap.c:syscall(), fake a trace trap if the single-step flag was set on entry to the kernel, not if it will be set on exit from the kernel. This fixes bogus trace traps after the last instruction of signal handlers. gdb-4.18 (the version in FreeBSD) still has problems with the program in the PR. These seem to be due to bugs in gdb and not in FreeBSD, and are fixed in gdb-5.1 (the distribution version). PR: 33262 Tested by: k Macy <kip_macy@yahoo.com> MFC after: 1 day
* Fix typo in function name.wes2002-01-101-1/+1
| | | | | Reviewed by: peter@ Obtained from: mux@sneakerz.org
* Use a spare slot in the machine context for a flags word to indicatedeischen2002-01-102-1/+5
| | | | | | | | | | whether the machine context is valid and whether the FPU state is valid (saved). Mark the machine context valid before copying it out when sending a signal. Approved by: -arch
* Fix S3 breakage.takawata2002-01-091-1/+2
| | | | | Now AcpiEnterSleep() is light enough, so flushing cache before the function is not too early.
* - generic Arcnet frameworkfjoe2002-01-081-0/+9
| | | | | | - device driver for SMC COM90cx6 Arcnet network adapters Obtained from: NetBSD
* Gut this header; since physio_proc_init is never called, the code never doesmsmith2002-01-081-34/+1
| | | | anything more than multiply declare some unused variables.
* Staticise devclasses and some unnecessarily global variables.msmith2002-01-081-1/+1
|
* Convert a bunch of 1 << PCPU_GET(cpuid) to PCPU_GET(cpumask).peter2002-01-054-9/+9
|
* Change the preemption code for software interrupt thread schedules andjhb2002-01-057-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mutex releases to not require flags for the cases when preemption is not allowed: The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent switching to a higher priority thread on mutex releease and swi schedule, respectively when that switch is not safe. Now that the critical section API maintains a per-thread nesting count, the kernel can easily check whether or not it should switch without relying on flags from the programmer. This fixes a few bugs in that all current callers of swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from fast interrupt handlers and the swi_sched of softclock needed this flag. Note that to ensure that swi_sched()'s in clock and fast interrupt handlers do not switch, these handlers have to be explicitly wrapped in critical_enter/exit pairs. Presently, just wrapping the handlers is sufficient, but in the future with the fully preemptive kernel, the interrupt must be EOI'd before critical_exit() is called. (critical_exit() can switch due to a deferred preemption in a fully preemptive kernel.) I've tested the changes to the interrupt code on i386 and alpha. I have not tested ia64, but the interrupt code is almost identical to the alpha code, so I expect it will work fine. PowerPC and ARM do not yet have interrupt code in the tree so they shouldn't be broken. Sparc64 is broken, but that's been ok'd by jake and tmm who will be fixing the interrupt code for sparc64 shortly. Reviewed by: peter Tested on: i386, alpha
* GC unfinished function selected_proc_ipi(). It is a duplicate ofpeter2002-01-051-30/+0
| | | | apic_ipi_singledest() anyway.
* Allow a specific setting for pv entries. This avoids the need to guesspeter2002-01-031-0/+1
| | | | | (or calculate by hand) the effect of interactions between shpgperproc, physical ram size, maxproc, maxdsiz, etc.
* Add the nullmodem devicejulian2002-01-011-0/+1
|
* Grrr. The tlb code is strewn over 3 files and I misread it. Revertdillon2001-12-311-8/+0
| | | | | the last change (it was a NOP), and remove the XXX comments that no longer apply.
* You know those 'XXX what about SMP' comments in pmap_kenter()? Well,dillon2001-12-311-3/+10
| | | | | | | | | | they were right. Fix both kenter() and kremove() for SMP by ensuring that the tlb is flushed on other cpu's. This will directly solve random-corruption panic issues in -stable when it is MFC'd. Better to be safe then sorry, we can optimize this later. Original Suspicion by: peter Maybe MFC: immediately on re's permission
* GC an alternate trap_pfault() which has rotted away behind an "#ifdef notyet"phk2001-12-301-118/+0
| | | | since 21-Mar-95 .
* Add the ifpi2 driver.gj2001-12-221-0/+7
| | | | MFC after: 4 weeks
* Add support for the AVM Fritz!Card PCI version 2 controller.gj2001-12-221-2/+4
| | | | MFC after: 4 weeks
* Use the new resource_list_print_type() function.tmm2001-12-211-1/+1
| | | | | Pass the bus device to isa_init() (this is needed for the sparc64 version).
* Add support for the Intel 82443MX chipsetpirzyk2001-12-211-1/+1
| | | | | PR: kern/33032 MFC after: 1 month
* Introduce a standard name for the lock protecting an interrupt controllerjhb2001-12-2017-119/+84
| | | | | | | | and it's associated state variables: icu_lock with the name "icu". This renames the imen_mtx for x86 SMP, but also uses the lock to protect access to the 8259 PIC on x86 UP. This also adds an appropriate lock to the various Alpha chipsets which fixes problems with Alpha SMP machines dropping interrupts with an SMP kernel.
* I am not sure if it is a good idea or not to have my id in the cvs logpeter2001-12-201-824/+797
| | | | | | | for this file, but here goes nothing. This was my first attempt at tidying up this file. Unfortunately, it just exposes many more horrors in the code itself that had been masked by the eyesore that was there before. I think this just needs to be put out of its misery.
* Replace a bunch of:peter2001-12-201-20/+6
| | | | | | | | for (pv = TAILQ_FIRST(&m->md.pv_list); pv; pv = TAILQ_NEXT(pv, pv_list)) { with: TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) {
* Fix some whitespace nits, and a minor error that I made in some unusedpeter2001-12-201-8/+7
| | | | #ifdef DEBUG code (VM_MAXUSER_ADDRESS vs UPT_MAX_ADDRESS).
* Comment out DEVICE_POLLING so that LINT compiles again.phk2001-12-191-1/+2
|
* Axe stale extern for a non-existent variable.jhb2001-12-181-1/+0
|
* In a couple of places, we recalculated addresses we already had in localjulian2001-12-181-3/+3
| | | | pointer variables.
OpenPOWER on IntegriCloud