Commit Graph

3035 Commits

Author SHA1 Message Date
Devin Teske
20539a9a2a Add remainder of supported ANSI escape sequences.
MFC after:	3 days
X-MFC-to:	stable/10
2015-04-01 01:17:36 +00:00
Devin Teske
ae8fb6eac6 Move beastie to logo-*.4th; brands to brand-*.4th
Suggested by:	jkh, alfred
MFC after:	3 days
X-MFC-to:	stable/10
2015-04-01 01:14:19 +00:00
Devin Teske
53cf64df40 Comments. No functional change.
MFC after:	3 days
X-MFC-to:	stable/10
2015-04-01 00:49:34 +00:00
Devin Teske
6f102967c4 Whitespace and cleanup. No functional change(s).
MFC after:	3 days
X-MFC-to:	stable/10
2015-03-31 23:09:54 +00:00
Devin Teske
4cfd485553 Optimize bootmsg to use fg/bg/me from screen.4th
NB: screen.4th is included by way of check-password.4th

MFC after:	3 days
X-MFC-to:	stable/10
2015-03-31 23:00:48 +00:00
Devin Teske
7453b9b598 Comments. No functional change(s).
MFC after:	3 days
X-MFC-to:	stable/10
2015-03-31 22:32:35 +00:00
Devin Teske
696516711b Whitespace. No functional change(s).
MFC after:	3 days
MFH:		stable/10
2015-03-31 22:10:40 +00:00
Devin Teske
12dc00e4ed Change contents of the exec variable in loader.conf to be friendly to both
Ficl/Forth and Lua. No visible change for Forth while enabling Lua support.

Submitted by:	rpaulo
2015-03-31 21:46:44 +00:00
Ganbold Tsagaankhuu
edb96014a8 Add device tree files for Hardkernel Odroid-C1 and Visson ATV-102 devices.
Submitted by:	John Wehle
Approved by:	stas (mentor)
2015-03-31 11:55:56 +00:00
Andrew Turner
4ef84196c9 Reorder to help with moving the efi loader parts to sys/boot/efi. As these
will depend on ficl having been built, and are set via bsd.arch.inc.mk we
need to place this after ficl.

As Makefile.amd64 is now late enough we can add the i386 directory to this.
2015-03-29 15:43:24 +00:00
Andrew Turner
0006eaaf5f Add the Raspberry Pi 2 dtb, based on the existing rpi.dts, but with a
different base address for the devces.

MFC after:	1 week
2015-03-25 10:26:07 +00:00
Alexander Motin
cdc5836726 Remove from legacy ata(4) driver support for hardware, supported by newer
and more functional drivers ahci(4), siis(4) and mvs(4).

This removes about 3400 lines of code, unused since FreeBSD 9.0 release.
2015-03-24 18:09:07 +00:00
Devin Teske
f0c61ded93 Add missing variables password/bootlock_password.
NB: Using NULL for default values in-case someone
or something uncomments it and reboots. See
check-password.4th(8) for additional details.

MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2015-03-23 17:31:22 +00:00
Devin Teske
b066a1a278 Increase max input for password/bootlock_password from 16 to 255.
When taking user input, don't show asterisks as the user types
but instead spin a twiddle. Implement Ctrl-U to clear user input.
If the buffer is empty, either because the user has yet to type
anything, presses Ctrl-U at any time, or presses backspace enough
to end in an empty buffer, the twiddle is erased to provide feed-
back to the user.

MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2015-03-23 16:43:46 +00:00
Devin Teske
b37e85ccb5 Prevent password/bootlock_password features of loader.conf(5) from
locking out everyone in the case of setting a password longer than
the maximum (currently 16 characters). Now the required password is
truncated to the maximum input that can be read from the user.

PR:		kern/198760
MFC after:	3 days
MFH:		stable/10 stable/9
2015-03-23 16:31:27 +00:00
Devin Teske
4a7027d626 Fix sgetkey indentation to be consistent with the rest of the file.
Remove some blank lines, adjust some comments and update copyright.

MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2015-03-23 16:22:56 +00:00
Andrew Turner
ed68feb5d4 Stop calling x86_efi_copyin and x86_efi_getdev directly. This is to help
port loader.efi to both 32 and 64-bit ARM where we can use this file with
minimal changes.

Differential Revision:	https://reviews.freebsd.org/D2031
Reviewed by:	imp
2015-03-22 18:17:55 +00:00
Ian Lepore
db7e396903 Fix fdt_platform_fixups() mem region handling. It turns out u-boot puts
several types of data into the mem-info array (DRAM, SRAM, flash).  We
need to extract just the DRAM entries for translation into fdt memory
properties.

Also, increase the number of regions we can handle from 5 to 16.

Submitted by:	Michal Meloun
2015-03-17 21:15:24 +00:00
Andrew Turner
d051c9457e Move the x86 specific files to be built in the amd64 loader.efi. This will
help with importing the arm and arm64 versions of loader.efi.
2015-03-15 19:00:35 +00:00
Dimitry Andric
e0125cfdd1 Merge ^/head r279893 through r279984. 2015-03-14 13:08:00 +00:00
John Baldwin
02cbfd02ba Enable bzipfs support in the EFI loader.
- Add bzipfs to the list of supported filesystems in the EFI loader.
- Increase the heap size allocated for the EFI loader from 2MB to 3MB.

Differential Revision:	https://reviews.freebsd.org/D2053
Reviewed by:	benno, emaste, imp
MFC after:	2 weeks
Sponsored by:	Cisco Systems, Inc.
2015-03-13 09:41:27 +00:00
John Baldwin
ad06e987b1 The System V ABI for amd64 allows functions to use space in a 128 byte
redzone below the stack pointer for scratch space and requires
interrupt and signal frames to avoid overwriting it. However, EFI uses
the Windows ABI which does not support this. As a result, interrupt
handlers in EFI push their interrupt frames directly on top of the
stack pointer. If the compiler used the red zone in a function in the
EFI loader, then a device interrupt that occurred while that function
was running could trash its local variables.  In practice this happens
fairly reliable when using gzipfs as an interrupt during decompression
can trash the local variables in the inflate_table() function
resulting in corrupted output or hangs.

Fix this by disabling the redzone for amd64 EFI binaries. This
requires building not only the loader but any libraries used by the
loader without redzone support.

Thanks to Jilles for pointing me at the redzone once I found the stack
corruption.

Differential Revision:	https://reviews.freebsd.org/D2054
Reviewed by:	imp
MFC after:	2 weeks
Sponsored by:	Cisco Systems, Inc.
2015-03-13 09:38:16 +00:00
John Baldwin
7939325215 Allow the EFI loader to work with large kernels and/or modules
(for example, a large mfsroot).  Note that for EFI the kernel and
modules (as well as other metadata files such as splash screens or
memory disk images) are loaded into a statically-sized staging area.
When the EFI loader exits it copies this staging area down to the
location the kernel expects to run at.
- Add bounds checking to the copy routines to fail attempts to access
  memory outside of the staging area.  Previously loading a combined
  kernel + modules larger than the staging size (32MB) would overflow
  the staging area trashing whatever memory was afterwards.  Under
  Intel's OVMF firmware for qemu this resulted in fatal faults in the
  firmware itself.  Now the attempt will fail with ENOMEM.
- Allow the staging area size to be configured at compile time via
  an EFI_STAGING_SIZE variable in src.conf or on the command line.
  It accepts the size of the staging area in MB.  The default size
  remains 32MB.

MFC after:	2 weeks
Sponsored by:	Cisco Systems, Inc.
2015-03-12 17:07:24 +00:00
John Baldwin
e447efb4f1 Fix 'make depend' by moving the LDSCRIPT dependency into DPADD.
Sponsored by:	Cisco Systems, Inc.
2015-03-12 15:25:22 +00:00
John Baldwin
bc65857d86 Revert r279381. The EFI loader needs to use a separate libstand that
is compiled against the ABI EFI expects (specifically, no stack
redzone) so it cannot share libstand with userboot (which must use
the System V ABI).
2015-03-12 15:20:05 +00:00
Dimitry Andric
a857c4c833 Merge ^/head r279759 through r279892. 2015-03-11 19:04:01 +00:00
Nathan Whitehorn
4b2b0f5043 Provide a shim layer in loader to condense the Open Firmware device tree to
an FDT. This is how Linux and OS X boot and can avoid some issues with
using Open Firmware at runtime. The code is highly experimental and disabled
by default; it can be turned on by setting the loader environment variable
"usefdt" to a non-NULL value.
2015-03-09 02:57:34 +00:00
Nathan Whitehorn
78f38c60bc Fix loader on PowerPC following r279784. It turns out that, due to .PATH
confusion, the _setjmp.S in libstand was never being used and was instead
being shadowed by the libc version. Since the libc version now uses FPRs,
it caused loader to crash.
2015-03-09 02:19:44 +00:00
Dimitry Andric
6404f697a0 Merging ^/head r279596 through r279758. 2015-03-07 23:01:27 +00:00
Edward Tomasz Napierala
411443334b Add error reporting (but not actual handling yet, apart from
reporting them) for EFI calls to boot1.efi.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-07 19:14:01 +00:00
Dimitry Andric
6ba06d46ee When compiling boot2 with gcc on i386 and pc98, only use the custom flag
-mno-align-long-strings when compiling with base gcc.  This is checked
by comparing the version number against 4.2.1, which is not exactly
right, but good enough.  (There is no other way to check whether we are
using the non-standard gcc in base, as far as I know.)

Reported by:	rodrigc
MFC after:	3 days
2015-03-04 20:33:15 +00:00
Dimitry Andric
ca65be80fd Merge ^/head r279313 through r279595. 2015-03-04 19:47:33 +00:00
Ruslan Bukin
c7f898e9d3 o Add more room for EFI boot blocks
o Specify the filename as argument

Differential Revision:	https://reviews.freebsd.org/D1999
Reviewed by:	emaste@
2015-03-02 18:08:39 +00:00
David E. O'Brien
eda6932911 sys/boot/userboot/libstand/libstand.a should also include strtoul.c;
as lib/libstand/ and sys/boot/libstand32/ already does.
2015-02-27 22:23:35 +00:00
David E. O'Brien
48f73a80ba Use sys/boot/userboot/libstand/ and not /usr/lib/libstand.a. 2015-02-27 22:22:05 +00:00
David E. O'Brien
f76aa51521 Remove duplicated -I. 2015-02-27 22:20:07 +00:00
Jayachandran C.
020a664210 Move PCI bus below simplebus for Broadcom XLP
This will enable us to do common allocation code for memory and
interrupts for SoC devices as well as PCI devices.
2015-02-27 02:21:52 +00:00
Dimitry Andric
0d56a8cba1 Merge ^/head r279163 through r279308. 2015-02-26 07:26:56 +00:00
Jayachandran C.
5441635eb0 Remove run-time allocation of XLP IRQs
Follow the same static IRQ to Interrupt Table Entry mapping as the other
OS supported on XLP.
2015-02-26 02:22:47 +00:00
Jayachandran C.
70abc1ff8e Add netlogic,xlp-pic as interrupt controller for XLP
Add an empty driver for netlogic,xlp-pic to ensure that the device tree
is correct and has an interrupt controller.
2015-02-26 02:05:45 +00:00
Alexander Motin
772747e2ee Fix potential NULL dereference.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2015-02-25 09:57:05 +00:00
Michael Gmelin
29f2e5b5bc Improve memory detection in biosmem.c
- Add a quirk to allow ignoring e820 extended memory detection.
- Improve memory detection through e801.
- Add bootloader command "biosmem".

See differential revision for more details.

Reviewed by:	jhb, adrian
Approved by:	adrian
Differential Revision:  https://reviews.freebsd.org/D1741
2015-02-23 22:58:51 +00:00
Dimitry Andric
9b2a0d91b8 Merge ^/head r279023 through r279162. 2015-02-22 16:04:37 +00:00
Warner Losh
cda676ac0d Allow EFI and ACPI to be included together. When ACPI is included
first, EFI will use its definitions for {,U}INT{8,16,32,64} and
BOOLEAN. When EFI is included first, define ACPI_USE_SYSTEM_INTTYPES
to tell ACPI that these are already defined.

Differential Revision: https://reviews.freebsd.org/D1905
2015-02-20 01:40:55 +00:00
Dimitry Andric
714e3c812d Merge ^/head r278756 through r278915. 2015-02-17 19:53:41 +00:00
Luiz Otavio O Souza
206b8a8d5b Set the #address-cells and #size-cells properties on I2C controllers of
Raspberry-pi.

This fixes the issues of dtc(1) while compiling I2C addresses set in "reg"
property.

MFC after:	2 weeks
2015-02-17 19:38:16 +00:00
Dimitry Andric
569e61a4fc Merge ^/head r278499 through r278755. 2015-02-14 13:12:03 +00:00
John Baldwin
56af34a743 MFi386:
When building some of the boot loaders with clang, and DEBUG_FLAGS or
CFLAGS having '-g' in it, clang outputs several assembly directives that
are too new for our version of binutils.

Therefore, assemble the resulting .s files with clang instead.  A more
general solution can be implemented when a GNU as-compatible driver for
clang's integrated assembler appears.

Tested by:	gjb
2015-02-11 15:49:14 +00:00
George V. Neville-Neil
5dbbe22ac8 Summary: Update CPU identification call to recent version. 2015-02-11 12:08:40 +00:00
Dimitry Andric
b40d827331 Merging ^/head r278298 through r278350. 2015-02-07 12:57:40 +00:00