summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* - Fix style bug.kato1998-09-011-3/+3
| | | | | | - hw.ispc98 -> machdep.ispc98. Submitted by: Garrett Wollman (hw -> machdep)
* Use 16bit register in inline asm code to set segment registers.luoqi1998-08-311-3/+3
|
* - hw.machine_arch returns cpu architecture type.kato1998-08-312-13/+8
| | | | | | | | | - moved definition of MACHINE_ARCH from cpu.h to parm.h as alpha. - Added definitions of _MACHINE and _MACHINE_ARCH. - Added hw.ispc98. The hw.ispc98 is 1 in PC98 kernel and is 0 in IBM-PC kernel. Discussed with: John Birrell <jb@FreeBSD.ORG>
* Change various syscalls to use size_t arguments instead of u_int.dfr1998-08-241-0/+58
| | | | | | | | | | Add some overflow checks to read/write (from bde). Change all modifications to vm_page::flags, vm_page::busy, vm_object::flags and vm_object::paging_in_progress to use operations which are not interruptable. Reviewed by: Bruce Evans <bde@zeta.org.au>
* Fixed printf format errors. Only one left in LINT on i386's.bde1998-08-244-10/+11
|
* Don't check minor number of dump device at all.des1998-08-231-5/+1
| | | | Discussed-with: Jörg Wunsch
* Fixed printf format errors.bde1998-08-232-4/+4
|
* Presently there is only one `currentldt' variable for all cpusmsmith1998-08-188-16/+47
| | | | | | | | | | | | in a SMP system. Unexpected things could happen if each cpu has a different ldt setting and one cpu tries to use value of currentldt set by another cpu. The fix is to move currentldt to the per-cpu area. It includes patches I filed in PR i386/6219 which are also user ldt related. PR: i386/7591, i386/6219 Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
* FIxed typo (syntax error) in previous commit.bde1998-08-171-2/+2
|
* Add macros for accessing device memory.dfr1998-08-171-1/+9
|
* Import the (Fast) Etherlink XL driver. I'm reasonally confident in itswpaul1998-08-161-1/+2
| | | | | | | | | | stability now. ALso modify /sys/conf/files, /sys/i386/conf/GENERIC and /sys/i386/conf/LINT to add entries for the XL driver. Deactivate support for the XL adapters in the vortex driver. LAstly, add a man page. (Also added an MLINKS entry for the ThunderLAN man page which I forgot previously.)
* Revamp the ELF include files to better support architecture-independentjdp1998-08-161-1/+6
| | | | | | | | | | | | | | | | | | | | | applications. Here's how it works. The kernel should include <machine/elf.h> to get the definitions for the native architecture. It can reference the various ELF structures with generic names like Elf_Sym, Elf_Shdr, etc. A define __ELF_WORD_SIZE is also available with the value 32 or 64 as appropriate for the native architecture. Generic applications should include <elf.h>, which is just a wrapper for <machine/elf.h>. Applications such as object file dumpers that need to deal with foreign ELF files can include <sys/elf32.h> and/or <sys/elf64.h>. Both can be included from the same source file if desired. The structure names must be referenced using wordsize-specific names like Elf32_Sym, Elf64_Shdr, etc. I haven't change the alpha stuff, but I haven't broken it either.
* pmap.c:bde1998-08-164-19/+20
| | | | | | | | | | | | | | | | | Cast pointers to (vm_offset_t) instead of to (u_long) (as before) or to (uintptr_t)(void *) (as would be more correct). Don't cast vm_offset_t's to (u_long) just to do arithmetic on them. mp_machdep.c: Cast pointers to (uintptr_t) instead of to (u_long). Don't forget to cast pointers to (void *) first or to recover from integral possible integral promotions, although this is too much work for machine-dependent code. vm code generally avoids warnings for pointer vs long size mismatches by using vm_offset_t to represent pointers; pmap.c often uses plain `unsigned int' instead of vm_offset_t and didn't use u_long elsewhere, but this style was messed up by code apparently imported from mp_machdep.c.
* Register tty software interrupt handlers at run time using register_swi()bde1998-08-114-8/+8
| | | | | | | instead of at compile time using ifdefs. Use _swi_null instead of dummycamisr. CAM and dpt should call register_swi() instead of hacking on ihandlers[] directly.
* Implemented dynamic registration of software interrupt handlers. Notbde1998-08-116-38/+24
| | | | | | used yet. Use dummy SWI handlers to avoid some checks for null pointers.
* Fixed restoring of cpl after trap handling. The wrong cpl (SWI_AST_MASKbde1998-08-102-82/+20
| | | | | | | instead of 0) was "restored" after handling a trap that occurred while returning to user mode. This bug was most noticeable for VM86 and is still detected and fixed up (on return from the next exception) in doreti if VM86 is configured.
* Copy in the nfs_diskless structure if NFS_ROOT is defined. A previousmsmith1998-08-032-4/+4
| | | | | change to include nfs_root.h precluded NFS from being defined. Submitted by: Parag Patel <parag@cgt.com>
* Set p->p_switchtime to switchtime instead of to the current time inbde1998-07-282-2/+22
| | | | | | | | | | | | | fork_trampoline() if switchtime is valid. This fixes not accounting for the time between the previous context switch and and the current time (when the forked child starts up here) in most cases - the time is now counted in the child's runtime. I think it actually fixes all cases, and switchtime is always valid here, since there must have been a context switch just before the forked child starts up. Some code should be removed if this is correct. The check that switchtime is valid sometimes gives a false negative because the check isn't correct until the after the first context switch after the system has been up for >= 1 second.
* Micro-optimized and cleaned up the clearing of switchtime in idle().bde1998-07-282-24/+16
| | | | Cleaned up the conditionals in the disgusting SMP ifdef in idle().
* u_int --> unsigned int, remove (now unneeded) <sys/types.h>jlemon1998-07-281-3/+3
|
* Add wrappers for i386_*_ioperm, i386_vm86 so userland code doesjlemon1998-07-281-1/+4
| | | | | not have to call sysarch() directly. Added man pages for above, as well as sysarch()
* Fix an off-by-one error when setting the iomap bits.jlemon1998-07-281-5/+5
| | | | | Change struct i386_*_iomap to use ints instead of shorts/chars. (pointed out by bde long ago, prodded into action by msmith)
* Re-arrange the page layout used by vm86_bioscall so that we canjlemon1998-07-272-6/+16
| | | | | | | potentially re-use the stack page. Cosmetic cleanup of the code to de-obfuscate it and make it easier to follow. There should be no functional changes in this commit.
* Add the 'cs' driver for Crystal Semiconductor CS89x0 devices. Thismsmith1998-07-201-1/+2
| | | | | | supports PnP and if_media. I've been running a slightly older version here for several weeks now. Submitted by: Maxim Bolotin <max@rsu.ru>
* A slap on the wrist to Dag-Erling, who plainly did not test this beforejkh1998-07-191-2/+1
| | | | | committing it. There was a large syntax error at line 404 which could not possibly have allowed compilation. :)
* Stop physical DMA for the non-auto case in isa_dmadone(). This fixes abde1998-07-191-1/+3
| | | | | | | | small part of a bug suite beginning in the SLICE probes but mostly in the floppy driver. This is a quick fix: the auto case shouldn't be special; DMA should also be stopped in isa_dma_release(); isa_dmastop() probably shouldn't exist; common DMA registers should not be accessed without locking.
* Allow dump devices with dkpart != SWAP_PART on devfs/slicedes1998-07-181-1/+4
| | | | | | systems. This test should probably be removed altogether. See CVS log entries for revisions 1.97 and 1.98.
* Place a fat warning that floppy tapes should be configured as drive 2joerg1998-07-171-1/+4
| | | | | | only (normally). PR: kern/7176
* %n in a comment was a poor abbreviation for Immediate-byte-signed,bde1998-07-151-2/+2
| | | | especially now that %n format has almost gone away.
* Cast virtual addresses that happen to be represented as u_longs tobde1998-07-151-4/+4
| | | | | | uintptr_t before casting them to pointers. Explicit u_longs should never be used to represent virtual addresses... (vm_offset_t is normally right).
* Changed to the C9x draft spelling of the (unsigned) integral typebde1998-07-141-9/+8
| | | | | | | | suitable for holding object pointers (ptrint_t -> uintptr_t). Added corresponding signed type (intptr_t). Changed/added corresponding non-C9x types for function pointers to match. Don't use nonstandard types to implement these types, and don't comment on them in <machine/types.h>.
* Fixed printf format errors.bde1998-07-111-123/+113
| | | | Use offsetof() instead of null pointer hacks.
* Fixed printf format errors.bde1998-07-111-3/+3
|
* Don't disable pmap_setdevram() which isn't called, but which could be,phk1998-07-111-2/+3
| | | | | | | but instead disable pmap_setvidram() which is called, but probably shouldn't be. PR: 7227, 7240
* Fixed printf format errors.bde1998-07-114-25/+34
|
* Don't pretend to support ix86's with 16-bit ints by using longs just tobde1998-07-112-19/+18
| | | | | | ensure 32-bit variables. Doing so mainly bogotified some printf formats. Fixed disorder in md_var.h.
* Don't pretend to support ix86's with 16-bit ints by using longsbde1998-07-111-32/+32
| | | | | | | | | | | | | | just to ensure 32-bit variables. Doing so broke and/or pessimized i386's with 64-bit longs (unnecessary use of 64-bit variables caused remarkably few problems in C code, but the inline asm here tended to fail because there are no 64-bit registers). Since the interfaces here are very machine-dependent and shouldn't be used outside of the kernel, use a standard types of "known" width instead of fixed-width types. Changed all quad_t's to u_int64_t's. quad_t isn't standard, and using signed types for 64-bit registers was bogus (but made no difference).
* Oops, fptrint_t still needs to be declared in <machine/profile.h> in thebde1998-07-101-1/+6
| | | | | !KERNEL case. The kludge to get it declared in libc/gmon/mcount.c wasn't sufficient because fptrint_t is used in <sys/gmon.h>.
* Added a kernel-only typedef (ptrint_t) giving an integral type that isbde1998-07-101-4/+1
| | | | | | | | | | least unsuitable for holding an object pointer. This should have been used to fix warnings about casts between pointers and ints on alphas. Moved corresponding existing general typedef (fptrint_t) for function pointers from the i386 <machine/profile.h> to a kernel-only typedef in <machine/types.h>. Kludged libc/gmon/mcount.c so that it can still see this typedef.
* Use not-so-new printf formats %r and/or %z instead of %n and/or %+x.bde1998-07-082-14/+14
|
* Fixed bogus type of valuep in struct db_variable. It was `int *' andbde1998-07-081-17/+17
| | | | | became `long *' for alpha, but should always have been `db_expr_t *'. Fixed variable types to match.
* There is no such thing any more as "struct bdevsw".julian1998-07-041-2/+2
| | | | | | | | | | | | | | | | | | There is only cdevsw (which should be renamed in a later edit to deventry or something). cdevsw contains the union of what were in both bdevsw an cdevsw entries. The bdevsw[] table stiff exists and is a second pointer to the cdevsw entry of the device. it's major is in d_bmaj rather than d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw). rawread()/rawwrite() went away as part of this though it's not strictly the same patch, just that it involves all the same lines in the drivers. cdroms no longer have write() entries (they did have rawwrite (?)). tapes no longer have support for bdev operations. Reviewed by: Eivind Eklund and Mike Smith Changes suggested by eivind.
* Add 3 sysctl variables for future use by ps)1_phk1998-06-301-2/+12
|
* Add PSE36 to the bits we know by name.phk1998-06-301-2/+2
|
* convert some nfs tunables to options, these are:jmg1998-06-303-6/+6
| | | | | | | | | | | | | | | | NFS_MINATTRTIMO VREG attrib cache timeout in sec NFS_MAXATTRTIMO NFS_MINDIRATTRTIMO VDIR attrib cache timeout in sec NFS_MAXDIRATTRTIMO NFS_GATHERDELAY Default write gather delay (msec) NFS_UIDHASHSIZ Tune the size of nfssvc_sock with this NFS_WDELAYHASHSIZ and with this NFS_MUIDHASHSIZ Tune the size of nfsmount with this NFS_NOSERVER (already documented in LINT) NFS_DEBUG turn on NFS debugging also, because NFS_ROOT is used by very different files, it has been renamed to opt_nfsroot.h instead of the old opt_nfs.h....
* Removed unused includes.bde1998-06-214-8/+4
|
* Removed unused includes.bde1998-06-211-2/+3
| | | | Ifdefed conditionally used includes.
* Remove bogus comment that teleported in from sys/i386/i386/mp_machdep.c.mckay1998-06-211-3/+1
|
* Converted add_interrupt_randomness() to take a `void *' arg. Rewrotebde1998-06-211-56/+59
| | | | | | | mmioctl() to fix hundreds of style bugs and a few error handling bugs (don't check for superuser privilege for inappropriate ioctls, don't check the input arg for the output-only MEM_RETURNIRQ ioctl, and don't return EPERM for null changes).
* Converted isa_strayintr() to take a `void *' arg.bde1998-06-182-20/+22
|
OpenPOWER on IntegriCloud