Commit Graph

508 Commits

Author SHA1 Message Date
kleink
a3fabb9e7f Use <sys/ieee754.h> where applicable. 2003-10-26 20:55:30 +00:00
uwe
49fd54d39a Use adcvar.h. 2003-10-22 23:52:46 +00:00
uwe
5846d07065 Don't compare a char to NULL. 2003-10-22 21:13:44 +00:00
uwe
ae7219a39a Don't compare an integer to NULL. 2003-10-22 21:10:15 +00:00
uwe
49bb9c9d40 Don't compare an integer variable to NULL. 2003-10-22 21:09:09 +00:00
uwe
437e63c180 __KERNEL_RCSID. 2003-10-19 02:22:56 +00:00
uwe
a2a5c1629e Make intc_intr_priority() return old level. While here, make the code
more compact by factoring out register update to happen in one place,
outside the switch statements.

Add intc_intr_disable() and intc_intr_enable().
2003-10-18 23:21:35 +00:00
uwe
15e3e96e71 Config glue for adc(4). 2003-10-18 01:29:05 +00:00
uwe
721e6868b8 Driver for analog->digital converter in sh7709. 2003-10-18 01:27:18 +00:00
uwe
390e87a8b6 Use 'CH' for channel select in the ADCSR bits format string for consistency. 2003-10-15 22:55:07 +00:00
cl
e9de14a4d3 add MD part of SA/pthread pagefault handling on sh3 2003-10-13 18:08:45 +00:00
uwe
81428320f3 Register definitions for sh7709 analog->digital converter. 2003-10-10 23:52:30 +00:00
uwe
a348eb3a30 Add IPR mappings for remaining sh7709 IRQx.
While here, fix couple of typos.
2003-10-08 23:31:43 +00:00
thorpej
901da40cf9 Add some accessor macros for the ucontext:
* _UC_MACHINE_PC() - access the program counter
* _UC_MACHINE_INTRV() - access the integer return value register
* _UC_MACHINE_SET_PC() - set the program counter (this requires
  special handling on some platforms).
2003-10-08 22:43:01 +00:00
lukem
1c33b4e6a4 Overhaul MBR handling (part 1):
<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
2003-10-08 04:25:43 +00:00
uwe
576576bafb Add definitions for IRR0 bits. 2003-10-07 01:24:32 +00:00
uwe
c313f02140 Whitespace nit. 2003-10-01 21:51:15 +00:00
nathanw
4d59420344 Move __cpu_simple_lock_t and __SIMPLELOCK_{UN,}LOCKED to machine/types.h
so that they can be used in a namespace-friendly way.
2003-09-26 22:45:41 +00:00
simonb
550b4bef88 Fix "constify sendsig/trapsignal" fallout for non-siginfo'd archs. Test
compiled on most architectures.
2003-09-26 12:02:55 +00:00
uwe
a1cbc85a2f Bring _PROF_PROLOGUE back. The breakage was caused by calls to
__udivsi3 being treated specially by gcc.
2003-08-27 19:59:57 +00:00
christos
2b16e874b8 I don't understand why there this is here, since we have exec_ecoff.c in kern,
but remove the stack setup function anyway.
2003-08-11 12:58:43 +00:00
chs
78a835abdc fix typos in comments. 2003-08-10 02:03:31 +00:00
uwe
e4bd28ac72 Undo previous. It breaks profiling, but I managed to test against the
wrong tree and so missed it.
2003-08-10 01:22:03 +00:00
uwe
147642d466 Real _PROF_PROLOGUE so that assembly language functions can be profiled. 2003-08-10 00:00:26 +00:00
uwe
9cd06ccd7e For ELF put RCSID strings into .ident section. 2003-08-09 23:04:43 +00:00
uwe
8c46e68137 Add more sh7709 interrupt sources. Split sh3 and sh4 specific
switches because of conflicts in exception codes.
2003-08-08 00:52:42 +00:00
agc
aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
uwe
85fb38b211 When passing &buffers to uvm_map, add a cast to (void *). Without it,
gcc3 with -O2 produces "dereferencing type-punned pointer will break
strict-aliasing rules" warning.
2003-08-03 00:01:44 +00:00
thorpej
063033a023 Since everyone uses clock_subr.c (or should, if they don't currently),
list it in conf/files instead of in every port's files.*.
2003-07-27 01:17:37 +00:00
lukem
ed51729135 __KERNEL_RCSID() 2003-07-15 02:54:31 +00:00
uwe
66a03d56d3 Correct the macro name for SCP0DT bit.
Addresses port-sh3/22025 by FURUKAWA Masashi.
2003-07-01 11:49:37 +00:00
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
tsutsui
17418f8476 Allow user pmap to pmap_enter device (bus-space) memory. 2003-06-14 16:27:36 +00:00
tsutsui
fee6ce1d9f Fix lack of parentheses bug which causes wrong pte settings. 2003-06-14 16:21:31 +00:00
tsutsui
cead6ab903 mmap(2) function on sh3 should return page number, not physical address. 2003-06-14 16:08:09 +00:00
kleink
776138ea69 Rename <sys/float_ieee.h> to <sys/float_ieee754.h>, following libc's
convention for these.
2003-05-12 15:22:53 +00:00
thorpej
f4ca0d67fe Include <sys/disk.h>. 2003-05-12 14:48:12 +00:00
thorpej
e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
thorpej
36da248c07 Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
2003-05-10 21:10:23 +00:00
thorpej
b77900c3c2 Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM.  Machine-dependent code is
responsible for initializing them before main() is called.  Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
2003-05-08 18:13:12 +00:00
christos
6ec2f52f71 rename Locore.c -> locore_c.c so that we can compile on case insensitive
filesystems. (from John Gordon)
2003-05-08 12:37:36 +00:00
dsl
d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
scw
8c5c893bf7 Add a BKPT_ADDR() macro which gives MD code a chance to munge a
breakpoint address before it's used. Currently a no-op on all but sh5.

This is useful on sh5, for example, to mask off the instruction
type encoding in the bottom two address bits, and makes it possible
to do "db> break $rXX" instead of manually munging the address.
2003-04-29 17:06:03 +00:00
bjh21
4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.

This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
  can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
  various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
  !defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.

I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them.  In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.

Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
2003-04-28 23:16:11 +00:00
christos
a2dfb1b570 PR/3012: Greg A. Woods: Write all float.h files [except the vax of course]
in terms of float_ieee.h
2003-04-19 23:05:28 +00:00
bouyer
aec10dd80c Nake return values from bounds_check_with_label() conform to the man
page: -1 for error, 0 for EOF, 1 otherwise. Inspired by an OpenBSD commit
message, pointed out by Miod Vallat in private mail.
vax/mba/hp.c: check return value <= 0, not < 0 to be concistent with how
other places handle return values from bounds_check_with_label().
2003-04-16 15:00:59 +00:00
tsutsui
dcc0f5a63d Fix typo in printf message. 2003-04-13 04:07:34 +00:00
nathanw
ff28c51cc0 Make cpu_getmcontext() run the PC through ras_lookup() so that kernel
getcontext() plus userlevel setcontext() (as used in libpthread) respects
the atomicity of RAS regions.
2003-04-11 22:02:28 +00:00
thorpej
cc2c493bc4 Use PAGE_SIZE rather than NBPG. 2003-04-02 07:35:54 +00:00