summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
Commit message (Collapse)AuthorAgeFilesLines
* MFC r296419 (by kib):dim2016-03-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | In the link_elf_obj.c, handle sections of type SHT_AMD64_UNWIND same as SHT_PROGBITS. This is needed after the clang 3.8 import, which generates that type for .eh_frame section, which had SHT_PROGBITS type before. Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com> PR: 207729 Tested by: dim (previous version) Sponsored by: The FreeBSD Foundation MFC r296428: Since kernel modules can now contain sections of type SHT_AMD64_UNWIND, the boot loader should not skip over these anymore while loading images. Otherwise the kernel can still panic when it doesn't find the .eh_frame section belonging to the .rela.eh_frame section. Unfortunately this will require installing boot loaders from sys/boot before attempting to boot with a new kernel. Reviewed by: kib Approved by: re (marius)
* MFC r295356 (Partial)smh2016-02-111-1/+1
| | | | | | | Fix EFI platform build failures on arm.armeb Approved by: re (marius) Sponsored by: Multiplay
* MFC boot loader path and RBX constant deduplicationemaste2016-02-092-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | r294765 (imp) Move all the separate copies of the same strings into paths.h. There's nothing machine specific about these. r294765 (imp) RBX_ defines are in rbx.h, move it there. r294847 (imp) Remove static from these two. They slipped through the cracks. r294925 (imp) Fix mistake when transitioning to the new defines with ZFS loader. I hate adding yet another define, but it is the lessor of the evil choices available. Kill another evil by removing PATH_BOOT3 and replacing it with PATH_LOADER or PATH_LOADER_ZFS as appropriate. Approved by: re (gjb)
* MFC r281060, r294060, r294291, r294493, r294284:smh2016-01-281-7/+23
| | | | | | | | | | | | | | | | | | | MFC r281060: Remove an unnecessary space in a printf call MFC r294060: Modularise EFI boot loader MFC r294291 (by andrew): Reset the filesystem cache MFC r294493: Fix EFI UFS caching MFC r294284 (by emaste): boot1: correct typo in error message Sponsored by: Multiplay
* MFC r294506:smh2016-01-281-27/+66
| | | | | | Prevent loader.conf load failure due to unknown console entries Sponsored by: Multiplay
* MFC r293835:smh2016-01-283-11/+37
| | | | | | Improve non-interactive forth cmd error reporting Sponsored by: Multiplay
* MFC r286234 (by trasz):smh2016-01-281-0/+8
| | | | | | Fix a problem which made loader(8) load non-kld files twice. Sponsored by: Multiplay
* MFC r294059:smh2016-01-281-1/+8
| | | | | | Ensure boot fsread correctly probes all partitions Sponsored by: Multiplay
* MFC r281169, r293724, r293796, r294029, r294041, r294058smh2016-01-288-30/+25
| | | | | | | | | | | | | | | | | | | | | | MFC r281169 (by andrew): Make global variabled only used in this file static MFC r294058: Make common boot file_loadraw name parameter const MFC r294041: Remove unused reg param from fdt_fixup_memory MFC r293724: Enable warnings in EFI boot code MFC r293796: Fix typo in libefi.c MFC r294029: Only build EFI components on supported compilers Sponsored by: Multiplay
* MFC r293461:smh2016-01-251-1/+0
| | | | | | Remove hidden "Not ufs" printfs from boot code Sponsored by: Multiplay
* MFC r277215, r277291, r277418, r280953 and r280954:royger2016-01-204-66/+226
| | | | | | | | | loader: implement multiboot support for Xen Dom0 Note that only the subset of the multiboot specification needed in order to boot a Xen Dom0 is implemented. Sponsored by: Citrix Systems R&D
* MFC r292057:ae2016-01-101-0/+6
| | | | | | | | | | | | | | | | Make detection of GPT a bit more reliable. When we are detecting a partition table and didn't find PMBR, try to read backup GPT header from the last sector and if it is correct, assume that we have GPT. Differential Revision: https://reviews.freebsd.org/D4282 MFC r292058: Remove a note about damaged PMBR. Now GPT will be detected automatically with such corruption. Relnotes: yes
* MFC r291012:smh2015-11-251-1/+9
| | | | | | Document loader(8) dumpdev option Sponsored by: Multiplay
* MFC r289896:ngie2015-11-151-4/+8
| | | | | | | | | | | | | | | | Make vers.c creation atomic by using a temporary file, then moving the temporary file to vers.c at the end of the script The previous logic wrote out to vers.c multiple times, so the file could be incorrectly interpreted as being completely written out after one of the echo calls with recursive make, when in reality it was only partially written. Also, in the event the build was interrupted when creating vers.c (small race window), it would have a leftover file that needed to be cleaned up before resuming the build. Sponsored by: EMC / Isilon Storage Division
* MFC r285870:trasz2015-10-181-3/+9
| | | | | | | Document md_root in loader(8). The md(4) manual page mentions it, but it's hard to find and easy to miss. Sponsored by: The FreeBSD Foundation
* MFC r283033, r283062, r283066, r283069:ian2015-05-252-28/+51
| | | | | | | | | | | Do not set preload_addr_relocate for ARM. Refactor net_getparams() to make it easier to get params from sources other than bootp and rarp. Add a routine to obtain netboot parameters from the U-Boot env vars Enable the NETIF_OPEN_CLOSE_ONCE option for ubldr.
* MFC r277962, r277988, r282661, r282727, r282731, r283013, r283035:ian2015-05-252-36/+173
| | | | | | | | | | | | | | | | | Add support for booting relocatable kernels on PowerPC. Add code to support loading relocatable kernels at offsets that are not zero. Move ubldr text section to the start of the output file, so that when you create a stripped .bin file from it the entry point is the first byte of the file. (Will allow "load $addr $file ; go $addr" in u-boot.) Create a relocatable instance of ubldr for ARM (ubldr.bin). Re-link ubldr when any of its libraries change. An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that.
* MFC revisions 277693,278335,280382-280385,280923-280926,280931,dteske2015-04-221-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 280933-280939,280974-280976,281002,281009,281081,281176-281180, 281271,281275,281616 (described in-breif below): r277693: Font fix (des) r278335: Revert that r280382: Whitespace, comments, and copyright update r280383: Prevent inadvertent bootlock condition r280384: Increase max passowrd length from 16 to 255 chars r280385: Add missing variable hints to loader.conf(5) defaults r280923: Whitespace r280924: Comments r280925: Optimize bootmsg to use fg/bg/me from screen.4th r280926: Whitespace and cleanup r280931: Comments r280933: Move beastie to logo-*.4th; brands to brand-*.4th r280934: Add remainder of supported ANSI escape sequences r280935: Securely overwrite (zero) user input after password checks r280936: Use equals for ASCII double frames r280937: Solve dreaded "dictionary full" issue r280938: Add "GELI Passphrase:" prompt to boot loader r280939: Revert that (premature commit) r280974: Use fg/b/me from screen.4th instead of literals r280975: Eliminate literal escape sequences from *.4th r280976: Use ^[[m mode-ending versus ^[[37m r281002: Install newly added brand-*.4th and logo-*.4th files (jkim) r281009: Revert .PATH changes to fix mips build (jkim) r281081: Make sure forth manpages are only installed once (bapt) r281176: Back to previous mode-endings based on feedback r281177: Back to previous mode-endings based on feedback r281178: Back to previous mode-endings based on feedback r281179: Back to previous mode-endings based on feedback r281180: Eliminate literal escape sequences from *.rc r281271: Fix a bootlock condition if loader_version is set NB: Commit message of r281271 has a typo, s/_logo/_version/ r281275: Re-do proper mode-endings r281616: Add "GELI Passphrase:" prompt to boot loader Relnotes: Added "GELI Passphrase:" prompt to boot loader
* MFC r276306: Use proper markup for quotes.ian2015-02-121-2/+3
|
* MFC r276079, r276087:ian2015-02-112-1/+36
| | | | | | | | Add a divisor parameter to twiddle() so that callers can request that output only happen on every Nth call. Add a new loader(8) variable, twiddle_divisor, allowing control over the output frequency of the "twiddle" IO progress indicator.
* MFC r274407grehan2014-11-241-0/+22
| | | | | | | | | | Fix incorrect reading of 32-bit modinfo by 64-bit loaders. The various structures in the mod_metadata set of a FreeBSD kernel and modules contain pointers. The FreeBSD loader correctly deals with a mismatch in loader and kernel pointer size (e.g. 32-bit i386/ppc loader, loading 64-bit amd64/ppc64 kernels), but wasn't dealing with the inverse case where a 64-bit loader was loading a 32-bit kernel.
* MFC r271054:ian2014-10-261-0/+5
| | | | When built with FDT support, add /boot/dtb to the list of search directories.
* MFC r272749:ae2014-10-151-3/+3
| | | | Fix comment.
* MFC r272487:ae2014-10-111-0/+3
| | | | Add UUID of FreeBSD slice to GPT scheme.
* MFC r271609: add gptzfsboot.8, zfsboot.8 and zfsloader.8 manual pagesavg2014-10-072-0/+112
|
* MFC r270445:ae2014-09-011-8/+9
| | | | | | | | The size of the GPT table can not be less than one sector. MFC r270521: Since the size of GPT entry may differ from the sizeof(struct gpt_ent), use the size from GPT header to iterate entries.
* MFC 261504:jhb2014-06-122-0/+2
| | | | Add support for FreeBSD/i386 guests under bhyve.
* MFC r262340, r262345, r262347, find and load an appropriate dtb file.ian2014-04-292-10/+10
| | | | | | | | | | | | The search order for a usable dtb in fdt_setup_fdtp() is now - A dtb loaded with an explicit "load -t dtb" command. - A dtb already loaded into memory somehow[*] and pointed to by fdt_to_load. - A dtb in the memory pointed to by the u-boot env vars fdtaddr or fdt_addr. - A file named by the u-boot env vars fdtfile or fdt_file. - A static dtb compiled into the kernel. * Presumably by some arch-specific command or code.
* MFC r263468:ae2014-03-311-8/+5
| | | | | | | | | | | When loader(8) inspects MBR, it chooses GPT as main partition table, when MBR contains only PMBR entry or it is bootcamp-compatible. If MBR has PMBR entry and some other, the loader rejects it. Make these checks to be less strict. If loader decided that PMBR isn't suitable for GPT, it will use MBR. Reported by: Paul Thornton
* Sweep man pages replacing ad -> ada.pluknet2013-10-011-2/+2
| | | | | | Approved by: re (blackend) MFC after: 1 week X-MFC note: stable/9 only
* Make the check for number of entries less strict.ae2013-08-081-6/+9
| | | | | | | Some partitioning tools can create GPT with number of entries less than 128. MFC after: 1 week
* Since we didn't break the loop, we should set i to -1 to start from theae2013-04-211-1/+2
| | | | | | | beginning. Submitted by: Steven Hartland MFC after: 1 week
* strncmp for boot code: fix an off by one erroravg2013-04-051-2/+2
| | | | | | | Before this change strncmp would access and _compare_ n+1 characters in the case where the first n characters match. MFC after: 5 days
* Attach the elf section headers to the loaded kernel as metadata, soian2013-03-101-0/+2
| | | | | | | | | | | they can easily be used by later post-processing. When searching for a compiled-in fdt blob, use the section headers to get the size and location of the .dynsym section to do a symbol search. This fixes a problem where the search could overshoot the symbol table and wander into the string table. Sometimes that was harmless and sometimes it lead to spurious panic messages about an offset bigger than the module size.
* Since ubldr doesn't necessarily load a kernel at the physical address in theian2013-03-091-5/+6
| | | | | | | | | | elf headers, mask out the high nibble of that address. This effectly makes the entry point the offset from the load address, and it gets adjusted for the actual load address before jumping to it. Masking the high nibble makes assumptions about memory layout that are true for all the arm platforms we support right now, but it makes me uneasy. This needs to be revisited.
* Fix a typo that prevented booting a kernel that had virtual addresses inian2013-02-271-1/+1
| | | | the elf headers.
* Adjust the arm kernel entry point address properly regardless of whether theian2013-02-261-6/+17
| | | | | e_entry field holds a physical or a virtual address. Add a comment block that explains the assumptions being made by the adjustment code.
* Fix the bug I introduced in r247045.kientzle2013-02-252-38/+0
| | | | | | | | | | | | | | | | After digging through more carefully, it looks like there's no real need to have the DTB in the module directory. So we can simplify a lot: Just copy DTB into local heap for "fdt addr" and U-Boot integration, drop all the extra COPYIN() calls. I've left one final COPYIN() to update the in-kernel DTB for consistency with how this code used to work, but I'm no longer convinced it's appropriate here. I've also remove the mem_load_raw() utility that I added to boot/common/module.c with r247045 since it's no longer necessary.
* Add mem_load_raw() for loading data from another location in memory.kientzle2013-02-182-0/+39
| | | | | | This will be used by some upcoming changes to loader(8) FDT handling to allow it to use an FDT provided by an earlier boot stage the same as an FDT loaded from disk.
* Add bootcamp support to the loader.ae2013-02-101-3/+7
| | | | | Tested by: dchagin MFC after: 1 week
* Bring in some userboot changes from the bhyve branch to reduce diffs.grehan2013-01-081-2/+9
| | | | | | | | | | | | | | | | | | | | r238966 Bump up the heap size to 1MB. With a few kernel modules, libstand zalloc and userboot seem to want to use ~600KB of heap space, which results in a segfault when malloc fails in bhyveload. r241180 Clarify comment about default number of FICL dictionary cells. r241153 Allow the number of FICL dictionary cells to be overridden. Loading a 7.3 ISO with userboot/amd64 takes up 10035 cells, overflowing the long-standing default of 10000. Bump userboot's value up to 15000 cells. Reviewed by: dteske (r238966,241180) Obtained from: NetApp
* Hook in new files menusets.4th and manual.dteske2012-11-071-0/+1
| | | | Approved by: adrian (co-mentor) (implicit)
* Fix loader crash when some unhalted exception happens during `include`mav2012-10-261-0/+6
| | | | | | | command execution. In case of such unhandled exception, vmReset() inside ficlExecC() flushes the VM state. Attempt to return back to Forth after that cause garbage dereference with unexpected results. To avoid that situation call vmThrow() directly instead of expecting Forth to do it.
* Remove new-line characters from the include() errors to make it consistentmav2012-10-251-2/+2
| | | | with the rest of code.
* When loader tries to open GPT partition, but partition table is not GPT,ae2012-10-221-0/+7
| | | | | | | then try automatically detect an appropriate partition type. PR: kern/172550 Tested by: Ralf Wenk
* Add the flags parameter to the disk_open() function and DISK_F_NOCACHEae2012-10-212-10/+20
| | | | | flag, that disables the caching of partition tables metadata. Use this flag for floppies in the libi386/biosdisk driver.
* boot/console: handle consoles that fail to probeavg2012-10-062-10/+17
| | | | | | | | | | | | | | - clarify meaning of console flags - perform i/o via a console only if both of the following conditions are met: o console is active (selected by user or config) o console flags that it can perform the operation - warn if a chosen console can not work (the warning may go nowhere without working and active console, though) Reviewed by: jhb Tested by: Uffe Jakobsen <uffe@uffe.org>, Olivier Cochard-Labbe' <olivier@cochard.me> MFC after: 26 days
* Fix the style.ae2012-09-301-4/+4
|
* Remember the file format of the last loaded module and try to use it forae2012-09-301-2/+9
| | | | next files.
* Fix disk_cleanup() to work without DISK_DEBUG too.ae2012-09-301-1/+3
|
OpenPOWER on IntegriCloud