summaryrefslogtreecommitdiffstats
path: root/sys/boot
Commit message (Collapse)AuthorAgeFilesLines
* When building some of the boot loaders with clang, and DEBUG_FLAGS ordim2011-07-173-0/+7
| | | | | | | | | | | CFLAGS having '-g' in it, clang outputs several assembly directives that are too new for our version of binutils. Therefore, assemble the resulting .s files with clang instead. A more general solution can be implemented when a GNU as-compatible driver for clang's integrated assembler appears. Reported by: dougb
* Add support for booting PS3s from disk. This is still a little hackish untilnwhitehorn2011-07-1614-23/+1092
| | | | | | | | | | | we can find a way to get the information from petitboot or to guess it, so the current algorithm is: 1. See if ps3disk3p1 (first GPT slice on OtherOS partition) exists, and if so try to boot it. 2. Otherwise, netboot. Submitted by: glevand <geoffrey.levand at mail dot ru >
* Since r219452 the alignment of __dmadat has changed, revealing that fsread()marius2011-07-111-31/+35
| | | | | | | | | | bogusly casts its contents around causing alignment faults on sparc64 and most likely also on at least powerpc. Fix this by copying the contents bytewise instead as partly already done here. Solving this the right way costs some space, i.e. 148 bytes with GCC and 16 bytes with clang on x86 there are still some bytes left there though, and an acceptable hack which tricks the compiler into only using a 2-byte alignment instead of the native one when accessing the contents turned out to even take up more space that.
* - For Cheetah- and Zeus-class CPUs don't flush all unlocked entries frommarius2011-07-021-25/+63
| | | | | | | | | | | | | | | | | | | 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)
* Fix r223695 to compile on architectures which don't use the MBR scheme; wrapmarius2011-07-012-6/+17
| | | | | the MBR support in the common part of the loader in #ifdef's and enable it only for userboot for now.
* Add a version of the FreeBSD bootloader which can run in userland, packageddfr2011-06-3032-4/+4633
| | | | | as a shared library. This is intended to be used by BHyVe to load FreeBSD kernels into new virtual machines.
* Revert the entry point label to 'start' to unbreak the build.jhb2011-06-272-3/+3
| | | | Pointy hat to: jhb
* - Remove the fake BPB from zfsldr. zfsldr doesn't support booting fromjhb2011-06-272-82/+31
| | | | | | | | | | | | | | floppies, so it will not be used as the start of an emulated floppy image on a bootable CD which is what the fake BPB was used for. - Only check that EDD packet mode is available once at the start of zfsldr rather than for each disk sector now that we read data in one sector at a time. As a result, collapse the remaining bits of read up into nread and rename nread to read. - Restore a return at the end of putstr that I removed in the previous revision. Tested by: Henri Hennebert (earlier version) MFC after: 1 week
* As with EFI, OFW and U-Boot etc only compile FDT support on thosemarius2011-06-253-4/+8
| | | | architectures that actually use it.
* The recent change to increase the zfsboot size to 64k made a few BIOSesjhb2011-06-231-62/+63
| | | | | | | | | | | | | | | | | | | | | | unhappy (probably they don't handle crossing the 64k boundary, etc.). Fix this by changing zfsldr to use a loop reading from the disk one sector at a time. To avoid trashing the saved copy of the MBR which is used for disk I/O, read zfsboot2 at address 0x9000. This has the advantage that BTX no longer needs to be relocated as it is read into the correct location. However, the loop to relocate zfsboot2.bin can now cross a 64k boundary, so change it to use relative segments instead. (This will need further work if zfsboot2.bin ever exceeds 64k.) While here, stop storing a relocated copy of zfsldr at 0x700. This was only used by the xread hack which has recently been removed (and even that use was dubious). Also, include the BIOS error code as hex when reporting read errors to aid in debugging. Much thanks to Henri Hennebert for patiently testing various iterations of the patch as well as fixing the zfsboot2.bin relocation to use relative segments. MFC after: 1 week
* Minimize backward seeks when trying to load ELF relocatable modules.kan2011-06-191-7/+30
| | | | | | Some of loader filesystems are very ill equipped to handle seeking backwards within the file. Namely, tftp requires trasfer to be restarted from the start of the file every time we go backwards.
* Fix clang warnings.benl2011-06-181-1/+1
| | | | Approved by: philip (mentor)
* Revert changes to this file in r222417. This unconditionally enabled thenwhitehorn2011-06-151-4/+1
| | | | | | | boot menu on all platforms, which breaks loader completely on at least powerpc for reasons that are not understood yet. Reviewed by: Devin Teske
* Upgrade our copy of llvm/clang to r132879, from upstream's trunk.dim2011-06-121-1/+1
|
* o Bump the EFI loader version to 3.1.marcel2011-06-073-3/+68
| | | | | o Add the about, pbvm and reboot commands. o Trim the banner (suppress maker and date).
* Add ia64_sync_icache() and use it to make the I-cache coherentmarcel2011-06-074-1/+55
| | | | | after loading the kernel's text segment. The kernel will do the same for loaded modules, so don't worry about that.
* mdoc: fix markupuqs2011-06-021-1/+1
|
* Include forgotten framework changes to get some of the new menu files ↵julian2011-05-303-2/+5
| | | | | | installed correctly on non x86/amd systems. pointy-hut to devin
* Add some missing files. Without we hang in the OF prompt asking for screen.4th.andreast2011-05-291-0/+1
| | | | Approved by: nwhitehorn (mentor)
* New boot loader menus from Devin Teske.julian2011-05-2828-285/+3099
| | | | | | | | 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
* Disconnect sun4v architecture from the three.attilio2011-05-143-72/+3
| | | | | | | | | 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
* a whitespace nitavg2011-05-071-1/+1
| | | | | Reminder from: kib MFC after: 4 days
* a whitespace nitavg2011-05-071-1/+1
| | | | MFC after: 4 days
* Fine-tune llvm optimization for sys/boot/i386/boot2, which shaves offdim2011-05-051-1/+2
| | | | | | some more bytes from the final boot2 image. Submitted by: rdivacky
* Fix corner case where the size is a power of two.marcel2011-05-031-1/+1
|
* Clang r130700 can now compile sys/boot/i386/boot2 with room to spare.dim2011-05-021-3/+6
|
* Turn PBVM page table entries into PTEs so that they can be insertedmarcel2011-04-302-11/+22
| | | | | | into the TLB as-is. While here, have ia64_platform_alloc() return ~0UL on failure.
* Due to space constraints, the UFS boot2 and boot1 use an evil hack wherejhb2011-04-284-129/+33
| | | | | | | | | boot2 calls back into boot1 to perform disk reads. The ZFS MBR boot blocks do not have the same space constraints, so remove this hack for ZFS. While here, remove commented out code to support C/H/S addressing from zfsldr. The ZFS and GPT bootstraps always just use EDD LBA addressing. MFC after: 2 weeks
* Remove all object files during 'make clean'.ae2011-04-212-2/+4
| | | | MFC after: 1 week
* MFi386: revisions 220389 and 220392nyan2011-04-161-13/+13
| | | | | | - Mark getc() as inline, this has no effect on gcc but helps clang. - Move getc() body before xgetc() so gcc does not emit a warning about function having no body.
* Add basic support for the Marvell Orion TS-7800.philip2011-04-151-0/+161
| | | | Submitted by: Kristof Provost <kristof -at- freebsd.org>
* Remove the now defunct kern.ipc.nmbufs tunable.pluknet2011-04-131-1/+0
| | | | | PR: kern/132497 (part) MFC after: 1 week
* Move getc() body before xgetc() so gcc does not emit a warning about functionrdivacky2011-04-061-9/+9
| | | | | | having no body. Approved by: jhb
* Mark getc() as inline, this has no effect on gcc but helps clang.rdivacky2011-04-061-1/+1
| | | | Approved by: jhb
* MFi386: revision 220337nyan2011-04-051-0/+1
| | | | Build boot2 with -mregparm=3.
* Build boot2 with -mregparm=3, ie. pass upto 3 arguments via registers.rdivacky2011-04-043-10/+12
| | | | | | | | | | | This modifies CFLAGS and tweaks sio.S to use the new calling convention. The sio_init() and sio_putc() prototypes are modified so that other users of this code know the correct calling convention. This makes the code smaller when compiled with clang. Reviewed by: jhb Tested by: me and Freddie Cash <fjwcash gmail com>
* Fix a long standing bug where file_load() passes down the global loadaddrmarcel2011-04-041-1/+1
| | | | | | | | to the l_load() method in the file_formats structure, while being passed an address as an argument (dest). With file_load() calling arch_loadaddr() now, this bug is a little bit more significant. Spotted by: nyan@ (nice catch!)
* Use the new arch_loadaddr I/F to align ELF objects to PBVM pagemarcel2011-04-036-51/+135
| | | | | | | | | | | | | | | | | | boundaries. For good measure, align all other objects to cache lines boundaries. Use the new arch_loadseg I/F to keep track of kernel text and data so that we can wire as much of it as is possible. It is the responsibility of the kernel to link critical (read IVT related) code and data at the front of the respective segment so that it's covered by TRs before the kernel has a chance to add more translations. Use a better way of determining whether we're loading a legacy kernel or not. We can't check for the presence of the PBVM page table, because we may have unloaded that kernel and loaded an older (legacy) kernel after that. Simply use the latest load address for it.
* Add 2 new archsw interfaces:marcel2011-04-035-30/+55
| | | | | | | | | | | | | | 1. arch_loadaddr - used by platform code to adjust the address at which the object gets loaded. Implement PC98 using this new interface instead of using conditional compilation. For ELF objects the ELF header is passed as the data pointer. For raw files it's the filename. Note that ELF objects are first considered as raw files. 2. arch_loadseg - used by platform code to keep track of actual segments, so that (instruction) caches can be flushed or translations can be created. Both the ELF header as well as the program header are passed to allow platform code to treat the kernel proper differently from any additional modules and to have all the relevant details of the loaded segment (e.g. protection).
* Revert rev 165325. The arch_maphint interface hasn't been in use formarcel2011-04-032-48/+0
| | | | more than 4 years.
* Make the ski loader functional again after the previous set of changes.marcel2011-04-032-31/+31
|
* MFi386: the part of 219452nyan2011-03-241-14/+10
| | | | | | - bunch of variables are turned into uint8_t. - the setting and reading of "fmt" in load() is removed. - buf in printf() is made static to save space.
* The size of zfsboot2 grown up to 64 Kbytes in r219089.ae2011-03-162-2/+2
| | | | | | Increase NSECT up to 128 sectors too. Reviewed by: jhb, pjd
* Set control flags in putc(). This should fix zfsboot hangs in drvread().ae2011-03-161-0/+1
| | | | | | PR: kern/153552 Reviewed by: jhb MFC after: 1 week
* MFaltix:marcel2011-03-1613-141/+413
| | | | | | | | | | | | | | | | | | | | | | | | Add support for Pre-Boot Virtual Memory (PBVM) to the loader. PBVM allows us to link the kernel at a fixed virtual address without having to make any assumptions about the physical memory layout. On the SGI Altix 350 for example, there's no usuable physical memory below 192GB. Also, the PBVM allows us to control better where we're going to physically load the kernel and its modules so that we can make sure we load the kernel in memory that's close to the BSP. The PBVM is managed by a simple page table. The minimum size of the page table is 4KB (EFI page size) and the maximum is currently set to 1MB. A page in the PBVM is 64KB, as that's the maximum alignment one can specify in a linker script. The bottom line is that PBVM is between 64KB and 8GB in size. The loader maps the PBVM page table at a fixed virtual address and using a single translations. The PBVM itself is also mapped using a single translation for a maximum of 32MB. While here, increase the heap in the EFI loader from 512KB to 2MB and set the stage for supporting relocatable modules.
* Revert previous commit: EFI_STATUS is a 64-bit integral on ia64. Fix themarcel2011-03-161-1/+1
| | | | | | | | compile warning on i386 (where EFI_STATUS is a 32-bit integral) by casting the status argument to u_long instead. Pointy hat: brucec MFC after: 3 days
* - Initial release of bxe(4) to support Broadcom NetXtreme II 10GbE.davidch2011-03-141-0/+1
| | | | | | (BCM57710, BCM57711, BCM57711E) MFC after: One month
* Remove all object files during 'make clean'.jhb2011-03-111-1/+2
| | | | | | PR: kern/154888 Submitted by: arundel MFC after: 1 week
* Some more shrinking.rdivacky2011-03-102-21/+17
| | | | | | | | | | | | | | | | | o bunch of variables are turned into uint8_t o initial setting of namep[] in lookup() is removed as it's only overwritten a few lines down o kname is explicitly initialized in main() as BSS in boot2 is not zeroed o the setting and reading of "fmt" in load() is removed o buf in printf() is made static to save space Reviewed by: jhb Tested by: me and Fabian Keil <freebsd-listen fabiankeil de>
* MFi386: revision 219186nyan2011-03-031-22/+7
| | | | | | | | | This patch shrinks boot2 a little. o It switches kname to be just a pointer instead of an array. o It changes ioctl to unsigned from uint8_t. o It changes the second keyhit limit to 3 seconds from 5. o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting.
OpenPOWER on IntegriCloud