Commit Graph

295 Commits

Author SHA1 Message Date
christos
06555645c2 printf -> kprintf, sprintf -> ksprintf 1996-10-11 00:24:36 +00:00
christos
1f54d4ded6 add in_addr_t and in_port_t and use them. 1996-10-11 00:02:47 +00:00
cgd
472889f8e4 moved to aout_machdep.h (via repository copy) 1996-10-08 12:57:37 +00:00
christos
0b99fde177 Fix PR/2782: Remove definition of dos_partitions[]. 1996-10-01 00:06:05 +00:00
cgd
0e097578a2 add and use a machine-dependent header, which currently defines some
macros to use to remove #ifdefs from the machine ID case check.
Eventually, these headers will contain other information, e.g.
machine-dependent relocation information, etc.
1996-09-26 21:50:55 +00:00
jtk
2b5e1cd158 clean up missing prototype, extra variable 1996-09-10 11:22:33 +00:00
jtk
1a1feb3827 change APM to use new almost-generalized BIOS trampoline:
/*
 * void bioscall(int function, struct apmregs *regs):
 * 	call the BIOS interrupt "function" from real mode with
 *	registers as specified in "regs"
 *	(for the flags, though, only these flags are passed to the BIOS;
 *	the remainder come from the flags register at the time of the call:
 *	(PSL_C|PSL_PF|PSL_AF|PSL_Z|PSL_N|PSL_D|PSL_V)
 *
 *	Fills in *regs with registers as returned by BIOS.
 */

Thanks to Charles Hannum for complaining and inspiring me to hack this
together.
1996-09-08 15:43:37 +00:00
mycroft
2bc736661a Implement poll(2). 1996-09-07 12:40:22 +00:00
jtk
f613796771 make all constants use APM_ prefix, and some other minor cleanup so that
this can be the sole APM include file
1996-08-30 02:36:00 +00:00
jtk
b86b695240 add Advanced Power Management driver
Includes bootstrap support from FreeBSD (Tatsumi HOSOKAWA and <ukai>)
1996-08-25 23:38:57 +00:00
thorpej
8c2f15c6fc New implementation of bus_io_{,un}map() for the i386. Details:
- A fixed extent map (statically allocated descriptor storage) is
	  created in init386(), just before the call to consinit().  The
	  fixed descriptor storage has enough room for 8 region entires,
	  which is plenty for early initialization, but doesn't chew up
	  that much memory.

	  This extent map (ioport_ex) manages the i386 i/o port
	  space (0x0 - 0xffff).

	- Just before the call to configure() in cpu_startup(), a
	  flag is set which notifies the bus_io functions that it is
	  safe to use malloc() to allocate descriptor storage, in the
	  event that more than 8 regions are needed.

	- bus_io_map() attempts to allocate the specified region from
	  ioport_ex.  If the allocation succeeds, the io handle is
	  filled in.  If the allocation fails, it is implied that
	  something else is already using that io space, and an
	  error condition is returned.

	- bus_io_unmap() frees a region previously allocated from
	  ioport_ex in bus_io_map().  If the free fails, a warning
	  is printed on the conole.

These changes implement "port accounting".  This is required for
proper autoconfiguration on the i386 port, and makes dealing with,
among other things, PCMCIA io mappings _much_ easier.
1996-06-23 19:59:06 +00:00
mycroft
b3d8a261b9 Make imask[] larger, to match other changes. 1996-05-13 06:11:28 +00:00
mycroft
635c72115c Add multiple-inclusion protection. 1996-05-13 01:35:06 +00:00
mycroft
417bb90896 Move spl*() and soft interrupt definitions into intr.h. For now, include it
from psl.h.  XXX Will change after release.
1996-05-13 01:28:01 +00:00
mycroft
a8e2ce97e4 Implement IPL_HIGH. 1996-05-12 23:06:06 +00:00
mycroft
9f8f77f8f6 Move IPL_* and IST_* constants into intr.h. 1996-05-12 22:52:23 +00:00
jtc
0edf3579f4 Revert last change.
Changing types from unsigned {long,short} to u_int{32,16}_t causes problems
in a lot of userlevel code because those types aren't defined when machine/
endian.h is included.  And IMO including sys/types.h in machine/endian.h
is clearly wrong.

XPG4.2 defines new types in_addr_t and in_port_t for the {h,n}to{n,h}{l,s}
functions.  But we don't have time to figure out the implementation issues
given the current release schedule.
1996-05-08 20:00:38 +00:00
christos
59fdcbc7ad Change the prototype of fillw from (int, caddr_t, size_t) to
(short, void *, size_t).
1996-05-05 19:29:26 +00:00
christos
573f5e0cd6 Add the joystick 1996-05-05 19:28:34 +00:00
christos
b927d7be11 Fwd declarations for MD drivers. 1996-05-03 19:34:11 +00:00
christos
8fd0f1f8b3 Add missing prototypes. 1996-05-03 19:26:28 +00:00
christos
391a4ddc7c use u_int32_t instead of unsigned long
and u_int16_t instead of short in the {h,n}to{n,h}{l,s} inline routines
and macros.
1996-05-03 19:25:23 +00:00
christos
0b3580eb25 Comment out unused routines; add prototype for kdb_trap 1996-05-03 19:23:59 +00:00
christos
dc3ce37d53 Add prototypes from other files. 1996-05-03 19:22:49 +00:00
christos
1044435088 Avoid unused variable warnings, by using the first argument to the bus
functions.
1996-05-03 19:22:18 +00:00
mycroft
7511a5540e Remove BIOSSEG.
Don't mess with the flags when entering a software interrupt.
Use IF, not VIF.
NOTE: These changes break dosemu, but are required for proper emulation.
1996-04-30 10:35:25 +00:00
mycroft
47bf863ac1 Make some of the flag handling clearer. No functional change. 1996-04-18 10:04:32 +00:00
mycroft
035e9c211e Use the flag mask in a somewhat more sane fashion. 1996-04-12 05:57:43 +00:00
mycroft
c8ab43244b Actually keep track of the naughty PSL bits.
Use VIF, rather than IF, by default, to be compatible with dosemu.  XXXX
1996-04-11 10:07:17 +00:00
mycroft
48643c6605 Export [gs]et_vflags(), and always use them when saving/restoring registers
in VM86 mode.
Allow changing of *all* PSL bits in VM86 mode; some applications don't work
right otherwise, and all the nasty bits are virtualized anyway.
Make sure PSL_VIF, PSL_VIP, and PSL_VM don't show up in the user's view of
the PSL.
1996-04-11 07:47:33 +00:00
thorpej
84c7027789 Add bus_io_{read,write}_multi_{1,2,4,8}() to the <machine/bus.h>
interface, and implement them (except for the 8-byte versions) on
the i386.
1996-04-05 23:59:37 +00:00
mycroft
6424af4c10 Prototype delay(). 1996-03-29 00:23:28 +00:00
perry
ee2fa11baf add joystick driver from Matthieu Herrb (pr #2267) 1996-03-27 19:11:13 +00:00
jtc
2ce5f1478b Add _BSD_WINT_T_ definition so we can handle wint_t type added in NA1. 1996-03-16 01:31:45 +00:00
ghudson
4e0c8707f7 To enable people to mount DOS partitions on disks with no NetBSD
partition, add the MBR partitions to the default (faked-up)
disklabel used by NetBSD if it can't find a real one.  If the
type of the MBR partition is one of the common DOS ones, mark the
partition as having an MSDOS filesystem.
1996-03-09 20:52:54 +00:00
cgd
0b56afadf3 make this idempotent. bus.h needs to include it, and other things which
may include something that includes bus.h may include it as well.
1996-03-08 20:15:23 +00:00
cgd
6826c7bf48 bus memory and I/O space access functions/macros, to be used by
machine-independent code for more sane access to bus resources.
New functions will be added to this set, in the future, as appropriate,
but this is a good starting set.  Defines:
	bus_{io,mem}_{map,unmap}
	bus_{io,mem}_{read,write}_{1,2,4,8}
functions, and several types to go with them.
1996-03-08 20:11:23 +00:00
cgd
18ec26aa21 add _MACHINE and _MACHINE_ARCH, which are like MACHINE and MACHINE_ARCH,
execpt without quotes.  meant to be __CONCAT()ted for easy #includes
of machine-dependent headers for MI code (e.g. for the MI ISA/EISA/PCI/TC
bus code).
1996-03-04 05:04:10 +00:00
cgd
1c5d7babe5 Clean up tabbing/spacing in defns of MACHINE, MACHINE_ARCH, and MID_MACHINE. 1996-03-01 23:30:08 +00:00
jtc
8bd51c47b9 Copyright assigned to the NetBSD Foundation 1996-02-27 22:28:09 +00:00
mycroft
d1bae2700f Add the obligatory copyright notice. 1996-02-18 13:01:05 +00:00
christos
4d234d08d8 Move pmap_page_index declaration to <vm/pmap.h> 1996-02-12 21:12:29 +00:00
mycroft
9d9a70a5a2 Fix #includes. 1996-02-02 18:05:36 +00:00
mycroft
88e512b693 LOCORE -> _LOCORE 1996-02-01 22:28:24 +00:00
mycroft
7149c5ff14 VM86 support, by John Kohl, touched up a bit by me. 1996-01-08 13:51:30 +00:00
mycroft
87a8c945ba Hand-code softintr() to deal with GCC braindamage. 1996-01-07 21:48:35 +00:00
mycroft
0696821419 Deal with GCC's dead code elimination being suboptimal. 1996-01-07 03:59:28 +00:00
mycroft
41f463bf2c Modify splraise() to allow better optimization. 1996-01-07 02:40:44 +00:00
mycroft
946507cf4d Make cpl, ipending, and astpending volatile. 1996-01-07 02:08:28 +00:00
mycroft
cd8fe86bcb Make the type of __builtin_va_list a long. 1995-12-26 01:16:24 +00:00