summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
Commit message (Collapse)AuthorAgeFilesLines
* Some more tidy-up of stray "unsigned" variables instead of p[dt]_entry_tpeter2002-02-201-1/+1
| | | | etc.
* Add stubs for bus_space_unmap() and bus_space_free(). They are needed tonyan2002-02-182-8/+30
| | | | release a bus_space_handle allocated by bus_space_subregion().
* Use struct __ucontext in prototypes and associated functions instead ofdeischen2002-02-172-1/+7
| | | | | | | | | | ucontext_t. Forward declare struct __ucontext in <sys/signal.h> and remove reliance on <sys/ucontext.h> being included. While I'm here, also hide osigcontext types from userland; suggested by bde. Namespace pollution noticed by: Kevin Day <toasty@shell.dragondata.com>
* Correct typo.nyan2002-02-172-2/+2
|
* Move the bus_space_subregion function from the puc driver to the bus_spacenyan2002-02-172-6/+28
| | | | | | sutff. Reviewed by: jhay
* Move do_cpuid() from a identcpu.c into cpufunc.h.dwmalone2002-02-121-0/+11
|
* Garbage-collect the "LOCORE" version of MPLOCKED.bde2002-02-111-10/+2
|
* Apparently during the KSE M2 commit bzero() on the i386 was changed so thatjhb2002-02-081-2/+2
| | | | | it's first parameter was volatile. Catch i486_bzero() and i586_bzero()'s prototypes up to this to quiet warnings.
* 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).
* 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.
* Avoid __func__ string concatenationpeter2002-01-181-4/+4
|
* Changed the type of pcb_flags from u_char to u_int and adjusted things.bde2002-01-171-1/+1
| | | | | This removes the only atomic operation on a char type in the entire kernel.
* Ensure that we set all the %cr0 bits to a known state for the AP's beforepeter2002-01-161-0/+10
| | | | | | 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).
* Use a spare slot in the machine context for a flags word to indicatedeischen2002-01-101-1/+4
| | | | | | | | | | 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
* Convert a bunch of 1 << PCPU_GET(cpuid) to PCPU_GET(cpumask).peter2002-01-051-2/+2
|
* Introduce a standard name for the lock protecting an interrupt controllerjhb2001-12-202-27/+0
| | | | | | | | 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.
* Various assembly fixes mostly in the form of using the "+" modifier forjhb2001-12-181-14/+14
| | | | | | | output operands to mark them as both input and output rather than listing operands twice. Reviewed by: bde
* Allow the ATOMIC_ASM() macro to pass in the constraints on the V parameterjhb2001-12-181-23/+23
| | | | | | | since the char versions need to use either ax, bx, cx, or dx. Submitted by: Peter Jeremy (mostly) Recommended by: bde
* Modify the critical section API as follows:jhb2001-12-182-46/+15
| | | | | | | | | | | | | | | | | | | - The MD functions critical_enter/exit are renamed to start with a cpu_ prefix. - MI wrapper functions critical_enter/exit maintain a per-thread nesting count and a per-thread critical section saved state set when entering a critical section while at nesting level 0 and restored when exiting to nesting level 0. This moves the saved state out of spin mutexes so that interlocking spin mutexes works properly. - Most low-level MD code that used critical_enter/exit now use cpu_critical_enter/exit. MI code such as device drivers and spin mutexes use the MI wrappers. Note that since the MI wrappers store the state in the current thread, they do not have any return values or arguments. - mtx_intr_enable() is replaced with a constant CRITICAL_FORK which is assigned to curthread->td_savecrit during fork_exit(). Tested on: i386, alpha
* Small cleanups to the SMP code:jhb2001-12-172-37/+16
| | | | | | | | | | | - Axe inlvtlb_ok as it was completely redundant with smp_active. - Remove references to non-existent variable and non-existent file in i386/include/smp.h. - Don't perform initializations local to each CPU while holding the ap boot lock on i386 while an AP bootstraps itself. - Reorganize the AP startup code some to unify the latter half of the functions to bring an AP up. Eventually this might be broken out into a MI function in subr_smp.c.
* Fixed to draw mouse cursor. The syscons driver for PC98 uses differentnyan2001-12-141-0/+5
| | | | | | | attributes from i386. Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata) MFC after: 3 days
* Axe an unneeded PCPU_SET(spinlocks, NULL) that I missed earlier.jhb2001-12-121-1/+0
|
* Overhaul the per-CPU support a bit:jhb2001-12-115-49/+113
| | | | | | | | | | | | | | | | | | | | | | | | | - The MI portions of struct globaldata have been consolidated into a MI struct pcpu. The MD per-CPU data are specified via a macro defined in machine/pcpu.h. A macro was chosen over a struct mdpcpu so that the interface would be cleaner (PCPU_GET(my_md_field) vs. PCPU_GET(md.md_my_md_field)). - All references to globaldata are changed to pcpu instead. In a UP kernel, this data was stored as global variables which is where the original name came from. In an SMP world this data is per-CPU and ideally private to each CPU outside of the context of debuggers. This also included combining machine/globaldata.h and machine/globals.h into machine/pcpu.h. - The pointer to the thread using the FPU on i386 was renamed from npxthread to fpcurthread to be identical with other architectures. - Make the show pcpu ddb command MI with a MD callout to display MD fields. - The globaldata_register() function was renamed to pcpu_init() and now init's MI fields of a struct pcpu in addition to registering it with the internal array and list. - A pcpu_destroy() function was added to remove a struct pcpu from the internal array and list. Tested on: alpha, i386 Reviewed by: peter, jake
* Add a missing open paren to a macro that's been broken (and apparentlyjhb2001-12-041-1/+1
| | | | | | unused) since rev 1.1 so it is at least correct. Submitted by: Maxime Henrion <mux@qualys.com>
* Start bringing i386/pmap.c into line with cleanups that were done topeter2001-11-171-4/+5
| | | | | | | | | | | | | | | 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.
* 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
* 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
* 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
* Remove previous revision. smp_started back in subr_smp where it belongs.mjacob2001-10-311-2/+0
|
* Make the actual volatile int smp_started live *somewhere*. This ismjacob2001-10-311-0/+2
| | | | | | 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.
* 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
* Split the per-process Local Descriptor Table out of the PCB and intojhb2001-10-253-12/+18
| | | | | | | struct mdproc. Submitted by: Andrew R. Reiter <arr@watson.org> Silence on: -current
* [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.
* Add missing includes of sys/ktr.h.jhb2001-10-111-0/+1
|
* Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loaderps2001-10-101-1/+1
| | | | | | | tunable. Reviewed by: peter MFC after: 2 weeks
* Allow atomic ops to be somewhat safely used in userland. We always usejhb2001-10-081-3/+7
| | | | | lock prefixes in the userland case so that the binaries will work on both SMP and UP systems.
* - Moved the bus_dma declarations from bus_{at386,pc98}.h into bus_dma.h.nyan2001-10-064-1374/+4
| | | | | (bus_dma.h is repo-copied from bus_at386.h) - Added '#include <machine/bus_dma.h>' into bus.h for backward compatibility.
* Introduce a new option, KVA_SPACE, which can be used to reconfigurepeter2001-09-211-4/+13
| | | | | | the size of the kernel virtual address space relatively painlessly. Userland will adapt via the exported kernbase symbol. Increasing this causes the user part of address space to reduce.
* Cleanup and split of nfs client and server code.peter2001-09-181-1/+0
| | | | This builds on the top of several repo-copies.
* - If we ever do the per-cpu KTR stuff, the index won't be volatile as itjhb2001-09-181-14/+14
| | | | | | will be private to each CPU. - Re-style(9) the globaldata structures. There really needs to be a MI struct pcpu that has a MD struct mdpcpu member at some point.
* Fill out some gaps in ia64 DDB support. This involves generalising DDB'sdfr2001-09-151-0/+2
| | | | | breakpoint handling slightly to cope with the fact that ia64 instructions are not located on byte boundaries.
* KSE Milestone 2julian2001-09-1210-36/+39
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* style(9) the structure definitions.obrien2001-09-054-9/+9
|
* Reenable RTC interrupts after wakeup. Some laptops have a problemiwasaki2001-09-041-1/+1
| | | | | | | | | with system statistics monitoring tools (such as systat, vmstat...) because of stopping RTC interrupts generation. Restore all the timers (RTC and i8254) atomically. Reviewed by: bde MFC after: 1 week
* Fix the argument specifier for the PnP BIOS function 2yokota2001-09-031-1/+1
| | | | | | | (PNP_SET_DEVNODE). The second argument is not a segment:offset pointer, but a 16 bit short. MFC after: 4 weeks
* vm_page_zero_idle() is no longer MD.peter2001-08-251-1/+0
|
* Optionize UPAGES for the i386. As part of this I split some of the lowpeter2001-08-252-20/+2
| | | | | | | | | | level implementation stuff out of machine/globaldata.h to avoid exposing UPAGES to lots more places. The end result is that we can double the kernel stack size with 'options UPAGES=4' etc. This is mainly being done for the benefit of a MFC to RELENG_4 at some point. -current doesn't really need this so much since each interrupt runs on its own kstack.
* The general conesnsus on irc was that pci bios for config registersimp2001-08-211-0/+1
| | | | | | | | | and such was just a bad idea and one that users should be forced to enable if they want it. This patch introduces a hw.pci.enable_pcibios tunable for those people. This does not impact the pcibios interrupt routing at all. Approved by: peter, msmith
* Detect a certain type of PCIBIOS brain damage. For some reason,peter2001-08-211-0/+2
| | | | | | | | | | | | some bios vendors took it apon themselves to "censor" the host->pci bridges from PCIBIOS callers, even when the caller explicitly asks for them. This includes certain Compaq machines (eg: DL360) and some laptops. If we detect this, shut down pcibios and revert to using IO port bashing. Under -current, apcica does a better job anyway.
OpenPOWER on IntegriCloud