Commit Graph

3101 Commits

Author SHA1 Message Date
Luiz Otavio O Souza
b7ce14b99c Fix the gpio-leds node to match the LEDs on RPI2.
The 'pwr' LED is connected to GPIO pin 35 (active high) and the 'act' LED
is connected to GPIO pin 47 (active high).

Remove the GPIO pin 47 from reserved pins list, previously it was used to
signaling the SD Card presence and now it is used by act LED.
2015-04-23 18:36:36 +00:00
Luiz Otavio O Souza
b7dee41fd4 Enable the watchdog on RPI2.
The watchdog is used to reset the SoC on cpu_reset().

Without this, RPI2 will not reboot when asked to.
2015-04-23 14:58:39 +00:00
John Baldwin
179fa75e6e Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.

Approved by:	Hudson River Trading LLC (who owns ACT LLC)
MFC after:	1 week
2015-04-23 14:22:20 +00:00
Ed Maste
15222dc5d6 Reduce diffs between the three copies of libstand's Makefile
This should be a non-functional change.  A future change should
address the functional differences between these three and converge
on a single source.

Differential Revision:	https://reviews.freebsd.org/D2058
Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
2015-04-23 14:04:33 +00:00
Luiz Otavio O Souza
88d1700334 Fix the SDHCI clock frequency for RPI2, the default clock (for the newer
firmware versions) is 250MHz.
2015-04-22 17:35:58 +00:00
Devin Teske
43d4f8c4c6 Add "GELI Passphrase:" prompt to boot loader.
A new loader.conf(5) option of geom_eli_passphrase_prompt="YES" will now
allow you to enter your geli(8) root-mount credentials prior to invoking
the kernel.

See check-password.4th(8) for details.

Differential Revision:	https://reviews.freebsd.org/D2105
Reviewed by:	imp, kmoore
Discussed on:	-current
MFC after:	3 days
X-MFC-to:	stable/10
Relnotes:	yes
2015-04-16 20:53:15 +00:00
Andrew Turner
3f06facc8a * Remove the wfi when the efi loader returns, it's unneeded and is not
available on older designs.
* Enable the efi loader on arm
2015-04-14 14:15:14 +00:00
Andrew Turner
0cafabf97f Add support for arm64 to loader.efi and boot1.efi
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
2015-04-14 13:55:01 +00:00
Andrew Turner
30dd368aa7 Fix the arm64 MACHINE_CPUARCH value in the efi fdt glue code.
Sponsored by:	The FreeBSD Foundation
2015-04-14 10:41:57 +00:00
Andrew Turner
c93a8403be Use MACHINE in the efi loader when it is what we mean, it may not be the
same as MACHINE_CPUARCH, it just happened to be the case the architectures
this code currently supports.

Sponsored by:	The FreeBSD Foundation
2015-04-14 10:40:37 +00:00
Andrew Turner
2d790e26e5 Create the correct symlinks for the machine directory, and only create the
x86 symlink on i386 and amd64. Before this incorrect symlinks were being
created on armi and i386.

Differential Revision:	https://reviews.freebsd.org/D2283
Reviewed by:	emaste, imp
Sponsored by:	The FreeBSD Foundation
2015-04-13 16:00:09 +00:00
Andrew Turner
3d08016fc4 Add fdt support to the arm loader.efi 2015-04-11 11:00:53 +00:00
Andrew Turner
cc0ab6997e Only add -fPIC to CFLAGS and -Wl,-znocombreloc to LDFLAGS on x86, they
shouldn't be used on arm.
2015-04-11 10:36:48 +00:00
Andrew Turner
d4926f83a8 Move reloc.c to the top level Makefile as it has become generic. 2015-04-11 10:21:26 +00:00
Andrew Turner
43e9209c57 Update the arm efi ldscript to generate a valid efi binary 2015-04-11 10:07:58 +00:00
Ganbold Tsagaankhuu
498c473a94 This modifies the FreeBSD Amlogic DTS files to use the GNU files
as the base.

Submitted by:	John Wehle
Reviewed by:	imp
2015-04-11 08:27:38 +00:00
Ganbold Tsagaankhuu
7a24f0a21f The GNU files don't include a DTS for the aml8726-m8b (which has
cortex-a5 cores unlike the aml8726-m8 which has cortex-a9 cores).

Submitted by:	John Wehle
Reviewed by:	imp
2015-04-11 08:25:53 +00:00
Ed Maste
5ec8fa0ee4 Add build support for i386 loader.efi
Kernel changes are required for this to be useful but this will allow
others to experiment.

Differential Revision:	https://reviews.freebsd.org/D2276
2015-04-10 18:49:43 +00:00
Ed Maste
dea6bf66ea Limit EFI framebuffer metadata to amd64 for now
The i386 loader.efi does not yet exist. Avoid dealing with vt and
framebuffer issues there until the initial bootstrapping is done.
2015-04-10 18:08:09 +00:00
Andrew Turner
b6e1ffd447 Port the EFI reloc codeto work on arm64. This used the rela relocation
table so wiill need the addend included in the relocation calculation.

Sponsored by:	The FreeBSD Foundation
2015-04-10 09:15:35 +00:00
Ed Maste
b291974d25 Remove EOL whitespace from i386 EFI loader source 2015-04-09 19:48:42 +00:00
Andrew Turner
23c48d2315 Print error values with hex to make it easier to find the EFI error type. 2015-04-09 10:15:47 +00:00
Andrew Turner
8ab49d66d2 Only use -fPIC when building boot1.efi for x86.
Sponsored by:	The FreeBSD Foundation
2015-04-09 10:08:10 +00:00
Andrew Turner
3252a3c107 Add the arm64 machine dependent parts of ficl. This is not machine
dependent, as most copies of these files are identical, but unfortunately
this is still needed.

Sponsored by:	The FreeBSD Foundation
2015-04-09 10:00:26 +00:00
Devin Teske
a7ec487755 Re-do proper mode-endings. Antithesis of r281176-281179 which reverted
earlier migration away from sloppy mode-endings (r280925,280974-280976)
due to a red-herring in diagnosing HardenedBSD boot lockup.

Thanks to:	lattera (shawn.webb@hardenedbsd<dot>org)
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r280925,280974-280976,281176-281179
2015-04-08 20:10:42 +00:00
Devin Teske
ea1401b9a9 Fix a bootlock condition if/when loader_logo is set in loader.conf(5)
NB: This deeply effected HardenedBSD which had a default value set.

Embarassingly, I allowed the `type' primitive to be passed -1/-1 for
c-addr/u stack input (the effect of which is to pull INT_MAX bytes
from character address negative one in which hilarity ensues over a
black screen in full-on bootlock). Much thanks to Shawn Webb [lattera]
for helping me diagnose.

NB: The mode-ending revisions were initially suspected (and reverted)
but proved to be a red-herring. Proper mode endings will be returning.

Thanks to:	lattera (@HardenedBSD [<dot><com>])
Reported by:	lattera
MFC after:	3 days
X-MFC-to:	stable/10
2015-04-08 19:12:38 +00:00
Ed Maste
0c8a72c0d2 Add EFI boot1 for i386
loader.efi still needs work, but boot1.efi now builds.

Differential Revision:	https://reviews.freebsd.org/D2244
Reviewed by:	rpaulo
Sponsored by:	The FreeBSD Foundation
2015-04-07 21:41:26 +00:00
Ed Maste
c6f6755c90 EFI: use common reloc.c for all architectures
Much of this file is common to the architectures we support, so share
an implementation by adding a little #ifdef-ery.

Differential Revision:	https://reviews.freebsd.org/D2241
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2015-04-07 21:34:49 +00:00
Devin Teske
2df04ab49b Eliminate literal escape sequences from *.rc
Suggested by:	alfred
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r280976, r281179
2015-04-06 23:37:04 +00:00
Devin Teske
e076835f9c Partially revert r280976: Back to previous mode-endings based on feedback
Reported by:	lattera
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r280976
2015-04-06 23:22:54 +00:00
Devin Teske
be77d1d90c Partially revert r280975: Back to previous mode-endings based on feedback
Reported by:	lattera
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r280975
2015-04-06 23:16:03 +00:00
Devin Teske
72bd569df0 Partially revert r280974: Back to previous mode-endings based on feedback
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r290974
Reported by:	lattera
2015-04-06 23:13:16 +00:00
Devin Teske
9390da3689 Partially revert r280925: Back to previous mode-endings based on feedback
MFC after:	3 days
X-MFC-with:	r280925
Reported by:	lattera
2015-04-06 23:10:47 +00:00
Andrew Turner
533e5098de Make global variabled only used in this file static. 2015-04-06 19:58:28 +00:00
Andrew Turner
63d071445e Add support to the efi boot1 and loader for 32-bit ARM. This will be used
by the future qemu virt support.

Differential Revision:	https://reviews.freebsd.org/D2238
Reviewed by:	emaste
2015-04-06 15:50:20 +00:00
Rui Paulo
bb09480677 SMBIOS support for EFI.
MFC after:	1 week
2015-04-06 06:55:47 +00:00
Andrew Turner
45304e75b9 Move boot1.efi to the global CLEANFILES list, it's not x86 specific. 2015-04-05 18:57:58 +00:00
Andrew Turner
947d2519e3 Spell MACHINE_CPUARCH correctly 2015-04-05 18:42:43 +00:00
Andrew Turner
60ac534440 Add FDT support to loader.efi. This will be used on arm and arm64.
Differential Revision:	https://reviews.freebsd.org/D2219
2015-04-05 18:37:39 +00:00
Baptiste Daroussin
b0aa40ed29 Make sure forth manpages are only installed once.
Differential Revision:	https://reviews.freebsd.org/D2224
Reviewed by:	imp
2015-04-04 19:56:54 +00:00
Rui Paulo
a620035cf4 loader/EFI: improve the help of the 'mode' command. 2015-04-04 04:30:37 +00:00
Rui Paulo
c293bc993b Remove an unnecessary space in a printf call. 2015-04-04 04:29:31 +00:00
Rui Paulo
11d48637a1 boot1 EFI: reset the screen and select the best mode.
It's necessary to reset the screen to make sure any vendor pixels are
gone when we start boot1.  In the Lenovo X1 (3rd gen), this is the
only way to clear the screen.  Previously, the Lenovo logo would only
disappear after the kernel started scrolling the display.

After resetting the screen, EFI could put us in the worst LCD mode
(oversized characters), so we now find the largest mode we can use and
hope it's the most appropriate one (it's not trivial to tell what's
the correct LCD resolution at this point).  It's worth noting that the
final stage loader has a 'mode' command that can be used to switch
text modes.

While there, enable the software cursor, just like in the legacy boot
mode.

MFC after:	1 week
2015-04-04 04:27:54 +00:00
Rui Paulo
92de577931 Remove whitespace. 2015-04-04 04:18:52 +00:00
Andrew Turner
5d291f76e6 Add the start of the efi fdt bindings. These will be used on arm and arm64.
Sponsored by:	The FreeBSD Foundation
2015-04-03 15:47:48 +00:00
Andrew Turner
94d3e34255 Clean up more x86 only options in the efi code. 2015-04-03 15:25:59 +00:00
Andrew Turner
36725fc471 Only enable the efi framebuffer on x86 for now 2015-04-03 12:54:38 +00:00
Andrew Turner
5da820b611 Only include machine/specialreg.h on x86 2015-04-03 12:30:18 +00:00
Andrew Turner
cf5d3022f9 Only enable comconsole and nullconsole on x86. 2015-04-03 12:08:08 +00:00
Jung-uk Kim
96f6ece580 Fix powerpc/ps3 build, too. 2015-04-03 02:37:43 +00:00