History log of /freebsd-10.3-release/sys/boot/ofw/libofw/openfirm.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 296373 04-Mar-2016 marius

- Copy stable/10@296371 to releng/10.3 in preparation for 10.3-RC1
builds.
- Update newvers.sh to reflect RC1.
- Update __FreeBSD_version to reflect 10.3.
- Update default pkg(8) configuration to use the quarterly branch.

Approved by: re (implicit)

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 215577 20-Nov-2010 andreast

Check the OF_getprop() return value before proceeding. Allocate only as
much space as needed for the mode buffer. Use strcmp, relying on OF giving
back NULL terminated strings.

Submitted by: marius
Approved by: nwhitehorn (mentor)


# 215438 17-Nov-2010 andreast

Check the real-mode? OF property to find out whether we operate in real or
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)


# 214493 28-Oct-2010 nwhitehorn

Fix some memory management issues discovered when trying to boot the PPC
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


# 170854 17-Jun-2007 marius

- Make better use of the global chosen, memory and mmu handles instead
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.


# 170838 16-Jun-2007 marius

Sync the styles of sys/boot/ofw/libofw/openfirm.c and
sys/dev/ofw/openfirm.c with themselves, with each-other
and with style(9).


# 163145 09-Oct-2006 kmacy

add sun4v support to the sparc64 boot loader

Approved by: rwatson (mentor)
Reviewed by: jmg
Tested by: kris, dwhite, and jmg


# 151496 20-Oct-2005 marius

Remove unused variables.


# 139738 05-Jan-2005 imp

Start each of the license/copyright comments with /*-


# 133862 16-Aug-2004 marius

Instead of "OpenFirmware", "openfirmware", etc. use the official spelling
"Open Firmware" from IEEE 1275 and OpenFirmware.org (no pun intended).

Ok'ed by: tmm


# 131783 08-Jul-2004 grehan

All hell breaks loose if the loader image is released before
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.


# 124140 04-Jan-2004 obrien

Convert to __FBSDID.


# 100318 18-Jul-2002 benno

Major rework of how we copy data into kernel space.

We now talk to the memory and mmu instances directly rather than using the
OpenFirmware "claim" method.


# 91108 23-Feb-2002 jake

Add OF_claim_virt() and OF_release_phys().

Submitted by: tmm


# 85717 30-Oct-2001 jake

Make the openfirmware entry point function pointer non-static so that it
can be passed to the kernel.


# 84972 15-Oct-2001 robert

- Use the cell_t type definition for Open Firmware arguments in
combination with requisite casts as this avoids fatal side
effects on 64-bit architectures.
- Add the OF_alloc_phys function.


# 84617 07-Oct-2001 benno

Mega-patch for OpenFirmware loader support.

- 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.


# 68548 10-Nov-2000 benno

OpenFirmware/PowerPC loader, part 2.

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


# 67204 16-Oct-2000 obrien

"Ok, my loader's now up to putting up a prompt. It probes disks partially
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>