Centralize determination of boot firmware (UEFI vs. BIOS/CSM) into a
function x86_bootmethod() and fix deviations from style(9).
Use the FIFOs in the imx5/imx6 uart hardware instead of interrupting on
each byte sent or received.
Only allow ZFS boot on GPT; the MBR ZFS bootblocks cannot be installed using
gpart bootcode as /boot/zfsboot needs to be split into multiple pieces by
hand and copied to different areas of the partition.
ddb: ANSI-fy function declarations.

MFC after:	5 days
Remove stale comments.
Add an AC line monitor so power_profile can work

Summary:
Add a polling loop (1Hz) to monitor the battery and AC status, to notify devd
like ACPI does for power monitoring.  This allows /etc/rc.d/power_profile to
work on PowerPC laptops

Test Plan:
Tested on a Titanium PowerBook, configuring economy_cpu_freq and
performance_cpu_freq, disabling powerd.

Reviewers: #powerpc, nwhitehorn

Reviewed By: nwhitehorn

Subscribers: rpaulo

Differential Revision: https://reviews.freebsd.org/D937
Implement 64MB memory limit for test to ensure that it fails reliably in
600 seconds; it would previously fail inconsistently when run in some virtual
machine configurations

This patch might need to be reverted or revisited later (see the attached PR
for more details)

PR: 169302

Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
Fix compilation errors with missing wide-type headers and fix compilation
warnings with -Wformat

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
- Add libutil #include for fparseln
- Change ATF_REQUIRE_EQ_MSG to ATF_CHECK_EQ_MSG to gather all failing results
  possible (currently 12 with leftassoc)
- Mark leftassoc "atf_tc_expect_fail" on FreeBSD (PR coming soon after further
  analysis is done on the code)

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division
Merge remote-tracking branch 'freebsd/master' into hardened/current/master
Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/chacha