Subject: Re: ofwboot.xcf issues
To: None <port-macppc@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-macppc
Date: 11/29/2003 07:42:44
In article <20031127231039.GA4159@as6-3-4>
lars.nordlund@hem.utfors.se

> So it depends on the size after all?

I think so, but I don't know other people have the same problem with
ofwboot.xcf (My Apus has OFW 2.0 so I only use ofwboot + installboot).

> How is Darwin getting around this issue?

The problem here is the bootloader is overwritten by a loaded kernel,
so we could just move bootloader to higher address. The attached patch
will fix the problem on loading GENERIC (at least for me),
but this won't work on machines with less than 8MB memory.

(BTW, it seems DEFAULT_ENTRY_POINT should be set by installboot.)

> Micro-kernel design with
> everything as loadable modules?

I've heard that Linux has developed kernel LKM because of bootloader
limitation on i386, but IMHO we don't have to depend on LKM for
that reason.

> Does it matter if the kernel is gzipped or not?

The matter is size of loaded kernel on memory, not file size
to be loaded from disk.
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp

Index: stand/bootxx/bootxx.c
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/stand/bootxx/bootxx.c,v
retrieving revision 1.12
diff -u -r1.12 bootxx.c
--- stand/bootxx/bootxx.c	20 Oct 2003 00:12:10 -0000	1.12
+++ stand/bootxx/bootxx.c	28 Nov 2003 22:23:25 -0000
@@ -52,7 +52,7 @@
 };
 
 #ifndef DEFAULT_ENTRY_POINT
-#define	DEFAULT_ENTRY_POINT	0x600000
+#define	DEFAULT_ENTRY_POINT	0x800000
 #endif
 
 void (*entry_point)(int, int, void *) = (void *)DEFAULT_ENTRY_POINT;
Index: stand/ofwboot/Makefile
===================================================================
RCS file: /cvsroot/src/sys/arch/macppc/stand/ofwboot/Makefile,v
retrieving revision 1.38
diff -u -r1.38 Makefile
--- stand/ofwboot/Makefile	26 Oct 2003 07:25:36 -0000	1.38
+++ stand/ofwboot/Makefile	28 Nov 2003 22:23:25 -0000
@@ -47,8 +47,8 @@
 
 # For now...
 #RELOC=		20000
-RELOC=		640000
-RELOC_FLATFILE=	600000
+RELOC=		840000
+RELOC_FLATFILE=	800000
 
 ENTRY=		_start