History log of /freebsd-current/sys/dev/ofw/ofw_disk.c
Revision Date Author Comments
# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 718cf2cc 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 9f91930a 13-Jun-2009 Marius Strobl <marius@FreeBSD.org>

Missed style fixes.


# 481d6b54 13-Jun-2009 Marius Strobl <marius@FreeBSD.org>

Fix style.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 3745c395 20-Oct-2007 Julian Elischer <julian@FreeBSD.org>

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.


# a3624af7 30-Oct-2005 Peter Grehan <grehan@FreeBSD.org>

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.


# 098ca2bd 05-Jan-2005 Warner Losh <imp@FreeBSD.org>

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


# b8e106ea 27-Dec-2004 Peter Grehan <grehan@FreeBSD.org>

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...)


# d626a8a2 20-Dec-2004 Peter Grehan <grehan@FreeBSD.org>

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


# 39513fa6 16-Aug-2004 Marius Strobl <marius@FreeBSD.org>

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

Ok'ed by: tmm


# aa77148d 25-Jun-2004 Peter Grehan <grehan@FreeBSD.org>

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


# 0b7ed341 18-Feb-2004 Poul-Henning Kamp <phk@FreeBSD.org>

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.


# 1ac37de6 03-Feb-2004 Peter Grehan <grehan@FreeBSD.org>

- 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


# ad1c13f4 15-Dec-2003 Peter Grehan <grehan@FreeBSD.org>

- 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.


# 2abd35bc 12-Dec-2003 Peter Grehan <grehan@FreeBSD.org>

- 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


# 24730dd7 18-Oct-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Use bio_offset instead of bio_blkno


# aad970f1 24-Aug-2003 David E. O'Brien <obrien@FreeBSD.org>

Use __FBSDID().
Also some minor style cleanups.


# 91b928c9 03-Apr-2003 Dag-Erling Smørgrav <des@FreeBSD.org>

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


# 60794e04 08-Mar-2003 Poul-Henning Kamp <phk@FreeBSD.org>

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.


# e165e4d2 23-Feb-2003 Poul-Henning Kamp <phk@FreeBSD.org>

NO_GEOM cleanup:

Move to "struct disk *" centered API.

Fix some minor nits.


# 601385b7 20-Sep-2002 Peter Grehan <grehan@FreeBSD.org>

Add missing semicolon


# 7812d86f 20-Sep-2002 Poul-Henning Kamp <phk@FreeBSD.org>

(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.


# d9611800 15-Apr-2002 Benno Rice <benno@FreeBSD.org>

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.