summaryrefslogtreecommitdiffstats
path: root/sys/boot/ofw/common
Commit message (Collapse)AuthorAgeFilesLines
* Replace index() and rindex() calls with strchr() and strrchr().ed2012-01-031-1/+1
| | | | | | | | | | The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls.
* 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 some memory management issues discovered when trying to boot the PPCnwhitehorn2010-10-281-22/+18
| | | | | | | | 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
* - Make better use of the global chosen, memory and mmu handles insteadmarius2007-06-171-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | of obtaining them over and over again and pretending we could do anything useful without them (for chosen this includes adding a declaration and initializing it in OF_init()). - In OF_init() if obtaining the memory or mmu handle fails just call OF_exit() instead of panic() as the loader hasn't initialized the console at these early stages yet and trying to print out something causes a hang. With OF_exit() one at least has a change to get back to the OFW boot monitor and debug the problem. - Fix OF_call_method() on 64-bit machines (this is a merge of sys/dev/ofw/openfirm.c rev 1.6). - Replace OF_alloc_phys(), OF_claim_virt(), OF_map_phys() and OF_release_phys() in the MI part of the loader with wrappers around OF_call_method() in the sparc64. Beside the fact that they duplicate OF_call_method() the formers should never have been in the MI part of the loader as contrary to the OFW spec they use two-cell physical addresses. - Remove unused functions which are also MD dupes of OF_call_method(). - In sys/boot/sparc64/loader/main.c add __func__ to panic strings as different functions use otherwise identical panic strings and make some of the panic strings a tad more user-friendly instead of just mentioning the name of the function that returned an unexpected result.
* Don't unconditionally compile-in the bcache code. It's only used onmarcel2006-11-021-5/+0
| | | | | i386/amd64 and pc98. Remove useless calls to bcache_init() from the ia64 and sparc64 loaders, as well as from the OFW common code.
* Instead of "OpenFirmware", "openfirmware", etc. use the official spellingmarius2004-08-161-1/+1
| | | | | | "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-021-10/+24
| | | | 64 bits for the phys address, but only 32 for the virtual address.
* Convert to __FBSDID.obrien2004-01-041-2/+3
|
* - 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.
* Change the device path representation in libofw to use the full firmwarejake2002-11-101-35/+2
| | | | | | | | | 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
* Mega-patch for OpenFirmware loader support.benno2001-10-071-27/+20
| | | | | | | | | | | | | - 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.
* OpenFirmware/PowerPC loader, part 2.benno2000-11-102-0/+205
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
OpenPOWER on IntegriCloud