<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/boot/common, branch release/8.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F8.2.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F8.2.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2010-11-29T08:12:21Z</updated>
<entry>
<title>MFC r215758,215811:</title>
<updated>2010-11-29T08:12:21Z</updated>
<author>
<name>Attilio Rao</name>
<email>attilio@FreeBSD.org</email>
</author>
<published>2010-11-29T08:12:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=cf011b5d11e82aed1794a83c7c9dc86b09f19d74'/>
<id>urn:sha1:cf011b5d11e82aed1794a83c7c9dc86b09f19d74</id>
<content type='text'>
Make this printf output more verbose.

Sponsored by:	Sandvine Incorporated
</content>
</entry>
<entry>
<title>Revert r215755 as it was supposed to happen on -CURRENT and not STABLE_8.</title>
<updated>2010-11-23T18:47:43Z</updated>
<author>
<name>Attilio Rao</name>
<email>attilio@FreeBSD.org</email>
</author>
<published>2010-11-23T18:47:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=b3b3789197cd087e079c70bf8157ee9ce3ba2090'/>
<id>urn:sha1:b3b3789197cd087e079c70bf8157ee9ce3ba2090</id>
<content type='text'>
Pointy hat to:	me
</content>
</entry>
<entry>
<title>Make this printf output more verbose.</title>
<updated>2010-11-23T18:45:12Z</updated>
<author>
<name>Attilio Rao</name>
<email>attilio@FreeBSD.org</email>
</author>
<published>2010-11-23T18:45:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=6ed49a1fac59e2b48d98adb1cf3d81aefb2527f0'/>
<id>urn:sha1:6ed49a1fac59e2b48d98adb1cf3d81aefb2527f0</id>
<content type='text'>
Sponsored by:	Sandvine Incorporated
Submitted by:	Sandvine Incorporated
MFC after:	3 days
</content>
</entry>
<entry>
<title>MFC r213133,r213135,r213136,r213137,r213245:</title>
<updated>2010-10-17T20:10:00Z</updated>
<author>
<name>Pawel Jakub Dawidek</name>
<email>pjd@FreeBSD.org</email>
</author>
<published>2010-10-17T20:10:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=6e706df7d6d29afe19bf425b00f794daded00a71'/>
<id>urn:sha1:6e706df7d6d29afe19bf425b00f794daded00a71</id>
<content type='text'>
r213133:

Add three GPT attributes:

GPT_ENT_ATTR_BOOTME - this is bootable partition

GPT_ENT_ATTR_BOOTONCE - try to boot only once from this partition

GPT_ENT_ATTR_BOOTFAILED - set this flag if we cannot boot from partition
	containing GPT_ENT_ATTR_BOOTONCE flag; note that if we cannot
	boot from partition that contains only GPT_ENT_ATTR_BOOTME flag,
	the GPT_ENT_ATTR_BOOTFAILED flag won't be set

According to wikipedia Microsoft TechNet says that attributes are divided into
two halves: the lower 4 bytes representing partition independent attributes,
and the upper 4 bytes are partition type dependent. Microsoft is already using
bits 60 (read-only), 62 (hidden) and 63 (do not automount) and I'd like to not
collide with those, so we are using bit 59 (bootme), 58 (bootonce) and 57
(bootfailed).

Reviewed by:	arch (Message-ID: &lt;20100917234542.GE1902@garage.freebsd.pl&gt;)

r213135:

Allow to configure GPT attributes. It shouldn't be allowed to set bootfailed
attribute (it should be allowed only to unset it), but for test purposes it
might be useful, so the current code allows it.

Reviewed by:	arch@ (Message-ID: &lt;20100917234542.GE1902@garage.freebsd.pl&gt;)

r213136:

- Split code shared by almost any boot loader into separate files and
  clean up most layering violations:

	sys/boot/i386/common/rbx.h:

		RBX_* defines
		OPT_SET()
		OPT_CHECK()

	sys/boot/common/util.[ch]:

		memcpy()
		memset()
		memcmp()
		bcpy()
		bzero()
		bcmp()
		strcmp()
		strncmp() [new]
		strcpy()
		strcat()
		strchr()
		strlen()
		printf()

	sys/boot/i386/common/cons.[ch]:

		ioctrl
		putc()
		xputc()
		putchar()
		getc()
		xgetc()
		keyhit() [now takes number of seconds as an argument]
		getstr()

	sys/boot/i386/common/drv.[ch]:

		struct dsk
		drvread()
		drvwrite() [new]
		drvsize() [new]

	sys/boot/common/crc32.[ch] [new]

	sys/boot/common/gpt.[ch] [new]

- Teach gptboot and gptzfsboot about new files. I haven't touched the
  rest, but there is still a lot of code duplication to be removed.

- Implement full GPT support. Currently we just read primary header and
  partition table and don't care about checksums, etc. After this change we
  verify checksums of primary header and primary partition table and if
  there is a problem we fall back to backup header and backup partition
  table.

- Clean up most messages to use prefix of boot program, so in case of an
  error we know where the error comes from, eg.:

	gptboot: unable to read primary GPT header

- If we can't boot, print boot prompt only once and not every five
  seconds.

- Honour newly added GPT attributes:

	bootme - this is bootable partition
	bootonce - try to boot from this partition only once
	bootfailed - we failed to boot from this partition

- Change boot order of gptboot to the following:

	1. Try to boot from all the partitions that have both 'bootme'
	   and 'bootonce' attributes one by one.
	2. Try to boot from all the partitions that have only 'bootme'
	   attribute one by one.
	3. If there are no partitions with 'bootme' attribute, boot from
	   the first UFS partition.

- The 'bootonce' functionality is implemented in the following way:

	1. Walk through all the partitions and when 'bootonce'
	   attribute is found without 'bootme' attribute, remove
	   'bootonce' attribute and set 'bootfailed' attribute.
	   'bootonce' attribute alone means that we tried to boot from
	   this partition, but boot failed after leaving gptboot and
	   machine was restarted.
	2. Find partition with both 'bootme' and 'bootonce' attributes.
	3. Remove 'bootme' attribute.
	4. Try to execute /boot/loader or /boot/kernel/kernel from that
	   partition. If succeeded we stop here.
	5. If execution failed, remove 'bootonce' and set 'bootfailed'.
	6. Go to 2.

   If whole boot succeeded there is new /etc/rc.d/gptboot script coming
   that will log all partitions that we failed to boot from (the ones with
   'bootfailed' attribute) and will remove this attribute. It will also
   find partition with 'bootonce' attribute - this is the partition we
   booted from successfully. The script will log success and remove the
   attribute.

   All the GPT updates we do here goes to both primary and backup GPT if
   they are valid. We don't touch headers or partition tables when
   checksum doesn't match.

Reviewed by:	arch (Message-ID: &lt;20100917234542.GE1902@garage.freebsd.pl&gt;)
Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r213137:

Add gptboot script that is responsible for:
- looking for partition with 'bootonce' attribute alone (without 'bootme'
  attribute), removing it and logging that we successfully booted from this
  partition.
- looking for partitions with 'bootfailed' attribute, removing it and
  logging that we failed to boot from this partition.

Reviewed by:	arch (Message-ID: &lt;20100917234542.GE1902@garage.freebsd.pl&gt;)
Obtained from:	Wheel Systems Sp. z o.o. http://www.wheelsystems.com

r213245:

Document recently added GPT attributes (bootme, bootonce, bootfailed) and
list other schemes attributes.

Reviewed by:	simon, rpaulo
</content>
</entry>
<entry>
<title>MFC r210423: completely ignore zero-sized elf sections in modules of elf</title>
<updated>2010-08-21T18:48:24Z</updated>
<author>
<name>Andriy Gapon</name>
<email>avg@FreeBSD.org</email>
</author>
<published>2010-08-21T18:48:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=c68ec71bed6ad8539ec8e681ad410a618571aec8'/>
<id>urn:sha1:c68ec71bed6ad8539ec8e681ad410a618571aec8</id>
<content type='text'>
object type (amd64)
</content>
</entry>
<entry>
<title>MFC rev 201941:</title>
<updated>2010-01-16T04:34:03Z</updated>
<author>
<name>Marcel Moolenaar</name>
<email>marcel@FreeBSD.org</email>
</author>
<published>2010-01-16T04:34:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=fdc6e8a3013c9ec0510219ae7ecab8ee32456996'/>
<id>urn:sha1:fdc6e8a3013c9ec0510219ae7ecab8ee32456996</id>
<content type='text'>
Remove file system support based on the simple file system protocol.

MFC rev 201966:
Remove debugging printf().
</content>
</entry>
<entry>
<title>MFC: r201932</title>
<updated>2010-01-15T19:06:33Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2010-01-15T19:06:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=455564ab5cbeb45bf04d8b6f1852de1c956bba9e'/>
<id>urn:sha1:455564ab5cbeb45bf04d8b6f1852de1c956bba9e</id>
<content type='text'>
- Add code allowing a network device to only be open and closed once
  by keeping it opened after the first open and closing it via the
  cleanup handler when NETIF_OPEN_CLOSE_ONCE is defined in order to
  avoid the open-close-dance on every file access which with firmware
  that for example performs an auto-negotiation on every open causes
  netbooting to take horribly long. Basically the behavior with this
  knob enabled resembles the one employed between r60506 and r177108
  (and for sparc64 also again since r182919) with the addition that
  the network device now is closed eventually before entering the
  kernel and before rebooting. Actually I think this should be the
  desired MI behavior, however the U-Boot loader actually requires
  net_close() to be called after every transaction in order for some
  local shutdown operations to be performed (and which I think thus
  will break on concurrent opens, i.e. when netdev_opens is &gt; 1, like
  the loader does at least for disks when LOADER_GZIP_SUPPORT is
  enabled).
- Use NETIF_OPEN_CLOSE_ONCE to replace the hack, which artificially
  increased netdev_opens for sparc64 in order to keep the network
  device opened forever, as at least some firmware versions require
  the network device to be closed eventually before entering the
  kernel or otherwise will DMA received packets to stale memory.
  The powerpc OFW loader probably wants NETIF_OPEN_CLOSE_ONCE to be
  set as well for the same reasons.
</content>
</entry>
<entry>
<title>MFC: r201901</title>
<updated>2010-01-15T16:57:49Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2010-01-15T16:57:49Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=1a6cae7f37c634fdcd4264ec03b4fdac05b11bf5'/>
<id>urn:sha1:1a6cae7f37c634fdcd4264ec03b4fdac05b11bf5</id>
<content type='text'>
Remove clause 3 and 4 from TNF licenses (this was the only 4-clause TNF
license FreeBSD had in sys/boot).

Obtained from:	NetBSD
</content>
</entry>
<entry>
<title>MFC: r200945</title>
<updated>2010-01-15T15:27:17Z</updated>
<author>
<name>Marius Strobl</name>
<email>marius@FreeBSD.org</email>
</author>
<published>2010-01-15T15:27:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=e6af3b7bb837cf418226de51649d5158ec656131'/>
<id>urn:sha1:e6af3b7bb837cf418226de51649d5158ec656131</id>
<content type='text'>
- Consistently wrap debugging in NETIF_DEBUG. This basically merges
  NetBSD rev 1.19.
- Make the functions match their prototypes regarding static.
</content>
</entry>
<entry>
<title>MFC: revision 201339 and 201340</title>
<updated>2010-01-15T11:26:20Z</updated>
<author>
<name>Yoshihiro Takahashi</name>
<email>nyan@FreeBSD.org</email>
</author>
<published>2010-01-15T11:26:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=cf8398526359cf892db26ecb2bf7074aa2222b27'/>
<id>urn:sha1:cf8398526359cf892db26ecb2bf7074aa2222b27</id>
<content type='text'>
  - Add setting machine type support to the loader.
  - Don't use 15M-16M area on pc98.  It's reserved for some devices.
</content>
</entry>
</feed>
