summaryrefslogtreecommitdiffstats
path: root/sys/boot
Commit message (Collapse)AuthorAgeFilesLines
* Change the BTX kernel to drop all the way out to real mode to invoke BIOSjhb2008-03-101-401/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | routines (V86 requests from the client and hardware interrupt handlers): - Install trampoline real mode interrupt handlers at IDT vectors 0x20-0x2f to handle hardware interrupts by invoking the appropriate vector (0x8-0xf or 0x70-0x78). This allows the 8259As to use vectors 0x20-0x2f in real mode as well as protected mode will ensuring that the master 8259A doesn't share IDT space with CPU exceptions in protected mode. - Since we don't need to reserve space for page tables and a page directory anymore since dropping paging support, move the TSS and protected mode IDT up by 16k. Grow the ring 1 link stack by 16k as a result. - Repurpose the ring 1 link stack to be used as a real mode stack when invoking real mode routines either via a V86 request or a hardware interrupts. This simplifies a few things as we avoid disturbing the original user stack. - Add some more block comments to explain how the code interacts with the V86 structure as this wasn't immediately obvious from the prior comments (e.g. that we explicitly copy the seg regs for real mode out of the V86 struct onto the stack to be popped off when going into real mode, etc.). Also, document some of the stack frames we create going to real mode and back. - Remove all of the virtual 86 related code including having to simulate various instructions and BIOS calls on a trap from virtual 86 mode. - Explicitly panic if a user client attempts to perform a V86 CALL request that isn't a far call. - Bump version to 1.2. Assuming this works ok this should fix some of the long standing issues with USB booting as well as etherboot. MFC after: 2 weeks Submitted by: kib (some parts from his original real mode patch)
* In the PROBE_KEYBOARD case, always enable multiple consoles and set thejhb2008-03-061-2/+4
| | | | | | serial console as the primary console if the keyboard probe fails. MFC after: 1 week
* MFi386: revision 1.43nyan2008-02-291-0/+7
| | | | Do not attempt to make an NFS rpc call if using tftp
* MFi386: revision 1.55.nyan2008-02-291-4/+27
| | | | Tweak the verbose disk printing a bit.
* Tweak the verbose disk printing a bit:jhb2008-02-281-59/+51
| | | | | | | | | | | | - Consolidate the code to humanize the size of a disk partition into a single function based on the code for GPT partitions and use it for GPT partitions, BSD slices, and BSD partitions. - Teach the humanize code to use KB for small partitions (e.g. GPT boot partitions now show up as 64KB rather than 0MB). - Pad a few partition type names out so that things line up in the common case. MFC after: 1 week
* MFi386:nyan2008-02-282-57/+2
| | | | | Retire the support for using paging in BTX. It hasn't been used since before 4.0.
* Rev 1.72 fixed a bug where if /boot.config changed the console its contentsjhb2008-02-282-4/+6
| | | | | | | | | | | weren't displayed on the new console. However, the config string has been altered as part of being parsed so we only display the first option. Fix this by saving a copy of /boot.config before parsing it and displaying the saved copy after parsing. MFC after: 1 week PR: i386/103972 Submitted by: Alexandre Belloni alexandre.belloni of netasq.com
* Retire the support for using paging in BTX. It hasn't been used sincejhb2008-02-272-57/+2
| | | | | | before 4.0. Submitted by: kib
* o Build and install the U-Boot loader as ubldr.marcel2008-02-232-10/+6
| | | | | | o Don't build/install the manual pages or configuration files that are already installed by the OFW loader. o Hook the U-Boot loader to the build.
* style(9) commit.marcel2008-02-231-211/+218
|
* Setup the new bootinfo structure.marcel2008-02-231-36/+99
| | | | While here, make local function static and update copyright.
* o Keep running on U-Boot's stack.marcel2008-02-231-21/+23
| | | | | | | | | | o Disable interrupts while not running U-Boot code. We clobber registers that the U-Boot interrupt handlers assume to be fixed as per the U-Boot register usage. At this time this only applies to r14. U-Boot uses r2 now for what they used r29 for. After we restore r14 in preparation of doing the syscall, we re-enable interrupts. When we return from the syscall, we disable interrupts and restore the callee-saved r14.
* The NFS file system support is conditional upon LOADER_NFS_SUPPORT,marcel2008-02-231-1/+1
| | | | not LOADER_NET_SUPPORT.
* Add __elfN(relocation_offset). It holds the offset between the virtualmarcel2008-02-232-2/+30
| | | | | | | | | | (link) address and the physical (load) address. Ideally, the mapping between link and load addresses should be abstracted by the copyin(), copyout() and readin() functions, so that we don't have to add kluges in __elfN(loadimage)(). Then, we could also have paged virtual memory for the kernel. This can be important under EFI, where you need to allocate physical memory form the firmware if you want to work in all scenarios.
* o Include glue.hmarcel2008-02-231-12/+10
| | | | o Support multiple memory regions.
* o Build libuboot with -msoft-float like everything else.marcel2008-02-233-50/+88
| | | | | | | o Move the API prototypes to a separate header (glue.h) o Allow the platform to hint libuboot about where to look for the API signature. The uboot_address variable is expected to be defined by the platform.
* Add the appropriate license information. This file is doublemarcel2008-02-231-1/+55
| | | | | | licensed under GPL and BSD. Thanks to: raj@
* We build ficl and libofw with -msoft-float. Build the loadermarcel2008-02-231-1/+1
| | | | with -msoft-float too.
* Move the $FreeBSD$ tag in a comment as __FBSDID doesn't work.marcel2008-02-171-3/+2
|
* Hook the U-Boot library up to the build.marcel2008-02-171-0/+5
|
* MFp4 (e500):marcel2008-02-167-0/+817
| | | | | | | Add support for U-Boot. This uses the U-Boot API as developed by Rafal and which is (will be) part of U-Boot 1.3.2 and later. Credits to: raj@
* MFp4 (e500):marcel2008-02-1616-0/+1933
| | | | | | | Add support for U-Boot. This uses the U-Boot API as developed by Rafal and which is (will be) part of U-Boot 1.3.2 and later. Credits to: raj@
* Clean up PowerPC loader(8) build config.raj2008-02-112-2/+2
| | | | | | | | | | Turn off TFTP support by default: when both TFTP and NFS are enabled in the loader, strange interactions occur in the pure netbooting scenario (i.e. loader is TFTP-ed, kernel+world mounted over NFS), leading to very slow access to the NFS-exported files. Reviewed by: grehan Approved by: cognet (mentor)
* Make the openfirmware getchar entry point non-blocking. This catches upgrehan2008-02-061-4/+4
| | | | | | with jhb's 2005/05/27 loader multiple-console change. Tested by: marius/sparc64, grehan/ofwppc
* Bump manpage date for rev 1.27keramida2008-01-161-1/+1
| | | | MFC after: 3 days
* Document that loader(8) stops reading `loader.conf' when itkeramida2008-01-161-0/+10
| | | | | | | | encounters a syntax error, and add a tip about adding first the `vital' options and then experimental ones. PR: docs/119658 Submitted by: Julian Stacey, jhs at berklix.org
* "FreeBSD/Open Firmware/PowerPC ..." is confusing and non-standard.marcel2007-12-261-1/+1
| | | | Use "FreeBSD/powerpc Open Firmware ..." instead.
* - remove code from oroginal file, which is not required on BWCT boardsticso2007-12-231-52/+86
| | | | | | | - Be more chatty on startup, since we have enough code space on AT91RM9200 - init DS1672 charging - init USART GPIO
* BWCT boards uses two different SPI flash chipsticso2007-12-231-2/+3
| | | | check for both status codes
* Allow negative values to be specified in the loader.ambrisko2007-12-191-0/+2
|
* Remove file after being repocopied to ../ofw, where it lives on.marcel2007-12-177-749/+0
| | | | Repocopy by: simon@
* Build the OFW loader from its new location after the sourcesmarcel2007-12-171-1/+1
| | | | were repocopied from ./loader to ./ofw.
* Add a note to indicate that these files do borrow in part from mbr.s andjhb2007-11-262-0/+4
| | | | | | boot1.S Requested by: rnordier
* MFi386: revision 1.18nyan2007-11-181-1/+1
| | | | | Add a trailing \0 to the read error string so that read errors don't print out two error messages.
* Add a trailing \0 to the read error string so that read errors don't printjhb2007-11-171-1/+1
| | | | | | out two error messages. MFC after: 3 days
* Though we are currently not interested in the EDD3 flag,bz2007-11-121-1/+1
| | | | | | | Enhanced Disk Drive Specification Ver 3.0 defines that the version of extension in AH would be 30h. Correct the check for that to be >=30h instead of >3h. MFC after: 2 months
* Document the per-arch default value of kern.maxbcache.ru2007-11-081-2/+3
|
* - Add constants for the different memory types in the SMAP table.jhb2007-10-282-31/+18
| | | | | - Use the SMAP types and constants from <machine/pc/bios.h> in the boot code rather than duplicating it.
* Use the smaller cgbase() macro in ufsread.c if UFS_SMALL_CGBASE isjhb2007-10-264-4/+5
| | | | | | | | defined. This lets each boot program choose which version of cgbase() it wants to use rather than forcing ufsread.c to have that knowledge. MFC after: 1 week Discussed with: imp
* Add . to the include path so that we follow the 'machine' symlink we createjhb2007-10-261-1/+1
| | | | | | during depend on amd64. Reported by: rwatson
* The arm boot code uses this function as well. Redefining cgbase()imp2007-10-261-1/+1
| | | | | | | | saves about 500 bytes in the boot code. While the AT91RM9200 has 12k of space for the boot loader, which is more than i386's 8k, the code generated by gcc is a bit bigger. I've had this in p4 for about two years now.
* Fix signedness to make gcc happy.cognet2007-10-253-4/+4
|
* Break out of the I/O retry loop as soon as an I/O operation succeeds ratherjhb2007-10-251-0/+2
| | | | | | than always retrying operations three times. Submitted by: nyan
* MFi386: part of 1.52nyan2007-10-251-32/+33
| | | | | Split the pc98_partition specific routine in bd_opendisk() into bd_open_pc98().
* MFi386: part of revision 1.51nyan2007-10-251-161/+83
| | | | | | | | | Rework the read/write support in the bios disk driver some to cut down on duplicated code. - All of the bounce buffer and retry logic duplicated in bd_read() and bd_write() are merged into a single bd_io() routine that takes an extra direction argument. bd_read() and bd_write() are now simple wrappers around bd_io().
* Load the bytes into the EMAC's MAC address register in the properimp2007-10-251-2/+2
| | | | | | | | | | | order. The kernel used to shuffle them around to get things right, but that was recently fixed. This makes our boot loader match the behavior of most other boot loaders for the atmel parts. This bug was inherited from the Kwikbyte loader that we started from. This bug was discovered by Bj.ANvrn KNvnig back in June, but fell on the floor. He provided patches to the kernel, include backwards compatibility options that were similar to Olivier's if_ate.c commit.
* First cut at support for booting a GPT labeled disk via the BIOS bootstrapjhb2007-10-249-173/+839
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on i386 and amd64 machines. The overall process is that /boot/pmbr lives in the PMBR (similar to /boot/mbr for MBR disks) and is responsible for locating and loading /boot/gptboot. /boot/gptboot is similar to /boot/boot except that it groks GPT rather than MBR + bsdlabel. Unlike /boot/boot, /boot/gptboot lives in its own dedicated GPT partition with a new "FreeBSD boot" type. This partition does not have a fixed size in that /boot/pmbr will load the entire partition into the lower 640k. However, it is limited in that it can only be 545k. That's still a lot better than the current 7.5k limit for boot2 on MBR. gptboot mostly acts just like boot2 in that it reads /boot.config and loads up /boot/loader. Some more details: - Include uuid_equal() and uuid_is_nil() in libstand. - Add a new 'boot' command to gpt(8) which makes a GPT disk bootable using /boot/pmbr and /boot/gptboot. Note that the disk must have some free space for the boot partition. - This required exposing the backend of the 'add' function as a gpt_add_part() function to the rest of gpt(8). 'boot' uses this to create a boot partition if needed. - Don't cripple cgbase() in the UFS boot code for /boot/gptboot so that it can handle a filesystem > 1.5 TB. - /boot/gptboot has a simple loader (gptldr) that doesn't do any I/O unlike boot1 since /boot/pmbr loads all of gptboot up front. The C portion of gptboot (gptboot.c) has been repocopied from boot2.c. The primary changes are to parse the GPT to find a root filesystem and to use 64-bit disk addresses. Currently gptboot assumes that the first UFS partition on the disk is the / filesystem, but this algorithm will likely be improved in the future. - Teach the biosdisk driver in /boot/loader to understand GPT tables. GPT partitions are identified as 'disk0pX:' (e.g. disk0p2:) which is similar to the /dev names the kernel uses (e.g. /dev/ad0p2). - Add a new "freebsd-boot" alias to g_part() for the new boot UUID. MFC after: 1 month Discussed with: marcel (some things might still change, but am committing what I have so far)
* Rework the read/write support in the bios disk driver some to cut downjhb2007-10-241-196/+112
| | | | | | | | | | | | | | | | | | | on duplicated code and support 64-bit LBAs for GPT. - The code to manage an EDD or C/H/S I/O request are now in their own routines. The EDD routine now handles a full 64-bit LBA instead of truncating LBAs to the lower 32-bits. (MBRs and BSD labels only have 32-bit LBAs anyway, so the only LBAs ever passed down were 32-bit). - All of the bounce buffer and retry logic duplicated in bd_read() and bd_write() are merged into a single bd_io() routine that takes an extra direction argument. bd_read() and bd_write() are now simple wrappers around bd_io(). - If a disk supports EDD then always use it rather than only using it if the cylinder is > 1023. Other parts of the boot code already do something similar to this. Also, GPT just uses LBAs, so for a GPT disk it's probably best to ignore C/H/S completely. Always using EDD when it is supported by a disk is an easy way to accomplish this. MFC after: 1 week
* MFi386: revision 1.50nyan2007-10-241-39/+30
| | | | Reindent the read/write code of bd_realstrategy() so it is more readable.
* MFi386: revision 1.41nyan2007-10-241-2/+1
| | | | | | | Slightly cleanup the 'bootdev' concept on x86 by changing the various macros to treat the 'slice' field as a real part of the bootdev instead of as hack that spans two other fields (adaptor (sic) and controller) that are not used in any modern FreeBSD boot code.
OpenPOWER on IntegriCloud