summaryrefslogtreecommitdiffstats
path: root/sys/boot
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Check the real-mode? OF property to find out whether we operate in real orandreast2010-11-173-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | virtual mode. In virtual mode we have to do memory mapping. On PowerMacs it is usually false while on pSeries we have found that it is true. The real-mode? property is not available on sparc64. Approved by: nwhitehorn (mentor)
* | | | | Move the declaration of the eh struct (used only when debugging is enabled)andreast2010-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from ofwn_put into the debug section. Approved by: nwhitehorn (mentor)
* | | | | Make sure the .bss is cleared at the beginning. The pSeries OF ELF loader doesandreast2010-11-171-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not clear .bss automatically. Approved by: nwhitehorn (mentor)
* | | | | Load the full 16k stack space.andreast2010-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | Approved by: nwhitehorn (mentor)
* | | | | Don't display option 2 (to toggle ACPI on or off) on x86 machines if thejhb2010-11-151-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BIOS does not support ACPI. The other options in the menu retain their existing numbers, option 2 is simply blanked out (and '2' is ignored). MFC after: 1 month
* | | | | We no longer need the OUTPUT_FORMAT line, so fix the build by removing it.imp2010-11-151-1/+0
| | | | |
* | | | | Fix the jump location.brucec2010-11-141-1/+1
| | | | |
* | | | | When rebooting the machine jump to 0xf000:fff0 instead of 0xffff:0x0.brucec2010-11-141-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same change that was made in rev 1.33 of boot/i386/btx/btx/btx.S PR: i386/91871 Submitted by: Bjorn Konig <bkoenig at cs.tu-berlin.de> MFC after: 1 week
* | | | Now there is no functional difference from i386 version.nyan2010-11-131-35/+0
| | | | | | | | | | | | | | | | So use i386 version.
* | | | Remove unused includes.nyan2010-11-131-6/+0
| |_|/ |/| |
* | | Correct RAM size of the MPC8555CDS board.raj2010-11-111-1/+1
| | |
* | | Fix typos.brucec2010-11-091-2/+2
| | | | | | | | | | | | | | | PR: bin/148894 Submitted by: olgeni
* | | Remove support for autoloading ACPI from the loader. Leave in the code tojhb2010-11-085-55/+3
| |/ |/| | | | | | | detect ACPI and export info such as the location of the RSDP via hints as that is still useful.
* | Partially revert r203829; as it turns out what the PowerPC OFW loader didmarius2010-10-291-4/+4
| | | | | | | | | | | | | | | | 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.
* | Fix the printf() in init_heap so that it can run before the console is up.nwhitehorn2010-10-291-1/+5
| | | | | | | | Pointed out by: marius
* | Fix netboot on some Apple machines on which calling dma-free on thenwhitehorn2010-10-291-0/+3
| | | | | | | | | | network device can hang the machine. This causes the loss of 64 KB of accessible memory on netbooted machines.
* | Fix some memory management issues discovered when trying to boot the PPCnwhitehorn2010-10-283-28/+35
|/ | | | | | | | OF loader on systems where address cells and size cells are both 2 (the Mambo simulator) and fix an error where cons_probe() was called before init_heap() but used malloc() to set environment variables. MFC after: 1 month
* MFi386: revision 214210nyan2010-10-241-2/+2
| | | | | Avoid using memcpy() for copying 32bit chunks. This shrinks the resulting code a little.
* Avoid using memcpy() for copying 32bit chunks. This shrinksrdivacky2010-10-221-2/+2
| | | | | | | the resulting code a little. Approved by: rpaulo (mentor) Reviewed by: jhb
* Correct typos.pjd2010-10-201-2/+2
|
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-081-1/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* Ensure that a make from sys/boot does not pick up include files frompho2010-10-081-0/+1
| | | | | | /usr/include. Discussed with: kib
* - Split code shared by almost any boot loader into separate files andpjd2010-09-2418-864/+1383
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clean up most layering violations: sys/boot/i386/common/rbx.h: RBX_* defines OPT_SET() OPT_CHECK() sys/boot/common/util.[ch]: memcpy() memset() memcmp() bcpy() bzero() bcmp() strcmp() strncmp() [new] strcpy() strcat() strchr() strlen() printf() sys/boot/i386/common/cons.[ch]: ioctrl putc() xputc() putchar() getc() xgetc() keyhit() [now takes number of seconds as an argument] getstr() sys/boot/i386/common/drv.[ch]: struct dsk drvread() drvwrite() [new] drvsize() [new] sys/boot/common/crc32.[ch] [new] sys/boot/common/gpt.[ch] [new] - Teach gptboot and gptzfsboot about new files. I haven't touched the rest, but there is still a lot of code duplication to be removed. - Implement full GPT support. Currently we just read primary header and partition table and don't care about checksums, etc. After this change we verify checksums of primary header and primary partition table and if there is a problem we fall back to backup header and backup partition table. - Clean up most messages to use prefix of boot program, so in case of an error we know where the error comes from, eg.: gptboot: unable to read primary GPT header - If we can't boot, print boot prompt only once and not every five seconds. - Honour newly added GPT attributes: bootme - this is bootable partition bootonce - try to boot from this partition only once bootfailed - we failed to boot from this partition - Change boot order of gptboot to the following: 1. Try to boot from all the partitions that have both 'bootme' and 'bootonce' attributes one by one. 2. Try to boot from all the partitions that have only 'bootme' attribute one by one. 3. If there are no partitions with 'bootme' attribute, boot from the first UFS partition. - The 'bootonce' functionality is implemented in the following way: 1. Walk through all the partitions and when 'bootonce' attribute is found without 'bootme' attribute, remove 'bootonce' attribute and set 'bootfailed' attribute. 'bootonce' attribute alone means that we tried to boot from this partition, but boot failed after leaving gptboot and machine was restarted. 2. Find partition with both 'bootme' and 'bootonce' attributes. 3. Remove 'bootme' attribute. 4. Try to execute /boot/loader or /boot/kernel/kernel from that partition. If succeeded we stop here. 5. If execution failed, remove 'bootonce' and set 'bootfailed'. 6. Go to 2. If whole boot succeeded there is new /etc/rc.d/gptboot script coming that will log all partitions that we failed to boot from (the ones with 'bootfailed' attribute) and will remove this attribute. It will also find partition with 'bootonce' attribute - this is the partition we booted from successfully. The script will log success and remove the attribute. All the GPT updates we do here goes to both primary and backup GPT if they are valid. We don't touch headers or partition tables when checksum doesn't match. Reviewed by: arch (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>) Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com MFC after: 2 weeks
* When building world with clang, for gnu/lib/libobjc, sys/boot/i386/boot2dim2010-09-212-6/+2
| | | | | | | | | | | | and sys/boot/pc98/boot2, do not simply assign 'gcc' to CC, since compile flags are sometimes passed via this variable, for example during the build32 stage on amd64. This caused the 32-bit libobjc build on amd64 to fail. Instead, only replace the first instance of clang (if any, including optional path) with gcc, and leave the arguments alone. Approved-by: rpaulo (mentor)
* Add support 'device tpm' for amd64.nork2010-09-191-0/+1
| | | | | | | | Add tpm(4)'s default setting to /boot/defaults/loader.conf. Add 'device tpm' to NOTES for amd64 and i386. Discussed with: takawata Approved by: imp (mentor)
* Before VirtualBox is fixed, mark with #ifdef what has to be done to makepjd2010-09-172-3/+10
| | | | | | | | | it possible to boot from ZFS RAIDZ for example from within VirtualBox. The problem with VirtualBox is that its BIOS reports only one disk present. If we choose to ignore this report, we can find all the disks available. We can't have this work-around to be turned on by default, because some broken BIOSes report true when it comes to number of disks, but present the same disk multiple times.
* Remove magic value.pjd2010-09-171-1/+3
|
* Merge from powerpc:marius2010-09-161-33/+27
| | | | | | | - 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.
* Remove empty lines committed by accident.pjd2010-09-091-2/+0
| | | | MFC after: 2 weeks
* Ignore log vdevs.pjd2010-09-091-0/+7
| | | | MFC after: 2 weeks
* Allow to boot from a pool within which replacing is in progress.pjd2010-09-091-3/+33
| | | | | | | | | | | | Before the change it wasn't possible and the following error was printed: ZFS: can only boot from disk, mirror or raidz vdevs Now if the original vdev (the one we are replacing) is still present we will read from it, but if it is not present we won't read from the new vdev, as it might not have enough valid data yet. MFC after: 2 weeks
* Remove duplicated code.pjd2010-09-091-20/+9
| | | | MFC after: 2 weeks
* If autoboot_delay is set to -1, boot immediately without checking forjhb2010-09-081-1/+4
| | | | | | | | | a keypress to match the behavior of the loader. PR: docs/108101 Submitted by: Wayne Sierke ws of au.dyndns.ws Tested by: brd MFC after: 1 week
* Add custom kernel configuration and device tree source files foremax2010-09-081-0/+265
| | | | | | Seagate FreeAgent DockStar(tm) device. It seems to be a dumb down version of Marvell SheevaPlug. Device tree source file could use more tweaking, but at least it wll network boot and run FreeBSD/arm.
* In the case of non-sequential mappings, ofw_mapmem() could ask Opennwhitehorn2010-09-021-1/+1
| | | | | | Firmware to map a memory region with negative length, causing crashes and Undefined Behavior. Add the appropriate check to make the behavior defined.
* Modify pxe.c to use the version of nfs_getrootfh() that returnsrmacklem2010-09-021-0/+59
| | | | | | | | | | the file handle's size and was recently committed to lib/libstand/nfs.c. This allows pxeboot to use NFSv3 and work correcty for non-FreeBSD as well as FreeBSD NFS servers. If built with OLD_NFSV2 defined, the old code that predated this patch will be used. Tested by: danny at cs.huji.ac.il
* Use a cleaner expression to retrieve the memory size in pc98's boot2.c,dim2010-09-011-3/+2
| | | | | | | | which also avoids NULL pointer arithmetic, as suggested by jhb. The available space goes from 11 bytes to 7. Reviewed by: nyan Approved by: rpaulo (mentor)
* For consistency, change all 'i386' and MACHINE_ARCH to x86.delphij2010-08-313-3/+3
| | | | | Reviewed by: jhb MFC after: 1 week
* Avoid directly manipulating a NULL pointer (which could result indim2010-08-311-2/+2
| | | | | | | undefined behaviour) in sys/boot/pc98/boot2/boot2.c. Reviewed by: nyan Approved by: rpaulo (mentor)
* Always compile pc98 boot2 with gcc instead of clang, just as with i386dim2010-08-311-0/+7
| | | | | | | boot2. Unfortunately both still are too big when compiled with clang. Reviewed by: nyan Approved by: rpaulo (mentor)
* Use a more robust way to substitute gcc for clang, when compilingdim2010-08-311-1/+3
| | | | | | | gnu/lib/libobjc and sys/boot/i386/boot2, so it also works when using absolute paths and/or options, as in CC="/absolute/path/clang -foo". Approved by: rpaulo (mentor)
* Fix build of ppc32 loader.nwhitehorn2010-08-251-1/+1
|
* Replace structure assignments with explicity memcpy calls. This allowsrpaulo2010-08-241-4/+9
| | | | | | | | Clang to compile this file: it was using the builtin memcpy and we want to use the memcpy defined in gptboot.c. (Clang can't compile boot2 yet). Submitted by: Dimitry Andric <dimitry at andric.com> Reviewed by: jhb
* MFtbemd:imp2010-08-231-1/+1
| | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
* MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH ↵imp2010-08-236-18/+18
| | | | (which simplifies some powerpc/powerpc64 ifs)
* MF tbemd: move to using specific architecture makefilesimp2010-08-239-20/+27
|
* MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH ↵imp2010-08-232-11/+11
| | | | (which simplifies some powerpc/powerpc64 ifs)
* MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCHimp2010-08-238-10/+10
|
* It turns out that the OUTPUT_FORMAT should do the right thing for both ↵imp2010-08-232-135/+1
| | | | endians...
* MF tbemd: differentiate between arm and armebimp2010-08-232-1/+135
|
OpenPOWER on IntegriCloud