History log of /freebsd-10.1-release/sys/dev/ofw/ofw_disk.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 194139 13-Jun-2009 marius

Missed style fixes.


# 194138 13-Jun-2009 marius

Fix style.


# 172836 20-Oct-2007 julian

Rename the kthread_xxx (e.g. kthread_create()) calls
to kproc_xxx as they actually make whole processes.
Thos makes way for us to add REAL kthread_create() and friends
that actually make theads. it turns out that most of these
calls actually end up being moved back to the thread version
when it's added. but we need to make this cosmetic change first.

I'd LOVE to do this rename in 7.0 so that we can eventually MFC the
new kthread_xxx() calls.


# 151894 31-Oct-2005 grehan

The mediasize shouldn't be multipled by the sector size when it was
in bytes to start off with. This caused the GPT geom sniffer to attempt
a seek just back from the end of the 'disk', which resulted in a > 4G
seek, causing gdb psim to exit since it only supports 32-bit seeks.

The size of the disk should really be specified in the psim device tree,
but for now do the minimal amount of work to get psim to run again.


# 139749 05-Jan-2005 imp

Start each of the license/copyright comments with /*-, minor shuffle of lines


# 139372 28-Dec-2004 grehan

Don't probe for a disk unless explicitly enabled by a tunable.
This allows boot to proceed on a real system until the issue
of calling back into certain OpenFirmware calls (e.g. finddevice)
in thread context is understood.

(this commit only affects psim users, of which I think I am the
only one...)


# 139100 21-Dec-2004 grehan

GEOMify the OFW disk driver. Code taken unashamedly from
the preload case in dev/md/md.c.


# 133862 16-Aug-2004 marius

Instead of "OpenFirmware", "openfirmware", etc. use the official spelling
"Open Firmware" from IEEE 1275 and OpenFirmware.org (no pun intended).

Ok'ed by: tmm


# 131103 25-Jun-2004 grehan

- set resid correctly so that a failed seek (e.g. end of file) returns
correctly
- included required <sys/module.h>


# 125975 18-Feb-2004 phk

Change the disk(9) API in order to make device removal more robust.

Previously the "struct disk" were owned by the device driver and this
gave us problems when the device disappared and the users of that device
were not immediately disappearing.

Now the struct disk is allocate with a new call, disk_alloc() and owned
by geom_disk and just abandonned by the device driver when disk_create()
is called.

Unfortunately, this results in a ton of "s/\./->/" changes to device
drivers.

Since I'm doing the sweep anyway, a couple of other API improvements
have been carried out at the same time:

The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to
DISKFLAG_NEEDSGIANT

A version number have been added to disk_create() so that we can detect,
report and ignore binary drivers with old ABI in the future.

Manual page update to follow shortly.


# 125435 04-Feb-2004 grehan

- add an identify method, since the disk device used to be picked
up in the recursive OpenFirmware node walk. Rely on the psim config
file to have a "ofwdisk" device alias
- minor white space nits


# 123543 15-Dec-2003 grehan

- The last change conflicted with disks on a live system, as opposed to
the psim simulator. Look for the "file" property which only exists
on psim disks, and as a bonus, print the contents of this at boot-time,
which is the host file being used for the disk image.
- remove remaining warnings.


# 123490 12-Dec-2003 grehan

- accept device_type of "block", which is how psim/gdb6.0 defines
disks. continue to accept "disk" for psim/gdb5.x users.
- remove unneeded ofwd_identify


# 121209 18-Oct-2003 phk

Use bio_offset instead of bio_blkno


# 119418 24-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


# 113020 03-Apr-2003 des

<sys/disk.h> -> <geom/geom_disk.h>


# 111979 08-Mar-2003 phk

Centralize the devstat handling for all GEOM disk device drivers
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.


# 111340 23-Feb-2003 phk

NO_GEOM cleanup:

Move to "struct disk *" centered API.

Fix some minor nits.


# 103723 20-Sep-2002 grehan

Add missing semicolon


# 103714 20-Sep-2002 phk

(This commit touches about 15 disk device drivers in a very consistent
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.


# 94749 15-Apr-2002 benno

Basic OpenFirmware disk driver. It will attach to anything in OpenFirmware
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.