freebsd-dev/sys/boot/common
John Baldwin f352a0d45f First cut at support for booting a GPT labeled disk via the BIOS bootstrap
on i386 and amd64 machines.  The overall process is that /boot/pmbr lives
in the PMBR (similar to /boot/mbr for MBR disks) and is responsible for
locating and loading /boot/gptboot.  /boot/gptboot is similar to /boot/boot
except that it groks GPT rather than MBR + bsdlabel.  Unlike /boot/boot,
/boot/gptboot lives in its own dedicated GPT partition with a new
"FreeBSD boot" type.  This partition does not have a fixed size in that
/boot/pmbr will load the entire partition into the lower 640k.  However,
it is limited in that it can only be 545k.  That's still a lot better than
the current 7.5k limit for boot2 on MBR.  gptboot mostly acts just like
boot2 in that it reads /boot.config and loads up /boot/loader.  Some more
details:
- Include uuid_equal() and uuid_is_nil() in libstand.
- Add a new 'boot' command to gpt(8) which makes a GPT disk bootable using
  /boot/pmbr and /boot/gptboot.  Note that the disk must have some free
  space for the boot partition.
  - This required exposing the backend of the 'add' function as a
    gpt_add_part() function to the rest of gpt(8).  'boot' uses this to
    create a boot partition if needed.
- Don't cripple cgbase() in the UFS boot code for /boot/gptboot so that
  it can handle a filesystem > 1.5 TB.
- /boot/gptboot has a simple loader (gptldr) that doesn't do any I/O
  unlike boot1 since /boot/pmbr loads all of gptboot up front.  The
  C portion of gptboot (gptboot.c) has been repocopied from boot2.c.
  The primary changes are to parse the GPT to find a root filesystem
  and to use 64-bit disk addresses.  Currently gptboot assumes that the
  first UFS partition on the disk is the / filesystem, but this algorithm
  will likely be improved in the future.
- Teach the biosdisk driver in /boot/loader to understand GPT tables.
  GPT partitions are identified as 'disk0pX:' (e.g. disk0p2:) which is
  similar to the /dev names the kernel uses (e.g. /dev/ad0p2).
- Add a new "freebsd-boot" alias to g_part() for the new boot UUID.

MFC after:	1 month
Discussed with:	marcel (some things might still change, but am committing
			what I have so far)
2007-10-24 21:33:00 +00:00
..
bcache.c
boot.c Extend `autoboot_delay' handling - is this variable is set to -1 don't allow 2005-05-19 23:03:02 +00:00
bootstrap.h add an interface for passing the entire kernel size up front to the 2006-12-18 07:35:14 +00:00
commands.c
console.c Fix a comparison that broke ``set console=vidconsole'' and even the 2005-07-29 12:47:42 +00:00
dev_net.c
dev_net.h
devopen.c o Make sure to clear f->f_devdata if d_dev->dv_open() fails. It 2006-11-02 00:02:22 +00:00
help.common Replace a rarely used "depuration" with "debugging". 2006-10-13 20:48:17 +00:00
interp_backslash.c
interp_forth.c
interp_parse.c
interp.c
isapnp.c
isapnp.h
load_elf32_obj.c
load_elf32.c
load_elf64_obj.c
load_elf64.c
load_elf_obj.c Make our ELF64 type definitions match standards. In particular this 2005-12-18 04:52:37 +00:00
load_elf.c Unbreak compile with ELF_VERBOSE defined, and fix format warnings. 2006-11-02 17:52:43 +00:00
load.c
loader.8 Add documentation for the vm.kmem_size_min and vm.kmem_size_max tunables. 2007-05-09 02:37:58 +00:00
ls.c
Makefile.inc Don't unconditionally compile-in the bcache code. It's only used on 2006-11-02 00:26:45 +00:00
merge_help.awk Ignore a sub-topic match if it is inside the command description. 2006-09-28 19:06:20 +00:00
misc.c
module.c Also boot *.debug if everything else fails. 2007-10-04 18:29:52 +00:00
newvers.sh
panic.c Fix WARNS=2 warnings. 2006-09-29 20:57:38 +00:00
pnp.c Garbage collect the code for auto-loading modules based on ISAPNP IDs, 2007-01-07 22:25:45 +00:00
reloc_elf32.c
reloc_elf64.c
reloc_elf.c Make our ELF64 type definitions match standards. In particular this 2005-12-18 04:52:37 +00:00
ufsread.c First cut at support for booting a GPT labeled disk via the BIOS bootstrap 2007-10-24 21:33:00 +00:00