Home | History | Annotate | Download | only in ofwboot
History log of /src/sys/arch/macppc/stand/ofwboot/Locore.c
RevisionDateAuthorComments
 1.35  28-Feb-2021  thorpej - When starting the boot program, cache a bunch of OFW frequently used
ihandles / phandles, rather than fetching them all the time.
- Change the signature of OF_call_method() to take an array of cells for
the inputs and outputs, rather than using variadic arguments. This
makes it much easier to use OF_call_method() when the format of the
arguments passed to a given method are determined at run-time
(due to e.g. #address-cells).
- Properly inform OpenFirmware where the kernel is loaded by using
"claim" on /chosen/memory and, if running in virtual-mode, using
"claim" on /chosen/mmu to reserve the VA, and "map" on /chosen/mmu
to enter the translation. (The kernel is still always mapped VA==PA.)
 1.34  15-Apr-2020  rin branches: 1.34.2;
When boot up with auto-boot? == true, some systems do not provide stdout
if the normal output is screen.

Open screen explicitly as stdout in this case, both for ofwboot and kernel,
which fixes problems with auto-boot? == true for Mac mini G4:

- messages from ofwboot do not appear
- kernel freeze during early boot stage

Taken from OpenBSD:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/macppc/macppc/ofw_machdep.c#rev1.3
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/macppc/stand/Locore.c#rev1.3

XXX
pullup to netbsd-9 and -8
 1.33  12-Nov-2018  scole branches: 1.33.4; 1.33.10;
PR 51495/port-macppc

Allow ppc601 to boot off hard disk
 1.32  17-Aug-2018  macallan - add some G5-specific setup
- OF_claim() more heap space on G5
With this, and -DHEAP_VARIABLE my G5s boot from harddisk
 1.31  06-Jun-2018  uwe branches: 1.31.2;
Provide commented out OF_enter() that comes in handy when debugging.
 1.30  06-Jun-2018  uwe Provide an option to use libsa allocator. Not yet enabled. Same
binary code is generated.

To enable uncomment -DHEAP_VARIABLE and comment out alloc.c in the
makefile.

PR port-macppc/44895
 1.29  22-Apr-2016  christos branches: 1.29.10; 1.29.16;
undo unintended commit
 1.28  22-Apr-2016  christos Elide unused variable warnings (Felix Deichmann)
 1.27  13-Mar-2016  tsutsui TAB/space cleanup.
 1.26  26-Jul-2015  tsutsui Don't set garbages into BAT registers, which was broken in rev 1.25.

Should fix PR port-macppc/50018 (though there is no response for 3 weeks),
and should be pulled up to netbsd-7.
 1.25  26-Feb-2014  macallan branches: 1.25.4; 1.25.6;
support 601, from scole_mail
 1.24  17-Jul-2011  joerg branches: 1.24.2; 1.24.12; 1.24.16;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.23  18-Sep-2006  sanjayl Undo my half hearted atttempt at porting ofwboot to the G5.
Thanks to Cherry for pointing this out, and my apologies.
 1.22  05-Aug-2006  sanjayl branches: 1.22.2; 1.22.4; 1.22.6;
1st cut of Powermac G5 support (uses bridge mode).
 1.21  27-Jan-2006  uwe branches: 1.21.2; 1.21.6;
More constification.
 1.20  27-Jan-2006  uwe Tell gcc that startup and stack are used.
In startup remove declarations of unused symbols.
This file now compiles with WARNS=4.
 1.19  27-Jan-2006  uwe Make -Wcast-qual happy.
 1.18  24-Dec-2005  perry branches: 1.18.2;
bare asm -> __asm
 1.17  11-Dec-2005  christos merge ktrace-lwp.
 1.16  17-Mar-2004  wrstuden branches: 1.16.16;
Have Locore zero out the bss (which includes our stack) BEFORE
we start calling into C code. Previously we called memset() in our
C code. Unfortunately the compiler would sometimes store local variables
on the statck, which got killed by the memset(). Oops!
 1.15  26-Dec-2003  aymeric ANSIfy and clean up prototypes.
This has been lying around in my tree for too long now.
 1.14  02-Apr-2003  thorpej branches: 1.14.2;
Oops, didn't mean to commit this.
 1.13  02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.12  31-Oct-2002  matt Convert to register prefixes. Use ANSI string concatenation for
multiline asm strings.
 1.11  27-Sep-2002  wrstuden Remove vestiges of the syncicache() call originally in powerpc/ofwboot
before rev 1.4. This change makes OF 2.4 machines actually boot, and
it works fine on my OF 2.01 machine. No reports of failures on other
archs.

I expect this change is fine as the original code flushed the just-loaded
ofwboot out of the cache, conditionalized on FIRMWORKSBUGS. In rev.
1.4, the code got in-lined, and changed to actually flush low memory
out of the cache. Since machines kept booting, I expect the firmware
was really flushing the binary out of the cache, so we're fine.
 1.10  29-Mar-2002  tsutsui branches: 1.10.4;
Cosmetics.
 1.9  24-Sep-2001  wiz branches: 1.9.4;
va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).

Improved by comments from enami and christos -- thanks!

Heimdal/krb4/KAME changes already fed back, rest to follow.

Inspired by, but not not based on, OpenBSD.
 1.8  22-Jul-2001  wiz branches: 1.8.2;
bcopy -> memcpy, bzero -> memset, bcmp -> memcmp.
Reviewed by Matt Thomas, ok'd by Tsubai Masanari.
 1.7  20-Aug-2000  tsubai branches: 1.7.4;
Increase stack size.
 1.6  22-Dec-1999  thorpej Update some comments.
 1.5  04-Feb-1999  tsubai branches: 1.5.8;
Allocate DMA-aware memory area using "dma-alloc" method and use them
for data buffer.
XXX currently only netif_put() uses this.

iMac can use ofwboot.elf now.
 1.4  02-Feb-1999  tsubai Ensure lowest 256MB is mapped by BAT0.
 1.3  24-Jul-1998  tsubai Comment out "insert root disk..." message.
Remove unnecessary video init.
 1.2  26-Jun-1998  tsubai Change load address of ofwboot for large (md root) kernel.
 1.1  15-May-1998  tsubai Initial import of macppc port.
 1.5.8.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.7.4.4  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.7.4.3  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.4.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.4.1  03-Aug-2001  lukem update to -current
 1.8.2.1  01-Oct-2001  fvdl Catch up with -current.
 1.9.4.4  11-Nov-2002  nathanw Catch up to -current
 1.9.4.3  18-Oct-2002  nathanw Catch up to -current.
 1.9.4.2  17-Apr-2002  nathanw Catch up to -current.
 1.9.4.1  24-Sep-2001  nathanw file Locore.c was added on branch nathanw_sa on 2002-04-17 00:03:44 +0000
 1.10.4.1  30-Sep-2002  lukem Pull up revision 1.11 (requested by wrstuden in ticket #867):
Remove vestiges of the syncicache() call originally in powerpc/ofwboot
before rev 1.4. This change makes OF 2.4 machines actually boot, and
it works fine on my OF 2.01 machine. No reports of failures on other
archs.
I expect this change is fine as the original code flushed the just-loaded
ofwboot out of the cache, conditionalized on FIRMWORKSBUGS. In rev.
1.4, the code got in-lined, and changed to actually flush low memory
out of the cache. Since machines kept booting, I expect the firmware
was really flushing the binary out of the cache, so we're fine.
 1.14.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.14.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.14.2.1  03-Aug-2004  skrll Sync with HEAD
 1.16.16.1  21-Jun-2006  yamt sync with head.
 1.18.2.1  01-Feb-2006  yamt sync with head.
 1.21.6.1  11-Aug-2006  yamt sync with head
 1.21.2.1  09-Sep-2006  rpaulo sync with head
 1.22.6.1  22-Oct-2006  yamt sync with head
 1.22.4.1  18-Nov-2006  ad Sync with head.
 1.22.2.1  23-Sep-2006  snj Pull up following revision(s) (requested by sanjayl in ticket #175):
sys/arch/macppc/stand/ofwboot/Locore.c: revision 1.23
Undo my half hearted atttempt at porting ofwboot to the G5.
Thanks to Cherry for pointing this out, and my apologies.
 1.24.16.1  18-May-2014  rmind sync with head
 1.24.12.2  03-Dec-2017  jdolecek update from HEAD
 1.24.12.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.24.2.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.6.2  19-Mar-2016  skrll Sync with HEAD
 1.25.6.1  22-Sep-2015  skrll Sync with HEAD
 1.25.4.1  30-Jul-2015  martin Pull up following revision(s) (requested by tsutsui in ticket #893):
sys/arch/macppc/stand/ofwboot/Locore.c: revision 1.26
Don't set garbages into BAT registers, which was broken in rev 1.25.
Should fix PR port-macppc/50018 (though there is no response for 3 weeks),
and should be pulled up to netbsd-7.
 1.29.16.3  26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.29.16.2  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.29.16.1  25-Jun-2018  pgoyette Sync with HEAD
 1.29.10.1  21-Apr-2020  martin Pull up following revision(s) (requested by rin in ticket #1533):

sys/arch/macppc/stand/ofwboot/Locore.c: revision 1.34 (via patch)
sys/arch/powerpc/oea/ofw_consinit.c: revision 1.18

When boot up with auto-boot? == true, some systems do not provide stdout
if the normal output is screen.

Open screen explicitly as stdout in this case, both for ofwboot and kernel,
which fixes problems with auto-boot? == true for Mac mini G4:
- messages from ofwboot do not appear
- kernel freeze during early boot stage

Taken from OpenBSD:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/macppc/macppc/ofw_machdep.c#rev1.3
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/macppc/stand/Locore.c#rev1.3

XXX
pullup to netbsd-9 and -8
 1.31.2.2  21-Apr-2020  martin Sync with HEAD
 1.31.2.1  10-Jun-2019  christos Sync with HEAD
 1.33.10.1  20-Apr-2020  bouyer Sync with HEAD
 1.33.4.1  21-Apr-2020  martin Pull up following revision(s) (requested by rin in ticket #837):

sys/arch/macppc/stand/ofwboot/Locore.c: revision 1.34
sys/arch/powerpc/oea/ofw_consinit.c: revision 1.18

When boot up with auto-boot? == true, some systems do not provide stdout
if the normal output is screen.

Open screen explicitly as stdout in this case, both for ofwboot and kernel,
which fixes problems with auto-boot? == true for Mac mini G4:
- messages from ofwboot do not appear
- kernel freeze during early boot stage

Taken from OpenBSD:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/macppc/macppc/ofw_machdep.c#rev1.3
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/macppc/stand/Locore.c#rev1.3

XXX
pullup to netbsd-9 and -8
 1.34.2.1  03-Apr-2021  thorpej Sync with HEAD.

RSS XML Feed