summaryrefslogtreecommitdiff
path: root/stand/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* bootprog_info is generated in vers.c. Move it's definition toWarner Losh2018-06-142-3/+0
| | | | | | | | | bootstrap.h and remove all the redundant copies. Sponsored by: Netflix Notes: svn path=/head/; revision=335117
* Prefer uintXX_t to u_intXX_tWarner Losh2018-03-135-11/+11
| | | | | | | | | 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 Notes: svn path=/head/; revision=330864
* Where we can, pass the kernel an FDT facsimile of the OF device tree ratherNathan Whitehorn2018-03-041-0/+21
| | | | | | | | | | | | | | | | than a pointer to Open Firmware by default. This eliminates a number of potentially unsafe calls to firmware from the kernel and provides better performance. This feature is meant to be expanded until it is on by default unconditionally and, ideally, we can then garbage-collect the nightmare pile of hacks required to call into Open Firmware from a live kernel. Reviewed by: jhibbits Notes: svn path=/head/; revision=330371
* Move "common" Open Firmware parts of the loader used only on PowerPC toNathan Whitehorn2018-03-035-5/+399
| | | | | | | | | | | the powerpc/ subdirectory. These have never used by SPARC and we have no other (and almost certainly will have no other) Open Firmware platforms. This makes the directory structure simpler and lets us avoid some cargo-cult MI patterns on code that is, and always was, architecture-specific. Notes: svn path=/head/; revision=330365
* stand: Fix build after r330249Kyle Evans2018-03-011-1/+1
| | | | | | | | 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. Notes: svn path=/head/; revision=330250
* stand: Makefile SUBDIR cleanupKyle Evans2018-03-011-3/+1
| | | | | | | | | | Use SUBDIR.${MK_*} where appropriate. r330248 eliminated most of the offenders, sweep the rest under the rug. Differential Revision: https://reviews.freebsd.org/D14545 Notes: svn path=/head/; revision=330249
* Add NO_OBJ to those directories that don't make anything.Warner Losh2018-02-261-0/+2
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=330004
* Unify metadata load files for arm, mips, powerpc, sparc64Justin Hibbits2018-02-135-699/+3
| | | | | | | | | | | | 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. Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D13978 Notes: svn path=/head/; revision=329190
* Fix regression introduced in r328806, preventing boot at least on allNathan Whitehorn2018-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PowerPC Apple hardware, and likely all Open Firmware systems. The loader would allocate memory for its heap at whatever address Open Firmware gave it, which would in general be the lowest unallocated address, usually starting a page or two above 0. As the kernel is linked at 1 MB, and loader insists on running the kernel at its link address, any heap larger than 1 MB would overlap the kernel, causing loader memory allocations to corrupt the kernel and vice versa. Although r328806 made this problem much worse by increasing the heap size to 8 MB, causing 88% of the loader heap to overlap with the kernel, the problem has always existed. The old heap size was 1 MB and, unless that started exactly at zero, which would cause other problems, some number of pages of the loader heap still overlapped with the kernel. This patch solves the issue in two ways and cleans up some related code: - Moves the loader heap inside of the loader. This guarantees that the heap will be contiguous with the loader and simplifies the heap allocation code at no cost, since the heap lives in BSS. - Moves the loader, previously at 28 MB and dangerously close to the kernel it loads, a bit higher to 44 MB. This has the effect of breaking loader on non-embedded PPC machines with < 48 MB of RAM, but we did not support those anyway. The fundamental problem is that the way loader loads ELF files is incredibly fragile, but that can't be fixed without fundamental architectural changes. MFC after: 10 days Notes: svn path=/head/; revision=328835
* Invent new LDR_INTERP for the loader interpreter to use. Use this inWarner Losh2018-02-023-6/+6
| | | | | | | | | | preference to LIBFICL{,32}. LIBFICL{,32} are now always defined, but LDR_INTERP{,32} is defined empty when building w/o forth (aka the simple interpreter) and defined to LIBFICL{,32} when we are building forth. Notes: svn path=/head/; revision=328783
* Centralize several variables.Warner Losh2018-02-024-7/+0
| | | | | | | | | | MK_CTF, MK_SSP, MK_PROFILE, NO_PIC, and INTERNALLIB are always the same, so set them in defs.mk. MAN= is common, so set it here too. This removes a lot of boring repetition from the Makefiles that added almost no value. Notes: svn path=/head/; revision=328769
* loader: support for mixed-endianness ELF/loader and POWER8Wojciech Macek2018-01-298-43/+349
| | | | | | | | | | | | | | | On POWER8 with current petitpoot, the loader.kboot might be run as little-endian application. The FreeBSD kernel is always big-endian, so the load_elf_* routines must be aware of proper endianness of all fields. Submitted by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf Sponsored by: IBM, QCM Technologies Differential revision: https://reviews.freebsd.org/D12422 Notes: svn path=/head/; revision=328536
* Tag unreachable places as such. I left the while (1); in place sinceWarner Losh2018-01-261-0/+1
| | | | | | | | | in this context we want to busy wait to stop. Suggested by: pfg@ Notes: svn path=/head/; revision=328449
* Make exit() never return until host_exit can be written.Warner Losh2018-01-261-1/+1
| | | | Notes: svn path=/head/; revision=328448
* Garbage-collect loader.ps3. It is currently disconnected from the build andNathan Whitehorn2017-12-3023-3510/+0
| | | | | | | | is superseded by either direct loading of the kernel by petitboot (soon to become the installer default) or loader.kboot. Notes: svn path=/head/; revision=327390
* Interact is always called with NULL. Simplify code a little byWarner Losh2017-12-192-2/+2
| | | | | | | | | | | | removing this argument, and expanding when rc is NULL. This effectively completes the back out of custom scripts for tftp booted loaders from r269153 that was started in r292344 with the new path tricks that obsoleted it. Submitted by: Netflix Notes: svn path=/head/; revision=326961
* Move loader help file definitions to being 100% inside of loader.mk.Warner Losh2017-12-184-6/+1
| | | | | | | | | | | | HELP_FILES is a loader only thing, so move it to loader.mk. Only generate the help file if HELP_FILES is defined. Adjust Makefiles to new convention. Fix a few cases where ${.CURDIR}/ was missing resulting in missing bits from the help files. Sponsored by: Netflix Notes: svn path=/head/; revision=326926
* Revert r326792, r326784, r326772, r326712Warner Losh2017-12-122-2/+2
| | | | | | | | | | Something subtle is creating problems for disk access on ubldr. Back it out unti that can be sorted out. Sponsored by: Netflix Notes: svn path=/head/; revision=326812
* Fix regression with lua importWarner Losh2017-12-112-2/+2
| | | | | | | | | | | | | | Don't print when we can't find a file. Copy it instead to the error buffer. Higher level routines determine if it's appropriate to print the error message. Also, remove dead code (labeled bogusly lost functionality) since we never used that functionality. Remove unused arg from interact() too. Sponsored by: Netflix Notes: svn path=/head/; revision=326772
* Provide a md_load64 prototype.Warner Losh2017-12-031-0/+2
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=326493
* Cast void * pointer to char * so the arg matches the %s format.Warner Losh2017-12-031-1/+1
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=326492
* Disconnet ps3 from the build. There's too many warnings to fix. Also,Warner Losh2017-12-031-3/+0
| | | | | | | | | | | | it's going to be removed soon anyway once the final lingering issues with kboot are resolved. Go ahead and disconnect it from the build a little early. Sponsored by: Netflix OK'd by: nathanw@ Notes: svn path=/head/; revision=326491
* Declare our strange brand of main().Warner Losh2017-12-031-0/+2
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=326490
* Include machine/md_var to pick up __syncicache prototype.Warner Losh2017-12-031-2/+1
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=326486
* Cleanup CFALGS usage hereWarner Losh2017-12-021-3/+1
| | | | | | | | | | | Only define the CFLAGS we need. SSP_CFLAGS is now defined globally, no need to define it here. Define -D_STANDALONE globally for src/stand builds. Sponsored by: Netflix Notes: svn path=/head/; revision=326442
* Remove stale dependency on ufsread.cWarner Losh2017-12-021-2/+0
| | | | | | | | | | | Remove the now-useless dependency on ufsread.c. In some cases, it was on the wrong file. But in all cases, we now automatically generate .depend files, so we don't need it explicitly. Sponsored by: Netflix Notes: svn path=/head/; revision=326440
* Use const pointers to avoid casting away constness.Warner Losh2017-11-302-3/+3
| | | | | | | | | | | | The host_open interface was a legitimate mismatch to the userboot function, while the other pointers didn't need to be non-const. This makes the powerpc warning free again. Sponsored by: Netflix Notes: svn path=/head/; revision=326384
* Modify all FreeBSD bootloaders on PowerPC AIM (Book-S) systems to pass aNathan Whitehorn2017-11-242-2/+2
| | | | | | | | | | | | | | magic number to the kernel in r7 rather than the (currently unused and irrelevant) width of the metadata pointer, which I believe was intended for a never-used approach to the 64-bit port. This enables the kernel, in a future commit, to switch on the cookie to distinguish a real metadata pointer from loader(8) from garbage left in r6 by some other boot loader. MFC after: 3 weeks Notes: svn path=/head/; revision=326182
* Move some more common stuff up to Makefile.inc. In particular, the noWarner Losh2017-11-205-8/+3
| | | | | | | | | | | | | | simd / no float stuff is centeralized here. Also centralise -ffreestanding since it is specified everywhere. This, along with a change to share/mk/bsd.cpu.mk to include -mno-avx2 in CFLAGS_NO_SIMD should fix building for newer machines (eg with CPUTYPE=haswell) where clang was generating avx2 instructions. Sponsored by: Netflix Notes: svn path=/head/; revision=326038
* Move sys/boot to stand. Fix all references to new locationWarner Losh2017-11-1456-0/+7453
Sponsored by: Netflix Notes: svn path=/head/; revision=325834