summaryrefslogtreecommitdiffstats
path: root/sys/dev/ofw
Commit message (Collapse)AuthorAgeFilesLines
* Add a solaris compatible ofw interface for third party software thatjake2003-06-192-0/+264
| | | | | | | expects one to use. Only the functions used by XFree86 are actually implemented. Glanced at by: tmm
* - Add an OFIOCGETPROPLEN ioctl() to get the length of a property.tmm2003-06-112-13/+12
| | | | | - Do not use a fixed major. - Minor cleanups.
* Implement OF_interpret.jake2003-06-072-2/+34
| | | | Obtained from: netbsd
* Use __FBSDID rather than rcsid[].obrien2003-04-031-4/+2
|
* <sys/disk.h> -> <geom/geom_disk.h>des2003-04-031-1/+1
|
* Centralize the devstat handling for all GEOM disk device driversphk2003-03-081-1/+1
| | | | | | | | in geom_disk.c. As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again.
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-032-27/+13
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* NO_GEOM cleanup:phk2003-02-231-91/+27
| | | | | | Move to "struct disk *" centered API. Fix some minor nits.
* Change the console interface to pass a "struct consdev *" instead of aphk2003-02-201-5/+5
| | | | | | | | | dev_t to the method functions. The dev_t can still be found at struct consdev *->cn_dev. Add a void *cn_arg element to struct consdev which the drivers can use for retrieving their softc.
* Back out M_* changes, per decision of the TRB.imp2003-02-192-4/+4
| | | | Approved by: trb
* Implement the ALT_BREAK_TO_DEBUGGER option for the ofw console. This is veryharti2003-02-071-0/+18
| | | | | | | | | | handy if the machine is on another floor. A minor issue with this is that these functions are also used by the debugger, so its possible to break into the debugger from the debugger. PR: sparc64/47143 Reviewed by: benno Approved by: jake (mentor)
* Change ofwcons to use the output-device property from the firmware for thejake2003-01-271-2/+3
| | | | | | | | | | name of the device that it creates. Update /etc/ttys accordingly. An alias is created for the old name so that old /etc/ttys will continue to work, but due to aliases being implemented as symlinks in devfs you cannot login as root when using the alias device. Discussed with: grehan
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-212-4/+4
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Create the ofwcons device at SI_SUB_CONFIGURE instead of SI_SUB_DRIVERS,jake2002-11-181-6/+15
| | | | | | after configure() has run. Only create the device if ofwcons is the highest priority console. Make a dev alias with the same name as the firmware output-device property.
* Add a pseudo device which allows to access the OpenFirmware device treetmm2002-10-182-0/+389
| | | | | via ioctl()s. This was ported from NetBSD and adapted a bit to better match our OpenFirmware support code.
* Add an #ifdef _KERNEL to make it possible to include this file fromtmm2002-10-181-5/+7
| | | | userland (to get the typedefs).
* Add missing semicolongrehan2002-09-201-1/+1
|
* (This commit touches about 15 disk device drivers in a very consistentphk2002-09-201-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and predictable way, and I apologize if I have gotten it wrong anywhere, getting prior review on a patch like this is not feasible, considering the number of people involved and hardware availability etc.) If struct disklabel is the messenger: kill the messenger. Inside struct disk we had a struct disklabel which disk drivers used to communicate certain metrics to the disklayer above (GEOM or the disk mini-layer). This commit changes this communication to use four explicit fields instead. Amongst the benefits is that the fields do not get overwritten by wrong or bogus on-disk disklabels. Once that is clear, <sys/disk.h> which is included in the drivers no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in, the few places that needs them, have gotten explicit #includes for them. The disklabel inside struct disk is now only for internal use in the disk mini-layer, so instead of embedding it, we malloc it as we need it. This concludes (modulus any mistakes) the series of disklabel related commits. I belive it all amounts to a NOP for all the rest of you :-) Sponsored by: DARPA & NAI Labs.
* Basic OpenFirmware disk driver. It will attach to anything in OpenFirmwarebenno2002-04-151-0/+261
| | | | | | | that declares itself to be a disk, which may be the wrong thing to do in the long term but it works well enough to attach to emulated disks in the PowerPC simulator in gdb now that they have the proper device_type property.
* Change the suser() API to take advantage of td_ucred as well as do ajhb2002-04-011-1/+1
| | | | | | | | | | | | general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag. Discussed on: smp@
* Move the make_dev call from the cn_probe to a sysinit that runs atjake2002-01-091-1/+9
| | | | SI_SUB_DRIVERS. cnprobe is too early.
* 1. Lower the poll timeout for the ofw console driver from hz / 50 to hz / 4.jake2002-01-011-2/+2
| | | | | | | | | | This gives a bit of a sluggish console, but it prevents the console from getting stuck if we poll too fast, as well as other badness on certain machines. 2. Fix a test for != 0 that should have been > 0. Noticed by: Jamey Wood <Jamey.Wood@Sun.COM> and myself Submitted by: tmm (2)
* 1. Add ofw_pci.h with definitions for the OpenFirmware PCI bindingstmm2001-11-183-0/+143
| | | | | | | | 2. Add OF_getprop_alloc(), a helper function that will malloc() a sufficient amount of memory and then retrieve a property value into it. Approved by: benno Obtained from: NetBSD (1)
* KSE Milestone 2julian2001-09-121-5/+5
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Make the openfirmware functions work on 64 bit architectures by usingjake2001-07-312-237/+241
| | | | | | | a standard cell_t type for the fields of all argument structs. Also make ihandle_t and phandle_t unsigned to avoid sign extension problems. Approved by: benno
* Quiet uninitialized variable warning (also a bug).jake2001-07-311-0/+2
|
* Bracket this file in the usual #ifndef/#define/#endif stuff to preventbenno2001-06-271-0/+5
| | | | multiple inclusion.
* Garbage collect some debug code.benno2001-06-271-11/+0
|
* OpenFirmware kernel support, as used by the PowerPC and hopefully otherbenno2001-06-163-7/+357
| | | | | | | | | ports later on. This includes the basic MI interface routines as well as a console driver. The MD code is kept in the MD directories. Reviewed by: obrien
* OpenFirmware/PowerPC loader, part 2.benno2000-11-102-9/+23
| | | | | | | | | | As of this patchset, the loader builds (under NetBSD/macppc), boots, interacts and talks to BOOTP/NFS servers. (main.c was moved from boot/ofw/libofw to boot/ofw/common but has no revision history) Reviewed by: obrien
* "Ok, my loader's now up to putting up a prompt. It probes disks partiallyobrien2000-10-162-0/+852
but can't boot from them yet." Thanks to Stephane Potvin for the some of the code in this set. Submitted by: Benno Rice <benno@jeamland.net>
OpenPOWER on IntegriCloud