Subject: Re: 20020313+0314 time warp version works on kbd/screen
To: None <port-macppc@netbsd.org>
From: Makoto Fujiwara <makoto@ki.nu>
List: port-macppc
Date: 06/19/2002 08:54:04
Thanks Bill,
Here is some trial stuff:
machdep.c ----- sys/arch/macppc/macppc/machdep.c
syncicache.c -- sys/lib/libkern/arch/powerpc/syncicache.c
Parts to check:
machdepc. syncicache.c
(1) consinit removed x
(2) cpu_probe_cache/before install_extint x
(3) syncicache.c (half) reverted to 20020313 x
(4) add printf-cacheinfo x
(5) - no cninit x
(6) - no ddb init x
Status up to yesterday:
(1) (2) (3)
YES works
YES YES works
YES stops after start=0x100000
YES YES works
Todays addition:
+----syncicache-half-revert
|
| +-- add printf-cacheinfo
| |
| | +-- no cninit
| | |
(1) (2) (3) (4) (5)
YES YES works (*1)
YES YES YES works (*1)
YES YES works (*1)
(*1) but no cacheinfo printed --- to early to use printf ?
I will attache diff to 20020314 for case (3)+(4)+(5)
cvs diff -u syssrc/sys/arch/macppc > ~/macppc/paren-5
cvs diff -u syssrc/sys/arch/powerpc >> ~/macppc/paren-5
cvs diff -u syssrc/sys/lib/libkern/arch/powerpc >> ~/macppc/paren-5
---
Makoto Fujiwara,
Index: syssrc/sys/arch/macppc/macppc/machdep.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/macppc/macppc/machdep.c,v
retrieving revision 1.110
diff -u -r1.110 machdep.c
--- machdep.c 2002/03/02 00:44:08 1.110
+++ machdep.c 2002/06/18 23:42:14
@@ -107,6 +107,7 @@
struct proc *fpuproc;
#endif
+extern void consinit_early(void);
extern struct user *proc0paddr;
extern int ofmsr;
@@ -381,8 +382,13 @@
* but I really think the console should be initialized
* as early as possible.
*/
- consinit();
+ consinit_early();
+ printf("Cache info: ");
+ printf("isize %u, ilinesize %u, dsize %u, dlinesize %u\n",
+ ci->ci_ci.icache_size, ci->ci_ci.icache_line_size,
+ ci->ci_ci.dcache_size, ci->ci_ci.dcache_line_size);
+
/*
* Set the page size.
*/
@@ -1090,3 +1096,38 @@
#endif
}
#endif /* MULTIPROCESSOR */
+
+/*
+ * consinit
+ * Initialize system console.
+ */
+void
+consinit_early()
+{
+ static int initted;
+
+ if (initted)
+ return;
+ initted = 1;
+ /* cninit(); */
+
+#ifdef DDB
+ ddb_init((int)((u_int)endsym - (u_int)startsym), startsym, endsym);
+ if (boothowto & RB_KDB)
+ Debugger();
+#endif
+
+#ifdef IPKDB
+ ipkdb_init();
+ if (boothowto & RB_KDB)
+ ipkdb_connect(0);
+#endif
+
+#ifdef KGDB
+#if NZSC > 0
+ zs_kgdb_init();
+#endif
+ if (boothowto & RB_KDB)
+ kgdb_connect(1);
+#endif
+}
Index: syssrc/sys/lib/libkern/arch/powerpc/syncicache.c
===================================================================
RCS file: /cvsroot/syssrc/sys/lib/libkern/arch/powerpc/syncicache.c,v
retrieving revision 1.5
diff -u -r1.5 syncicache.c
--- syncicache.c 2002/03/13 00:59:29 1.5
+++ syncicache.c 2002/06/18 23:43:01
@@ -103,8 +103,8 @@
getcachelinesize();
#endif
- if (CACHEINFO.dcache_size > 0) {
- linesz = CACHEINFO.dcache_line_size;
+ if (1 > 0) {
+ linesz = 32;
off = (u_int)from & (linesz - 1);
l = len += off;
p = (char *)from - off;
@@ -115,8 +115,8 @@
}
__asm__ __volatile ("sync");
- if (CACHEINFO.icache_size > 0 ) {
- linesz = CACHEINFO.icache_line_size;
+ if (1 > 0 ) {
+ linesz = 32;
off = (u_int)from & (linesz - 1);
p = (char *)from - off;
do {