diff options
author | jhb <jhb@FreeBSD.org> | 2007-10-24 04:03:25 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2007-10-24 04:03:25 +0000 |
commit | 67997e41d53c8ad1c2b5042fbb90c1324c017ac4 (patch) | |
tree | fdf38b4daaca0d3bae26f2cebbfb7bbbf5eb115e /sys/i386/include/bootinfo.h | |
parent | 9bc0f4c6a443721979818bca4ed522cc2dcb24f3 (diff) | |
download | FreeBSD-src-67997e41d53c8ad1c2b5042fbb90c1324c017ac4.zip FreeBSD-src-67997e41d53c8ad1c2b5042fbb90c1324c017ac4.tar.gz |
Slightly cleanup the 'bootdev' concept on x86 by changing the various
macros to treat the 'slice' field as a real part of the bootdev instead
of as hack that spans two other fields (adaptor (sic) and controller)
that are not used in any modern FreeBSD boot code.
MFC after: 1 week
Diffstat (limited to 'sys/i386/include/bootinfo.h')
-rw-r--r-- | sys/i386/include/bootinfo.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/i386/include/bootinfo.h b/sys/i386/include/bootinfo.h index 475a09e..09b4e2c 100644 --- a/sys/i386/include/bootinfo.h +++ b/sys/i386/include/bootinfo.h @@ -78,17 +78,11 @@ extern struct bootinfo bootinfo; * for backward compatibility. Except for that of the "magic * number", each mask applies to the shifted value. * Format: - * (4) (4) (4) (4) (8) (8) + * (4) (8) (4) (8) (8) * -------------------------------- - * |MA | AD| CT| UN| PART | TYPE | + * |MA | SLICE | UN| PART | TYPE | * -------------------------------- */ -#define B_ADAPTORSHIFT 24 -#define B_ADAPTORMASK 0x0f -#define B_ADAPTOR(val) (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK) -#define B_CONTROLLERSHIFT 20 -#define B_CONTROLLERMASK 0xf -#define B_CONTROLLER(val) (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK) #define B_SLICESHIFT 20 #define B_SLICEMASK 0xff #define B_SLICE(val) (((val)>>B_SLICESHIFT) & B_SLICEMASK) @@ -105,10 +99,10 @@ extern struct bootinfo bootinfo; #define B_MAGICMASK 0xf0000000 #define B_DEVMAGIC 0xa0000000 -#define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \ - (((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \ - ((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \ - ((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC) +#define MAKEBOOTDEV(type, slice, unit, partition) \ + (((type) << B_TYPESHIFT) | ((slice) << B_SLICESHIFT) | \ + ((unit) << B_UNITSHIFT) | ((partition) << B_PARTITIONSHIFT) | \ + B_DEVMAGIC) #define BASE_SLICE 2 #define COMPATIBILITY_SLICE 0 |