Port-atari archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Current kernel with http://gnats.netbsd.org/39965 and pmap patches



I wrote:

> --- atari/atari_init.c.0      2008-12-17 19:12:51.000000000 +0900
> +++ atari/atari_init.c        2008-12-17 23:47:19.000000000 +0900
 :

Ah, there is a bad pasto. Please try this one.


--- atari/atari_init.c.0        2008-12-17 19:12:51.000000000 +0900
+++ atari/atari_init.c  2008-12-18 00:46:07.000000000 +0900
@@ -918,15 +918,15 @@
        u_int           sysptmap_pa;    /* System page table            */
        u_int           kbase;
 {
-       st_entry_t      sg_proto, *sg;
+       st_entry_t      sg_proto, *sg, *esg;
        pt_entry_t      pg_proto, *pg, *epg;
 
        /*
         * Map the page table pages in both the HW segment table
         * and the software Sysptmap.
         */
-       sg  = (u_int *)Sysseg_pa;
-       pg  = (u_int *)sysptmap_pa;
+       sg  = (st_entry_t *)Sysseg_pa;
+       pg  = (pt_entry_t *)sysptmap_pa;
        epg = &pg[ptsize >> PGSHIFT];
        sg_proto = ((u_int)pt + kbase) | SG_RW | SG_V;
        pg_proto = ((u_int)pt + kbase) | PG_RW | PG_CI | PG_V;
@@ -938,14 +938,20 @@
        }
 
        /* 
-        * invalidate the remainder of the tables
+        * Invalidate the remainder of the tables.
         */
-       /* XXX PAGE_SIZE dependent constant: 256 or 1024 */
-       epg = (u_int *)(sysptmap_pa + (256 - 1) * sizeof(st_entry_t));
-       while(pg < epg) {
+#define TIA_SIZE       256
+       esg = (st_entry_t *)(Sysseg_pa + (TIA_SIZE - 1) * sizeof(st_entry_t));
+       while (sg < esg)
                *sg++ = SG_NV;
+
+       epg = (pt_entry_t *)(sysptmap_pa + (NPTEPG - 1) * sizeof(pt_entry_t));
+       while (pg < epg)
                *pg++ = PG_NV;
-       }
+
+       /*
+        * Initialize the last one to point Sysptmap.
+        */
        *sg = sysptmap_pa | SG_RW | SG_V;
        *pg = sysptmap_pa | PG_RW | PG_CI | PG_V;
 }

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index