summaryrefslogtreecommitdiffstats
path: root/sys/boot
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Increase the EFI staging area to better fit the pfSense installer ↵Renato Botelho2017-11-161-1/+1
| | | | | | mfsroot." This reverts commit f7a77d2d71fe340b36e1bb10a73639d463c88e52.
* fix image alignmentJared Dillard2017-10-171-2/+2
|
* Increase the EFI staging area to better fit the pfSense installer mfsroot.Luiz Souza2017-10-111-1/+1
| | | | (cherry picked from commit a98694e891ecb4b6a4eebd75ddffb6c56266fdec)
* Update pfSense brand and logoRenato Botelho2017-10-072-19/+19
|
* MFC r316374, r316377:ian2017-09-152-1/+12
| | | | | | | | | | | | Preserve the registers containing argc, argv, and return address values passed in from u-boot across the call to self_reloc and any other early-init code, and restore them before calling main(). Correct a comment... the stack used by ubldr is the same stack u-boot was running on when it jumped to the ubldr entry point. None of the arches that use this code set up a different stack in their start.S routines. (cherry picked from commit 2d944638c5a8da5a3c012f6d351ccfc933b8d047)
* MFC r322628: Fix BSD label partition end sector calculation.oleg2017-09-151-1/+1
| | | | | | Differential Revision: https://reviews.freebsd.org/D12066 (cherry picked from commit 831e4a7f7244fd9dfed84aa248312cb5f109c6da)
* Enable the second CESA unit.Luiz Souza2017-09-081-0/+3
| | | | | | Reported by: jimt (cherry picked from commit 544d167e6f0972e7f712596765bab752ed4401cc)
* partly revert 249c1f7f8f5a84349fe87868d4bb4075624ea70d.Luiz Souza2017-09-061-8/+6
| | | | | | FreeBSD can handle multiple ranges now. (cherry picked from commit 12af32a29927eaf0f850ab9863920989479ddb31)
* Make the rogue-1 DTS compatible with FreeBSD.Luiz Souza2017-09-061-13/+8
| | | | (cherry picked from commit dbefc7dead9e6e00b54c8f5f0c6b0e2c4bb498ab)
* Enable the LED drivers on rogue-1.Luiz Souza2017-09-061-1/+16
| | | | (cherry picked from commit 93d0dfb01dd19bb4998f5f7ed1373bd85dc11b1c)
* Add the default vlangroup for the switch ports.Luiz Souza2017-09-061-1/+10
| | | | | | Set the fixed ports to match the 2.5Gb uplink. (cherry picked from commit dcf3c458bca70e8a81aa7d283f40e69c512f993a)
* Update the switch address on DTS.Luiz Souza2017-09-061-2/+2
| | | | (cherry picked from commit a620415c26e5e72359b2ed5a8bb4d05810744bc3)
* Remove garbage at start of file.Luiz Souza2017-09-061-1/+1
| | | | (cherry picked from commit 129fd9b8eca08e11bbe433c011a7ec957b8817e8)
* Add the preliminary support for the R-1 DTS.Luiz Souza2017-09-061-0/+433
| | | | | | Obtained from: ADI (cherry picked from commit 3e5fa592e54decb50f21ec377f63fcbc9def72f6)
* Update pl310 node in Armada 38x DTS to match the one used in Linuxmw2017-09-061-1/+4
| | | | | | | | | | | | | Since the cache controller nodes fixup is added to the platform code, this patch aligns it to the Linux device tree representation. Submitted by: Patryk Duda <pdk@semihalf.com> Reviewed by: cognet (mentor) Approved by: cognet (mentor) Obtained from: Semihalf Differential Revision: https://reviews.freebsd.org/D11884 (cherry picked from commit 4bd0fb56b85087bc2c052cc4d2192884fca61e5d)
* Enable arm,io-coherent property of PL310 L2 cache on Armada 38x platformszbb2017-09-061-0/+1
| | | | | | | | | | | | | | | | This patch disables outer cache sync in PL310 driver by adding "arm,io-coherent" property. In addition to the previous patches it was the last bit needed for enabling proper operation of Armada 38x SoCs with the IO cache coherency. Submitted by: Michal Mazur <mkm@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Reviewed by: mmel Differential revision: https://reviews.freebsd.org/D11204 (cherry picked from commit 4bb8c5f36b6f41e820675d3a4d940cb802da42a3)
* Remove clock-frequency properties from Armada 38x timer nodesmw2017-09-061-2/+0
| | | | | | | | | | | | | | Since the timers' base frequency setting is added to the platform code, this patch removes clock-frequency properties from global and twd timers, aligning both to the Linux device tree. Submitted by: Patryk Duda <pdk@semihalf.com> Reviewed by: cognet (mentor) Approved by: cognet (mentor) Obtained from: Semihalf Differential Revision: https://reviews.freebsd.org/D11882 (cherry picked from commit bce1dbee51dd9468e51e9f3457e0304665c5a6ec)
* Restore original /soc ranges on Marvell Armada 38x boardsmw2017-09-063-3/+15
| | | | | | | | | | | | | Because fdt_get_ranges can process now multiple 'ranges' entries, restoring the ranges from original Linux device trees is possible. Submitted by: Patryk Duda <pdk@semihalf.com> Reviewed by: cognet (mentor) Approved by: cognet (mentor) Obtained from: Semihalf Differential Revision: https://reviews.freebsd.org/D11877 (cherry picked from commit e77679c61c1faabbf8025ca8e22cfd64146d92ea)
* Enable in-band link management on A388-Clearfog boardzbb2017-09-061-5/+1
| | | | | | | | | | | | | This patch adds in-band link management over SGMII of the SFP transceiver on Armada-388-Clearfog board. Submitted by: Marcin Wojtas <mw@semihalf.com> Obtained from: Semihalf Sponsored by: Netgate Reviewed by: loos Differential revision: https://reviews.freebsd.org/D10708 (cherry picked from commit 88a3a7c33f29cc11080b56d4194db9edd9e2de10)
* Correct CESA node in armada-38x.dtsizbb2017-09-061-1/+2
| | | | | | | | | | | | CESA resources were invalid, what caused driver to fail during attach call. Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D8180 (cherry picked from commit 756350a9d010ce99095a13ec47d49a347f84ee1d)
* Add buffer management entries to armada-38x.dtsizbb2017-09-061-0/+19
| | | | | | | | | | | | | Hardware buffer management entries are not used yet by FreeBSD. They were added for compliance with Linux Armada 38x device tree representation and will be used in future network support. Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D8179 (cherry picked from commit e8e86cbc83f628cf0bd89e9b898a368beaf5ac27)
* Add DTS file for Armada 385 DB-AP boardzbb2017-09-061-0/+271
| | | | | | | | | | | | | | Armada38x is already supported in the tree. This commit adds support for DB-AP board. File was taken from Linux v4.8 and accustomed to FreeBSD in minimal possible way. Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D7327 (cherry picked from commit f76be8ca9cc7e0c6c8da135f83052d5dc3978369)
* Add DTS file for Solidrun ClearFog boardzbb2017-09-062-0/+589
| | | | | | | | | | | | ClearFog is equipped with Marvell Armada 388 SoC, which is already supported in FreeBSD. Submitted by: Bartosz Szczepanek <bsz@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield Differential revision: https://reviews.freebsd.org/D7326 (cherry picked from commit c3e4ee70fad37ecd70d68098cd5803af4ef39d9a)
* Restore DTS node of PCIe controller for A38X boardszbb2017-09-064-41/+171
| | | | | | | | | | | | | | | | | Add pcie-controller node as a bus-parent of pcie nodes for Armada38x boards. This reduces diff between Linux and FreeBSD PCIe device tree representation to the minimum. This commit also allows for using multiple PCIe ports, thanks to the recent driver updates, which support such hierarchy. Restore original PCIe nodes in armada-385.dtsi and apply necessary changes in hitherto unused armada-380.dtsi. Submitted by: Michal Mazur <mkm@semihalf.com> Marcin Wojtas <mw@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield, Netgate Differential revision: https://reviews.freebsd.org/D10907 (cherry picked from commit d9f8ae151ab12118ad2101f0764b9681db254aee)
* Enable HWPMC overflow IRQ on both CPUs in MPICzbb2017-09-061-1/+1
| | | | | | | | | | | | | | | | | This commit enables usage of HWPMC interrupts for the Marvell SoCs, which use MPIC (Armada38x and ArmadaXP). Those interrupts require extra unmasking, comparing to others. Also, in order to process counters per-CPU, they are masked/unmasked using separate registers' sets for each core. Submitted by: Michal Mazur <mkm@semihalf.com> Marcin Wojtas <mw@semihalf.com> Obtained from: Semihalf Sponsored by: Stormshield, Netgate Differential revision: https://reviews.freebsd.org/D10913 (cherry picked from commit 9d6e7340c6b8293f3655371bbab9b1e4dc2fdb4f)
* Merge remote-tracking branch 'origin/releng/11.1' into RELENG_2_5Renato Botelho2017-07-0315-22/+248
|\
| * MFC r309412,r316109,r316132:ngie2017-05-2810-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r309412 (by imp): dd is currently a bootstrap tool. It really doesn't have any business being a bootstrap tool. However, for reproducible build output, FreeBSD added dd status=none because it was otherwise difficult to suppress the status information, but retain any errors that might happen. There's no real reason that dd has to be a build tool, other than we use status=none unconditional. Remove dd from a bootstrap tool entirely by only using status=none when available. This may also help efforts to build the system on non-FreeBSD hosts as well. r316109: Don't hardcode input files for stage 1/2 bootloaders; use .ALLSRC instead This is a better pattern to follow when creating the bootloaders and doing the relevant space checks to make sure that the sizes aren't exceeded (and thus, copy-pasting is a bit less error prone). r316132: Parameterize out 7680 (15 * 512) as BOOT2SIZE, similar to sys/boot/i386/zfsboot/... This is being done to make it easier to change in the future--this action might be needed sooner rather than later because of gcc 6.3.0 bailing, stating that there is negative free space left (deficit) in the boot2 bootloader.
| * MFC r316103:ngie2017-05-222-3/+0
| | | | | | | | | | | | Remove redundant declarations They're already defined in libstand.h
| * MFC efivar(8) (by imp):kib2017-05-202-0/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | List of revisions merged: r307070 r307071 r307072 r307074 r307189 r307224 r307339 r307390 r307391 r309776 r314231 r314232 r314615 r314616 r314617 r314618 r314619 r314620 r314621 r314623 r314890 r314925 r314926 r314927 r314928 r315770 r315771 Discussed with: gjb (re), imp Sponsored by: The FreeBSD Foundation
| * MFC r318193:markj2017-05-181-1/+1
| | | | | | | | Set the right variable when overriding the default console speed.
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2017-05-1120-42/+292
|\ \ | |/
| * MFC r316754: loader/multiboot: fix multiboot loadingroyger2017-05-093-0/+59
| | | | | | | | Sponsored by: Citrix Systems R&D
| * MFC r315019:gonzo2017-05-091-5/+10
| | | | | | | | | | | | | | | | | | [loader][fdt] Fix applying overlays without __local_fixups__ node Do not return error if __local_fixups__ node is missing in DTB overlay because local fixup data is optional. Reported by: Manuel Stuhn
| * MFC r303442, r305343: remove CONSTRUCTORS from linker scriptsemaste2017-04-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r303442: remove CONSTRUCTORS from kernel linker scripts r305343: remove CONSTRUCTORS from MIPS uboot linker script The linker script CONSTRUCTORS keyword is only meaningful "when linking object file formats which do not support arbitrary sections, such as ECOFF and XCOFF"[1] and is ignored for other object file formats. LLVM's lld does not yet accept (and ignore) CONSTRUCTORS, so just remove CONSTRUCTORS from the linker script as it has no effect. [1] https://sourceware.org/binutils/docs/ld/Output-Section-Keywords.html Reported by: andrew Sponsored by: The FreeBSD Foundation
| * Fix the arm64 userland building with lld:andrew2017-04-192-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC 308124: On arm64 build the efi loader with -fPIC. Without this clang 3.9 will generate relocation in the self relocation code. MFC 316608: Add -fPIC to the standalone build flags on arm64. This is needed as loader.efi is position independend, however we were not building it as such causing a build failure when building with lld. MFC 315452: Mark the EFI PE header as allocated. While ld.bfd doesn't seem to care about not having this flag ld.lld fails to link without it.
| * MFC r316106:ngie2017-03-311-5/+5
| | | | | | | | | | | | | | Don't shadow read(2) definition with `read` argument in vdev_{create,probe} This fixes several -Wshadow warnings introduced in r192194, but now errors with gcc 6.3.0.
| * MFC r316107:ngie2017-03-311-1/+0
| | | | | | | | | | | | | | | | | | Remove redundant declaration for `zfs_crc64_table` zfssubr.c already defines this statically. Besides, zfsimpl.c defined it, but didn't use it. This fixes a -Wredundant-decls warning.
| * MFC r316108:ngie2017-03-311-2/+1
| | | | | | | | | | | | Remove -Wunused-but-set variable, `tail` in `ls_getdir(..)` This variable has been unused since its inception in r40106.
| * boot1.efi: can't boot from ZFS on 4kn HDDtsoome2017-03-301-9/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The boot1.efi immediate issue from PR216964 is that we are reading into too small buffer, from UEFI spec 2.6: The size of the Buffer in bytes. This must be a multiple of the intrinsic block size of the device. The secondary issue is that LBA calculation does not check reminder from division. This fix does check the provided buffer size and if we read less than media sector size or the read offset is not aligned to sector boundary, we allocate bounce buffer and perform the read by single sector. PR: 216964 Reported by: Sergey Kozlov Reviewed by: allanjude, Sergey Kozlov Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D9870
| * MFC: 314547, 314770, 314828, 314891, 314956, 314962, 315235dexuan2017-03-301-4/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r314547 loader.efi: reduce the size of the staging area if necessary The loader assumes physical memory in [2MB, 2MB + EFI_STAGING_SIZE) is Conventional Memory, but actually it may not, e.g. in the case of Hyper-V Generation-2 VM (i.e. UEFI VM) running on Windows Server 2012 R2 host, there is a BootServiceData memory block at the address 47.449MB and the memory is not writable. Without the patch, the loader will crash in efi_copy_finish(): see PR 211746. The patch verifies the end of the staging area, and reduces its size if necessary. This way, the loader will not try to write into the BootServiceData memory any longer. Thank Marcel Moolenaar for helping me on this issue! The patch also allocates the staging area in the first 1GB memory. See the comment in the patch for this. PR: 211746 Reviewed by: marcel, kib, sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9686 r314770 loader.efi: fix recent UEFI-boot regression on physical machines This patch fixes my recent patch "loader.efi: reduce the size of the staging area if necessary", which causes EFI-boot failure on physical machines since Mar 2: on the host there is a 1MB LoaderData memory range, which splits the big Conventional Memory range into a small one (15MB) and a big one: the small one is too small to hold the staging area. We can actually use the LoaderData range safely, because when amd64_tramp -> efi_copy_finish() starts to run, we're almost at the very end of the efi loader code and we're going to "return" to the kernel entry, so we're pretty sure we won't access any loader data any more. For people who are interested in the details: please see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746#c22 PS, some people also reported the regression happened to FreeBSD VM running on Bhyve in EFI mode. This patch should resolve it too, though I don't have such a setup to test. Reviewed by: sephe Approved by: sephe (mentor) Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9904 r314828 loader.efi: fix an off-by-one bug in efi_verify_staging_size() Also remove the warning message: it may not be unusual to see the memory range containing 2MB is not of EfiConventionalMemory. Sponsored by: Microsoft r314891 loader.efi: finally fix the off-by-one bug in efi_verify_staging_size() r314828(loader.efi: fix an off-by-one bug in efi_verify_staging_size()) doesn't really fix the bug and this patch adds the missing part. It's a shame that I didn't make everything correct at the very beginning... Sponsored by: Microsoft r314956 loader.efi: only reduce the size of the staging area on Hyper-V Doing this on physical hosts turns out to be problematic, e.g. see comment 24 and 28 in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746. To fix the real underlying issue correctly & thoroughly, IMO we need a relocatable kernel, but that would require a lot of complicated long term work: https://reviews.freebsd.org/D9686?id=25414#inline-56969 For now, let's only apply efi_verify_staging_size() to VMs running on Hyper-V, and restore the old behavior on physical machines since that has been working for people for a long period of time, though that's potentially unsafe... Sponsored by: Microsoft r314962 loader.efi: only include the machine/ header files on x86 The 2 files may not exist on other archs like aarch64 and hence we can have a build failure there. Reported by: lwhsu Sponsored by: Microsoft r315235 loader.efi: use stricter check for Hyper-V Some other hypervisors like Xen can pretend to be Hyper-V but obviously they can't implement all Hyper-V features. Let's make sure we're genuine Hyper-V here. Also fix some minor coding style issues. PR: 211746 Sponsored by: Microsoft PR: 211746
| * MFC r315738:ngie2017-03-291-0/+4
| | | | | | | | | | | | | | | | | | Document some more 10GbE+ network drivers in loader.conf - if_cxgbe - if_ixl - if_ixlv - sfxge
| * MFC r313982, r314068:pfg2017-03-1410-14/+14
| | | | | | | | | | | | sys: Replace zero with NULL for pointers. Found with: devel/coccinelle
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Renato Botelho2017-03-138-8/+16
|\ \ | |/
| * MFC r314505:pfg2017-03-086-6/+12
| | | | | | | | | | | | | | Split the ficl CFLAGS when they refer to an arch-specific include path. This is a minimal attempt to keep consistency in the Makefiles so that moving ficl to somwehere like contrib will be less error prone.
| * MFC r309195:ian2017-03-012-2/+4
| | | | | | | | | | | | Add an ethernet0 alias pointing to the /aix/usb/hub/ethernet node. This is required for u-boot to locate the ethernet node when it's doing fixup of the mac-address property when the user has overridden the default addr.
* | Merge remote-tracking branch 'origin/stable/11' into devel-11Luiz Otavio O Souza2017-02-0959-259/+455
|\ \ | |/
| * MFC r309369,310850,310853:tsoome2017-02-0622-111/+91
| | | | | | | | | | | | | | | | | | | | libstand: dosfs cstyle cleanup for return keyword. dosfs support in libstand is broken since r298230 PR: 214423 Submitted by: Mikhail Kupchik Reported by: Mikhail Kupchik Approved by: imp (mentor)
| * MFC r310845: boot2 will deadlock if extended keys are used on text inputtsoome2017-02-061-15/+34
| | | | | | | | | | Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D8608
| * MFC r310124 (by andrew):gonzo2017-02-041-0/+2
| | | | | | | | | | | | | | | | | | | | Add -fPIC to the ubldr build. Without this the self relocation code will try to use an absolute address in a switch statement, jumping to an invalid memory location. Sponsored by: ABT Systems Ltd PR: 216504
| * MFC r311932:dim2017-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make EFI_RESERVED_SERVICE a proper prototype With clang 4.0.0, the EFI API header causes the following warning: In file included from sys/boot/efi/loader/bootinfo.c:43: In file included from sys/boot/efi/loader/../include/efi.h:52: sys/boot/efi/include/efiapi.h:534:32: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] (EFIAPI *EFI_RESERVED_SERVICE) ( ^ Add VOID to make it into a real prototype. Reviewed by: imp, emaste, tsoome Differential Revision: https://reviews.freebsd.org/D9132
OpenPOWER on IntegriCloud