freebsd-dev/sys/boot/i386/libi386
Andriy Gapon 1702e62f67 zfsboot/zfsloader: support accessing filesystems within a pool
In zfs loader zfs device name format now is "zfs:pool/fs",
fully qualified file path is "zfs:pool/fs:/path/to/file"
loader allows accessing files from various pools and filesystems as well
as changing currdev to a different pool/filesystem.

zfsboot accepts kernel/loader name in a format pool:fs:path/to/file or,
as before, pool:path/to/file; in the latter case a default filesystem
is used (pool root or bootfs).  zfsboot passes guids of the selected
pool and dataset to zfsloader to be used as its defaults.

zfs support should be architecture independent and is provided
in a separate library, but architectures wishing to use this zfs support
still have to provide some glue code and their devdesc should be
compatible with zfs_devdesc.
arch_zfs_probe method is used to discover all disk devices that may
be part of ZFS pool(s).

libi386 unconditionally includes zfs support, but some zfs-specific
functions are stubbed out as weak symbols.  The strong definitions
are provided in libzfsboot.
This change mean that the size of i386_devspec becomes larger
to match zfs_devspec.

Backward-compatibility shims are provided for recently added sparc64
zfs boot support.  Currently that architecture still works the old
way and does not support the new features.

TODO:
- clear up pool root filesystem vs pool bootfs filesystem distinction
- update sparc64 support
- set vfs.root.mountfrom based on currdev (for zfs)

Mid-future TODO:
- loader sub-menu for selecting alternative boot environment

Distant future TODO:
- support accessing snapshots, using a snapshot as readonly root

Reviewed by:	marius (sparc64),
		Gavin Mu <gavin.mu@gmail.com> (sparc64)
Tested by:	Florian Wagner <florian@wagner-flo.net> (x86),
		marius (sparc64)
No objections:	fs@, hackers@
MFC after:	1 month
2012-05-12 09:03:30 +00:00
..
amd64_tramp.S
biosacpi.c Fix clang warnings. 2011-06-18 13:56:33 +00:00
bioscd.c Revert some debugging printfs that crept into 223695. 2011-11-09 14:37:47 +00:00
biosdisk.c i386 boot: consolidate MAXBDDEV definition 2012-05-09 08:05:50 +00:00
biosmem.c Consolidate duplicate definitions of V86_CY() and V86_ZR() which check for 2011-10-25 19:45:12 +00:00
biospci.c Add special loader environment variables 'comconsole_port' and 2012-01-03 22:36:12 +00:00
biospnp.c Instead of packing the individual fields in the PnP structures, pack the 2009-06-08 15:09:22 +00:00
biossmap.c Consolidate duplicate definitions of V86_CY() and V86_ZR() which check for 2011-10-25 19:45:12 +00:00
bootinfo32.c
bootinfo64.c Allow VIA Nano processors to boot FreeBSD/amd64. 2009-01-12 16:28:19 +00:00
bootinfo.c
comconsole.c Add special loader environment variables 'comconsole_port' and 2012-01-03 22:36:12 +00:00
devicename.c zfsboot/zfsloader: support accessing filesystems within a pool 2012-05-12 09:03:30 +00:00
elf32_freebsd.c Be nice, don't use the f-word. 2009-11-25 16:36:07 +00:00
elf64_freebsd.c Be nice, don't use the f-word. 2009-11-25 16:36:07 +00:00
i386_copy.c
i386_module.c Remove unused includes. 2010-11-13 15:23:20 +00:00
libi386.h zfsboot/zfsloader: support accessing filesystems within a pool 2012-05-12 09:03:30 +00:00
Makefile zfsboot/zfsloader: support accessing filesystems within a pool 2012-05-12 09:03:30 +00:00
nullconsole.c
pread.c
pxe.c Wrap changes from svn r212126 inside LOADER_NFS_SUPPORT such that 2012-01-19 01:25:50 +00:00
pxe.h
pxetramp.s
smbios.c Rewrite SMBIOS for loader: 2009-04-07 17:58:15 +00:00
spinconsole.c Whitespace-only: another instance of identation with spaces. 2009-11-27 04:00:52 +00:00
time.c Make the RTC checking for QEMU even more aggressive. 2011-12-21 16:47:01 +00:00
vidconsole.c Fix a long standing bug. The caller expects a non-zero value for success. 2012-02-29 18:11:33 +00:00