Commit Graph

1249 Commits

Author SHA1 Message Date
matt 0dbe439e05 Adapt ARM Linux compat code to deal with SIGINFO. 2003-10-10 14:44:42 +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
scw 0047ff3f6e Ok, I give up for now. There's no easy/reliable way to deal with
these spurious interrupts.
2003-10-08 19:46:12 +00:00
scw 677ee2fdbf Simplify the last change to just check for spurious GPIO interrupts. 2003-10-08 19:39:40 +00:00
scw ecc5fec473 If no interrupt handler claims to have dealt with a level-triggered
GPIO interrupt, check the GPIO interrupt status register after clearing
it down to see if the interrupt source has disappeared. If it does,
assume it was a spurious event. Otherwise, panic.
2003-10-08 19:31:17 +00:00
scw fb2c521159 Make it easier to support different types of IXP425 board:
- Move board-specific PCI/GPIO initialisation to its rightful place.

 - Handle clearing down latched GPIO interrupts in a board-independent way.

 - Use MI com(4) driver for on-chip UARTs.

 - Misc. tidying up.

Tested on IXDP425.
2003-10-08 14:55:04 +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
thorpej 68723a995b * Shuffle some data structures so, and add a flags word to ksiginfo_t.
Right now the only flag is used to indicate if a ksiginfo_t is a
  result of a trap.  Add a predicate macro to test for this flag.
* Add initialization macros for ksiginfo_t's.
* Add accssor macro for ksi_trap.  Expands to 0 if the ksiginfo_t was
  not the result of a trap.  This matches the sigcontext trapcode semantics.
* In kpsendsig(), use KSI_TRAP_P() to select the lwp that gets the signal.
  Inspired by Matthias Drochner's fix to kpsendsig(), but correctly handles
  the case of non-trap-generated signals that have a > 0 si_code.

This patch fixes a signal delivery problem with threaded programs noted by
Matthias Drochner on tech-kern.

As discussed on tech-kern.  Reviewed and OK's by Christos.
2003-10-08 00:28:40 +00:00
thorpej 2c0d381bd7 New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc.  Primarily written by Steve Woodford,
with some modification by me.

(NOTE: "cvs ci" was missed on this directory during the initial checkin
of the new I2C code.)
2003-10-06 16:11:19 +00:00
thorpej d322684f55 Add support for the i80312 and i80321 I2C controllers. 2003-10-06 16:06:05 +00:00
thorpej df011fda1d Make sure to pass mod/ref seeds with PMAP_WIRED. 2003-10-06 15:43:35 +00:00
thorpej 388386eef7 Make sure to pass mod/ref seeds with PMAP_WIRED. 2003-10-06 00:40:36 +00:00
matt 73ca535921 Add SA_SIGINFO support for ARM (from Chris Gilbert). 2003-10-05 19:44:58 +00:00
jdolecek e6286b949a Add some framework for MI assignment of device majors - add sys/dev/majors
which is automatically included during kernel config, and add comments
to individual machine-dependant majors.* files to assign new MI majors
in MI file.

Range 0-191 is reserved for machine-specific assignments, range
192+ are MI assignments.

Follows recent discussion on tech-kern@
2003-10-05 08:04:24 +00:00
bsh 81227d1ae1 avoid compile error with GCC3, and add some comments. 2003-10-03 07:24:05 +00:00
thorpej 2652188cc4 New generic I2C framework. Supports bit-bang and "intelligent" I2C
interface controllers (of varying intelligence levels).

Contributed by Wasabi Systems, Inc.  Primarily written by Steve Woodford,
with some modification by me.
2003-09-30 00:35:30 +00:00
scw 960dfae23f Define ELF32_MACHDEP_ENDIANNESS according to target byte order. 2003-09-29 09:08:20 +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
ichiro 066497ec38 add comment and delete unused definition 2003-09-25 14:48:16 +00:00
ichiro 663ccee1cc pci bus support 2003-09-25 14:11:18 +00:00
mycroft 3e08e45a55 Fix GCC 3 barfage. 2003-09-24 11:57:44 +00:00
scw 6b19830ebb Tweak register usage to shave a couple of instructions off
the Xscale code.
2003-09-23 10:01:36 +00:00
matt 6bf111a80e Fix GCC 3.3.1 nits. 2003-09-21 19:32:37 +00:00
matt b9d20d131e Fix GCC 3.3.1 nits 2003-09-21 15:12:16 +00:00
matt 2d54fd3a9c Change some type-punning detected by gcc 3.3.1 to (void *). 2003-09-21 00:26:09 +00:00
agc 81976735fd If we're going to reference SA variables in this file, might as well
include the header file to define them. From Steve Woodford.
2003-09-19 11:42:20 +00:00
cl 2c1366cfee add MD part of SA/pthread pagefault handling on arm 2003-09-18 22:37:38 +00:00
ichiro 22d06d95f5 fix typo
#if DEBUG -> #ifdef PCI_DEBUG
2003-09-15 05:11:31 +00:00
ichiro 4be788fe81 add address decode of "PCI Configuration type 1" 2003-09-15 05:07:29 +00:00
chris 27dc577349 Tidy up a couple of bits to avoid duplication within the switch. 2003-09-13 14:31:34 +00:00
martin 346b195550 Backout previous, now that <sys/syscall.h> is fixed it's SYS___sigreturn14
again (until we convert to siginfo).
2003-09-11 19:36:29 +00:00
scw 877b3cbe5e Hand-optimised in_cksum/in4_cksum for ARM and XSCALE.
Contributed by Wasabi Systems, with input from Chris Gilbert,
Richard Earnshaw and David Laight.
2003-09-11 18:54:31 +00:00
kleink d440784b30 __{BEGIN,END}_DECLS-wrap prototypes. 2003-09-11 09:40:11 +00:00
briggs ab0f909e6e s/SYS___sigreturn14/SYS_compat_16___sigreturn14/ 2003-09-11 03:57:29 +00:00
rearnsha b805fdb7fa Add build-system support for ARM10. 2003-09-06 09:48:47 +00:00
rearnsha 46af0c9f17 Make sure _ARM32_BUS_DMA_PRIVATE is defined before we pull in any
include files to avoid problems with the rats nest of dependencies.
2003-09-06 09:46:37 +00:00
rearnsha da86d47fb0 Support for initializing ARM10 processors in write-through mode. 2003-09-06 09:44:10 +00:00
rearnsha ec2b5e2dfd Support for ARM10E class devices. 2003-09-06 09:42:12 +00:00
rearnsha 1eba58255a Support for ARM10. Extract some additional information about the
dcache so that we can have cache cleaning code that works for any
permitted arm10 cache architecture.
2003-09-06 09:31:37 +00:00
rearnsha bb00ee6bce Add a function to read the processor cache configuation register. 2003-09-06 09:14:52 +00:00
rearnsha 637a44c215 Processor-specific operations for ARM10 class devices. 2003-09-06 09:12:29 +00:00
rearnsha d4e1e335e8 Add support for ARM10 class processors. 2003-09-06 09:10:46 +00:00
rearnsha a515ec698a Add processor-specific declarations for ARM10 class processors. 2003-09-06 09:08:35 +00:00
rearnsha 446ca3f32d Fix declarations of primary cache variables, so that they are
declarations, not definitions.
2003-09-06 09:04:52 +00:00
rearnsha cfcc3a8ad4 Add support for ARM10 class devices. 2003-09-06 08:55:42 +00:00
rearnsha e1f8618cbd Add arm1020E cpu id 2003-09-06 08:43:02 +00:00
mycroft e5168f409e Use generic versions of rr_1, wr_1, sr_1 -- some PCMCIA cards use these. 2003-09-03 03:15:02 +00:00
mycroft f13bd83ab3 Minor tweak for some macros elsewhere. 2003-09-03 03:12:28 +00:00
mycroft 1e2b27307d Add some register definitions. 2003-09-03 03:11:50 +00:00