344399 |
21-Feb-2019 |
kevans |
MFC GELI Loader Improvements: r336252, r336254, r336256, r336354, r336532-r336534, r336537, r336626, r337326, r337349, r341071, r341160, r341420, r341473, r341651, r342793
Note that this MFC contains some seemingly unrelated zfsloader bits -- this was needed in order to pull in some later fixes for GELI hand-off w/ ZFS bits included.
r336252: Extend loader(8) geli support to all architectures and all disk-like devices.
This moves the bulk of the geli support from lib386/biosdisk.c into a new geli/gelidev.c which implements a devsw-type device whose dv_strategy() function handles geli decryption. Support for all arches comes from moving the taste-and-attach code to the devopen() function in libsa.
After opening any DEVT_DISK device, devopen() calls the new function geli_probe_and_attach(), which will "attach" the geli code to the open_file struct by creating a geli_devdesc instance to replace the disk_devdesc instance in the open_file. That routes all IO for the device through the geli code.
A new public geli_add_key() function is added, to allow arch/vendor-specific code to add keys obtained from custom hardware or other sources.
With these changes, geli support will be compiled into all variations of loader(8) on all arches because the default is WITH_LOADER_GELI.
r336254: Use if rather than case for a simple boolean. gcc thinks blks is undefined sometimes with the case, but enc is always 0 or 1, so and if / else is better anyway.
r336256: Fix glitched indentation (and rewrap as needed due to deeper indent). No functional changes.
r336354: zfsboot: fix build with WITHOUT_LOADER_GELI
r336532: Collapse zfsloader functionality back down into loader.
We no longer really need a separate zfsloader. It was useful when we were first supporting ZFS and had limited ability to properly boot off of ZFS without the special boot loader. Now that the boot loader has matured, go the way loader.efi pioneered and just build one binary. Change the name of the loader to load in the secondary boot blocks to be just /boot/loader. Provide a symbolic link from zfsloader to loader so people who have not upgraded their boot blocks are not affected. This has the happy benefit of making coexistence easier as well (fewer binaries in the matrix).
r336533: Eliminate zfsloader man page.
Remove all cross references to zfsloader.8 and /boot/zfsloader. Move ZFS specific info into loader.8.
r336534: NM and OBJCOPY are already defined for all builds. There's no need to conditionally define them here.
r336537: Mention zfsloader being folded into loader in UPDATING.
r336626: Older zfs boot blocks don't support symlinks. install the link to zfsloader as a hard link. While newer ones do, the whole point of the link was to transition to the new world order smoothly. A hard link is less flexible, but it works and will result in fewer bumps. Adjust UPDATING entry to match.
r337326: loader: biosdisk.c has leftover geli header.
A small cleanup, remove unneeded #include.
r337349: zfsboot: Fix startup crash
On a FreeNAS mini XL, with geli encrypted drives the loader crashed in geli_read().
When we iterate over the list of disks and allocate the zfsdsk structures we don’t zero out the gdev pointer. In one case that resulted in geli_read() (called on the bogus pointer) dividing by zero.
Use calloc() to ensure the zfsdsk structure is always zeroed, so the pointer is initialised to NULL. As a side benefit it gets rid of one #ifdef LOADER_GELI_SUPPORT.
r341071: Restore the ability to override the disk unit/partition at the boot: prompt in gptboot.
When arch-independent geli support was added, a new static 'gdsk' struct was added, but there was still a static 'dsk' struct, and when you typed in an alternate disk/partition, the string was parsed into that struct, which was then never used for anything. Now the string gets parsed into gdsk.dsk, the struct that's actually used.
r341160: Add comments describing the bootargs handoff between loader(8) and gptboot or zfsboot, when loader(8) is the BTX loader. No functional changes.
r341420: Eliminate duplicated code and struct member definitions in the handoff of args data between gptboot/zfsboot and loader(8).
Despite what seems like a lot of changes here, there are no actual changes in behavior, or in the data layout in the structures involved. This is just eliminating identical code pasted into multiple locations.
In detail, the changes are...
- Move struct zfs_boot_args definition from libsa/zfs/libzfs.h to i386/common/bootargs.h because it is specific to x86 booting and the handoff between zfsboot and loader, and has no relation to the zfs library code in general.
- The geli_boot_args and zfs_boot_args structs both contain an identical set of member variables containing geli information. Extract this out to a new geli_boot_data struct, and embed it in the arg-passing structs.
- Provide new routines geli_import_boot_data() and geli_export_boot_data() that can be shared between gptboot, zfsboot, and loader instead of pasting identical code into several different .c files.
- Remove some checks for a NULL pointer that can never be true because the pointer being tested was set using pointer math (kargs + 1) and that can never result in NULL in this code.
r341473: Fix args cross-threading between gptboot(8) and loader(8) with zfs support.
When loader(8) is built with zfs support enabled, it assumes that any extarg data present is a zfs_boot_args struct, but if the first-stage loader was gptboot(8) the extarg data is actually a geli_boot_args struct. Luckily, zfsboot(8) and gptzfsboot(8) have always passed KARGS_FLAGS_ZFS along with KARGS_FLAGS_EXTARG, so we can use KARGS_FLAGS_ZFS to decide whether the extarg data is a zfs_boot_args struct.
To avoid similar problems in the future, gptboot(8) now passes a new KARGS_FLAGS_GELI to indicate that extarg data is geli_boot_args. In loader(8), if the neither KARGS_FLAGS_ZFS nor KARGS_FLAGS_GELI is set but extarg data is present (which will be the case for gptboot compiled before this change), we now check for the known size of the geli_boot_args struct passed by the older versions of gptboot as a way of confirming what type of extarg data is present.
In a semi-related tidying up, since loader's main() has already decided what type of extarg data is present and set the global 'zargs' var accordingly, don't repeat the check in extract_currdev, just check whether zargs is NULL or not.
r341651: Don't reference zfs-specific variables if LOADER_ZFS_SUPPORT is undefined because the variables will be undefined too.
r342793: MK_ZFS -> {MK_ZFS|MK_LOADER_ZFS}, this is so we can diable userland / kernel ZFS but keep the boot-loaders when using ZoL port.
Relnotes: yes (GELI support extended) Relnotes: yes (zfsloader has been collapsed into loader and may be removed after boot blocks have been updated) |
344377 |
20-Feb-2019 |
kevans |
MFC r336084-r336085, r336118: Move zfs impl into libsa
r336084: Move ZFS files into libsa
Move the libzfs stuff into libsa. There's no need for it to be a separate library. The separate library adds to the issues of build ordering that we see from time to time. Move the filesystem support into libsa, like all the other filesystem support rather than making zfs the odd-duck out.
Discussed with: allanjude@
r336085: Stop using ../zfs/libzfs.h but instead use libzfs.h.
While ../zfs/libzfs.h mostly works, there are a few situations where it does not. Eliminate the problem by using plain libzfs.h, like we do for ufs support. This fixes the weird cases, and is easier to understand. It also follows the general style convetion of avoiding ../ in #includes.
r336118: Remove dirs that git svn should have removed but didn't. |
344290 |
19-Feb-2019 |
kevans |
MFC r335117: stand bootprog_info consolidation
bootprog_info is generated in vers.c. Move it's definition to bootstrap.h and remove all the redundant copies. |
338332 |
27-Aug-2018 |
lidl |
MFC r338201: increase heap size during "loader" on sparc64
Increase the size of the heap size available on sparc64 during operation of "loader". The dramatic increase in size of SPA_MAXBLOCKSIZE in r304321 causes the heap space to be exhausted, so malloc() fails, ultimately leading to a memcpy() with a destination of 0x0. |
334191 |
24-May-2018 |
marius |
MFC: r333955
- Unbreak booting sparc64 kernels after the metadata unification in r329190 (MFCed to stable/11 in r332150); sparc64 kernels are always 64-bit but with that revision in place, the loader was treating them as 32-bit ones. - In order to reduce the likelihood of this kind of breakage in the future, #ifdef out md_load() on sparc64 and make md_load_dual() - which is currently local to metadata.c anyway - static. - Make md_getboothowto() - also local to metadata.c - static. - Get rid of the unused DTB pointer on sparc64.
Approved by: re (kib) |
332154 |
06-Apr-2018 |
kevans |
MFC r330806-r330815, r330837, r330864, r330883
pc98 changes associated with the named commits are also included in this commit, despite not having been made with the original commits due to its removal in head.
r330806: Minor cosmetic changes.
Make sure { on the same line as struct for all struct *devdesc. Move some type definitions to next to the dv_type define, since that's what sets the d_type.
r330807: We can't use d_opendata for blkio storage.
open_disk uses d_opendata for it's own purpse. We can't store blkio there. Fortunately, blkio is stored elsewhere and we never actually retrieve blkio from d_opendata. Eliminate it as a source of confusion. Eliminate all stores of d_opendata in efi since this layer doesn't own that field.
r330808: Make struct libi386_devdesc match the struct devdesc better
Move data to top and call it d_opendata.
r330809: Use the actual struct devdesc at the start of all *_devdesc structs
The current system is fragile and requires very careful layout of all *_devdesc structures. It also makes it hard to change the base devdesc. Take a page from CAM and put the 'header' in all the derived classes and adjust the code to match.
For OFW, move the iHandle h_handle out of a slot conflicting with d_opendata. Due to quirks in the alignment rules, this worked. However changing the code to use d_opendata storage now that it's a pointer is hard, so just have a separate field for it.
All other cleanups were to make the *_devdesc structures match where they'd taken some liberties that were none-the-less compatible enough to work.
r330810: Remove d_type from devdesc. It's not needed as we can fetch it from d_dev->dv_type when we need it.
r330811: GC unused routines.
Sponsored by: Netflix
r330812: Use the one-line-per-file pattern here, and sort the file names.
Sponsored by: Netflix
r330813: Move the env convenience routines out of boot1.c.
These routines are more generally useful. Even though boot1 is on its way out, it's better to make these common during the transition than copy them.
r330814: Star BootCurrent entry when booting.
Sponsored by: Netflix
r330815: Print the load and device path as well as BootCurrent and BootOrder
Sponsored by: Netflix
r330837: biosdisk.c should not set d_opendata.
Same as 330807, d_opendata is owned by open_disk and we should not set it.
M stand/i386/libi386/biosdisk.c
r330864: Prefer uintXX_t to u_intXX_t
A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. With consistency a great soul has simply nothing to do. -- Ralph Waldo Emerson
r330883: Fix typo that misteriously passes compilation. |
332150 |
06-Apr-2018 |
kevans |
MFC r329190, r329315, r330131: metadata load file unification
r329190: Unify metadata load files for arm, mips, powerpc, sparc64
Summary: All metadata.c files are very similar, with only trivial changes. Unify them into a single common file, with minor special-casing where needed.
r329315: stand: Fix ubldr after r329190
metadata load files were consolidated in r329190, and these relocation fixup bits were inadvertently dropped in the process. Re-add them to fix boot with ubldr.
r330131: Fix module loading on arm after the metadata.c unification in r329190. Arm modules need an additional address fixup not needed by other platforms. |
332148 |
06-Apr-2018 |
kevans |
MFC r330249-r330250
r330249: stand: Makefile SUBDIR cleanup
Use SUBDIR.${MK_*} where appropriate. r330248 eliminated most of the offenders, sweep the rest under the rug.
Differential Revision: https://reviews.freebsd.org/D14545
r330250: stand: Fix build after r330249
One does not simply convert to SUBDIR.yes in stand without making everything else in the affected files SUBDIR.yes -- there are better ways to do this. |
332134 |
06-Apr-2018 |
kevans |
MFC r329758: Fix compilation with LOADER_DEBUG defined after r329725. |
332128 |
06-Apr-2018 |
kevans |
MFC r329725, r329831
r329725: Consolidate three copies of ZFS commands into a central location.
There's no reason to have multiple copies of lszfs and reloadbe. Consolidate them into one location. Also ldi_get_size is the same everywhere (except sparc64). Make it the same everywhere as the common definition is more general and will work on spar64.
r329831: Fix userboot w/ ZFS after r329725
r329725 cleaned up ZFS commands duplicated in multiple places, but userboot was not setting HAVE_ZFS when MK_ZFS != "no". This resulted in a failure to boot (as seen in PR 226118) in bhyve, with the following message:
/boot/userboot.so: Undefined symbol "ldi_get_size" |
330123 |
28-Feb-2018 |
kevans |
MFC r330004: Add NO_OBJ to those directories that don't make anything.
For directories that don't many anything, add NO_OBJ=t just before we include bsd.init.mk. This prevents them from creating an OBJ directory. In addition, prevent defs.mk from creating the machine related links in these cases. They aren't needed and break, at least on stable, the read-only src tree build.
PR: 226074 |
329183 |
12-Feb-2018 |
kevans |
MFC Loader Fixes Final: r327612,r327703,r327704,r327878,r327879,r327881, r328007,r328029,r328030,r328031,r328061,r328156,r328169,r328288,r328289, r328290,r328291,r328292,r328411,r328536,r328603,r328614,r328642,r328769, r328779,r328780,r328781,r328782,r328783,r328806,r328808,r328826,r328835, r328911,r328986,r328987,r328990,r328999,r329000,r329019,r329050,r329054, r329060
r327612: Invent new #defines for the biospci_{read,write}_config function
r327703: Define __dmadat after #include'ing ufsread.c.
r327704: Fix printf missing format variables warnings.
r327878: Add GUID for UEFI boot manager variables.
r327879: Report the boot order and where we are in that boot order.
r327881: Allow this file to be included
r328007: Fix booting on some arm64 systems after r327879 by fixing the call to utf8_to_ucs2
r328029: When returning an error and freeing allocated memory from ucs2_to_utf8, NULL the return pointer.
r328030: Check the return value from utf8_to_ucs2 instead of whether or not uv is NULL.
r328031: Need to free uv after we're done using it.
r328061: utf8_to_ucs2() should check for malloc failure
r328156: stand: Move sections around to fix stand/ build with ld.lld on armv7
r328169: Remove extra copy of bootinfo.c. It's a bit rotted copy of the one in efi/loader.
r328288: Fix some resource leaks.
r328289: Don't leak memory when displaying help.
r328290: On malloc failure, be sure to close the include file that triggered it.
r328291: getenv does not return tainted data in the boot loader. Attempt to clue Coverity into that fact.
r328292: There's no tainted data here, tag it as such to avoid false positives.
r328411: loader.efi: add missing EFI GUIDs
r328536: loader: support for mixed-endianness ELF/loader and POWER8
r328603: Add missing non-POWERPC case to give the scr value something non-zero.
r328614: Move libstand.3 to libsa.3. Update libsa.3 to include functions
r328642: Break out the interpreters (simple and forth) w/o ifdefs.
r328769: Centralize several variables.
r328779: Retire pnp.4th and the code needed only for 4th words used here.
r328780: These 4th words were an attempt to allow integration into the boot loader scripts. However, that path won't be taken after all it seems.
r328781: Remove pcibios forth support.
r328782: Now that we no longer conditionally compile some files outside of ficl
r328783: Invent new LDR_INTERP for the loader interpreter to use.
r328806: We need more heap space to properly load newer powerpc kernels.
r328808: Implement strcoll as strcmp.
r328826: Make cross-endian loader changes apply only to powerpc
r328835: Fix regression introduced in r328806, preventing boot on many platforms.
r328911: Ignore relocation tables for non-memory-resident sections.
r328986: Fix relative location of USB sources after recent move.
r328987: A more definitions to kernel emulation shim in order to build stand/usb.
r328990: Move the stand/usb test loader into its own directory.
r328999: Fix indentation to FreeBSD standard for interp files
r329000: Move simple interpreter 'perform' into interp.c and call it
r329019: Move to tabs for indentation and to 8-space notches, per style(9).
r329050: Fix build of userboot.so
r329054: Set script.lang in the environment to either 'forth' or 'simple' to reflect what scripting language was compiled into the loader.
r329060: loader: fix endianness conversion
PR: 225323 |
329175 |
12-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p7: r324844,r326089,r326926,r326440,r326484,r326494, r326588,r326708,r326784,r326914,r327390,r328446,r326090,r326143,r326144, r326182,r326384,r326421,r326440,r326441,r326442,r326443,r326444,r326445, r326446,r326447,r326448,r326484,r326485,r326486,r326487,r326488,r326490, r326491,r326492,r326493,r326494,r326495,r326504,r326507,r326509,r326584, r326585,r326586,r326587,r326588,r326589,r326590,r326591,r326592,r326593, r326594,r326600,r326616,r326671,r326707,r326708,r326709,r326710,r326711, r326712,r326714,r326720,r326768,r326772,r326784,r326792,r326812,r326854, r326855,r326856,r326858,r326886,r326887,r326914,r326926,r326927,r326960, r326961,r326962,r326963,r327351,r327453,r327390,r327523,r327524,r326489, r327880,r328437,r328438,r328439,r328441,r328446,r328448,r328449,r328612, r328613,r328615
While here, undo our libfdt hack of not including <stdlib.h> if we're compiling _STANDALONE.
r324844: When building standalone, don't define errno. Let the definition from stand.h override. This is similar to what we do in the kernel.
r326089: loader.efi: efipart does not recognize partitionless disks
r326090: net_parse_rootpath() has no parameters
r326143: Fix theoretical integer overflow issues. If the product here is
r326144: Mark the func pointer as __dead2. It looks up loader_main, which
r326182: Modify all FreeBSD bootloaders on PowerPC AIM (Book-S) systems
r326384: Use const pointers to avoid casting away constness.
r326421: loader.efi: efipart should exclude iPXE stub block protocol
r326440: Remove stale dependency on ufsread.c
r326441: Minor flags cleanup
r326442: Cleanup CFALGS usage here
r326443: We don't need both _STAND and _STANDALONE, use the latter.
r326444: Move geli to common DO32 stuff
r326445: Fix random() and srandom() prototypes to match the standard.
r326446: Undefine _STANDALONE since this is test code.
r326447: Tweaks to the beri boot loader so that it builds w/o warnings.
r326448: Fix all warnings related to geli and ZFS support on x86.
r326484: Const poison the propname.
r326485: Delcare md_load in libofw.h. Make all prototypes match for ofw
r326486: Include machine/md_var to pick up __syncicache prototype.
r326487: Cast mdp (a vm_offset_t) to void * to match prototype.
r326488: e_entry can be smaller than a pointer. Cast it to an intptr_t
r326490: Declare our strange brand of main().
r326491: Disconnet ps3 from the build. There's too many warnings to fix.
r326492: Cast void * pointer to char * so the arg matches the %s format.
r326493: Provide a md_load64 prototype.
r326494: Mark two things as unused (since they are only sometimes used)
r326495: Now it's safe to bump WARNS to 1.
r326504: Switch to proper MK_LOADER_GELI tests.
r326507: increase maximum size of zfsboot
r326509: loader.efi: add note about iPXE into the efipart.c
r326584: When building standalone, include stand.h rather than the kernel
r326585: Include ficl.h before anything else
r326586: No need to include the userland md5.h, the kernel one is just fine.
r326587: Use the kernel relative paths, rather than the userland relative paths
r326588: Need to include skein in the include path
r326589: Make sure we include the right path for skein.h
r326590: Prefer stdint.h to inttypes.h
r326591: This isn't NetBSD specific code. Include these for any kernel /
r326592: Don't inherit CFLAGS. This a specialized test program.
r326593: Stop building with the standard system headers.
r326594: Now that we offer a semi-sane standards-ish set of #include files, stop hacking includes with sed.
r326600: Since this is contrib code, create an upstreamable version of my
r326616: dhcp_try_rfc1048() is not used any more
r326671: Avoid setting -Wno-tentative-definition-incomplete-type with gcc.
r326707: Add partial support signal.h functioanlity. Pull in machine/signal.h
r326708: Remove _KERNEL hack now that errno.h does the right thing when built standalone.
r326709: Provide implementations for iscntrl, ispunct and isgraph.
r326710: Put the files we're copying over into a few variables and clean hings up.
r326711: Const poison a couple of interfaces.
r326712: Create interp class.
r326714: boot1.c needs EFI_ZFS_BOOT too, so add it globally.
r326720: This path belongs in ficl/Makefile, not the common defines for users
r326768: Fix a comment to be more accurate
r326772: Fix regression with lua import
r326784: Revert part of 362772. It was causing problems for includes
r326792: Attempt to unbreak buildworld
r326812: Revert r326792, r326784, r326772, r326712
r326854: libefi: make efichar.h more usable in stand code
r326855: Cargo cut a fix for the regressions r326585 caused.
r326856: Fix comments after bump in size.
r326858: Revert r326855: Cargo cut a fix for the regressions r326585 caused.
r326886: Panic in sbrk if setheap hasn't been called yet. This is preferable o a mysterious crash
r326887: Remove the 'mini libstand in libstand' that util.[ch] provided.
r326914: Move loader-only defines to loader.mk from defs.mk
r326926: Move loader help file definitions to being 100% inside of loader.mk.
r326927: libficl is only ever used in a loader (never a boot) program. Move it.
r326960: Simplify things a little. The RETURN macro isn't required.
r326961: Interact is always called with NULL. Simplify code a little
r326962: Hoist btx include stuff to i386/Makefile.inc
r326963: No need to use relative paths like this here.
r327351: Fix ubldr. uboot/lib uses defines for the loader.
r327453: Add a validbcd() routine that uses the bcd2bin_data[] array
r327390: Garbage-collect loader.ps3. It is currently disconnected from the build and kboot replaces.
r327523: Don't clobber system LDFLAGS for beri boot loaders.
r327524: Use 'extern uint8_t' instead of 'extern void' for external symbols.
r326489: Allow this file to be used in libsa without warning...
r327880: Move getsecs() prototype to stand.h from net.h so it can be used
r328437: Split panic routine
r328438: Implement abort() as a call to panic.
r328439: Provide abs form stdlib.h.
r328441: abort() should be marked __dead2 since it won't return.
r328446: Now that exit is __dead2, we need to tag ub_exit() as __dead2.
r328448: Make exit() never return until host_exit can be written.
r328449: Tag unreachable places as such. I left the while (1); in place
r328612: Move strtold wrapper from strtol.c to its own strtold.c.
r328613: Kill copies of strtol and strtoul.
r328615: Update stand.h for changes for strto*l
PR: 223969 |
329146 |
12-Feb-2018 |
kevans |
MFC r326038,r326069,r326072: More stand simplification and fixes
r326038: Move some more common stuff up to Makefile.inc.
r326069: Fix gptzfsboot for cases with GELI.
r326072: Unbreak riscv build in universe. |
329145 |
12-Feb-2018 |
kevans |
MFC r325834,r325997,326502: Move sys/boot to stand/
This is effectively a direct commit to stable/11, due to differences between stable/11 and head. Changes to DTS in sys/boot/fdt/dts were often accompanied by kernel changes. Many of these were also risc-v updates that likely had many more dependencies to MFC.
Because of this, sys/boot/fdt/dts remains as-is while everything else in sys/boot relocates to stand/.
r325834: Move sys/boot to stand. Fix all references to new location
r325997: Remove empty directories.
r326502: Document the sys/boot -> stand move in hier.7 and the top-level README. |
329140 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p6: r324649,r324650,r324651,r324652,r324653,r324654, r324700,r324702,r324709,r324717,r324719,r324841,r324842,r324843,r324845, r324850,r324876,r324877,r324878,r324879,r324880,r324881,r324883,r324980, r324981,r324982,r324995,r325014,r325093,r325094,r325114,r325170,r325171, r325172,r325173,r325174,r325175,r325176,r325248,r325286,r325310,r325332, r325338,r325339,r325376,r325377,r325379,r325380,r325382,r325478,r325479, r325480,r325482,r325483,r325484,r325485,r325556,r325641,r325681,r325685, r325686,r325687,r325688,r325689,r325690,r325691,r325692,r325693,r325694, r325743,r325744,r325748,r325775,r325779,r325780
r324649: Move common/Makefile.inc to sys/boot/loader.mk.
r324650: tweak style
r324651: create defs.mk for common definitions
r324652: Move all the ficl common code into ficl.mk
r324653: LOADER_foo_SUPPORTED
r324654: Explicitly inlcude SYSDIR in the include path
r324700: loader: initialize dv_cleanup in md.c to eliminate clang warning
r324702: We need to include disk.o in libuboot.a when we're building with support for disk access.
r324709: Revert "Unify boot1 with loader" change r324646
r324717: libsa/ip.c: misplaced comment, ip_v is half char, not ip_p
r324719: libsa/ip: stop read loop on bad fragments
r324841: Use BOOTDIR more consistently in defs.mk rather than repeat sys/boot.
r324842: Introduce BOOTOBJ: The top level object directory for the boot tree
r324843: Stopgap fix to the mistmatch between LOADER_GELI_SUPPORT and LOADER_NO_GELI_SUPPORT.
r324845: Use BOOTOBJ and BOOTDIR to find geli includes and libraries.
r324850: Define LIBSA32 to LIBSA on i386 to fix build.
r324876: Move fdt and uboot defines into common uboot.mk.
r324877: End source directories with SRC rather than a hodgepodge of names
r324878: Make at91 boot loader compile again.
r324879: Prefer SRCTOP paths for bits we're grabbing from libc.
r324880: Use BOOTSRC here.
r324881: Use SYSDIR instead of ${.CURDIR}/../..<etc>/sys.
r324883: Use preferred defined paths, rather than relative paths in fdt.
r324980: Use BOOTDIR consistently.
r324981: Move BINDIR definition to defs.mk, and override where it isn't /boot
r324982: Remove sys/boot/arm/at91 and ixp425
r324995: loader.efi: Make framebuffer commands available for arm64
r325014: Add a 'place holder' arm struct efi_fb until a real one comes
r325093: Define new EFI variables
r325094: Cleanup non-arch Makefiles
r325114: Use defs.mk defins in most MD code
r325170: Use defs.mk values for userboot
r325171: Use defs.mk name and prefer bsd.init.mk
r325172: Remove the -nostdlib stuff I added. Instead, fix LDFLAGS to be honored correctly with the new Makefile.inc include order.
r325173: We don't need to build a special ficl for userboot.
r325174: Minor cleanup
r325175: For amd64, compile both zfs and zfs32 libraries.
r325176: Actually add zfs32/Makefile
r325248: loader ptblread() is broken with >512B sectors
r325286: efipart_strategy is using wrong offset with >512B sectors
r325310: zfs.c:vdev_read() needs to be careful about large sectors
r325332: loader: re-enable gzip support for x86
r325338: loader: fix BOOTSRC -> BOOTOBJ in a library path
r325339: This used to have bzip2 support too.
r325376: WIP: centralize machine links
r325377: mostly libsa
r325379: Revert "mostly libsa"
r325380: Revert "WIP: centralize machine links"
r325382: Cleanup stray libstand names to be libsa names.
r325478: Powerpc is a 32-bit boot loader.
r325479: Define LIBFICL32 to be libficl.a on i386 and libficl32.a on amd64.
r325480: Use DO32 for all the places that we need to flag we're building a 32-bit version of a library.
r325482: Move machine and other link creation to defs.mk
r325483: MACHINE can never be powerpc64, so cleanup code that thinks it can.
r325484: Prefer bsd.init.mk to src.opts.mk
r325485: Centralize all 32-bit builds on 64-bit platform stuff.
r325556: loader: set options before including bsd.init.mk
r325641: loader.efi: efi_devpath_is_prefix should return bool
r325681: boot1: avoid using NULL device path
r325685: libsa32 isn't needed for i386. It's already a 32-bit platform.
r325686: Simplify this if to a direct assignment.
r325687: Remove all the empty help files from the powerpc build.
r325688: FDT support doesn't make sense for ps3, remove it.
r325689: Remove LOADER_FDT_SUPPORT as a Makefile variable.
r325690: Remove LOADER_ZFS_SUPPORT as a Makefile variable
r325691: Remove useless PNP define here.
r325692: Replace LOADER_FIREWIRE_SUPPORT variable
r325693: Move LOADER_{NO,}_GELI_SUPPORT to MK_LOADER_GELI
r325694: Install the 4th files in sys/boot/forth instead of each loader
r325743: Make sure the proper loader.rc gets installed.
r325744: boot1: also check for NULL device
r325748: Use proper include file.
r325775: Add loader.conf to the list of files that are MD.
r325779: Add /boot/dts to the list of default modules.
r325780: Don't add /boot/dt*s* but /boot/dt*b*. Stupid think-o. |
329134 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p4: r324552,r324553,r324554,r324555,r324556
r324552: Kill the userboot copy of libstand.
r324553: Rename libstand.a to libsa.a and libstand32.a to libsa32.a
r324554: Move crc32.c, util.c and gpt.c over to libsa.
r324555: Honor CFLAGS modifications in Makefile.inc by using += here.
r324556: Move ufsread.c |
329131 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p3: r324460,r324471
r324460: Rather than laying whack-a-mole with including the path to stand.h, always include it.
r324471: Fix typos: `stand alon{e,g}` should be spelled like `standalone` |
329129 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p1: r324321,r324359,r324360,r324388,r324449,r324450, r324451,r324452
r324321: This README file was quite relevant for FreeBSD 3 or 4. No more.
r324359: Add efi_devpath_is_prefix
r324360: Encapsulate ZFS preferences into efi_zfs_is_preferred
r324388: Unbreak building efiboot with MK_ZFS == no
r324449: Prefer ${LIBSTAND} to -lstand
r324450: Define SASRC and use it
r324451: Add missing -I${SASRC} in a couple of places so that stand.h doesn't accidentally come in via host pollution.
r324452: Define LIBSA* and use them instead of overloaded LIBSTAND |
329100 |
10-Feb-2018 |
kevans |
MFC Loader Fixes 2017q2: r316437,r316577,r316578,r316585,r316590,r316612, r316625,r316628,r316654,r316682,r316704,r316771,r317092,r317097,r317099, r317652,r317785,r317886,r317887,r318142,r318320,r318356,r318678,r318754, r318982,r318986,r318987,r318988,r318989,r318990,r318991,r318992,r318993, r318994,r318999,r319083,r319084,r319085,r320011,r320234,r320288,r320304, r320467,r320482
r316437: Small cleanup to make i386/loader match efi/loader boot environment code
r316577: loader: part.c cstyle cleanup
r316578: loader: want mechanism to avoid RA with bcache
r316585: loader: zfs reader should check all labels
r316590: libstand/dosfs: cache FAT32 in 128 Kb blocks to save loader memory
r316612: In r298230 the value of HEAP_MIN was changed from 3MB to 64MB. Correct a comment.
r316625: Do not use -msoft-float with intention of disabling FP on aarch64
r316628: Silence GCC warning by initializing the local variable.
r316654: loader: r316585 did miss userboot update
r316682: loader: r316585 did miss sparc/ofw
r316704: loader.efi: only fetch zfs pool guid for the actual boot device
r316771: loader: Avoid possible overflow via environment variable
r317092: loader: zfs reader vdev_probe should check for minimum device size
r317097: loader: F_READ/F_WRITE should be checked against masked flag
r317099: loader: uboot disk ioctl should call disk_ioctl
r317652: loader.efi: ResetSystem does not use data with EFI_SUCCESS
r317785: zfsboot: drvsize() may be unusable on some systems
r317886: distinguish NFS versus TFTP boot by rootpath
r317887: loader: network read rework
r318142: libstand: NULL pointer dereference in rarp
r318320: loader: add ip layer code into libstand
r318356: libstand: increase nfs max read size to 16k
r318678: Replacing iterating over rootpath by strsep(3).
r318754: Pass -N directly to ld via -Wl rather than passing it to the compiler driver.
r318982: Pass a "FREEBSD" user-class in PXE dhcp request
r318986: add a comment on vendor index 19 and 20 to avoid confusion
r318987: Support URI scheme for root-path in netbooting
r318988: Always build tftpfs support along with nfs for pxeboot
r318989: Always issue the pxe request
r318990: Partially revert r314948
r318991: Document recent changes on pxeboot
r318992: Capitalize DHCP
r318993: Use the usual FreeBSD spelling for the DHCP user class
r318994: Catch with the change in the user class
r318999: Update the comments concerning net_parse_rootpath to reflect what it is now
r319083: Followup on the user-class changes
r319084: Small cleanup in dev_net.c
r319085: use the same option list for dhcp discovery and request
r320011: Add chain loader support for loader
r320234: Make structure padding explicit in EFI_MEMORY_DESCRIPTOR
r320288: Allow Clang's integrated assembler to assemble boot0
r320304: loader.efi: Disable smbios for arm
r320467: loader: chain load relocate data declaration is bad
r320482: As with arm64 mark the EFI PE header as allocated on arm.
PR: 218473 |
329099 |
10-Feb-2018 |
kevans |
MFC Loader Fixes 2017q1: r311458,r312237,r312314,r312374,r312947,r313042, r313047,r313166,r313328,r313332,r313333,r313337,r313348,r313349,r313389, r313442,r313451,r313575,r313645,r313710,r314114,r314213,r314275,r314945, r314948,r315008,r315408,r315427,r315645,r315646,r315648,r315653,r315850, r316064,r316078,r316079,r316100,r316104,r316111,r316112,r316171,r316279, r316280,r316287,r316311,r316343,r316424,r316436
r311458: Use compiler driver to link BERI boot loaders
r312237: loader.efi: find_currdev() can leak memory
r312314: loader: move device path definitions to include/efidevp.h
r312374: loader: efi devpath api usage should be more aware of NULL pointers
r312947: Remove "-Xassembler -G0" from CFLAGS.
r313042: loader.efi environment related cleanups
r313047: loader: disk/part api needs to use uint64_t offsets
r313166: loader: libefi/env.c warnings in arm build
r313328: loader: Implement disk_ioctl() to support DIOCGSECTORSIZE and DIOCGMEDIASIZE.
r313332: loader: bcache read ahead block count should take account the large sectors
r313333: loader: Replace EFI part devices.
r313337: loader: 313329 missed ZFS guard in loader/main.c
r313348: loader: biosdisk fix for 2+TB disks
r313349: loader: disk io should not use alloca()
r313389: efipart is also using the '%S' printf format, add -Wno-format for it.
r313442: loader: possible NULL pointer dereference in efipart.c
r313451: loader: possible NULL pointer dereference in bcache.c
r313575: makefs: make the buffer functions look exactly like the kernel ones
r313645: loader: implement MEDIA_FILEPATH_DP support in efipart
r313710: loader: cstyle fixes and DIOCGMEDIASIZE should use uint64_t
r314114: Use LDFLAGS with CC instead of _LDFLAGS.
r314213: Remove control+r handling from geliboot's pwgets()
r314275: Remove unused macro from common/drv.c.
r314945: Some style(9) fixes. No functional changes.
r314948: Try to extract the RFC1048 data from PXE.
r315008: r314948 seems to be missing a variable or two that will break
r315408: loader: remove open_disk cache
r315427: loader: biosdisk should report IO error from INT13
r315645: loader: disk_cleanup was left in userboot_disk.c
r315646: loader: pxe.h constants have wrong values
r315648: libstand: verify value provided by nfs.read_size
r315653: loader: verify the value from dhcp.interface-mtu and use snprintf o set mtu
r315850: The original author abused Nd (one-line description, used by makewhatis)
r316064: Fix build with path names with 'align' or 'nop' in them.
r316078: gpt*boot: Save a bit more memory when LOADER_NO_GELI_SUPPORT is specified
r316079: Simply retire the sedification of the boot2.s file.
r316100: Remove -fno-guess-branch-probability and -fno-unit-at-a-time.
r316104: Use `NO_WCAST_ALIGN` instead of spelling it out as -Wno-cast-align in CFLAGS
r316111: loader: move bios getsecs into time.c
r316112: loader: ls command should display file types properly
r316171: xfsread inlined uses more space, so remove the inline tag.
r316279: loader: efipart should check disk size from partition table
r316280: loader: simplify efi_zfs_probe and avoid double probing for zfs.
r316287: Remove OLD_NFSV2 from loader and libstand
r316311: Add explicit_bzero() to libstand, and switch GELIBoot to using it
r316343: Implement boot-time encryption key passing (keybuf)
r316424: Fix sparc64 build broken by r316343 and r316076
r316436: Restore EFI boot environment functionality broken in r313333
PR: 216940 217298 217935 |
319024 |
28-May-2017 |
ngie |
MFC r309412,r316109,r316132:
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. |
315221 |
14-Mar-2017 |
pfg |
MFC r313982, r314068: sys: Replace zero with NULL for pointers.
Found with: devel/coccinelle |
312556 |
20-Jan-2017 |
emaste |
MFC r310267: Deduplicate loader vers.c Makefile rules
The Makefile rule to create vers.c for loader version info was previously duplicated in each of the various loader Makefiles. Instead, share a common rule in Makefile.inc.
Sponsored by: The FreeBSD Foundation |
312318 |
17-Jan-2017 |
emaste |
MFC r310225: Reduce boot loader version string duplication
Instead of repeating "%s, Revision %s" "(%s %s)" in each loader, just create the full version string in vers.c |
308719 |
16-Nov-2016 |
bapt |
MFC r307238:
Stop closing the network device when netbooting for loaders using the common dev_net.c code.
The NETIF_OPEN_CLOSE_ONCE flag was added in r201932 to prevent that behaviour on some architectures (sparc64 and powerpc64) the default was left to always open and close the device for each open and close of a file by the loader because it was necessary for u-boot on arm.
Since it has been added, the flag was turned on for every arches including the u-boot loader for arm.
This also fixes netbooting on RPi3 (tested by gonzo@)
For the loader.efi it greatly speeds up netbooting
Reviewed by: emaste, gonzo, tsoome Approved by: gonzo MFC after: 1 month Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D8230 |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
298645 |
26-Apr-2016 |
pfg |
sys/boot: make use of the howmany() macro when available.
We have a howmany() macro in the <sys/param.h> header that is convenient to re-use as it makes things easier to read.
|
294765 |
26-Jan-2016 |
imp |
Move all the separate copies of the same strings into paths.h. There's nothing machine specific about these.
Differential Revision: https://reviews.freebsd.org/D5038
|
286368 |
06-Aug-2015 |
allanjude |
Remove guards around overwriting loader.rc and menu.rc
There have been .local version of each for user modifications for some time This allows users to receive future updates to these files
PR: 183765 Submitted by: Bertram Scharpf, Nikolai Lifanov (patch) Reviewed by: dteske, loos, eadler Approved by: bapt (mentor) MFC after: 1 month Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3176
|
284597 |
19-Jun-2015 |
bapt |
Fix fallouts from r284590
Reported by: kib
|
282320 |
01-May-2015 |
andreast |
Fix the loader for sparc64. The commit from r279799 missed the adaptation of md_load in sparc64/loader/main.c. This resulted in Memory Address Align issues at the early boot stage.
Tested on a netbooted Fire 120.
|
281009 |
03-Apr-2015 |
jkim |
Revert .PATH changes to fix mips build.
Reported by: bz Pointy hat to: jkim
|
281002 |
02-Apr-2015 |
jkim |
Install newly added brand-*.4th and logo-*.4th files and reduce duplication.
Reviewed by: dteske Pointy hat to: dteske
|
279799 |
09-Mar-2015 |
nwhitehorn |
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.
|
270168 |
19-Aug-2014 |
bdrewery |
Revert r267233 for now. PIE support needs to be reworked.
1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other build-only utility libraries. 2. Another 40% is fixed by generating _pic.a variants of various libraries. 3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR) where it never would work anyhow, such as csu or loader. This suggests there may be better ways of adding support to the tree. Many of these cases can be fixed such that -fPIE will work but there is really no reason to have it in those cases. 4. Some of the uses are working around hacks done to some Makefiles that are really building libraries but have been using bsd.prog.mk because the code is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have been needed.
We likely do want to enable PIE by default (opt-out) for non-tree consumers (such as ports). For in-tree though we probably want to only enable PIE (opt-in) for common attack targets such as remote service daemons and setuid utilities. This is also a great performance compromise since ASLR is expected to reduce performance. As such it does not make sense to enable it in all utilities such as ls(1) that have little benefit to having it enabled.
Reported by: kib
|
269153 |
27-Jul-2014 |
marcel |
Give loaders more control over the Forth initialization process. In particular, allow loaders to define the name of the RC script the interpreter needs to use. Use this new-found control to have the PXE loader (when compiled with TFTP support and not NFS support) read from ${bootfile}.4th, where ${bootfile} is the name of the file fetched by the PXE firmware.
The normal startup process involves reading the following files: 1. /boot/boot.4th 2. /boot/loader.rc or alternatively /boot/boot.conf
When these come from a FreeBSD-defined file system, this is all good. But when we boot over the network, subdirectories and fixed file names are often painful to administrators and there's really no way for them to change the behaviour of the loader.
Obtained from: Juniper Networks, Inc.
|
267233 |
08-Jun-2014 |
bdrewery |
In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE.
This is currently an opt-in build flag. Once ASLR support is ready and stable it should changed to opt-out and be enabled by default along with ASLR.
Each application Makefile uses opt-out to ensure that ASLR will be enabled by default in new directories when the system is compiled with PIE/ASLR. [2]
Mark known build failures as NO_PIE for now.
The only known runtime failure was rtld.
[1] http://www.bsdcan.org/2014/schedule/events/452.en.html Submitted by: Shawn Webb <lattera@gmail.com> Discussed between: des@ and Shawn Webb [2]
|
265420 |
06-May-2014 |
imp |
Use src.opts.mk in preference to bsd.own.mk except where we need stuff from the latter.
|
264400 |
13-Apr-2014 |
imp |
NO_MAN= has been deprecated in favor of MAN= for some time, go ahead and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit.
|
263005 |
11-Mar-2014 |
royger |
howto_names: unify declaration
Approved by: gibbs Sponsored by: Citrix Systems R&D
boot/i386/efi/bootinfo.c: boot/i386/libi386/bootinfo.c: boot/ia64/common/bootinfo.c: boot/powerpc/ofw/metadata.c: boot/powerpc/ps3/metadata.c: boot/sparc64/loader/metadata.c: boot/uboot/common/metadata.c: boot/userboot/userboot/bootinfo.c: i386/xen/xen_machdep.c: - Include sys/boot.h - Remove custom definition of howto_names.
sys/boot.h: - Define howto_names.
x86/xen/pv.c: - Include sys/boot.h
|
262613 |
28-Feb-2014 |
dim |
Merge the projects/clang-sparc64 branch back to head. This brings in several updates from the llvm and clang trunks to make the sparc64 backend fully functional.
Apart from one patch to sys/sparc64/include/pcpu.h which is still under discussion, this makes it possible to let clang fully build world and kernel for sparc64.
Any assistance with testing this on actual sparc64 hardware is greatly appreciated, as there will unavoidably be bugs left.
Many thanks go to Roman Divacky for his upstream work on getting the sparc64 backend into shape.
MFC after: 1 month
|
251589 |
10-Jun-2013 |
marius |
- The method introduced as part of r234898 for not altering the boot path when booting from ZFS turned out to also cause the boot path not being adjusted if booting from CD-ROM with firmware versions that do not employ the "cdrom" alias in that case. So shuffle the code around instead in order to achieve the original intent. Ideally, we shouldn't fiddle with the boot path when booting from UFS on a disk either; unfortunately, there doesn't seem to be an universal way of telling disks and CD-ROMs apart, though. [1] - Use NULL instead of 0 for pointers.
PR: 179289 MFC after: 1 week
|
245697 |
20-Jan-2013 |
avg |
zfs/sparc64 boot: fix booting after r242230
arch_zfs_probe method is supposed to only probe for ZFS vdevs, but it can not expect that ZFS data is in a ready state yet. So, move some code from sparc64_zfs_probe to main to meet the constraints.
Reported by: Chris Ross <cross+freebsd@distal.com> Tested by: Chris Ross <cross+freebsd@distal.com> MFC after: 4 days
|
244307 |
16-Dec-2012 |
marius |
Restore pre-r234898 printing of boot loader and path.
MFC after: 3 days
|
243305 |
19-Nov-2012 |
marius |
Fix build after r243245.
Submitted by: trasz
|
242688 |
07-Nov-2012 |
dteske |
Hook in new files menusets.4th and manual.
Approved by: adrian (co-mentor) (implicit)
|
240335 |
11-Sep-2012 |
ae |
Slightly reduce an overhead for the open() call in the zfsloader. libstand(3) tries to detect file system in the predefined order, but zfsloader usually is used for the booting from ZFS, and there is no need to try detect several file system types for each open() call.
|
238851 |
27-Jul-2012 |
marius |
Pull the tier-2 card and change the sparc64 ZFS loader to no longer probe all diskN aliases for providers (which more or less corresponds to how the x86 version behaves) but instead probe only those listed in the boot-device OFW environment variable. This has the following advantages: - avoids otherwise unavoidable OFW warnings about failures to open disks for which aliases exist but no actual hardware is connected - avoids issues due to different diskN naming schemes - aligns us with Solaris
MFC after: 3 days
|
236581 |
04-Jun-2012 |
marius |
The loaddev environment variable is not modifiable once set, so it is not update for ZFS. It seems that this does not really affect anything except the help command. Nevertheless, rearrange things so loaddev is set only once in all cases in order to get it right. Pointed out by: avg
MFC after: r235364
|
235988 |
25-May-2012 |
gleb |
Use 32-bit ufs_ino_t instead of ino_t to keep boot2 small and prevent unnecessary 64-bit math on 32-bit machines.
Sponsored by: Google Summer of Code 2011
|
235364 |
12-May-2012 |
avg |
sparc64/zfs boot: take advantage of new libzfsboot capabilities
Also drop the now unneeded compatibility shims.
Tested by: marius MFC after: 1 month
|
235329 |
12-May-2012 |
avg |
zfsboot/zfsloader: support accessing filesystems within a pool
In zfs loader zfs device name format now is "zfs:pool/fs", fully qualified file path is "zfs:pool/fs:/path/to/file" loader allows accessing files from various pools and filesystems as well as changing currdev to a different pool/filesystem.
zfsboot accepts kernel/loader name in a format pool:fs:path/to/file or, as before, pool:path/to/file; in the latter case a default filesystem is used (pool root or bootfs). zfsboot passes guids of the selected pool and dataset to zfsloader to be used as its defaults.
zfs support should be architecture independent and is provided in a separate library, but architectures wishing to use this zfs support still have to provide some glue code and their devdesc should be compatible with zfs_devdesc. arch_zfs_probe method is used to discover all disk devices that may be part of ZFS pool(s).
libi386 unconditionally includes zfs support, but some zfs-specific functions are stubbed out as weak symbols. The strong definitions are provided in libzfsboot. This change mean that the size of i386_devspec becomes larger to match zfs_devspec.
Backward-compatibility shims are provided for recently added sparc64 zfs boot support. Currently that architecture still works the old way and does not support the new features.
TODO: - clear up pool root filesystem vs pool bootfs filesystem distinction - update sparc64 support - set vfs.root.mountfrom based on currdev (for zfs)
Mid-future TODO: - loader sub-menu for selecting alternative boot environment
Distant future TODO: - support accessing snapshots, using a snapshot as readonly root
Reviewed by: marius (sparc64), Gavin Mu <gavin.mu@gmail.com> (sparc64) Tested by: Florian Wagner <florian@wagner-flo.net> (x86), marius (sparc64) No objections: fs@, hackers@ MFC after: 1 month
|
235207 |
09-May-2012 |
marius |
Use a non-tricky approach for building and installing zfsboot sharing the Makefile with boot1.
Submitted by: ru
|
235153 |
09-May-2012 |
avg |
sys/boot: add common CTASSERT definition
|
234898 |
01-May-2012 |
marius |
Add initial support for booting from ZFS on sparc64. At least on Sun Fire V100, the firmware is known to be broken and not allowing to simultaneously open disk devices, causing attempts to boot from a mirror or RAIDZ to cause a crash. This will be worked around later. The firmwares of newer sun4u models don't seem to exhibit this problem though.
Steps for ZFS booting:
1. create VTOC8 label # gpart create -s vtoc8 da0
2. add partitions, f.e.: # gpart add -t freebsd-zfs -s 60g da0 # gpart add -t freebsd-swap da0 resulting in something like: # gpart show => 0 143331930 da0 VTOC8 (68G) 0 125821080 1 freebsd-zfs (60G) 125821080 17510850 2 freebsd-swap (8.4G)
3. create zpool # zpool create bunker da0a or for mirror/RAIDZ (after preparing additional disks as in steps 1. + 2.): # zpool create bunker mirror da0a da1a # zpool create bunker raidz da0a da1a da2a ...
4. set bootfs # zpool set bootfs=bunker bunker
5. install zfsboot # zpool export bunker # gpart bootcode -p /boot/zfsboot da0
6. write zfsloader to the ZFS Boot Block (so far, there's no dedicated tool for this, so dd(1) has to be used for this purpose) When using mirror/RAIDZ, step 4. and the dd(1) invocation should be repeated for the additional disks in order to be able to boot from another disk in case of failure. # sysctl kern.geom.debugflags=0x10 # dd if=/boot/zfsloader of=/dev/da0a bs=512 oseek=1024 conv=notrunc # zpool import bunker
7. install system on ZFS filesystem Don't forget to set 'zfs_load="YES"' and vfs.root.mountfrom="zfs:bunker" in loader.conf as well as 'zfs_enable="YES"'in rc.conf.
8. copy zpool.cache to the ZFS filesystem cp -p /boot/zfs/zpool.cache /bunker/boot/zfs/zpool.cache
9. set mountpoint # zfs set mountpoint=/ bunker
10. Now, given that aliases for all disks in the zpool exists (check with the `devalias` command on the boot monitor prompt) and disk0 corresponds to da0 (likewise for additional disks), the system can be booted from the ZFS with: {1} ok boot disk0
PR: 165025 Submitted by: Gavin Mu
|
234897 |
01-May-2012 |
marius |
Add a command for showing the heap usage.
PR: 165025 Submitted by: Gavin Mu MFC after: 1 week
|
223719 |
02-Jul-2011 |
marius |
- For Cheetah- and Zeus-class CPUs don't flush all unlocked entries from the TLBs in order to get rid of the user mappings but instead traverse them an flush only the latter like we also do for the Spitfire-class. Also flushing the unlocked kernel entries can cause instant faults which when called from within cpu_switch() are handled with the scheduler lock held which in turn can cause timeouts on the acquisition of the lock by other CPUs. This was easily seen with a 16-core V890 but occasionally also happened with 2-way machines. While at it, move the SPARC64-V support code entirely to zeus.c. This causes a little bit of duplication but is less confusing than partially using Cheetah-class bits for these. - For SPARC64-V ensure that 4-Mbyte page entries are stored in the 1024- entry, 2-way set associative TLB. - In {d,i}tlb_get_data_sun4u() turn off the interrupts in order to ensure that ASI_{D,I}TLB_DATA_ACCESS_REG actually are read twice back-to-back.
Tested by: Peter Jeremy (16-core US-IV), Michael Moll (2-way SPARC64-V)
|
222472 |
30-May-2011 |
julian |
Include forgotten framework changes to get some of the new menu files installed correctly on non x86/amd systems. pointy-hut to devin
|
222417 |
28-May-2011 |
julian |
New boot loader menus from Devin Teske. Discussed on hackers and recommended for inclusion into 9.0 at the devsummit. All support email to devin dteske at vicor dot ignoreme dot com .
Submitted by: dteske at vicor dot ignoreme dot com Reviewed by: me and many others
|
221869 |
14-May-2011 |
attilio |
Disconnect sun4v architecture from the three.
Some files keep the SUN4V tags as a code reference, for the future, if any rewamped sun4v support wants to be added again.
Reviewed by: marius Tested by: sbruno Approved by: re
|
220290 |
03-Apr-2011 |
marcel |
Revert rev 165325. The arch_maphint interface hasn't been in use for more than 4 years.
|
214526 |
29-Oct-2010 |
marius |
Partially revert r203829; as it turns out what the PowerPC OFW loader did was incorrect as further down the road cons_probe() calls malloc() so the former can't be called before init_heap() has succeed. Instead just exit to the firmware in case init_heap() fails like OF_init() does when hitting a problem as we're then likely running in a very broken environment where hardly anything can be trusted to work.
|
212729 |
16-Sep-2010 |
marius |
Merge from powerpc: - Change putc_func_t to use a char instead of an int for the character. - Make functions and variables not used outside of this source file static. - Remove unused prototypes and variables. - The OFW read and seek methods take 3 and not 4 input arguments.
|
208789 |
03-Jun-2010 |
ed |
Use -Wl,-N instead of the undocumented -N option for GCC.
GCC forwards the -N flag directly to ld. This flag is not documented and not supported by (for example) Clang. Just use -Wl,-N.
Submitted by: Pawel Worach
|
207537 |
02-May-2010 |
marius |
Add support for SPARC64 V (and where it already makes sense for other HAL/Fujitsu) CPUs. For the most part this consists of fleshing out the MMU and cache handling, it doesn't add pmap optimizations possible with these CPU, yet, though. With these changes FreeBSD runs stable on Fujitsu Siemens PRIMEPOWER 250 and likely also other models based on SPARC64 V like 450, 650 and 850. Thanks go to Michael Moll for providing access to a PRIMEPOWER 250.
|
204152 |
20-Feb-2010 |
marius |
Some machines can not only consist of CPUs running at different speeds but also of different types, f.e. Sun Fire V890 can be equipped with a mix of UltraSPARC IV and IV+ CPUs, requiring different MMU initialization and different workarounds for model specific errata. Therefore move the CPU implementation number from a global variable to the per-CPU data. Functions which are called before the latter is available are passed the implementation number as a parameter now.
|
203831 |
13-Feb-2010 |
marius |
Correct the panic strings introduced in r203830 to match their arguments.
|
203830 |
13-Feb-2010 |
marius |
Use the SUNW,{d,i}tlb-load methods for entering locked TLB entries like OpenBSD and OpenSolaris do instead of fiddling with the MMUs ourselves. Unlike direct access the firmware methods don't automatically use the next free (?) TLB slot, instead the slot to be used has to be specified. We allocate the TLB slots for the kernel top-down as OpenSolaris suggests that the firmware will always allocate the ones for its own use bottom-up. Besides being simpler, according to OpenBSD using the firmware methods is required to allow booting on Sun Fire E10K with multi-systemboard domains.
|
203829 |
13-Feb-2010 |
marius |
- Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware of Sun Fire V1280 doesn't round up the size itself but instead lets claiming of non page-sized amounts of memory fail. - Change parameters and variables related to the TLB slots to unsigned which is more appropriate. - Search the whole OFW device tree instead of only the children of the root nexus device for the BSP as starting with UltraSPARC IV the 'cpu' nodes hang off of from 'cmp' (chip multi-threading processor) or 'core' or combinations thereof. Also in large UltraSPARC III based machines the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which group snooping-coherency domains together instead of directly from the nexus. - Add support for UltraSPARC IV and IV+ BSPs. Due to the fact that these are multi-core each CPU has two Fireplane config registers and thus the module/target ID has to be determined differently so the one specific to a certain core is used. Similarly, starting with UltraSPARC IV the individual cores use a different property in the OFW device tree to indicate the CPU/core ID as it no longer is in coincidence with the shared slot/socket ID. While at it additionally distinguish between CPUs with Fireplane and JBus interconnects as these also use slightly different sizes for the JBus/agent/module/target IDs. - Check the return value of init_heap(). This requires moving it after cons_probe() so we can panic when appropriate. This should be fine as the PowerPC OFW loader uses that order for quite some time now.
|
201932 |
09-Jan-2010 |
marius |
- Add code allowing a network device to only be open and closed once by keeping it opened after the first open and closing it via the cleanup handler when NETIF_OPEN_CLOSE_ONCE is defined in order to avoid the open-close-dance on every file access which with firmware that for example performs an auto-negotiation on every open causes netbooting to take horribly long. Basically the behavior with this knob enabled resembles the one employed between r60506 and r177108 (and for sparc64 also again since r182919) with the addition that the network device now is closed eventually before entering the kernel and before rebooting. Actually I think this should be the desired MI behavior, however the U-Boot loader actually requires net_close() to be called after every transaction in order for some local shutdown operations to be performed (and which I think thus will break on concurrent opens, i.e. when netdev_opens is > 1, like the loader does at least for disks when LOADER_GZIP_SUPPORT is enabled). - Use NETIF_OPEN_CLOSE_ONCE to replace the hack, which artificially increased netdev_opens for sparc64 in order to keep the network device opened forever, as at least some firmware versions require the network device to be closed eventually before entering the kernel or otherwise will DMA received packets to stale memory. The powerpc OFW loader probably wants NETIF_OPEN_CLOSE_ONCE to be set as well for the same reasons.
|
200946 |
24-Dec-2009 |
marius |
Execute the cleanup handlers before jumping to the kernel just like the other architectures do.
|
200944 |
24-Dec-2009 |
marius |
Revert r183628 as with the current ata(4) ATAPI DMA with AcerLabs M5229 appears to be once again fixed. If this happens to return we probably should disable ATAPI DMA in ataacerlabs(4) instead just like the Linux libATA does.
|
191071 |
14-Apr-2009 |
marius |
Fix masking of TTE bits; the TD_*_MASK macros need shifting via the corresponding TD_*_SHIFT.
MFC after: 3 days
|
191012 |
13-Apr-2009 |
marius |
Fix whitespace.
|
188895 |
21-Feb-2009 |
ru |
Fix build when WITH_SSP is set explicitly.
Submitted by: Jeremie Le Hen
|
188455 |
10-Feb-2009 |
marius |
- Use the generally more appropriate PROM base rather than the kernel one as the non-faulting flush address in the loader so we can can change KERNBASE and VM_MIN_KERNEL_ADDRESS if we ever want to without needing to worry about using a compatible loader. - Correctly check for LOADER_DEBUG. - Add a missing const for page_sizes[].
|
183628 |
05-Oct-2008 |
marius |
Disable ATAPI DMA as it's once again broken in that it causes data corruption with the on-board AcerLabs M5229 controllers. While at it, remove the pointless "nothing to autoload yet." message.
MFC after: 3 days
|
182916 |
10-Sep-2008 |
marius |
Work around Cheetah+ erratum 34 (USIII+ erratum #10) by relocating the locked entry in it16 slot 0, which typically is occupied by the PROM, and manually entering locked entries in slots != 0.
Thanks to Hubert Feyrer for donating the Blade 2000 this change was developed on.
|
182877 |
08-Sep-2008 |
marius |
USIII and beyond CPUs have stricter requirements when it comes to synchronization needed after stores to internal ASIs in order to make side-effects visible. This mainly requires the MEMBAR #Sync after such stores to be replaced with a FLUSH. We use KERNBASE as the address to FLUSH as it is guaranteed to not trap. Actually, the USII synchronization rules also already require a FLUSH in pretty much all of the cases changed. We're also hitting an additional USIII synchronization rule which requires stores to AA_IMMU_SFSR to be immediately followed by a DONE, FLUSH or RETRY. Doing so triggers a RED state exception though so leave the MEMBAR #Sync. Linux apparently also has gotten away with doing the same for quite some time now, apart from the fact that it's not clear to me why we need to clear the valid bit from the SFSR in the first place.
Reviewed by: nwhitehorn
|
182766 |
04-Sep-2008 |
marius |
Ensure interrupts are off while in {d,i}tlb_va_to_pa_sun4u(). I think this is necessary in order to make sure the workarounds in {d,i}tlb_get_data_sun4u() work correctly.
|
182478 |
30-Aug-2008 |
marius |
- Read ASI_{D,I}TLB_DATA_ACCESS_REG twice in order to work around errata of USIII and beyond (USIII erratum #19, USIII+ erratum #1, USIIIi erratum #1). - Use the cheetah PA mask in {d,i}tlb_va_to_pa_sun4u() for USIII and beyond. This is done so that these functions will still mask the debug bits of spitfire-class CPUs once we increase TD_PA_BITS to match the number of bits used for the PA by cheetah-class CPUs. - Change {d,i}tlb_enter_sun4u() to also set TLB_CTX_KERNEL as the context of the mappings entered. This is more or less cosmetic as TLB_CTX_KERNEL is 0. - Now that we have to distinguish between different sun4u CPUs in the loader anyway, no longer do trial and error when reading the portid property.
|
182020 |
22-Aug-2008 |
marius |
cosmetic changes and style fixes
|
181398 |
07-Aug-2008 |
marius |
- Reimplement {d,i}tlb_enter() and {d,i}tlb_va_to_pa() in C. There's no particular reason for them to be implemented in assembler and having them in C allows easier extension as well as using more C macros and {d,i}tlb_slot_max rather than hard-coding magic (and actually spitfire-only) values. - Fix the compilation of pmap_print_tte(). - Change pmap_print_tlb() to use ldxa() rather than re-rolling it inline as well as TLB_DAR_SLOT and {d,i}tlb_slot_max rather than hardcoding magic (and actually spitfire-only) values. - While at it, suffix the above mentioned functions with "_sun4u" to underline they're architecture-specific. - Use __FBSDID and macros instead of magic values in locore.S. - Remove unused includes and smp_stack in locore.S.
|
180208 |
03-Jul-2008 |
peter |
Set magic fbsd:nokeywords property that allows files to bypass keyword expansion. (file-specific replacement for CVSROOT/exclude)
|
180012 |
25-Jun-2008 |
ru |
Enable GCC stack protection (aka Propolice) for userland: - It is opt-out for now so as to give it maximum testing, but it may be turned opt-in for stable branches depending on the consensus. You can turn it off with WITHOUT_SSP. - WITHOUT_SSP was previously used to disable the build of GNU libssp. It is harmless to steal the knob as SSP symbols have been provided by libc for a long time, GNU libssp should not have been much used. - SSP is disabled in a few corners such as system bootstrap programs (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves. - It should be safe to use -fstack-protector-all to build world, however libc will be automatically downgraded to -fstack-protector because it breaks rtld otherwise. - This option is unavailable on ia64.
Enable GCC stack protection (aka Propolice) for kernel: - It is opt-out for now so as to give it maximum testing. - Do not compile your kernel with -fstack-protector-all, it won't work.
Submitted by: Jeremie Le Hen <jeremie@le-hen.org>
|
170854 |
17-Jun-2007 |
marius |
- Make better use of the global chosen, memory and mmu handles instead of obtaining them over and over again and pretending we could do anything useful without them (for chosen this includes adding a declaration and initializing it in OF_init()). - In OF_init() if obtaining the memory or mmu handle fails just call OF_exit() instead of panic() as the loader hasn't initialized the console at these early stages yet and trying to print out something causes a hang. With OF_exit() one at least has a change to get back to the OFW boot monitor and debug the problem. - Fix OF_call_method() on 64-bit machines (this is a merge of sys/dev/ofw/openfirm.c rev 1.6). - Replace OF_alloc_phys(), OF_claim_virt(), OF_map_phys() and OF_release_phys() in the MI part of the loader with wrappers around OF_call_method() in the sparc64. Beside the fact that they duplicate OF_call_method() the formers should never have been in the MI part of the loader as contrary to the OFW spec they use two-cell physical addresses. - Remove unused functions which are also MD dupes of OF_call_method(). - In sys/boot/sparc64/loader/main.c add __func__ to panic strings as different functions use otherwise identical panic strings and make some of the panic strings a tad more user-friendly instead of just mentioning the name of the function that returned an unexpected result.
|
170839 |
16-Jun-2007 |
marius |
- Remove dupe and unused declarations and prototypes. - Add missing prototypes. - Define global variables not used outside of this module as static. - Replace some outdated hard-coded functions names in panic strings with __func__. - Fix some style(9) bugs.
|
165325 |
18-Dec-2006 |
kmacy |
add an interface for passing the entire kernel size up front to the loader so that it can memory can be allocated aligned at the beginning of the desired large page
|
164563 |
23-Nov-2006 |
kmacy |
remove CDDL derive hcall.S
|
163893 |
02-Nov-2006 |
marcel |
Don't unconditionally compile-in the bcache code. It's only used on i386/amd64 and pc98. Remove useless calls to bcache_init() from the ia64 and sparc64 loaders, as well as from the OFW common code.
|
163151 |
09-Oct-2006 |
kmacy |
unbreak sparc64 loader build re-add accidentally deleted asi value remove sun4v only header include
Approved by: rwatson (mentor) Reviewed by: jmg
|
163145 |
09-Oct-2006 |
kmacy |
add sun4v support to the sparc64 boot loader
Approved by: rwatson (mentor) Reviewed by: jmg Tested by: kris, dwhite, and jmg
|
156813 |
17-Mar-2006 |
ru |
Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html
The src.conf(5) manpage is to follow in a few days.
Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)
|
150469 |
22-Sep-2005 |
ru |
Add loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE: "boot_dfltroot", "boot_mute", and "boot_pause" respectively.
|
149111 |
15-Aug-2005 |
marius |
- Change the code that determines whether to use a serial console and which serial device to use in that case respectively to not rely on the OFW names of the input/output and stdin/stdout devices. Instead check whether input and output refers to the same device and is of type serial (uart(4) was already doing this) and for the fallback to a serial console in case a keyboard is the selected input device but unplugged do the same for stdin and stdout in case the input device is nonexistent (PS/2 and USB keyboards) or has a 'keyboard' property (RS232 keyboards). Additionally also check whether the OFW did a fallback to a serial console in the same way in case the output device is nonexistent. While at it save on some variables and for sys/boot/sparc64/loader/metadata.c move the code in question to a new function md_bootserial() so it can be kept in sync with uart_cpu_getdev_console() more easily. This fixes selecting a serial console and the appropriate device when using a device path for the 'input-device' and 'output-device' OFW environment variables instead of an alias for the serial device to use or when using a screen alias that additionally denotes a video mode (like e.g. 'screen:r1024x768x60') but no keyboard is plugged in (amongst others). It also makes the code select a serial console in case the OFW did the same due to a misconfiguration like both 'input-device' and 'output-device' set to 'keyboard' or to a nonexisting device (whether the OFW does a fallback to a serial console in case of a misconfiguration or one ends up with just no console at all highly depends on the OBP version however). - Reduce the size of buffers that only ever need to hold the string 'serial' accordingly. Double the size of buffers that may need to hold a device path as e.g. '/pci@8,700000/ebus@5/serial@1,400000:a' exceeds 32 chars. - Remove the package handle of the '/options' node from the argument list of uart_cpu_getdev_dbgport() as it's unused there and future use is also unlikely.
MFC after: 1 week
|
139738 |
05-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-
|
139123 |
21-Dec-2004 |
ru |
NOFORTH -> NO_FORTH
|
139103 |
21-Dec-2004 |
ru |
Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by: core
|
138249 |
01-Dec-2004 |
scottl |
Remove the last vestiges of the userconfig option. None of this actually did anything, so this commit should be considered a NO-OP.
|
134944 |
08-Sep-2004 |
kensmith |
Back out v1.24. v1.40 of sys/sparc64/sparc64/bus_machdep.c fixes the problem this hack was put in place for.
MFC to be done if the fix to bus_machdep.c is MFC-ed.
|
134039 |
19-Aug-2004 |
kensmith |
Temporary bandaid to help sparc64 systems with ATA disks boot. Recent changes to the ATA driver cause a kernel crash, no fault of the ATA code. Work is in progress to add the necessary feature to the sparc64 kernel and this commit will be backed out when it is complete. This bandaid is being put in mostly in the interests of getting the first release snapshot done and out the door.
Tested on: Ultra-10 exhibiting the insta-panic. MFC: Real Soon
|
133862 |
16-Aug-2004 |
marius |
Instead of "OpenFirmware", "openfirmware", etc. use the official spelling "Open Firmware" from IEEE 1275 and OpenFirmware.org (no pun intended).
Ok'ed by: tmm
|
127826 |
04-Apr-2004 |
marcel |
To quote the submitter: "...If "keyboard" is the selected input-device and "screen" the output-device (both via /options) but the keyboard is unplugged, OF automatically switches to ttya for the console, it even prints a line telling so on "screen". Solaris respects this behaviour and uses ttya as the console in this case and people probably expect FreeBSD to do the same (it's also very handy to temporarily switch consoles)..." "...I changed the comparison of the console device with "ttya" || "ttyb" to "tty" because on AXe boards all 4 onboard UARTs end in SUB-D connectors (ttya and ttyb being 16550 and ttyc and ttyd a SAB82532) and there's no Sun keyboard connector (but PS/2). If one plugs a serial card in a box there also can be more than just ttya and ttyb available for a console..."
Submitted by: Marius Strobl <marius@alchemy.franken.de> Has no doubt that the change is correct: marcel
|
125717 |
11-Feb-2004 |
ru |
_start.S -> _start.s as the latter is pure asm file.
Repocopied by: joe
|
125674 |
10-Feb-2004 |
ru |
Since loader(8) on SPARC64 is a pure ELF executable (as opposed to other architectures), there is no reason not to strip(1) it.
Tested by: kensmith
|
125622 |
09-Feb-2004 |
ru |
MFi386.
- Factor out common settings and put them in an upper level Makefile.inc. - Properly use PROG for real programs, not their products. - Further reduce diffs to i386 versions.
Tested on: sparc64 (panther)
|
124139 |
04-Jan-2004 |
obrien |
Convert to __FBSDID.
|
122499 |
11-Nov-2003 |
jake |
Set RB_SERIAL in boothowto if the firmware output-device is ttya or ttyb. This ensures that uart gets a higher console priority than syscons when a serial console is being used. Testing against the "console" environment variable doesn't make sense since we only have one loader console driver.
|
117448 |
11-Jul-2003 |
tmm |
NFS support should be conditional on LOADER_NFS_SUPPORT, not LOADER_NET_SUPPORT.
|
116415 |
15-Jun-2003 |
jake |
Remember to release the loader's heap.
Reviewed by: tmm
|
114386 |
01-May-2003 |
peter |
Commit a missed change to keep in sync with the MI elf loader.
|
114338 |
30-Apr-2003 |
peter |
Also look for an "elf64 kernel" (for sparc64) and "elf32 kernel" (for powerpc) when building metadata.
|
113583 |
16-Apr-2003 |
phk |
Cut&Paste considered far too easy:
Don't include <sys/disklabel.h>
|
113083 |
04-Apr-2003 |
phk |
Libdisk does not need to include <sys/diskslice.h> any more.
Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h>
Move i386/pc98 specific bits from <sys/reboot.h> to <i386/include/bootinfo.h> as well.
Adjust includes in sys/boot accordingly.
|
108115 |
20-Dec-2002 |
jake |
Fix breakage from earlier inadvertant changes.
|
108100 |
19-Dec-2002 |
jake |
Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c.
|
106738 |
10-Nov-2002 |
jake |
Change the device path representation in libofw to use the full firmware path, instead of an internal i386 specific one. Don't try to interpret a disklabel in ofw_disk.c, open the partition's device node directly and let the firmware do it. This fixes booting from a partition other than 'a' on sparc64, which is needed to support more installation methods.
No objection: ppc
|
105427 |
18-Oct-2002 |
tmm |
Pass the right number of tlb slots to the kernel. The allocation scheme was changed in r1.4, but I neglected to update most of the code in metadata.c.
Pointy hat to: tmm
|
105065 |
13-Oct-2002 |
jake |
Compile in support for zipfs and bzipfs so we can load the gzipped mfsroot that releases use.
|
102829 |
02-Sep-2002 |
jake |
Remove NOFORTH=yes, it seems to work now thanks to scottl.
|
102226 |
21-Aug-2002 |
robert |
- Do not pretend to compile a kernel and remove the definition of the _KERNEL macro. - Do not include <sys/pcpu.h> for no reason.
Suggested by: jake
|
102219 |
21-Aug-2002 |
robert |
- Define the macro _KERNEL to pretend we are compiling a kernel. This is required by recent changes to <sys/pcpu.h>, which uses the #error preprocessor directive to keep non-kernel applications from using it. _KERNEL is defined below the #include <stand.h>, because <stand.h> removes the definition of _KERNEL. - Move the inclusion of <sys/queue.h> above the inclusion of <sys/linker.h> to avoid syntax errors.
|
101287 |
04-Aug-2002 |
jake |
Print out the strings in vers.o instead of hardcoding the loader banner.
|
99560 |
07-Jul-2002 |
jake |
Enable netboot support by default, since it can now coexist with disk and cdrom support. This avoids having to distribute separate loaders.
|
99541 |
07-Jul-2002 |
jake |
Make building with ficl work. Unfortunately booting with it doesn't.
|
98594 |
21-Jun-2002 |
jake |
Enable cd9660 support by default.
|
98472 |
20-Jun-2002 |
peter |
Add boot_serial and boot_multicons variables to set RB_SERIAL and RB_MULTIPLE since this seems to be the easiest way to add these flags for non-forth loaders etc.
|
97867 |
05-Jun-2002 |
phk |
Add explicit dependency on ufsread.c
|
97865 |
05-Jun-2002 |
phk |
Remove UFS related #includes, they're read in ufsread.c now.
|
97864 |
05-Jun-2002 |
phk |
Make sparc64 share ufsread.c with i386.
Sponsored by: DARPA & NAI Labs.
|
97863 |
05-Jun-2002 |
phk |
Avoid entering IOCCC with a memcpy turned bcopy.
|
97510 |
29-May-2002 |
jake |
Add needed include of queue.h. Remove unneeded include of smp.h.
|
97445 |
29-May-2002 |
jake |
Use a contrived 'tlb_entry' structure for passing the mappings for the kernel text and data from the loader to the kernel, so that the tte format is not part of the loader->kernel ABI.
|
97432 |
28-May-2002 |
jake |
Sync with i386. The loader was being installed before the beforeinstall target, which conventiently moved it to loader.old, leaving no loader.
|
96755 |
16-May-2002 |
trhodes |
More s/file system/filesystem/g
|
96497 |
13-May-2002 |
obrien |
Match the default newfs UFS block size.
|
96428 |
11-May-2002 |
jake |
Attempt to not crash and burn on UltraSPARC III machines; the cpuid property is named differently.
|
96342 |
10-May-2002 |
obrien |
-ffreestanding is the word. (also resort some CFLAGS such that the more "important" value are first so they are easier to see)
|
95351 |
24-Apr-2002 |
jake |
Split file system setup code out into a function called mount. Implement vsnprintf. Implement panic in terms of it.
|
95346 |
24-Apr-2002 |
jake |
Add support for loading files other than /boot/loader. Useful if you're loader is screwed and you want loader.old. Rewrite the scaled down printf so it actually works right, and add support for more formats.
|
95342 |
24-Apr-2002 |
jake |
Add an exit function.
|
95341 |
24-Apr-2002 |
jake |
Add -Wno-unused.
|
95340 |
24-Apr-2002 |
jake |
memcpy, memset -> bcopy, bzero.
|
95339 |
24-Apr-2002 |
jake |
Clean up elf loading to not make assumptions about the ordering of sections. Don't load the symbol table; this is only needed for loading kernels and we load the loader.
|
95338 |
24-Apr-2002 |
jake |
Remove xfsread. Just call fsread directly.
|
95337 |
24-Apr-2002 |
jake |
Remove a bunch of unused variables, functions and macros. Allocate storage statically instead of using a faked up malloc.
|
95172 |
21-Apr-2002 |
obrien |
o Use our own elf2aout now. o Generalize a little.
|
93678 |
02-Apr-2002 |
tmm |
Do not use semi-fixed TLB slots for the 4M kernel pages any more.
|
93677 |
02-Apr-2002 |
tmm |
1.) Rename locore.s to locore.S (by repocopy), to be able to remove special-case make rule 2.) Cleanups, remove superfluous expicit rules, add -nostdlib to LDFLAGS, remove -X and -g, remove -g from CFLAGS 3.) Add BINDIR 4.) Build install the loader help file, add an empty help.sparc64 5.) Change the default configuration to only support booting from disk 6.) Get libofw.a from a path relative ${.OBJDIR}, not ${.CURDIR}
Submitted by: jake (1 - 5), obrien (6)
|
93606 |
01-Apr-2002 |
tmm |
Add support for booting from CD-ROM. Make it possible to enable UFS support using make arguments.
|
93605 |
01-Apr-2002 |
tmm |
1.) Produce a boot1 disklabel template of the format disklabel(8) expects. 2.) Clean up and change over to using bsd.prog.mk
Submitted by: jake (2)
|
93313 |
28-Mar-2002 |
obrien |
was repocopied to ../boot1
|
93311 |
28-Mar-2002 |
obrien |
Apparently either gcc or ld, in their infinite wisdom, want to put a bunch of crap before the code in .text. Since the firmware doesn't seem to honour the a.out entry point, we need to include a little assmbler file which jumps to where we want to be in C.
Submitted by: jake
|
93308 |
28-Mar-2002 |
obrien |
Opps, bootblock component is no more.
|
93302 |
28-Mar-2002 |
obrien |
Add a Makefile for sparc64 at this level.
|
91696 |
05-Mar-2002 |
robert |
Change every occurrence of "bootblock" into "boot1" after the repo-move from "src/sys/boot/sparc64/bootblock".
|
91678 |
05-Mar-2002 |
robert |
- Fix seeking for offsets requiring more than 32 bits. - Add sanity checks to lookup(). - Implement the 'l' modifier in printf().
Submitted by: tmm
|
91519 |
01-Mar-2002 |
jake |
Catch up to change in tte format.
Forgetten by: jake Submitted by: tmm
|
91295 |
26-Feb-2002 |
robert |
- Fix indentation and return statements to conform to style(9). - Use the __FBSDID macro. - Fix some warnings.
Submitted by: obrien (partly)
|
91139 |
23-Feb-2002 |
jake |
Keep track of the ttes used to map the kernel and pass them to it as loader metadata. Modify tlb handling functions to take a tte, instead of virtual address, physical address and flags.
|
91114 |
23-Feb-2002 |
jake |
Add make variables for fs support and propagate them to CFLAGS. Put -ffreestanding in CFLAGS. Remove unnecessary LDFLAGS.
|
91110 |
23-Feb-2002 |
jake |
Fix fs support ifdefs. Add tftp support. Add physical and virtual watchpoint support for debugging (under LOADER_DEBUG). Claim the physical and virtual addresses used to map the kernel from the prom; we map it ourselves behind the scenes though. Add a reboot command.
Submitted by: tmm
|
91109 |
23-Feb-2002 |
jake |
Allocate a frame on our initial stack so that it doesn't run off into random memory. Disable interrupts while loading the tlb.
Submitted by: tmm
|
91107 |
23-Feb-2002 |
jake |
Include <machine/metadata.h>.
|
90699 |
15-Feb-2002 |
robert |
Add the FreeBSD/sparc64 bootblock and its make file.
|
88597 |
28-Dec-2001 |
robert |
Avoid having the text and data sections merged into one program header table entry by removing the -N flag from the LDFLAGS.
|
85720 |
30-Oct-2001 |
jake |
Add code to copy the enironment and loader metadata into kernel space.
|
85719 |
30-Oct-2001 |
jake |
Add definitions for network support, doesn't work yet. Pass the right arguments to the kernel. Replace magic numbers with symbolic constants. Pass the real openfirmware entry point to OF_init.
|
85718 |
30-Oct-2001 |
jake |
Use ENTRY() for defining functions in asm. Remove asm functions to call the openfirmware and kernel entry points; we can just call them directly. Don't use the stack pointer for an intermediate result in setx. Put the stack in the bss.
|
84997 |
15-Oct-2001 |
robert |
Fix some warnings.
|
84996 |
15-Oct-2001 |
robert |
Add the FreeBSD/sparc64 boot loader source files.
|
84974 |
15-Oct-2001 |
robert |
Add a Makefile for the sparc64 boot loader.
|