Age | Commit message (Collapse) | Author |
|
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
|
|
|
|
might even work now (ie. if it works, it is because finding the label
location is now MI code shared for the read & write paths)
|
|
to support hotplug media on most architectures. disklabel setup and
verification done using new helper functions. Disklabels must *always*
have a correct checksum now. Same code paths are used to learn on-disk
location disklabels, to avoid new errors sneaking in. Tested on almost all
cases, testing help from todd, kettenis, krw, otto, dlg, robert, gwk, drahn
|
|
pulled in.
look at how doing it in one architecture gets that code copied to the
derivative architectures... amazing..
|
|
|
|
|
|
|
|
correct and unify; ok thib miod
|
|
routines (alpha, vax) prove to be not worth keeping. Move
bounds_check_with_label() into the MI world. Eliminate unreliable and
almost certainly useless checks for overwriting a disklabel.
After discussion with deraadt@
|
|
|
|
implimentations were simply either missing code, or spacing and such.
setdisklabel() can become MI now.
|
|
|
|
size which is the REAL DISK SIZE. always. if a driver fails to set
this right, please fix it. agreed with otto and krw
|
|
there.
'so go to it!' deraadt@
|
|
type of all variables to daddr64_t. this includes the APIs for XXsize()
and XXdump(), all range checks inside bio drivers, internal variables
for disklabel handling, and even uvm's swap offsets. re-read numerous
times by otto, miod, krw, thib to look for errors
|
|
accuracy so that the variious disksubr.c's can be compared easier.
setdisklabel() starts taking an int for openmask.
ok krw, and read by quite a few other people
|
|
to size. tested on almost all machines, double checked by miod and krw
next comes the type handling surrounding these values
|
|
convert version 0 to version 1 disklabels.
Suggested by deraadt@.
ok deraadt@ otto@
|
|
subsystems were enabled. others used a *md_diskconf -> diskconf() method to
make sure init_main could "do late setroot". Change all architectures to
have diskconf(), use it directly & late. tested by todd and myself on most
architectures, ok miod too
|
|
bounds_check_with_label() routines as identical as possible without
changing any code. Code nits and adjustments to come.
|
|
|
|
bounds_check_with_label. All callers check for <= 0, so no functional
change.
Feedback from miod@.
ok weingart@
|
|
(and part of setroot); ok miod
|
|
free room in struct partition by packing fragment size and
fragments/block more tighlty and use the resulting space to make
offset and size 48 bits. For the disk part we use spare fields in
struct disklabel. Kernel converts in-mem copy of the on-disk
label if needed, disklabel(8) writes new version.
We are careful to only change fields not used by bootloaders.
Conception of basic scheme by deraadt.
ok deraadt@ krw@
|
|
preparation for translating all disk labels visible to the kernel to
the soon to arrive V1 format.
ok otto@ deraadt@
|
|
|
|
ok pedro@
|
|
prompted by/ok dlg@ deraadt@
|
|
deraadt@ dlg@.
|
|
grudgingly ok deraadt@
|
|
device_register() function -- even if it does nothing. reduces the
cpp-based blather different between architectures
idea ok'd by miod; tested on all architectures (except a few miod will
need to cleanup because he has them)
|
|
|
|
as done for DAEs not occuring during interrupts.
Remove the check for unprocessed DAE on return from trap() in eh_common.S,
since this can't happen. As a result, the return-from-trap code becomes
identical on 88100 and 88110 systems.
|
|
|
|
machines. Instead -- build one solid clean MI version, and thenchange all
the architectures to use it. ok various people, tested on almost all cases.
(it is a 10094 line diff..)
|
|
|
|
|
|
rt and such; tested and ok miod drahn
|
|
for a bare FAT12/16/32 filesystem. If one is found, spoof it as 'i'.
This enables iPod shuffles and other umass devices that are shipped
with a bare FAT32 filesystem to be used as install media. And
generally makes things easier for the user just trying to mount some
media, e.g. floppies.
Does not make it safe to write a disklabel or MBR on such a device!
That will still obliterate the FAT filesystem.
Help and suggestions from tom@ and deraadt@. Feedback and suggestions
for future enhancements from espie@ mickey@ and peter@.
ok tom@ deraadt@
|
|
right now that are supposed to be atomic with respect to interrupts and
SMP: atomic_setbits_int and atomic_clearbits_int.
All architectures other than i386 and amd64 get dummy implementations
since at first we'll be replacing operations that are done with
"a |= bit" and "a &= ~bit" today. More proper implementations will follow
kettenis@, miod@ ok
|
|
of the disk. Fixes the creation of spurious 'i' partitions on new iPod
Shuffle. And other devices with no MBR, just a FAT32 filesystem.
Pointed out most recently by Stephan A. Rickauer for his sixth
generation, clip-on iPod shuffle.
Fix tested by Stephan.
ok pedro@ tom@ miod@ 'nice' deraadt@
|
|
in its exception-related contents and pcb-related contents.
|
|
|
|
iso_disklabelspoof() and udf_disklabelspoof(). Use (msg &&
iso_disklabelspoof()) instead. Makes more arch's textually consistant.
No functional change.
|
|
extended partition except on alpha, hppa, hppa64 and mips64. So don't
spoof extended partitions as 'a' and try to read a disklabel from
them. Make all archs consistant.
When we can boot from extended partitions we can change to reading and
writing disklabels from them.
This means the first OpenBSD ('A6') extended partition will now be
ignored during spoofing, just as subsequent ones have always been.
Feedback from tom@, weingart@ and deraadt@.
|
|
partitions with 0 in the length field we don't need to test for
and skip partitions that are all zeros. Eliminating that code
allows elimination of a local pointer.
"0 length partitions are definately dead" deraadt@
|
|
De-register. Move declaration to top of function for DOS MBR
processing. Indent nit in macppc.
No functional change.
|
|
than lp->d_partitions[8+n++]. All other cases already use the pointer.
No functional change.
|
|
"The dosparts member of cpu_disklabel was not used for any persistant
data. Eliminate it, and just use the data being read in while
processing MBR and EBR records.
Should be no functional change.
ok weingart@ deraadt@"
|