Commit Graph

520 Commits

Author SHA1 Message Date
bde
7b9dc76b76 Removed the cast to a pointer in the definition of PS_STRINGS and
adjusted related casts to match (only in the kernel in this commit).
The pointer was only wanted in one place in kern_exec.c.  Applications
should use the kern.ps_strings sysctl instead of PS_STRINGS, so they
shouldn't notice this change.
1998-12-16 16:28:58 +00:00
bde
9dd9cb4cb2 Removed bogus casts of USRSTACK and/or the other operand in binary
expressions involving USRSTACK.
1998-12-16 15:21:51 +00:00
dt
7212f6ac0c Added 3 new errno values, requred by various standards: EOVERFLOW,
ECANCELED, EILSEQ.

Fixed ibcs2 and especially linux EIDRM and ENOMSG errno mapping.
Reviewed by:	Dan Nelson <dnelson@emsphone.com>
1998-12-14 18:54:04 +00:00
eivind
d246f6b8ce Get rid of CTLTYPE_OPAQUE in a SYSCTL_OPAQUE - it is added my the
SYSCTL_OPAQUE macro.
1998-12-09 02:26:45 +00:00
imp
2cfcfef3a1 If there is no .depends file, use the standard ad-hoc way of ensuring
that the generated files are generated before any of the object files.
Also minor cleanup of dependencies in conf/files that I bogusly added
before.

This should fix the requirement that make depend be done starting from
a clean config directory.  If you don't have a clean directory, make
depend is still required if you want the proper .o's to be recompiled.

Reviewed by: bde
1998-12-07 22:36:54 +00:00
mjacob
e2a1b1bb3b fix warning messages from previous delta 1998-12-06 00:10:52 +00:00
mjacob
a3957bb74a Fix it so that it works on an eb164 when you have a serial console on com1.
Obtained from:gallatin@freebsd.org
1998-12-05 22:36:31 +00:00
archie
982e80577d Examine all occurrences of sprintf(), strcat(), and str[n]cpy()
for possible buffer overflow problems. Replaced most sprintf()'s
with snprintf(); for others cases, added terminating NUL bytes where
appropriate, replaced constants like "16" with sizeof(), etc.

These changes include several bug fixes, but most changes are for
maintainability's sake. Any instance where it wasn't "immediately
obvious" that a buffer overflow could not occur was made safer.

Reviewed by:	Bruce Evans <bde@zeta.org.au>
Reviewed by:	Matthew Dillon <dillon@apollo.backplane.com>
Reviewed by:	Mike Spengler <mks@networkcs.com>
1998-12-04 22:54:57 +00:00
dfr
8f01fff32f Implement 'software completion' for floating point arithmetic. On the
alpha, operations involving non-finite numbers or denormalised numbers
or operations which should generate such numbers will cause an arithmetic
exception.  For programs which follow some strict code generation rules,
the kernel trap handler can then 'complete' the operation by emulating
the faulting instruction.

To use software completion, a program must be compiled with the arguments
'-mtrap-precision=i' and '-mfp-trap-mode=su' or '-mfp-trap-mode=sui'.
Programs compiled in this way can use non-finite and denormalised numbers
at the expense of slightly less efficient code generation of floating
point instructions.  Programs not compiled with these options will receive
a SIGFPE signal when non-finite or denormalised numbers are used or
generated.

Reviewed by: John Polstra <jdp@polstra.com>
1998-12-04 10:52:48 +00:00
dfr
1a07486702 Restore the user HAE all the time, not just when returning to usermode.
This closes a very small window where the use HAE might not be restored
at all.  This only happens when switching to a process which has used the
HAE.
1998-12-02 10:24:56 +00:00
dfr
a5349072cf Enable BWX i/o access. I disabled it by mistake with the last commit.
Pointed out by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-12-02 09:33:27 +00:00
dfr
3aaf69d186 Add support for 'vmstat -i'.
Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
Obtained from: NetBSD
1998-11-28 09:55:16 +00:00
dfr
68f5aa320d Port top to the alpha.
Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1998-11-25 09:45:28 +00:00
yokota
85b18b5acf Oops, I forgot to update this file when I changed moused recently. 1998-11-22 11:57:59 +00:00
dfr
a9a7505ea5 Fix things so that pci interrupts can be registered correctly on apecs
and lca machines (which route PCI interrupts through the ISA PIC).

Reviewed by: dima
1998-11-18 23:53:12 +00:00
dfr
86637d9d69 Add sc_traparg_a0, sc_traparg_a1 and sc_traparg_a2 to the sigcontext
structure for the alpha.  These give extra information about some
signals (such as SIGSEGV) and should be compatible with Digital Unix.

Submitted by: jdp
1998-11-18 23:51:40 +00:00
dima
f6dc1e1822 Remove -U__NetBSD__ 1998-11-18 23:51:17 +00:00
dfr
5f54e20205 Definitions for alpha specific device resources. 1998-11-17 10:40:33 +00:00
dfr
6aa347bbd1 Definitions for alpha specific system calls. 1998-11-17 10:40:07 +00:00
dfr
3331f029dc * Add hooks to allow the X server to access I/O ports and memory.
* Update drivers to the latest version of the bus interface.

The ISA drivers' use of the new resource api is minimal.  Garrett has
some much cleaner drivers which should be more easily shared between
i386 and alpha.  This has only been tested on cia based machines.  It
should work on lca and apecs but I might have broken something.
1998-11-15 18:25:17 +00:00
dfr
ae8eeebcb3 Don't include link_elf.c twice in the link. 1998-11-15 18:15:06 +00:00
dfr
c804c217bb * Change 'struct resource' to 'struct config_resource'.
* Bump config version.
1998-11-15 18:07:35 +00:00
bde
51ad68ca2d Finished updating module event handlers to be compatible with
modeventhand_t.
1998-11-15 15:33:52 +00:00
dima
de202f3038 indent 1998-11-15 00:50:59 +00:00
jkh
78b866cf0e MF22: Bring in some linux sound ioctl support which I committed to 2.2
for PR 7792 but did not bring forward.

Submitted by:	Avatar Liang <avatar@www.mmlab.cse.yzu.edu.tw>
PR:		8656
1998-11-12 00:42:08 +00:00
msmith
7e4e43c513 Use an at_shutdown hook to drop back to the SRM in the case where the system
is being halted, rather than hanging waiting for a keypress.

Submitted by:	Andrew Gallatin <gallatin@freebsd.org>
1998-11-11 00:02:25 +00:00
dima
4fbaec48cb Add some bogus stuff to make systat/vmstat happy.
Reviewed by:	dfr
1998-11-09 10:47:19 +00:00
phk
b75b623eaa Update interface to timecounter to last change to the generic code. 1998-11-08 19:26:23 +00:00
nsouch
8576d8f990 Update configuration files for the perl based makedevops script.
Submitted by: Nick Hibma <nick.hibma@jrc.it>
Approved by:  Doug Rabson <dfr@nlsystems.com>
1998-11-08 18:39:57 +00:00
nsouch
1f9c4b34fd Add semicolon to INTERFACE declarations 1998-11-08 18:35:53 +00:00
dfr
b6d9e06815 * Fix a couple of places in the device pager where an address was
truncated to 32 bits.
* Change the calling convention of the device mmap entry point to
  pass a vm_offset_t instead of an int for the offset allowing
  devices with a larger memory map than (1<<32) to be supported
  on the alpha (/dev/mem is one such).

These changes are required to allow the X server to mmap the various
I/O regions used for device port and memory access on the alpha.
1998-11-08 12:39:07 +00:00
alex
7f75b60ff7 Optimize bzero() by unrolling the aligned quadword loop and moving the length
manipulation away from the length comparison.  Measurements on beast.cdrom.com
show >3X improvement over the original code on large block sizes, putting the
performance on par with the optimized assembly code in libc.
1998-11-02 00:14:50 +00:00
dfr
6812cb0412 * Fix vga_probe() so that it doesn't report a non-vga display adapter as
a vga.
* Fix broken logic in syscons for a failed probe.
* Fix AlphaStation 500/600 so that non-serial consoles are supported.

Submitted by: Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu> (vga bits),
	      Andrew Gallatin <gallatin@cs.duke.edu> (AS500/AS600)
1998-10-31 10:35:24 +00:00
msmith
e79dcdb69f Add the ability to specify where on the at_shutdown queue a handler is
installed.

Remove cpu_power_down, and replace it with an entry at the end of the
SHUTDOWN_FINAL queue in the only place it's used (APM).

Submitted by:	Some ideas from Bruce Walter <walter@fortean.com>
1998-10-30 05:41:15 +00:00
jkh
02085b8fcd Put back MFS_ROOT now that it's been fixed correctly. 1998-10-30 01:37:33 +00:00
jkh
af8d56d484 Fix this correctly - check if mfs_getimage() succeeds before settings
the MFS root unconditionally, just as on the x86.
Prompted by:	msmith
1998-10-30 01:36:40 +00:00
jkh
573dce4383 Take MFS_ROOT out for now; for some reason, the alpha GENERIC chokes
and dies if it can't find the MFS root whereas the x86 one seems to sail
past.  Looking at the code, I can't see how either one works, so I'm
confused. :)
1998-10-30 01:17:42 +00:00
dima
0ae4c4c0e7 Bump VERSREQ to make ``config'' happy.
Obtained from: Makefile.i386
1998-10-29 17:09:36 +00:00
dg
20b2c33d9a Added a second argument, "activate" to the vm_page_unwire() call so that
the caller can select either inactive or active queue to put the page on.
1998-10-28 13:37:02 +00:00
paul
138aad3569 Fix the interrupt mask generated for enabling/disabling interrupts 8 to 15. 1998-10-25 01:30:16 +00:00
dg
3bb5ec13b6 Decrement the now unused page table page's wire_count prior to freeing it.
It will soon be required that pages have a zero wire_count when being
freed.
1998-10-21 11:38:14 +00:00
dfr
dc962160ec R_ALPHA_RELATIVE relocations need to add the value to the existing memory
contents.
1998-10-18 19:04:13 +00:00
jkh
725fd5a896 fixup for the alpha. tag slid forward, since it's benign for the x86. 1998-10-16 10:13:09 +00:00
peter
464de37ce6 *gulp*. Jordan specifically OK'ed this..
This is the bulk of the support for doing kld modules.  Two linker_sets
were replaced by SYSINIT()'s.  VFS's and exec handlers are self registered.
kld is now a superset of lkm.  I have converted most of them, they will
follow as a seperate commit as samples.
This all still works as a static a.out kernel using LKM's.
1998-10-16 03:55:01 +00:00
dfr
8d976b1320 Fix a typo preventing the correct value of kernend from being picked up
from the bootstrap.  Also change some debug printfs from #if 0 to
#ifdef DEBUG_CLUSTER to make it easier to debug startup memory problems.
1998-10-15 22:00:54 +00:00
dfr
87a0ba4fba Change a bogus cast to the correct one. 1998-10-15 09:53:27 +00:00
peter
9a0107aa1b Fix a warning I missed before. 1998-10-14 10:08:35 +00:00
peter
4523e75227 Typo fix. 1998-10-14 10:04:32 +00:00
peter
a6df719969 Initial attempt to update the Alpha loader and kernel to use the machine
independent elf loader and have access to kld modules.  Jordan and I were
not sure how to create boot floppies, and the things we tried just made
SRM laugh in our faces - but it was upset at boot1 which was not touched
by these changes.  Essentially this has been untested. :-(

What this does is to steal the last three slots from the nine spare longs
in the bootinfo_v1 struct to pass the module base pointer through.

The startup code now to set up and fills in the module and environment
structures, hopefully close enough to the i386 layout to be able to use
the same kernel code.  We now pass though the updated end of the kernel
space used, rather than _end. (like the i386).

If this does not work, it needs to be beaten into shape pronto.  Otherwise
it should be backed out before 3.0.

Pre-approved in principle by: dfr
1998-10-14 09:53:25 +00:00
jkh
b9d923f32c DB_ELF_SYMBOLS doesn't appear to do anything yet, or if it does it's
not been added to the appropriate options file.  Comment it out to
prevent config(8) warnings.
1998-10-14 00:42:02 +00:00
jkh
4c78bf40b0 Sync up with some needed x86 options. 1998-10-13 21:38:46 +00:00
alex
4d7dc29a1d Bring in _BSD_UINT8_T_, _BSD_UINT16_T_, and _BSD_UINT32_T from the i386
ansi.h.
1998-10-12 23:57:58 +00:00
alex
772482444a Unregister the glibc2 brand at module unload time.
Change the ELF registration/unregistration scheme to be less error prone.
Adding a new brand requires a single addition to linux_brandlist instead of
modifying linux_load(), linux_unload(), and linux_elf_init().

Approved by:	jkh
Reviewed by:	msmith
1998-10-11 21:08:02 +00:00
gpalmer
d397217307 Make kernel build on alpha again. New kld stuff needs rindex. 1998-10-10 18:32:18 +00:00
dfr
685a5b889f Add functions for accessing dense and bwx memory for pci devices. These
routines are necessary to allow the use of certain types of hardware on
the alpha, particularly a Myrinet card.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-10-06 14:18:40 +00:00
dfr
0d820bb7db Add support for adjkerntz (largely untested). 1998-10-06 08:40:18 +00:00
dfr
d84eda21c7 Fix unaligned accesses when checking DOS MBRs. 1998-10-06 08:38:58 +00:00
dfr
c1d604a90c Add MFS_ROOT support. 1998-10-06 08:38:04 +00:00
jfieber
abe2a74713 Make async I/O on a socket work.
Although the current Sybase license does not permit running under
emulation, FreeBSD 3.0 is now "Sybase Ready" should the license change.
1998-10-05 16:37:36 +00:00
jfieber
cd83b59140 Add several missing ioctl handlers. One needed by Sybase, the others
found while looking for the one.
1998-09-30 01:42:53 +00:00
dfr
9437402528 Update SimOS scsi driver to use CAM. 1998-09-26 14:49:26 +00:00
dfr
fb8743cea1 Don't try to attach an isa bus if there isn't one. 1998-09-26 14:48:19 +00:00
dfr
955fc8ee3e Start using the new SWI registration system instead of hardwiring everything. 1998-09-26 14:25:32 +00:00
dfr
968dcc7cb5 Automatically detect which disk was booted and change the root to that disk. 1998-09-26 12:22:53 +00:00
msmith
6140797f7f Fix type 0 configuration accesses, and use a virtual rather than physical
address for the LCA PCI configuration register address.

FreeBSD/Alpha now boots on the NoName (aka AXPpci 33, Alpha PC), and probably
also on the Multia (mine hasn't arrived yet, so I can't tell for sure).

Submitted by:	Doug Rabson <dfr@freebsd.org>
1998-09-23 21:23:51 +00:00
dfr
c8dca54f6b Add splsoftvm().
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-09-19 09:29:40 +00:00
dfr
51cec067f7 Change sd to da and comment out the non-cam TurboChannel scsi drivers.
Fix a typo which prevented VGA consoles from working.
1998-09-18 18:43:52 +00:00
dfr
64de388139 Change version number. 1998-09-18 18:41:49 +00:00
dfr
7fcbfd5d9c Cam changes sd to da. 1998-09-18 18:40:59 +00:00
mjacob
4cc465448d (requested by gibbs) Remove the SCSI_CAM option (and rework the isp driver
that had depended on it for compilation within or without CAM to use
__FreeBSD_version instead).
1998-09-18 00:46:42 +00:00
msmith
23bdbca2d4 Add support for glibc consumers using the new ld-linux.so.2 linker.
I can't say this was the most inspired fix, but it matches the design OK.
1998-09-17 22:08:34 +00:00
dfr
a1160c9857 Merge with the latest i386 syscons. 1998-09-17 09:38:36 +00:00
dfr
271727741c Fix printf format errors. 1998-09-17 09:35:31 +00:00
dfr
f85d349294 Workaround some EB164 wierdness.
Obtained from: NetBSD
1998-09-16 08:24:30 +00:00
dfr
0fc69df41c Disable unwanted isa interrupts. 1998-09-16 08:23:51 +00:00
dfr
45aaebf289 Add cam spls. 1998-09-16 08:23:21 +00:00
dfr
d894d7bf5d Port i386 bus_space and bus_dma to alpha. 1998-09-16 08:22:57 +00:00
dfr
6dc7ad2249 Change to cam. 1998-09-16 08:22:09 +00:00
dfr
8d967039de Add cam software interrupts. 1998-09-16 08:21:12 +00:00
dfr
a821ae45b4 Port the i386 bus_dma implementation to alpha. 1998-09-16 08:20:45 +00:00
jdp
60718890ae Add new functions fill_fpregs() and set_fpregs(), like fill_regs()
and set_regs() but for the floating point register state.  The code
is stolen from procfs_machdep.c, and moved out of there into
machdep.c.

These functions are needed for generating ELF core dumps.
1998-09-14 22:43:40 +00:00
jdp
c3165880f6 Add generic defines ELF_ARCH, ELF_CLASS, and ELF_DATA. These give
the relevant characteristics of the native machine, for building
and checking Elf_Ehdr structures.

Add structures to represent ELF "note" headers.  Add defines for the
note types used in ELF core files.
1998-09-14 20:30:13 +00:00
jdp
70bb8503aa Add provisions for variant core dump file formats, depending on the
object format of the executable being dumped.  This is the first
step toward producing ELF core dumps in the proper format.  I will
commit the code to generate the ELF core dumps Real Soon Now.  In
the meantime, ELF executables won't dump core at all.  That is
probably no less useful than dumping a.out-style core dumps as they
have done until now.

Submitted by:	Alex <garbanzo@hooked.net> (with very minor changes by me)
1998-09-14 05:36:51 +00:00
dfr
4568e792af Machine dependant relocations for KLD. 1998-09-11 08:47:02 +00:00
jdp
7aadfa5c68 Add a new library function getobjformat(). It checks all the
standard places ("/etc/objformat", ${OBJFORMAT}, argv) for an
indication of the user's preferred object file format.  This
consolidates some code that was starting to be duplicated in more
and more places.

Use the new function in ldconfig.

Note: I don't think that gcc should use getobjformat(), even though
it could.  The compiler should limit itself to functions that are
widespread, to ease porting and cross-compilation.
1998-09-09 01:21:25 +00:00
dfr
471d02c516 Device framework code now declared in MI code. 1998-09-07 07:29:30 +00:00
dfr
cc6d00dd2e Cosmetic changes to the PAGE_XXX macros to make them consistent with
the other objects in vm.
1998-09-04 18:49:35 +00:00
dfr
4b6b0ee13a Make SimOS work again. 1998-09-04 08:01:26 +00:00
dfr
c71608e226 Make this build even if sio is not in the kernel. 1998-09-04 07:58:33 +00:00
jkh
6185272d7d Initial support for using linux X servers under emulation - to use an
XFree86 server, users need to create the following links in their
/compat/linux/dev directory (assuming kernel configured with 4 VTs).

lrwxrwxrwx  1 root  wheel  7 Aug 30 22:59 tty0 -> console
lrwxrwxrwx  1 root  wheel  5 Aug 30 22:45 tty1 -> ttyv0
lrwxrwxrwx  1 root  wheel  5 Aug 30 22:45 tty2 -> ttyv1
lrwxrwxrwx  1 root  wheel  5 Aug 30 22:45 tty3 -> ttyv2
lrwxrwxrwx  1 root  wheel  5 Aug 30 22:45 tty4 -> ttyv3

VT switching is still not yet supported. Attempting to switch VT
currently will cause Xserver bus error.

Submitted by:	Chain Lee <chain@110.net>
1998-08-31 06:55:02 +00:00
dfr
03ff6bb24a Remove some duplicated devices. 1998-08-30 10:50:30 +00:00
dfr
5112766b07 Add atomic.s. 1998-08-24 08:48:22 +00:00
dfr
5fdaeb281d Change various syscalls to use size_t arguments instead of u_int.
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>
1998-08-24 08:39:39 +00:00
dfr
c0efc73d67 Use address space numbers to reduce TLB flushes. 1998-08-23 16:05:55 +00:00
dfr
9717669bea Remove bogus unused code. 1998-08-22 10:32:38 +00:00
gpalmer
255afcebdd Add BREAK_TO_DEBUGGER so that config stops whining 1998-08-21 23:43:15 +00:00
dfr
0c47a30d50 Add support for TurboChannel alphas (DEC 3000/300 and 3000/500).
Obtained from: NetBSD
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-08-20 08:27:11 +00:00
dfr
571e764758 Add Miata system type and pull in the LOCATE_PCS macro from NetBSD. 1998-08-17 08:26:12 +00:00
dfr
9892f6ef43 Add breakpoint() for BREAK_TO_DEBUGGER. 1998-08-17 08:21:31 +00:00
dfr
e6912eb9df Update to use elf_generic.h. 1998-08-17 08:05:55 +00:00
dfr
c6e0f3c5a9 Disable some unnecessary debugging code. 1998-08-17 08:04:42 +00:00
bde
9e27b29fba Use [u]intptr_t instead of [u_]long for casts between pointers and
integers.  Don't forget to cast to (void *) as well.
1998-08-16 01:21:52 +00:00
dfr
80d9c672e1 I managed to break sparse configuration accesses with my last commit.
Pointed out by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-08-13 08:11:27 +00:00
dfr
fd999b742a Add code from NetBSD to print CIA capabilities and try to detect Pyxis bugs. 1998-08-11 08:51:09 +00:00
dfr
3454605751 Sync with i386/isa/diskslice_machdep.c 1.31. 1998-08-11 07:17:36 +00:00
dfr
adbadeedc1 Lots of changes, including:
* Support for AlphaStation 200, 250, 255, 400
* Untested support for UDB, Multia, AXPpci33 (Noname)
* Support for Personal Workstation 433a/433au, 500a/500au, 600a/600au (Miata)
* Some minor fixes and improvements to interrupt handling.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu> (AS200, Miata)
Obtained from: NetBSD (some code for AS200, Miata, Noname)
1998-08-10 07:53:59 +00:00
dfr
2882dcd255 Add support for type1 pci configuration cycles for cia (not pyxis yet).
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-08-07 08:18:44 +00:00
dfr
f43a7c1a9c Add some more useful macros.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-08-07 08:17:39 +00:00
dfr
3f4718364a Update so that it should build a working kernel for the platforms supported
so far.
1998-08-07 08:16:31 +00:00
dfr
f0dc47baed Tweaks to console support.
Fixes for AS 600.
1998-08-07 08:15:16 +00:00
dfr
a90f51195a Port syscons to the alpha. The driver itself has moved to sys/isa as it will
hopefully become a portable driver usable by all architectures.  The api
support files have had to be copied to sys/alpha/include since userland
programs expect to find them in <machine/*.h>.

All the revision history of the i386 syscons has been retained by a
repository copy.
1998-08-06 09:15:54 +00:00
yokota
506dee0328 1. Reorganized screen saver related code so that both the LKM screen
saver and splash screen can all work properly with syscons.  Note that
the splash screen option (SC_SPLASH_SCREEN) does not work yet, as it
requires additional code from msmith.

- Reorganized the splash screen code to match the latest development
  in this area.
- Delay screen switch in `switch_scr()' until the screen saver is
  stopped, if one is running,
- Start the screen saver immediately, if any, when the `saver' key is
  pressed. (There will be another commit for `kbdcontrol' to support
  this keyword in the keymap file.)
- Do not always stop the screen saver when mouse-related ioctls
  are called.  Stop it only if the mouse is moved or buttons are
  clicked; don't stop it if any other mouse ioctls are called.

2. Added provision to write userland screen savers.  (Contact me if you
are interested in writing one.)

- Added CONS_IDLE, CONS_SAVERMODE, and CONS_SAVERSTART ioctls to
  support userland screen savers.

3. Some code clean-ups.
1998-08-03 11:30:45 +00:00
dfr
ca7833d043 Cosmetic change to driver registration. 1998-07-31 09:20:35 +00:00
dfr
501e6a31b5 Only perform byte/word accesses in the correct EV56 memory space.
Sparse macros have moved to <machine/swiz.h>.
Fix sparse memory access so that it actually works as intended.
Tidy up sparse configuration access slightly.
1998-07-31 09:17:51 +00:00
dfr
2446fc2943 Add definitions of EV56 INT1/INT2/INT4/INT8 memory spaces. 1998-07-31 09:14:49 +00:00
dfr
8a797b3a00 Merge with i386/isa/diskslice_machdep.c 1.30 1998-07-31 09:13:25 +00:00
dfr
b99598d6ac Change load address to 0xfffffc0000300000 to help support AS200. 1998-07-30 08:12:14 +00:00
dfr
62e36a420d Remove spurious printf. 1998-07-30 08:10:26 +00:00
dfr
7ccaec5082 Fix msgbuf so that it actually works properly. 1998-07-29 18:36:29 +00:00
bde
690e655ec2 Fixed print format errors. 1998-07-29 16:43:00 +00:00
bde
8498bf4764 Fixed printf format errors.
Use offsetof() instead of null pointer hacks.  Use a home made offsetof()
because including <stddef.h> is not permitted in LKMs.
1998-07-29 15:50:41 +00:00
dfr
ebdd0888b1 Record the new physical address of the pcb in pmap_swapin_proc.
Third attempt at pmap_remove().  This one actually works properly :-).
1998-07-28 09:34:50 +00:00
dfr
93ab89b30e Macros for accessing alpha sparse device ports and memory. 1998-07-27 09:40:35 +00:00
dfr
bd66cc2399 Support the disabled keyword for isa devices. 1998-07-27 09:38:26 +00:00
dfr
0668f6953d Fix a stupid bug preventing gdb from seeing the right value of 'v0'. 1998-07-26 18:47:47 +00:00
dfr
03ddb15c2b Fix a stupid bug in the new pmap_remove().
Arrange for soft modified/referenced flags to be cleared when a page is freed.
1998-07-26 18:13:28 +00:00
dfr
f424d5f084 Fix pmap_enter_quick() to stop it hanging when the level 2 pte exists
but isn't valid.

Reimplement pmap_remove() to be much more efficient at removing large
stretches of addresses.

As part of reimplementing pmap_remove() fix pmap_protect() so that it stands
a hope of working.
1998-07-24 09:43:27 +00:00
dfr
953622fb2a Add ISA support.
Remove mcclock hack which was only needed because ISA wasn't done yet.
1998-07-22 08:34:19 +00:00
dfr
15d5de14dc Add some convenience functions for accessing device memory.
Add a DDB command to allow access to inb/inw/inl from the debugger.
1998-07-22 08:33:30 +00:00
dfr
cc3eb8a152 Merge KN20AA support from Andrew Gallatin.
Add support for device memory access.
Add support for ISA irqs.
1998-07-22 08:32:17 +00:00
dfr
f103a50fde Move the mcclock from root to isa. 1998-07-22 08:30:25 +00:00
dfr
eb3dbdd0de Add a simple ISA bus. No support for memory mapped devices or DMA as yet. 1998-07-22 08:29:26 +00:00
dfr
9cb558a8da Add sio support. 1998-07-22 08:28:24 +00:00
dfr
8964f60d8e Add platform functions for manipulating PCI irqs.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:27:56 +00:00
dfr
9bc86e47bd Add declaration of {aquire,release}_timer2(). 1998-07-22 08:26:23 +00:00
dfr
b5978db404 Add macros and chipset support for accessing device i/o memory on the alpha. 1998-07-22 08:25:39 +00:00
dfr
5dfe812895 Add KN20AA support.
Add entries for syscons.
1998-07-22 08:24:39 +00:00
dfr
d2bedeabab Tweaks to stop config(8) warnings and to avoid an unfinished experiment of
mine.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:23:26 +00:00
dfr
90402a6db5 Support header for sysbeep() implementation. 1998-07-22 08:21:36 +00:00
dfr
db52332709 Make ptrace single steps over branches work as intended. 1998-07-22 08:20:57 +00:00
dfr
6651610ba2 Add support for sio's soft interrupts. 1998-07-22 08:20:15 +00:00
dfr
9249ba813d Support the DEC_KN20AA platform (AlphaStation 500 or 600).
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:19:39 +00:00
dfr
028c8a1c5b Merge changes from Andrew Gallatin to support different CIA based platforms.
Add code to identify and attach either serial or VGA console as appropriate.
1998-07-22 08:18:34 +00:00
dfr
385f0cb1c1 Add code from i386 to support sysbeep(). Doesn't work quite right but it
makes a noise.
1998-07-22 08:16:34 +00:00
dfr
dd7b21d1e7 Change siocn{put,get}c to siogdb{put,get}c to allow a serial console on one
line with serial debugging on another line.
1998-07-22 08:15:34 +00:00
dfr
024928fa98 Simplify access to PCI config registers. 1998-07-16 13:38:35 +00:00
dfr
43439d1572 Make ptrace work. 1998-07-15 20:16:28 +00:00
dfr
988e0b33fd Tweaks for cross-building from NetBSD/alpha.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-15 20:12:54 +00:00
dfr
583ae31e95 Add some debug code. 1998-07-15 20:07:33 +00:00
dfr
f14b57be26 An mc146818a clock attached to an isa bus. 1998-07-15 19:21:31 +00:00
dfr
0b4d04df93 Linker script for alpha kernel. 1998-07-15 19:19:24 +00:00
bde
55ddae5a80 Changed to the C9x draft spelling of the (unsigned) integral type
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>.
1998-07-14 05:09:48 +00:00
dfr
f32529a069 Overhaul the spl system so that it actually works properly. 1998-07-12 16:32:10 +00:00
dfr
f2d6c22423 Don't bother calling pmap_emulate_reference() from cpu_fork(). It isn't
needed and it panics a DIAGNOSTIC kernel.
1998-07-12 16:30:58 +00:00
dfr
662a5e4c85 Define option DEC_EB164 1998-07-12 16:28:09 +00:00
dfr
bd279b3d39 Add entry for prom console. 1998-07-12 16:27:34 +00:00
dfr
dafe07ff6c Add some bits and pieces for my test box. 1998-07-12 16:26:52 +00:00
dfr
a9e2f7158b Update to new interrupt api. 1998-07-12 16:23:19 +00:00
dfr
f664913b02 Implement CIA interrupts.
Obtained from: SRM console magic from NetBSD
1998-07-12 16:17:54 +00:00
dfr
e377de494c Implement intr_create/intr_connect. 1998-07-12 16:16:22 +00:00
dfr
c53bd8654e Implement promcncheckc. 1998-07-12 16:15:06 +00:00
dfr
483a019b6e Add some debug code.
Always clear TLB in pmap_activate, even if activating curproc's pmap.
1998-07-12 16:13:54 +00:00
dfr
6d945ddc47 Add a couple of sysctls and implement sendsig/sigreturn.
Obtained from: signal code from NetBSD
1998-07-12 16:10:52 +00:00
dfr
f41e40cbe8 Add some generic interrupt dispatch code. 1998-07-12 16:09:30 +00:00
dfr
3bd2433fe9 Add definition of p_switchtime. 1998-07-12 16:08:15 +00:00
dfr
084dad2dd6 Include opt_ddb.h. 1998-07-12 16:07:43 +00:00
dfr
3c4bcba4ef Hardwire the root disk of my test box for now. 1998-07-12 16:07:05 +00:00
jkh
e75406ce05 Quick and dirty support for Linux's mremap. Not used by anything
but quake2 AFAIK.

Submitted by:   Luoqi Chen <luoqi@watermarkgroup.com>
1998-07-10 22:30:08 +00:00
bde
4c73b80db0 Oops, forgot to modify the pointer-int typedefs from the i386 version. 1998-07-10 02:34:50 +00:00
bde
63dd5b520f Added a kernel-only typedef (ptrint_t) giving an integral type that is
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.
1998-07-10 02:27:16 +00:00
imp
d1c7cd559f Add the ability to suspend as well as hibernate to the system. This
is the kernel part of my commits, the userlevel stuff will be done in
a separate commit.  Add the ability to suspend as well as hibernate to
syscons.  Create a new virtual key like hibernate for suspend.  Update
apm_bios.h to define more apm bios goodies.
1998-07-06 06:29:07 +00:00
dfr
78bd2b1675 Add support for kernel gdb. 1998-07-05 12:24:18 +00:00
dfr
49590d8c5a Use byte/word access in badaddr if relevant. 1998-07-05 12:22:56 +00:00
dfr
bfd0739c1c Support channel B as well as channel A. 1998-07-05 12:16:55 +00:00
dfr
e9ee4c7825 Add basic support for 2117x pci chipsets. Currently only pyxis (21174)
is supported.  Older chipsets will be easy to support later but right now,
I just want to boot my 164LX scratch machine :-).
1998-07-05 12:16:15 +00:00
dfr
6c3ebd4526 Add macros for byte/word sized load and store instructions. 1998-07-05 12:14:15 +00:00
dfr
771d8cc0ed Add declaration of the NetBSD/alpha bootinfo. 1998-07-05 12:13:18 +00:00
dfr
fe6b4cc2d3 First steps at supporting EB164 (AlphaPC 164, 164LX, 164SX). 1998-07-05 12:10:10 +00:00
dfr
4853eea201 Define bio_imask to allow the ncr driver to compile. The idea of passing
mask address around when registering interrupts is wrong IMHO.  We should
use a priority level like IPL_BIO and the lower levels can then translate
it into a mask if they want.
1998-07-05 12:08:59 +00:00
dfr
b16d4fb555 Make the prom console work as a real device as well as a console. 1998-07-05 11:59:44 +00:00
dfr
63e9a0f3ba Make sure hold_count for level 2 maps is maintained properly.
Simplify pmap_mapdev (its still totally wrong for the alpha).
1998-07-05 11:58:35 +00:00
dfr
40ca608c7a Make breakpoints and single-step work. 1998-06-28 01:00:27 +00:00
dfr
a20fbca38d Add a macro for testing the e_machine field of Elf64_Ehdr. 1998-06-28 00:50:35 +00:00
dfr
17a5ee3c73 Use elf symbols in DDB. 1998-06-28 00:48:48 +00:00
dfr
88bc68bf95 Allow gentrap. 1998-06-28 00:47:50 +00:00
dfr
d5688c26bd Call ddb_trap() for gentrap on SimOS since I am using gentrap for DDB
breakpoints (SimOS uses bpt itself for external debuggers).
1998-06-28 00:47:20 +00:00
dfr
55a2793d50 Add a hack to get the ELF symbols from where SIMOS leaves them. 1998-06-28 00:45:50 +00:00
dfr
d45b64b019 machine/conf.h no longer exists. 1998-06-28 00:44:51 +00:00
dfr
b3b330344c Add some stack backtrace support. Pretty fragile but its a start. 1998-06-27 15:37:43 +00:00
dfr
fbd10e3f6a Use %lx for printing register contents. 1998-06-27 15:35:57 +00:00
dfr
c54bbafb0a Make uoff_t compile. 1998-06-27 15:35:00 +00:00
bde
b3b3e5229b The isa device configuration hook was especially useless here. 1998-06-17 15:55:22 +00:00
ahasty
a75c402e98 Reviewed by: Amancio
Submitted by:	Randall Hopper <rhh@ct.picker.com>
    The patch supports using the X10 Mouse Remote in both stand-alone and
pass-through configurations, so you can plug your mouse and remote into the
same serial port, use the mouse for X, and use the remote for other apps
like Fxtv. For instance, we can now control fxtv via the remote control
just like a TV : change channels, mute, increase volume, zoom video,
freeze frame 8)

     The mouse events are channeled through the syscons/sysmouse I/F like
normal, and the remote buttons are "syphoned off" to a UNIX-domain stream
socket (defined as _PATH_MOUSEREMOTE in <machine/mouse.h>) for a
remote-aware app to grab and use.

For further info on the X10 Mouse Remote see:
http://www.x10.com/products/x10_mk19a.htm
1998-06-14 20:05:27 +00:00
bde
76251ad832 Added uoff_t. 1998-06-14 15:26:03 +00:00
dfr
b4fb1227df Declare zs_cnattach. 1998-06-14 13:58:57 +00:00
dfr
037452c745 [Add missing files from previous commit]
Major changes to the generic device framework for FreeBSD/alpha:

* Eliminate bus_t and make it possible for all devices to have
  attached children.

* Support dynamically extendable interfaces for drivers to replace
  both the function pointers in driver_t and bus_ops_t (which has been
  removed entirely.  Two system defined interfaces have been defined,
  'device' which is mandatory for all devices and 'bus' which is
  recommended for all devices which support attached children.

* In addition, the alpha port defines two simple interfaces 'clock'
  for attaching various real time clocks to the system and 'mcclock'
  for the many different variations of mc146818 clocks which can be
  attached to different alpha platforms.  This eliminates two more
  function pointer tables in favour of the generic method dispatch
  system provided by the device framework.

Future device interfaces may include:

* cdev and bdev interfaces for devfs to use in replacement for specfs
  and the fixed interfaces bdevsw and cdevsw.

* scsi interface to replace struct scsi_adapter (not sure how this
  works in CAM but I imagine there is something similar there).

* various tailored interfaces for different bus types such as pci,
  isa, pccard etc.
1998-06-14 13:53:12 +00:00
dfr
dc295ed278 Major changes to the generic device framework for FreeBSD/alpha:
* Eliminate bus_t and make it possible for all devices to have
  attached children.

* Support dynamically extendable interfaces for drivers to replace
  both the function pointers in driver_t and bus_ops_t (which has been
  removed entirely.  Two system defined interfaces have been defined,
  'device' which is mandatory for all devices and 'bus' which is
  recommended for all devices which support attached children.

* In addition, the alpha port defines two simple interfaces 'clock'
  for attaching various real time clocks to the system and 'mcclock'
  for the many different variations of mc146818 clocks which can be
  attached to different alpha platforms.  This eliminates two more
  function pointer tables in favour of the generic method dispatch
  system provided by the device framework.

Future device interfaces may include:

* cdev and bdev interfaces for devfs to use in replacement for specfs
  and the fixed interfaces bdevsw and cdevsw.

* scsi interface to replace struct scsi_adapter (not sure how this
  works in CAM but I imagine there is something similar there).

* various tailored interfaces for different bus types such as pci,
  isa, pccard etc.
1998-06-14 13:46:10 +00:00
dfr
39d9d41bc8 Reimplement spl*() as function calls. Implement software interrupts. 1998-06-11 11:51:27 +00:00
dfr
ffb6f0fe45 Add missing Id keywords. 1998-06-11 07:15:55 +00:00
dfr
da6aa760ca Add my own copyright to this file. In this case not even the comments
resemble the NetBSD source so the NetBSD copyright has been removed.
1998-06-10 20:48:03 +00:00
dfr
bfcbac9a52 Add my own copyright to this file. The only remnants of NetBSD code here
are in the comments.  As such the NetBSD copyright is included to protect
the valuable intellectual copyright included in those comments.
1998-06-10 20:40:59 +00:00
dfr
71a6f6bb7b Add yet another copyright. If some CVS wizard feels like nuking the versions
that so offend Jason Thorpe then they can.
1998-06-10 20:35:10 +00:00
dfr
af9c9e1423 Fix mangled Id keyword. 1998-06-10 20:13:32 +00:00
dfr
bc7ca30cfb Add Id keyword. 1998-06-10 20:11:16 +00:00
dfr
8bc7b7e51a Add missing copyrights. Thanks to Jason Thorpe for politely noting the
mistake...
1998-06-10 19:59:41 +00:00
dfr
224577d6cf Add initial support for the FreeBSD/alpha kernel. This is very much a
work in progress and has never booted a real machine.  Initial
development and testing was done using SimOS (see
http://simos.stanford.edu for details).  On the SimOS simulator, this
port successfully reaches single-user mode and has been tested with
loads as high as one copy of /bin/ls :-).

Obtained from: partly from NetBSD/alpha
1998-06-10 10:57:29 +00:00
bde
db50a6d677 Include "opt_compat.h" explicitly instead of depending on
makesyscalls.sh generating it as pollution.

Don't attempt to separate the includes by newlines.  makesyscalls.sh
just ignores newlines.
1998-06-09 03:28:14 +00:00
dfr
1d5f38ac22 This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
jb
a6f64e749c libtcl expects to see ieeefp.h definitions through this header. 1998-05-13 22:40:42 +00:00
eivind
70fdf8aef9 Unbotch whitespace and change switch with two cases to if.
Noticed by:	bde
1998-05-07 00:42:25 +00:00
eivind
67c7bb9c04 Translate T_PROTFLT to SIGSEGV instead of SIGBUS when running under
Linux emulation.  This make Allegro Common Lisp 4.3 work under
FreeBSD!

Submitted by: Fred Gilham <gilham@csl.sri.com>
Commented on by: bde, dg, msmith, tg
Hoping he got everything right:  eivind
1998-04-28 18:15:08 +00:00
sos
ca4ad743cf Added EIDRM & ENOMSG to errno translation table. 1998-04-13 17:49:51 +00:00
peter
a9835c646b The linux chown syscall is more like lchown, a new chown syscall that
follows links was added.
1998-03-29 07:59:10 +00:00
peter
5a40a96426 Patch up some space/tab problems. It looks like some of this came
from an xterm via cut/paste.  No other changes apart from whitespace.
1998-03-29 07:53:19 +00:00
peter
63018a1e91 Add in placeholders for the newer linux syscalls 1998-03-29 06:35:22 +00:00
dufault
8ed0defc6e Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B and
_KPOSIX_PRIORITY_SCHEDULING options to work.  Changes:

Change all "posix4" to "p1003_1b".  Misnamed files are left
as "posix4" until I'm told if I can simply delete them and add
new ones;

Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux;

Add man pages for _POSIX_PRIORITY_SCHEDULING system calls;

Add options to LINT;

Minor fixes to P1003_1B code during testing.
1998-03-28 11:51:01 +00:00
jb
11d4132720 Add vm_ooffset_t and vm_pindex_t that FreeBSD uses (but NetBSD doesn't).
Ugh, this is for user code that looks into vm_map_entry. I'd shoot
it but semi-automatic guns aren't legal here anymore. 8-(
1998-03-23 08:17:16 +00:00
jb
f874b751f4 Added a null entry for sysmk that is generated by makesyscalls.sh.
Gee, I wish there was a better way to run makesyscalls.sh so that
a make world finds missing things like this. Running it manually
sucks.

Pointed out by: Peter Dufault
1998-03-13 19:13:54 +00:00
jb
8cfaeb38b8 Updates to reflect differences in what NetBSD does and what FreeBSD
userland expects.
1998-03-09 05:53:13 +00:00
jb
61880eb7f0 This commit was generated by cvs2svn to compensate for changes in r34368,
which included commits to RCS files with non-trunk default branches.
1998-03-09 05:43:16 +00:00
jb
5936ee903a Import NetBSD/Alpha headers needed to get the FreeBSD userland to compile
(and even run). These files don't necessarily make sense for a
FreeBSD/Alpha kernel build. That will come later and these files
will be changed accordingly.
1998-03-09 05:43:16 +00:00
bde
f571342745 Staticized. 1998-02-13 07:34:52 +00:00
phk
e5a46b0176 Add display of type KD_PIXEL. 1998-02-12 20:47:39 +00:00
eivind
5cb8382644 De-staticize enough to make all the LKMs work again. Add comments where
deemed relevant.
1998-02-11 01:46:50 +00:00
eivind
d7a6ab2803 Staticize. 1998-02-09 06:11:36 +00:00
eivind
4547a09753 Back out DIAGNOSTIC changes. 1998-02-06 12:14:30 +00:00
eivind
c552a9a1c3 Turn DIAGNOSTIC into a new-style option. 1998-02-04 22:34:03 +00:00
bde
b7f12097c9 Fixed conflicts between <machine/console.h> and <machine/pcvt_ioctl.h>,
so that it is possible for kdump and truss to include them both.  Use
#defines from pcvt_ioctl.h in conflicting cases, since pcvt_ioctl.h
gives a hint about the bogus third arg to _IO().  Ifdef the common
typedefs.  Export `struct key_t' from pcvt_ioctl.h so pcvt_ioctl.h is
bug for bug compatible with console.h (now both are broken in C++
mode).
1998-02-03 19:57:46 +00:00
bde
4cee3d0e1e Declare printf() instead of including <stdio.h>, so that this doesn't
depend on anything outside of the "sys" tree.
1998-02-01 18:47:56 +00:00
jb
1b94ff5481 Suggested by: bde
Move sigjmp_buf and jmp_buf structure definitions to machine/setjmp.h
so that i386 can continue to use int as the basic register type and
alpha can use long. Bruce was concerned about possible differing
alignment. I've left the definition of _JBLEN in machine/setjmp.h
even though Bruce's example used the number directly. I don't know if
any other code relies on _JBLEN, so I left it to avoid potential
breakage.
1998-01-20 09:09:24 +00:00
cvs2svn
7c6e96080c This commit was manufactured by cvs2svn to create branch 'JB'. 1998-01-10 23:00:07 +00:00
jb
1a06f650e6 Add a machine dependent header to size the jmpbuf instead of piling
machine dependencies in src/include/setjmp.h.
1998-01-10 23:00:06 +00:00
jb
1d9560f590 PAL codes needed for asm.h 1998-01-10 22:42:21 +00:00
jb
58d8db41d2 Header files which are linked from /usr/include to /usr/include/machine.
NetBSD's endian.h needs sys/types.h for the typedefs that are used to
get htonl() correct when a long is 64 bits.
1998-01-10 22:09:53 +00:00
jb
eb6c3ae58f These are a few of the alpha machine dependent header files - the first
referenced by the build of user-space libraries. These files were
obtained from NetBSD (with ansi.h being modified to reflect the FreeBSD
off_t and pid_t implementation).
1998-01-10 10:13:16 +00:00
yokota
3ed12c01d2 Added accent (dead) key support to syscons and kbdcontrol.
With a keymap with accent key definitions loaded to syscons, you press
an accent key followed by a regular letter key to produce an accented
letter.  Press an accent key followed by the space bar to get the
accent letter itself.

Code is based on the ideas and work by jmrueda@diatel.upm.es and
totii@est.is.

PR: i386/4016

console.h
- Defined structures and constants for accent (dead) keys.

syscons.c, kbdtables.h
- When an accent key is pressed, set the corresponding index to
  `accents'.  If the next key is the space key, produce the accent char
  itself.  Otherwise search the accent key map entry, indexed by
  `accents', for a matching pair of a regular char and an accented char.
- Added ioctl functions to set and get the accent key map (PIO_DEADKEYMAP
  and GIO_DEADKEYMAP).
1998-01-07 08:40:34 +00:00
kato
ad6e872947 I should not edit linux_prot.h directly. Fix the argument of linux_nice.
Pointed out by:	Eivind Eklund <eivind@FreeBSD.ORG>
	NOPROTO	LINUX	{ int getpgrp(void); }
66	NOPROTO	LINUX	{ int setsid(void); }
67	STD	LINUX	{ int linux_sigaction(int sig, \
			    struct linux_sigaction *nsa, \
			    struct linux_sigaction *osa); }
68	STD	LINUX	{ int linux_siggetmask(void); }
69	STD	LINUX	{ int linux_sigsetmask(linux_sigset_t mask); }
70	NOPROTO	LINUX	{ int setreuid(int ruid, int euid); }
71	NOPROTO	LINUX	{ int setregid(int rgid, int egid); }
72	STD	LINUX	{ int linux_sigsuspend(int restart, \
			    linux_sigset_t oldmask, linux_sigset_t mask); }
73	STD	LINUX	{ int linux_sigpending(linux_sigset_t *mask); }
74	NOPROTO	LINUX	{ int osethostname(char *hostname, \
			    u_int len);}
75	NOPROTO	LINUX	{ int osetrlimit(u_int which, \
			    struct ogetrlimit *rlp); }
76	NOPROTO	LINUX	{ int ogetrlimit(u_int which, \
			    struct ogetrlimit *rlp); }
77	NOPROTO	LINUX	{ int getrusage(int who, struct rusage *rusage); }
78	NOPROTO	LINUX	{ int gettimeofday(struct timeval *tp, \
			    struct timezone *tzp); }
79	NOPROTO	LINUX	{ int settimeofday(struct timeval *tp, \
			    struct timezone *tzp); }
80	NOPROTO	LINUX	{ int getgroups(u_int gidsetsize, gid_t *gidset); }
81	NOPROTO	LINUX	{ int setgroups(u_int gidsetsize, gid_t *gidset); }
82	STD	LINUX	{ int linux_select(struct linux_select_argv *ptr); }
83	STD	LINUX	{ int linux_symlink(char *path, char *to); }
84	NOPROTO	LINUX	{ int ostat(char *path, struct ostat *up); }
85	STD	LINUX	{ int linux_readlink(char *name, char *buf, \
			    int count); }
86	STD	LINUX	{ int linux_uselib(char *library); }
87	NOPROTO	LINUX	{ int swapon(char *name); }
88	NOPROTO	LINUX	{ int reboot(int opt); }
89	STD	LINUX	{ int linux_readdir(int fd, struct linux_dirent *dent, \
			    unsigned int count); }
90	STD	LINUX	{ int linux_mmap(struct linux_mmap_argv *ptr); }
91	NOPROTO	LINUX	{ int munmap(caddr_t addr, int len); }
92	STD	LINUX	{ int linux_truncate(char *path, long length); }
93	NOPROTO	LINUX	{ int oftruncate(int fd, long length); }
94	NOPROTO	LINUX	{ int fchmod(int fd, int mode); }
95	NOPROTO	LINUX	{ int fchown(int fd, int uid, int gid); }
96	NOPROTO	LINUX	{ int getpriority(int which, int who); }
97	NOPROTO	LINUX	{ int setpriority(int which, int who, int prio); }
98	NOPROTO	LINUX	{ int profil(caddr_t samples, u_int size, \
			    u_int offset, u_int scale); }
99	STD	LINUX	{ int linux_statfs(char *path, \
			    struct linux_statfs_buf *buf); }
100	STD	LINUX	{ int linux_fstatfs(int fd, \
			    struct linux_statfs_buf *buf); }
101	STD	LINUX	{ int linux_ioperm(unsigned int lo, \
			    unsigned int hi, int val); }
102	STD	LINUX	{ int linux_socketcall(int what, void *args); }
103	STD	LINUX	{ int linux_ksyslog(int what); }
104	STD	LINUX	{ int linux_setitimer(u_int which, \
			    struct itimerval *itv, struct itimerval *oitv); }
105	STD	LINUX	{ int linux_getitimer(u_int which, \
			    struct itimerval *itv); }
106	STD	LINUX	{ int linux_newstat(char *path, \
			    struct linux_newstat *buf); }
107	STD	LINUX	{ int linux_newlstat(char *path, \
			    struct linux_newstat *buf); }
108	STD	LINUX	{ int linux_newfstat(int fd, struct linux_newstat *buf); }
109	STD	LINUX	{ int linux_uname(struct linux_old_utsname *up); }
110	STD	LINUX	{ int linux_iopl(int level); }
111	STD	LINUX	{ int linux_vhangup(void); }
112	STD	LINUX	{ int linux_idle(void); }
113	STD	LINUX	{ int linux_vm86(void); }
114	STD	LINUX	{ int linux_wait4(int pid, int *status, \
			    int options, struct rusage *rusage); }
115	STD	LINUX	{ int linux_swapoff(void); }
116	STD	LINUX	{ int linux_sysinfo(void); }
117	STD	LINUX	{ int linux_ipc(int what, int arg1, int arg2, int arg3, \
			    caddr_t ptr); }
118	NOPROTO	LINUX	{ int fsync(int fd); }
119	STD	LINUX	{ int linux_sigreturn(struct linux_sigcontext *scp); }
access
1997-12-17 03:12:35 +00:00
eivind
01dd6091ed Make COMPAT_43 and COMPAT_SUNOS new-style options. 1997-12-16 17:40:42 +00:00
msmith
b878831388 As described by the submitter:
These patches enables us to play quake2 .

Support linux keyboard ioctl for setting RAW, MEDIUMRAW and XLATE.

Support linux virtual terminal operations:
 OPENQRY, GETMODE, SETMODE, GETSTATE, ACTIVATE, and WAITACTIVE.

Submitted by:	Amancio Hasty <hasty@rah.star-gate.com>
1997-12-15 06:09:11 +00:00
yokota
14e5988fe7 - Add support for the following mice to psm/moused/sysmouse:
MS IntelliMouse, Kensington Thinking Mouse, Genius NetScroll,
  Genius NetMouse, Genius NetMouse Pro, ALPS GlidePoint, ASCII
  MieMouse, Logitech MouseMan+, FirstMouse+

- The `psm' driver is made to recognize various models of PS/2 mice
and enable their extra features so that their additional buttons and
wheel/roller are recognized. The name of the detected model will be
printed at boot time.

- A set of new ioctl functions are added to the `psm', `mse' and
`sysmouse' drivers so that the userland program (such as the X server)
can query device information and change driver settings.

- The wheel/roller movement is handled as the `Z' axis movement by the
mouse drivers and the moused daemon. The Z axis movement may be mapped
to another axis movement or buttons.

- The mouse drivers support a new, standard mouse data format,
MOUSE_PROTO_SYSMOUSE format which can encode x, y, and x axis movement
and up to 10 buttons.

/sys/i386/include/mouse.h
- Added some fields to `mousestatus_t' to store Z axis movement
  and flag bits.
- Added the field `model' to `mousehw_t' to store mouse model code.
  Defined model codes.
- Extended `mousemode_t'.
- Added new protocols and some constants for them.
- Added new ioctl functions and structures.
- Removed obsolete ioctl definitions.

/sys/i386/include/console.h
- Added `dz' field to the structure `mouse_data' to pass Z axis movement
  to `syscons/sysmouse'.
- Removed LEFT_BUTTON, MIDDLE_BUTTON and RIGHT_BUTTON.  Use button bits
  defined in `mouse.h' instead.

/sys/i386/isa/psm.c
- Added a set of functions to detect various mice which have additional
  features (wheel and buttons) unavailable in the standard PS/2 mouse.
- Refined existing ioctl functions and added new ones.  Most important
  of all is MOUSE_SETLEVEL which manipulates the output level of the driver.
  While the output level remains zero, the output from the `psm' driver is
  in the standard PS/2 mouse format (three bytes long).  When the level
  is set to one, the `psm' driver will send data in the extended format.
  At the level two the driver uses the format which is native to the
  connected mouse is used. (Meaning that the output from the device is
  passed to the caller as is, unmodified.)  The `psm'  driver will pass
  such extended data format as is to the caller if the output level is
  two, but emulates the standard format if the output level is zero.
- Added kernel configuration flags to set initial resolution
  (PSM_CONFIG_RESOLUTION) and acceleration (PSM_CONFIG_ACCEL).
- Removed the compile options PSM_ACCEL, PSM_CHECKSYNC and PSM_EMULATION.
  Acceleration ratio is now specified by the kernel configuration flags
  stated above.  Sync check logic is refined and now standard.
  The sync check can be turned off by the new kernel configuration flags
  PSM_CONFIG_NOCHECKSYNC (0x100).  PSM_EMULATION has been of little use.
- Summer clean up :-)  Removed unused code and obsolete comments.

/sys/i386/isa/mse.c
- Created mseioctl() to deal with ioctl functions MOUSE_XXXX.
  Most importantly, the MOUSE_SETLEVEL ioctl will change the
  output format from the 5 byte format to the new, extended format
  so that the caller can take advantage of Z axis movement and additional
  buttons.
- Use constants defined in `mouse.h' rather than magic numbers.

/sys/i386/isa/syscons.c
- Changed scioctl() to reflect the new `console.h' and some of the new
  ioctls defined in `mouse.h'.  Most importantly, the MOUSE_SETLEVEL
  ioctl will change the `sysmouse' output format from the MouseSystems
  5 byte format to the new, extended format so that the caller can
  take advantage of Z axis movement and additional buttons.
- Added support for double/triple click actions of the left button and
  single click action of the right button in the virtual console.  The
  left button double click will select a word under the mouse pointer.
  The triple click will select a line and the single click of the right
  button will extend the selected region to the current position of
  the mouse pointer.  This will make the cut/paste support more compatible
  with xterm.

/sys/i386/isa/kbdio.h
- Added PSM_INTELLI_ID.
1997-12-07 08:09:19 +00:00
ahasty
1938134234 Added support for linux sound ioctls:
LINUX_SNDCTL_DSP_GETOPTR
LINUX_SNDCTL_DSP_GETIPTR
LINUX_SNDCTL_DSP_SETTRIGGER
LINUX_SNDCTL_DSP_GETCAPS

With this rev level the linux realaudio player 5 and xquake should work.
1997-11-17 04:00:32 +00:00
phk
4c8218a5c7 Move the "retval" (3rd) parameter from all syscall functions and put
it in struct proc instead.

This fixes a boatload of compiler warning, and removes a lot of cruft
from the sources.

I have not removed the /*ARGSUSED*/, they will require some looking at.

libkvm, ps and other userland struct proc frobbing programs will need
recompiled.
1997-11-06 19:29:57 +00:00
kato
cfc3d1cfdf Implement linux_iopl and linux_nice. 1997-10-29 08:17:14 +00:00
kato
c2c827e04f Implement linux_semop, linux_semget and linux_semctl.
PR:		4355
1997-10-28 10:50:02 +00:00
yokota
804107bc40 Rename MOUSE_GETINFO to MOUSE_GETHWINFO. The name collided with the one
in console.h.
Pointed out by bde.
1997-10-19 10:45:18 +00:00
sos
85a02d214d Add a new keyboard mode K_CODE. Returns a single byte for each key
much like the scancode mode.
However the keys that (for no good reason) returns extension codes
etc, are translated into singlebyte codes.
Needed by libvgl.  This makes life ALOT easier, also the XFree86
folks could use this.
1997-10-01 20:46:29 +00:00
kato
d6853bffcf Always defines macros for PC-98 display. 1997-09-04 09:05:17 +00:00
bde
be13855b37 Removed unused #includes (<machine/cpu.h> now gives more pollution). 1997-09-01 02:12:39 +00:00
bde
04b5795c64 Fixed misplaced declaration. 1997-08-25 23:41:39 +00:00
bde
ec670fd1e0 Minor formatting and style fixes. 1997-08-25 23:36:23 +00:00