summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Yet another verbose printing cleanup. Remove debug_wakeup flag andiwasaki2001-11-181-5/+2
| | | | check common verbose flag instead.
* Fix the non-KSTACK_GUARD case.. It has been broken since the KSEpeter2001-11-171-0/+1
| | | | commit. ptek was not been initialized.
* Start bringing i386/pmap.c into line with cleanups that were done topeter2001-11-173-257/+192
| | | | | | | | | | | | | | | alpha pmap. In particular - - pd_entry_t and pt_entry_t are now u_int32_t instead of a pointer. This is to enable cleaner PAE and x86-64 support down the track sor that we can change the pd_entry_t/pt_entry_t types to 64 bit entities. - Terminate "unsigned *ptep, pte" with extreme prejudice and use the correct pt_entry_t/pd_entry_t types. - Various other cosmetic changes to match cleanups elsewhere. - This eliminates a boatload of casts. - use VM_MAXUSER_ADDRESS in place of UPT_MIN_ADDRESS in a couple of places where we're testing user address space limits. Assuming the page tables start directly after the end of user space is not a safe assumption. There is still more to go.
* Oops, I accidently merged a whitespace error from the original commit.peter2001-11-161-1/+1
| | | | (whitespace at end of line in rev 1.264 pmap.c). Fix them all.
* Converge/fix some debug code (#if 0'ed on alpha, but whatever)peter2001-11-161-14/+11
| | | | | | - use NPTEPG/NPDEPG instead of magic 1024 (important for PAE) - use pt_entry_t instead of unsigned (important for PAE) - use vm_offset_t instead of unsigned for va's (important for x86-64)
* Allow bit 21 of EFLAGS register (PSL_ID) be changed in the use-mode withoutsobomax2001-11-151-1/+1
| | | | | | | | | | ill effects. This should fix problems threaded programs are having with auto-detecting CPU type. Reported by: Joe Clarke <marcus@marcuscom.com> Tested by: Joe Clarke <marcus@marcuscom.com> Reviewed by: jhb MFC after: 1 week
* - Don't enable interrupts in trap() if we trapped while holding a spinjhb2001-11-151-6/+17
| | | | | | | | lock as this usually makes the problem worse. - If we get a page fault while holding a spin lock, treat it as a fatal trap and don't even bother calling into the VM since calling into the VM will panic when trying to lock Giant before we can get a useful message anyways.
* Use newer constraints for atomic_cmpset().jhb2001-11-121-11/+9
| | | | Requested by: bde
* Use newer constraints for inline assembly for an operand that is both anjhb2001-11-121-21/+21
| | | | | | | input and an output by using the '+' modifier rather than listing the operand in both the input and output sections. Reviwed by: bde
* Add two minor changes.iwasaki2001-11-111-33/+44
| | | | | | - clean up wakeup routing fixup code by using macros. - allocate pte object temporary for kernel thread to avoid kernel panic by events from sleep button or lid switch.
* Fix tab damage in rev 1.326.obrien2001-11-061-1/+1
|
* Add S4BIOS sleep (BIOS hibernation) and DSDT overriding support.iwasaki2001-11-061-1/+9
| | | | | | | | | | | | | | - Add S4BIOS sleep implementation. This will works well if MIB hw.acpi.s4bios is set (and of course BIOS supports it and hibernation is enabled correctly). - Add DSDT overriding support which is submitted by takawata originally. If loader tunable acpi_dsdt_load="YES" and DSDT file is set to acpi_dsdt_name (default DSDT file name is /boot/acpi_dsdt.aml), ACPI CA core loads DSDT from given file rather than BIOS memory block. DSDT file can be generated by iasl in ports/devel/acpicatools/. - Add new files so that we can add our proposed additional code to Intel ACPI CA into these files temporary. They will be removed when similar code is added into ACPI CA officially.
* o Add new header <sys/stdint.h>.mike2001-11-021-0/+220
| | | | | | | | | | | | | | | | | | | | | o Make <stdint.h> a symbolic link to <sys/stdint.h>. o Move most of <sys/inttypes.h> into <sys/stdint.h>, as per C99. o Remove <sys/inttypes.h>. o Adjust includes in sys/types.h and boot/efi/include/ia64/efibind.h to reflect new location of integer types in <sys/stdint.h>. o Remove previously symbolicly linked <inttypes.h>, instead create a new file. o Add MD headers <machine/_inttypes.h> from NetBSD. o Include <sys/stdint.h> in <inttypes.h>, as required by C99; and include <machine/_inttypes.h> in <inttypes.h>, to fill in the remaining requirements for <inttypes.h>. o Add additional integer types in <machine/ansi.h> and <machine/limits.h> which are included via <sys/stdint.h>. Partially obtain from: NetBSD Tested on: alpha, i386 Discussed on: freebsd-standards@bostonradio.org Reviewed by: bde, fenner, obrien, wollman
* Some fix for the recent apm module changes.iwasaki2001-11-012-14/+8
| | | | | | | | | | | | | | - Now that apm loadable module can inform its existence to other kernel components (e.g. i386/isa/clock.c:startrtclock()'s TCS hack). - Exchange priority of SI_SUB_CPU and SI_SUB_KLD for above purpose. - Add simple arbitration mechanism for APM vs. ACPI. This prevents the kernel enables both of them. - Remove obsolete `#ifdef DEV_APM' related code. - Add abstracted interface for Powermanagement operations. Public apm(4) functions, such as apm_suspend(), should be replaced new interfaces. Currently only power_pm_suspend (successor of apm_suspend) is implemented. Reviewed by: peter, arch@ and audit@
* Skip PG_UNMANAGED pages when we're shooting everything down to try andpeter2001-11-011-1/+1
| | | | | | reclaim pv_entries. PG_UNMANAGED pages dont have pv_entries to reclaim. Reported by: David Xu <davidx@viasoft.com.cn>
* Remove previous revision. smp_started back in subr_smp where it belongs.mjacob2001-10-313-6/+0
|
* Make the actual volatile int smp_started live *somewhere*. This ismjacob2001-10-313-0/+6
| | | | | | a temporary fix so that we can compile kernels. I waited 30 minutes for a response from the person who would likely know, but any longer is too long to wait with breakage at ToT.
* Spell deivces as devices.rwatson2001-10-311-1/+1
|
* Don't let pmap_object_init_pt() exhaust all available free pagesdillon2001-10-311-1/+17
| | | | | | (allocating pv entries w/ zalloci) when called in a loop due to an madvise(). It is possible to completely exhaust the free page list and cause a system panic when an expected allocation fails.
* Don't try to probe the PnP BIOS if ACPI is active.msmith2001-10-311-0/+5
|
* Add kmupetext(), a function that expands the range of memory coveredgreen2001-10-301-0/+1
| | | | | | | | | by the profiler on a running system. This is not done sparsely, as memory is cheaper than processor speed and each gprof mcount() and mexitcount() operation is already very expensive. Obtained from: NAI Labs CBOSS project Funded by: DARPA
* Move device lnc to isa section, since it no longer uses the compat shims.imp2001-10-301-3/+2
| | | | | | Add comment about lnc. Remove probe order comment from isa_compat.c. That appears to no longer be the case.
* Fix a typo in comment and #ifdef fixes: GRAP_PRIO -> GRAB_PRIO so thatjhb2001-10-302-2/+2
| | | | | | | x86 SMP kernels actually boot again to single user mode. Pointy hat to: jhb Noticed by: jlemon
* Don't set CR0_NE in cpu_setregs() for the SMP case, since setting itbde2001-10-291-0/+2
| | | | | | | is npx.c's job and setting it here breaks the edit-time option of not setting it in npx.c. (It is not set in the right places for the SMP case, but always setting it here is harmless because there isn't even an edit-time option to not set it.)
* - More whitespace and comment cleanups.jhb2001-10-282-70/+92
| | | | | | | | - Remove unused sw1a label. A breakpoint can be set in choosethread() for the same effect. Reviewed by: bde Submitted by: bde (partly)
* Add APM compatibility feature to ACPI.iwasaki2001-10-261-0/+335
| | | | | | | | | | | | | | | | | This emulates APM device node interface APIs (mainly ioctl) and provides APM services for the applications. The goal is to support most of APM applications without any changes. Implemented ioctls in this commit are: - APMIO_SUSPEND (mapped ACPI S3 as default but changable by sysctl) - APMIO_STANDBY (mapped ACPI S1 as default but changable by sysctl) - APMIO_GETINFO and APMIO_GETINFO_OLD - APMIO_GETPWSTATUS With above, many APM applications which get batteries, ac-line info. and transition the system into suspend/standby mode (such as wmapm, xbatt) should work with ACPI enabled kernel (if ACPI works well :-) Reviewed by: arch@, audit@ and some guys
* Add a per-thread ucred reference for syscalls and synchronous traps fromjhb2001-10-261-26/+37
| | | | | | | | | userland. The per thread ucred reference is immutable and thus needs no locks to be read. However, until all the proc locking associated with writes to p_ucred are completed, it is still not safe to use the per-thread reference. Tested on: x86 (SMP), alpha, sparc64
* Currently no code does a CROSSJUMP() to sw1a, so we don't need ajhb2001-10-252-4/+0
| | | | | | CROSSJUMPTARGET() for it. Submitted by: bde
* Use %ecx instead of %ebx for the scratch register while updating %dr7 sincejhb2001-10-252-10/+6
| | | | | | | %ecx isn't a call safe register and thus we don't have to save and restore it. Submitted by: bde
* - Fix typo in comment from previous revision.jhb2001-10-252-6/+8
| | | | | | | | - Fix a bug in the LDT changes where the wrong argument was passed to set_user_ldt() from cpu_switch(). The bug was passing a pointer to the ldt, but set_user_ldt() takes a pointer to the process' mdproc structure. Submitted by: bde
* Whitespace, comment, and string fixes.jhb2001-10-252-86/+78
| | | | Submitted by: bde (mostly)
* Add PCI_ENABLE_IO_MODES option, for BIOSen that neglect this.jlemon2001-10-251-0/+1
| | | | Submitted by: Andrew R. Reiter arr@watson.org
* Backout 1.61 -- both intrcnt and intrnames are already exportedluigi2001-10-252-12/+0
| | | | via sysctl under "hw".
* Split the per-process Local Descriptor Table out of the PCB and intojhb2001-10-259-88/+111
| | | | | | | struct mdproc. Submitted by: Andrew R. Reiter <arr@watson.org> Silence on: -current
* - Clean up the comments slightly here to make them more readable.jhb2001-10-241-3/+7
| | | | | | | | - Set the type and trapframe number for the F00F workaround since type can be used later by sv_transtrap(). Debuggers might also want to look at the type in the trapframe. Submitted by: bde (mostly)
* Set the code and signal for the F00F hack fault directly instead ofjhb2001-10-231-7/+3
| | | | | | | changing the code in the trapframe and looping back to the top of trap again. Tested by: cjc
* Implement multiple low-level console support.jlemon2001-10-231-1/+1
|
* [partially forced commit due to pilot error in earlier commit attempt]des2001-10-212-6/+6
| | | | | | | | | | | | | | | | | {set,fill}_{,fp,db}regs() fixup: - Add dummy {set,fill}_dbregs() on architectures that don't have them. - KSEfy the powerpc versions (struct proc -> struct thread). - Some architectures had the prototypes in md_var.h, some in reg.h, and some in both; for consistency, move them to reg.h on all platforms. These functions aren't really MD (the implementation is MD, but the interface is MI), so they should move to an MI header, but I haven't figured out which one yet. Run-tested on i386, build-tested on Alpha, untested on other platforms.
* MFi386:bde2001-10-212-0/+4
| | | | | | | | | - sys/pc98/pc98/npx.c 1.87 (2001/09/15; author: imp) I don't think pc98 has acpi at all, so ifdef the acpi attachments for now. This completes merging sys/pc98/pc98/npx.c into sys/i386/isa/npx.c so that the former can be removed.
* MFpc98: fundamental differences. The magic numbers for the i/o portbde2001-10-212-0/+34
| | | | | | and the irq are different for pc98, and are not very well handled (we use a historical mess of hard-coded values, values from header files and values from hints).
* MFpc98: all changes in sys/pc98/pc98/npx.c related to FPU_ERROR_BROKEN.bde2001-10-212-0/+18
| | | | | | | | | | | | | | - 1.58 (2000/09/01; author: kato) Fixed FPU_ERROR_BROKEN code. It had old-isa code. - 1.33 (1998/03/09; author: kato) Make FPU_ERROR_BROKEN a new-style option. - 1.7 (1996/10/09; author: asami) Make sure FPU is recognized for non-Intel CPUs. The log for rev.1.7 should have said something like: Added FPU_ERROR_BROKEN option. This forces a successful probe for exception 16, so that hardware with a broken FPU error signal can sort of work.
* Remove wx.mjacob2001-10-201-1/+0
|
* Drop support for x87 emulation. Any CPU one would dare to run 5-CURRENTobrien2001-10-201-1/+0
| | | | on would have built-in FP support.
* Make SCSI changer and SES devices standard in generic kernels.mjacob2001-10-161-0/+2
| | | | Reviewed by: ken@kdm.org
* Deleted most of npxprobe(), and merged npxprobe1() back into npxprobe().bde2001-10-162-254/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | Use the normal interrupt handler (npx_intr()) instead of a special probe-time interrupt handler, although this causes problems due to the bus_teardown_intr() not actually even tearing down the interrupt (these problems were avoided by doing interrupt attachment for the special interrupt handler directly). Fixed minor bitrot in comments. The reason for the npxprobe()/npxprobe1() split mostly went away at about the same time it was made (in 1992 or 1993 just before the beginning of history). 386BSD ran all probes with interrupts completely masked, and I didn't want to disturb this when I added an irq probe to npxprobe(). An irq (not necessarily npx) must be acked for at least external npx's to take the cpu out of the wait state that it enters when an npx error occurs, so the probe must be done with a suitable irq unmasked. npxprobe() went to great lengths to unmask precisely the npx irq. Running probes with all interrupts masked was never really needed in FreeBSD, since FreeBSD always masked interrupts well enough using splhigh(), but it wasn't until rev.1.48 (1995/12/12) of autoconf.c that all probes were run with CPU interrupts enabled. This permits npxprobe() to probe its irq using normal interrupt resources. Note that most drivers still can't depend on this. It depends on the interrupt handler being fast and the irq not being shared.
* Commit my old fixes for cosmetic bugs in npxprobe() so that they aren'tbde2001-10-162-26/+16
| | | | | | | | | | | | | | | | lost when the buggy code goes away completely: - don't assume that the npx irq number is >= 8. Rev.1.73 only reversed part of the hard-coding of it to 13 in rev.1.66. - backed out the part of rev.1.84 that added a highly confused comment about an enable_intr() being "highly bogus". The whole reason for existence of npxprobe() (separate from the main probe, npxprobe1()) is to handle the complications to make this enable_intr() safe. - backed out the part of rev.1.94 that modified npxprobe(). It mainly broke the enable_intr() to restore_intr(). Restoring the interrupt state in a nested way is precisely what is not wanted here. It was harmless in practice because npxprobe() is called with interrupts enabled, so restoring the interrupt state enables interrupts. Most of npxprobe() is a no-op for the same reason...
* Explicitly initialize the fpu when SSE is enabled since this notegge2001-10-152-0/+10
| | | | | | longer happens as a side effect of calling npxsave. Reviewed by: peter, bde
* Change vmapbuf() to use pmap_qenter() and vunmapbuf() to use pmap_qremove().tegge2001-10-141-15/+24
| | | | | | | This significantly reduces the number of TLB shootdowns caused by vmapbuf/vunmapbuf when performing many large reads from raw disk devices. Reviewed by: dillon
* Reduce the number of TLB shootdowns caused by a call to pmap_qenter()tegge2001-10-141-4/+18
| | | | | | from number of pages mapped to 1. Reviewed by: dillon
* Correct the input/output/clobber specifications for the cpuidjdp2001-10-121-8/+3
| | | | | | | | | | | instruction. Stefan Keller <dres@earth.serd.org> noticed that CPU identification was broken when compiled with -O2, and tracked it down to the asm statement, which was storing values into memory without specifying that memory was modified. He submitted a patch which added "memory" as a clobber, but I refined it further to arrive at this version. MFC after: 3 days
OpenPOWER on IntegriCloud