summaryrefslogtreecommitdiffstats
path: root/sys/boot/ofw
Commit message (Collapse)AuthorAgeFilesLines
* Instead of "OpenFirmware", "openfirmware", etc. use the official spellingmarius2004-08-165-7/+7
| | | | | | "Open Firmware" from IEEE 1275 and OpenFirmware.org (no pun intended). Ok'ed by: tmm
* G5 support: handle the case where the OpenFirmware memory array usesgrehan2004-08-023-29/+90
| | | | 64 bits for the phys address, but only 32 for the virtual address.
* All hell breaks loose if the loader image is released beforegrehan2004-07-081-1/+3
| | | | | | | jumping to the kernel. Another bug exposed by removing the 1:1 BAT mapping. Sparc64 doesn't do this either. Compile tested on: panther (sparc64). Code built, but not used, on sparc64.
* Correctly calculate size of memory to be mapped when copying. Removalgrehan2004-07-081-1/+3
| | | | | | | of the 256Mb 1:1 BAT mapping exposed this as copying into memory that hadn't been claimed from OpenFirmware. compiled-tested on: panther (sparc64). Code built, but not used, on sparc64
* Extract entry point from elf header before releasing the heap.grehan2004-07-081-1/+3
| | | | | | | This caused a data-miss trap when the BAT init code was removed on PPC. Compile tested on: panther (sparc64). Code built, but not used, on sparc64.
* Convert to __FBSDID.obrien2004-01-0412-23/+37
|
* - Add ':' as a separator between the OpenFirmware device space andgrehan2003-12-212-3/+4
| | | | | | | the file path. Commonly used on Macs e.g. "hd:9". - Update the ofw_setcurrdev routine to match libstand setenv prototype Not objected to by: sparc64
* Make __elfN(ofw_loadfile) match parameter declaration for file_formatgrehan2003-12-211-1/+4
| | | | | | | in boot/common/bootstrap.h. Having a 32-bit size when a 64-bit param is declared wreaks havoc on PPC. Not objected to by: sparc64
* Only print out an error if returned data size is < 0. A value of 0grehan2003-12-211-1/+2
| | | | | | happens almost every time at the end of a file when using NFS. No objection by: sparc64
* Use daddr_t instead of u_long for byte offset in strategygrehan2003-12-211-1/+1
| | | | | | routine to avoid >4G truncation on 32-bit systems. no objection by: sparc64
* - use correct pointer arithmetic in heapsize calculationgrehan2003-12-211-7/+29
| | | | | | - handle multiple Ofw memory regions when determining mem size - allow currdev to be set as a loader command-line option. parse() is used to allow future options to be processed.
* Enable the i386 loader to load and run an amd64 kernel. If this putspeter2003-05-011-5/+5
| | | | | | | | | | | | | | | things over floppy size limits, I can exclude it for release builds or something like that. Most of the changes are to get the load_elf.c file into a seperate elf32_ or elf64_ namespace so that you can have two ELF loaders present at once. Note that for 64 bit kernels, it actually starts up the kernel already in 64 bit mode with paging enabled. This is really easy because we have a known minimum feature set. Of note is that for amd64, we have to pass in the bios int 15 0xe821 memory map because once in long mode, you absolutely cannot make VM86 calls. amd64 does not use 'struct bootinfo' at all. It is a pure loader metadata startup, just like sparc64 and powerpc. Much of the infrastructure to support this was adapted from sparc64.
* Cut&Paste considered far too easy:phk2003-04-162-2/+0
| | | | Don't include <sys/disklabel.h>
* Fix a dumb bug that broke net booting on sparc64. The wrong length wasjake2002-12-021-1/+1
| | | | | | | | passed to strncmp. Noticed by: tmm Approved by: re Pointy hat to: jake
* Change the device path representation in libofw to use the full firmwarejake2002-11-106-579/+62
| | | | | | | | | 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
* Major rework of how we copy data into kernel space.benno2002-07-186-22/+36
| | | | | We now talk to the memory and mmu instances directly rather than using the OpenFirmware "claim" method.
* Add support for passing metadata.benno2002-07-101-44/+16
|
* Fix up the DMA buffer allocation call.benno2002-06-071-1/+2
|
* Removed now unused INTERNALSTATICLIB.ru2002-05-131-3/+0
| | | | | INTERNALLIB now implies NOPIC and NOPROFILE. Removed gratuitous NOMAN.
* Back out last commit. I expect our bsd.*.mk gods to remove the need forobrien2002-05-121-0/+3
| | | | | defining so many extra things in addition to INTERNALLIB. We don't like repetitive C code and we shouldn't for make code either.
* Change the disk probing so that it will actually find disks otherjake2002-05-113-42/+136
| | | | | | | | | | | | | | | | | than the first one on a controller, and work for secondary controllers. Due to the prom not having nodes for each disk, but a catch-all one, we have to iterate over each device, trying to open it to determine whether it is actually present. Since probing this way takese some time (and spews some spurious warnings), it should maybe be short-circuited if we use the device we were booted from. Implement lazy device probing, and correct slice/partiniton handling in the ofwd_open() code. With this, I can now actually boot a kernel from disk, and the loader does not create unnecessary delays. Submitted by: tmm
* NOPIC, NOPROFILE, NOMAN, and INTERNALSTATICLIB are redundant when usingobrien2002-05-111-3/+0
| | | | INTERNALLIB now.
* Add -ffreestanding to CFLAGS.jake2002-02-231-0/+1
|
* Fix test for != 0 that should be > 0.jake2002-02-231-1/+1
|
* Check the return values of index() and don't dereference it if its null;jake2002-02-231-2/+8
| | | | | the path may not have a ':' in it. The mac address property is called mac-address for sparc64. Don't allocate a dma buffer for sparc64 either.
* #if 0 more bootinfo stuff.jake2002-02-231-0/+4
|
* Add OF_claim_virt() and OF_release_phys().jake2002-02-232-0/+72
| | | | Submitted by: tmm
* - Remove unneeded variable.robert2002-02-151-2/+0
| | | | | | | - Remove change for my local configuration that slipped in with the last commit; I am having problems booting when multiple SCSI disks are attached, so I will change this part as soon as I find a solution, anyway.
* This file is now unneeded.robert2002-02-151-492/+0
|
* - Do not include a NetBSD header as it is not needed anymore.robert2002-02-151-24/+11
| | | | | | | | | | - Remove two constants that were needed in conjuction with the NetBSD disklabel header. Use the FreeBSD equivalents. To boot from NetBSD/sparc64 partitions, define LABELOFFSET to be 128. - Do not use the complete open firmware path to filter out cdrom drives. No path containing "cdrom" is detected as a disk now. - Simplify some code.
* Make the openfirmware entry point function pointer non-static so that itjake2001-10-302-1/+3
| | | | can be passed to the kernel.
* Add a prototype for OF_alloc_phys.robert2001-10-151-0/+1
|
* Make the ofw_reg structure and ofw_alloc_heap 64-bit save.robert2001-10-152-4/+4
|
* Do not include openfirm.h; it is now included by libofw.h.robert2001-10-151-1/+0
|
* - Use the cell_t type definition for Open Firmware arguments inrobert2001-10-151-247/+359
| | | | | | combination with requisite casts as this avoids fatal side effects on 64-bit architectures. - Add the OF_alloc_phys function.
* - Fill dummy functions with code to read from disk using Openrobert2001-10-152-6/+597
| | | | | | | | | Firmware. - Add a temporary disklabel header to boot off a NetBSD/sparc64 partition. This file can be deleted when we have got a FCode bootblock. The disklabel header was obtained from NetBSD.
* - Include openfirm.h for phandle_t.robert2001-10-151-7/+10
| | | | | - Add some necessary members to the ofwdisk structure. - Add a prototype for ofw_parseofwdev.
* Add a function for parsing an Open Firmware boot path into therobert2001-10-151-3/+29
| | | | ofw_devdesc structure.
* - Add an ifdef guard.robert2001-10-151-3/+6
| | | | | | - Use unsigned types for the (32-bit) Open Firmware device handles to avoid sign extension on 64-bit architectures. - Add a standard type definition for Open Firmware arguments.
* Whitespace fixes.benno2001-10-072-5/+4
|
* Add new files needed by previous commit.benno2001-10-072-0/+221
|
* Mega-patch for OpenFirmware loader support.benno2001-10-077-43/+99
| | | | | | | | | | | | | - Flesh out ofw_readin routine. - Add OpenFirmware load and exec routines. - Make sure memory allocation for the kernel is done correctly. - Change the way the heap is allocated so as to make it easier to deallocate when we hand over. - Add a command to print memory maps similar to the one for ia64. With this patch, I can now load and hand over to a kernel on my iMac. There are some problems with OpenFirmware routines failing after the hand over that still need to be addressed.
* Pass NULL instead of MAXPHYS to the DMA allocation method. Be a bit morebenno2001-08-261-2/+4
| | | | verbose if we fail to allocate the DMA buffer.
* OpenFirmware/PowerPC loader, part 2.benno2000-11-1011-162/+407
| | | | | | | | | | As of this patchset, the loader builds (under NetBSD/macppc), boots, interacts and talks to BOOTP/NFS servers. (main.c was moved from boot/ofw/libofw to boot/ofw/common but has no revision history) Reviewed by: obrien
* Convert from the Alpha compontents to PowerPC ones.obrien2000-10-164-174/+83
|
* "Ok, my loader's now up to putting up a prompt. It probes disks partiallyobrien2000-10-1611-0/+1615
| | | | | | | | but can't boot from them yet." Thanks to Stephane Potvin for the some of the code in this set. Submitted by: Benno Rice <benno@jeamland.net>
* Fix the more obvious warnings to deal with my earlier warning cleanups.jhb2000-08-031-8/+8
|
* $Id$ -> $FreeBSD$peter1999-08-284-4/+4
|
* Bring the 'new-bus' to the i386. This extensively changes the way thepeter1999-04-161-2/+2
| | | | | | | | | | | | | | | | | | i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core
* * Add old UFS compatibility code to alpha/boot1.dfr1998-09-261-5/+6
| | | | | | * Fix a raft of warnings, printf and otherwise. * Allocate the correct amount in mod_searchmodule to prevent an overflow. * Fix the makefiles so they work outside my home directory (oops).
OpenPOWER on IntegriCloud