Commit Graph

545 Commits

Author SHA1 Message Date
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
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
tsutsui ddc207b63e Add options COMPAT_16. 2003-09-27 10:07:57 +00:00
simonb a35e8c4a16 Cast through (void *) to appease gcc3.
XXX1 - why does this "type-punned pointer" warning only affect little-
       endian MIPS and not big-endian MIPS?!
XXX2 - too much duplicated code.
2003-09-26 16:00:28 +00:00
chs c023b4180f add "makeoptions MACHINE_ARCH=..." in std.* for mips ports
where it is constant (to ease cross-building).
2003-08-30 22:44:38 +00:00
itojun 4440262659 create /dev/crypto 2003-08-22 05:06:22 +00:00
tsutsui 143adabe3d If BUS_DMA_ALLOCNOW is specified with nsegments > 1
in jazz_bus_dmamap_create() disable BUS_DMA_ALLOCNOW for now
rather than return ENOMEM.  Required by some PCI devices (like pciide(4)).
XXX needs re-think how BUS_DMA_ALLOCNOW should be handled.
XXX (we should use another flag for the jazz internal DMAC?)
2003-08-14 09:35:26 +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
bouyer 7c840df334 Add esiop at pci to GENERIC which already have siop at pci.
esiop has been tested enouth now.
esiop not added to INSTALL kernels because of possible space constraint.
siop should be able to drive all adapters supported by esiop.
2003-08-06 12:32:03 +00:00
itojun 3f14c71f75 reserve cdev major # for PF. ok'ed by technical-exec 2003-07-27 14:17:57 +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 a418360342 __KERNEL_RCSID() 2003-07-15 00:04:39 +00:00
lukem 001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +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 cc8f388df1 Make sure to call c_nec_eisa_cons_init() also on RISCserver 2200
so that its Cirrus VGA console is properly initialized.
Fixes problem reported by Bob Meader.
2003-06-19 16:00:19 +00:00
drochner 1a03e79900 don't #include <sys/dkstat.h> where it is (appearently) unused 2003-06-18 08:58:34 +00:00
fvdl 7dd7f8baa2 Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
2003-06-15 23:08:53 +00:00
tsutsui a3631eeb28 Add isapnp0 at isa and enable working isa/isapnp devices. 2003-06-15 06:10:42 +00:00
tsutsui 964d2f945e Remove nonexistent we* at isapnp. 2003-06-15 06:08:12 +00:00
tsutsui 55dd06d718 Don't enable both pc0 and vga0 at isa. 2003-06-15 06:05:31 +00:00
tsutsui 7826bdce78 Initialize and use extent maps for ISA bus space allocation.
Now isapnp on Tyne works properly.
2003-06-15 05:58:45 +00:00
tsutsui 109624a869 Fix a bug in isabr_dti_intr_status(), as per "re-look this" comment.
Now Tyne boots into single user (though it's still unstable). Woohoo!
2003-06-14 21:10:20 +00:00
tsutsui ddeb889ae9 Add a file definition for isapnp. 2003-06-14 19:14:52 +00:00
tsutsui 5c69b73566 Set intrtype[] properly.
XXX ISA interrupts on Tyne does not work yet.
2003-06-14 19:13:42 +00:00
tsutsui afa910a4ed Add isa_intr_alloc() for isapnp support. 2003-06-14 19:11:40 +00:00
thorpej 0eff671820 Also pass a type argument to comcnattach() and com_kgdb_attach().
comspeed() (and thus cominit()) may need this information.
2003-06-14 17:01:06 +00:00
tsutsui fdcf304c05 Set LINKFORMAT=-N.
ARCBIOS on Tyne can recognize only ECOFF with OMAGIC header.

XXX The real fix is implementing native bootloader.
2003-06-14 09:55:10 +00:00
tsutsui d096df8f90 Fix CPU clock for Tyne. It has 133MHz R4600. 2003-06-14 08:11:56 +00:00
tsutsui 27ad3392b9 Change DESKstation -> DeskStation, as per spelling on the Tyne board. 2003-06-14 08:09:47 +00:00
tsutsui 3baa558986 Rewrite arc/isa/isapnp_machdep.c (based on i386).
It seems no one tried the previous code.
2003-06-14 07:58:16 +00:00
tsutsui e1c1a8283d Add missed "\n" in attach message. 2003-06-14 02:57:03 +00:00
tsutsui f215f507a2 Don't enable both pc0 and vga0 at isa. 2003-06-14 02:40:42 +00:00
simonb 789329a94f Remove definitions and usage of MIPS_COP_0_STATUS_REG and
MIPS_COP_0_CAUSE_REG - use MIPS_COP_0_STATUS and MIPS_COP_0_CAUSE
instead.
2003-06-09 12:20:37 +00:00
tsutsui 173d4eacee - Remove softintr(9) stuff.
- Fix a typo.
2003-05-25 15:46:15 +00:00
tsutsui 51260decbe Add generic software interrupt support with mips/softintr.c. 2003-05-25 14:00:11 +00:00
tsutsui eab3a69dca Uppercase PICA.
"PICA" stands for "Performance-enhanced I/O and CPU Architecture."
2003-05-22 17:16:19 +00:00
tsutsui 8b9155e085 Remove MI ncr53c9x SCSI from TODO list. 2003-05-22 17:10:27 +00:00
tsutsui 30f71213c8 Remove unused file since asc.c switched to MI ncr53c9x. 2003-05-18 04:28:33 +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 2a90e2a9c9 Remove redundant bounds_check_with_label() prototype. 2003-05-10 16:12:02 +00:00
fvdl d88cf589cb A few ISA sound drivers like to share dma channels, and hence deferred
isa_dmamap_create() calls to their open/close entrypoints. This worked
with some luck, but broke on i386 when _bus_dmamap_create started
to allocate bounce buffers upfront, since memory below 16M may well
not be available when the sound devices is opened for the Nth time.

To fix this, create a new simple interface, isa_drq_alloc/isa_drq_free,
wrappers around already existing bitmask macros. These are expected
to be used before an isa_dmamap_create call, and after an
isa_dmamap_destroy call, respectively. For the sb and ad1848 drivers,
they're deferred until open/close.

All isa_dmamap_create calls can now use BUS_DMA_ALLOCNOW and be done
at attach time.
2003-05-09 23:51:25 +00:00
fvdl 6bd0c9f44d Move definition of ISA_DMA_BOUNCE_THRESHOLD to dev/isa/isareg.h. 2003-05-05 12:55:41 +00:00
tsutsui 2fb7363e5d Check arc_displayc_id before calling vga_isa_cnattach(). 2003-05-04 10:37:48 +00:00
tsutsui ff776a0f93 Remove (deprecated) DMA functions in jazz/dma.c which are no longer used.
jazz/dma.h now only contains DMAC register definitions.
2003-05-04 10:07:50 +00:00
tsutsui 0bcf529e7f Rewrite jazzio asc SCSI driver to use MI ncr53c9x and bus_dma(9) with
BUS_DMA_ALLOCNOW flag for jazzio bus DMAC.

Tested on Soda's NEC Image RISCstation (which is an OEM of Acer PICA),
and should fix port-arc/13388.
2003-05-04 10:01:19 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +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
tsutsui 4661d01ee2 options MIPS3_L2CACHE_PRESENT was gone long ago. 2003-04-28 05:03:44 +00:00
tsutsui a29ca71393 KNF and cosmetics. 2003-04-27 17:13:01 +00:00