Current-Users archive

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

booting BBC A3000 ARM2 8MHz 4M



Hi! all,


My BBC A3000 booting on -current with some patches.
http://www.facebook.com/#!/photo.php?v=214504058625417&set=vb.100001974734194&type=2&theater


My A3000 attaches Castle SCSI to mini-podulebus.  However this
device not support.  Linux too.
Shall I find other SCSI (or IDE) card in UK eBay?  ;-)


Also FOURMEG kernel do not boots.  I have a 4M memory FOURMEG
think too much current kernel.  
I will comment-out to FOURMEG to more slimly.


Thanks,
--
kiyohara
Index: sys/arch/acorn26/acorn26/autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn26/acorn26/autoconf.c,v
retrieving revision 1.7
diff -u -r1.7 autoconf.c
--- sys/arch/acorn26/acorn26/autoconf.c 18 Mar 2009 10:22:21 -0000      1.7
+++ sys/arch/acorn26/acorn26/autoconf.c 8 Dec 2011 15:44:43 -0000
@@ -47,8 +47,8 @@
 
        irq_init();
        config_rootfound("cpu", NULL);
-       config_rootfound("iobus", NULL);
        config_rootfound("arcvideo", NULL);
+       config_rootfound("iobus", NULL);
        spl0();
        fiq_on();
 }
Index: sys/arch/acorn26/vidc/arcvideo.c
===================================================================
RCS file: /cvsroot/src/sys/arch/acorn26/vidc/arcvideo.c,v
retrieving revision 1.15
diff -u -r1.15 arcvideo.c
--- sys/arch/acorn26/vidc/arcvideo.c    19 Jul 2011 16:05:11 -0000      1.15
+++ sys/arch/acorn26/vidc/arcvideo.c    8 Dec 2011 15:44:44 -0000
@@ -54,7 +54,6 @@
 #include <dev/rasops/rasops.h>
 
 #include <machine/boot.h>
-#include <machine/intr.h>
 #include <machine/irq.h>
 #include <machine/machdep.h>
 #include <machine/memcreg.h>
@@ -70,7 +69,6 @@
 static int arcvideo_setmode(device_t self, struct arcvideo_mode *mode);
 static void arcvideo_await_vsync(device_t self);
 #endif
-static int arcvideo_intr(void *cookie);
 static int arcvideo_ioctl(void *cookie, void *vs, u_long cmd, void *data,
                               int flag, struct lwp *l);
 static paddr_t arcvideo_mmap(void *cookie, void *vs, off_t off, int prot);
@@ -87,11 +85,7 @@
 
 struct arcvideo_softc {
        device_t                sc_dev;
-       paddr_t                 sc_screenmem_base;
-       struct arcvideo_mode    sc_current_mode;
        u_int32_t               sc_vidc_ctl;
-       struct irq_handler      *sc_irq;
-       struct evcnt            sc_intrcnt;
        int                     sc_flags;
 #define AV_VIDEO_ON    0x01
 };
@@ -131,7 +125,27 @@
        struct arcvideo_softc *sc = device_private(self);
 
        sc->sc_dev = the_arcvideo = self;
-       if (!arcvideo_isconsole) {
+       if (arcvideo_isconsole) {
+               struct rasops_info *ri = &arccons_ri;
+               long defattr;
+
+               if (rasops_init(ri, 1000, 1000) < 0)
+                       panic("rasops_init failed");
+
+               /* Take rcons stuff and put it in arcscreen */
+               /* XXX shouldn't this kind of thing be done by rcons_init? */
+               arcscreen.name = "arccons";
+               arcscreen.ncols = ri->ri_cols;
+               arcscreen.nrows = ri->ri_rows;
+               arcscreen.textops = &ri->ri_ops;
+               arcscreen.fontwidth = ri->ri_font->fontwidth;
+               arcscreen.fontheight = ri->ri_font->fontheight;
+               arcscreen.capabilities = ri->ri_caps;
+
+               if ((ri->ri_ops.allocattr)(ri, 0, 0, 0, &defattr) != 0)
+                       panic("allocattr failed");
+               wsdisplay_cnattach(&arcscreen, ri, 0, 0, defattr);
+       } else {
                aprint_error(": Not console -- I can't cope with this!\n");
                return;
        }
@@ -140,13 +154,7 @@
        /* Detect monitor type? */
        /* Reset VIDC */
 
-       /* Find IRQ */
-       evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
-           device_xname(sc->sc_dev), "vsync intr");
-       sc->sc_irq = irq_establish(IOC_IRQ_IR, IPL_TTY, arcvideo_intr, self,
-           &sc->sc_intrcnt);
-       aprint_verbose(": VSYNC interrupts at %s", irq_string(sc->sc_irq));
-       irq_disable(sc->sc_irq);
+       aprint_verbose(": VSYNC interrupts at IRQ %d", IOC_IRQ_IR);
 
        aprint_normal("\n");
 
@@ -274,14 +282,6 @@
 }
 #endif
 
-static int
-arcvideo_intr(void *cookie)
-{
-/*     struct arcvideo_softc *sc = cookie; */
-
-       return IRQ_HANDLED;
-}
-
 /*
  * In the standard RISC OS 8-bit palette (which we use), the bits go
  * BGgRbrTt, feeding RrTt, GgTt and BbTt to the DACs.  The top four of
@@ -299,15 +299,9 @@
 void
 arccons_init(void)
 {
-       long defattr;
-       int clear = 0;
-       int crow;
-       int i;
        struct rasops_info *ri = &arccons_ri;
+       int i;
 
-       /* Force the screen to be at a known location */
-       if (bootconfig.screenbase != 0)
-               clear = 1;
        MEMC_WRITE(MEMC_SET_PTR(MEMC_VSTART, 0));
        MEMC_WRITE(MEMC_SET_PTR(MEMC_VINIT, 0));
        MEMC_WRITE(MEMC_SET_PTR(MEMC_VEND, 0x00080000));
@@ -321,10 +315,7 @@
        ri->ri_width = bootconfig.xpixels;
        ri->ri_height = bootconfig.ypixels;
        ri->ri_stride = ((bootconfig.xpixels * bootconfig.bpp + 31) >> 5) << 2;
-       ri->ri_flg = RI_CENTER | (clear ? RI_CLEAR : 0);
-
-       if (rasops_init(ri, 1000, 1000) < 0)
-               panic("rasops_init failed");
+       ri->ri_flg = RI_CENTER | ((bootconfig.screenbase != 0) ? RI_CLEAR : 0);
 
        /* Register video memory with UVM now we know how much we're using. */
        uvm_page_physload(0, atop(MEMC_DMA_MAX),
@@ -340,31 +331,6 @@
                                               rasops_cmap[3*i + 1] >> 4,
                                               rasops_cmap[3*i + 2] >> 4, 0));
 
-       /* Take rcons stuff and put it in arcscreen */
-       /* XXX shouldn't this kind of thing be done by rcons_init? */
-       arcscreen.name = "arccons";
-       arcscreen.ncols = ri->ri_cols;
-       arcscreen.nrows = ri->ri_rows;
-       arcscreen.textops = &ri->ri_ops;
-       arcscreen.fontwidth = ri->ri_font->fontwidth;
-       arcscreen.fontheight = ri->ri_font->fontheight;
-       arcscreen.capabilities = ri->ri_caps;
-
-       /* work out cursor row */
-       if (clear)
-               crow = 0;
-       else
-               /* +/-1 is to round up */
-               crow = (bootconfig.cpixelrow - ri->ri_yorigin - 1) /
-                       ri->ri_font->fontheight + 1;
-       if (crow < 0) crow = 0;
-       if (crow > ri->ri_rows) crow = ri->ri_rows;
-
-       if ((arccons_ri.ri_ops.allocattr)(&arccons_ri, 0, 0, 0, &defattr) !=
-           0)
-               panic("allocattr failed");
-       wsdisplay_cnattach(&arcscreen, &arccons_ri, 0, crow, defattr);
-
        /* That should be all */
        arcvideo_isconsole = 1;
 }
Index: sys/dev/rasops/rasops4.c
===================================================================
RCS file: /cvsroot/src/sys/dev/rasops/rasops4.c,v
retrieving revision 1.10
diff -u -r1.10 rasops4.c
--- sys/dev/rasops/rasops4.c    4 May 2010 04:57:34 -0000       1.10
+++ sys/dev/rasops/rasops4.c    8 Dec 2011 15:46:44 -0000
@@ -289,8 +289,12 @@
                fs = font->stride;
 
                while (height--) {
-                       rp[0] = stamp[(*fr >> 4) & 0xf];
-                       rp[1] = stamp[*fr & 0xf];
+//                     rp[0] = stamp[(*fr >> 4) & 0xf];
+//                     rp[1] = stamp[*fr & 0xf];
+u_char x = (*fr >> 4) & 0xf;
+rp[0] = x << 12 | x << 8 | x << 4 | x << 0;
+x = (*fr >> 0) & 0xf;
+rp[1] = x << 12 | x << 8 | x << 4 | x << 0;
                        fr += fs;
                        rp += rs;
                }
@@ -360,9 +364,15 @@
                fs = font->stride;
 
                while (height--) {
-                       rp[0] = stamp[(fr[0] >> 4) & 0xf];
-                       rp[1] = stamp[fr[0] & 0xf];
-                       rp[2] = stamp[(fr[1] >> 4) & 0xf];
+//                     rp[0] = stamp[(fr[0] >> 4) & 0xf];
+//                     rp[1] = stamp[fr[0] & 0xf];
+//                     rp[2] = stamp[(fr[1] >> 4) & 0xf];
+u_char x = (fr[0] >> 4) & 0xf;
+rp[0] = x << 12 | x << 8 | x << 4 | x << 0;
+       x = (fr[0] >> 0) & 0xf;
+rp[1] = x << 12 | x << 8 | x << 4 | x << 0;
+       x = (fr[1] >> 4) & 0xf;
+rp[2] = x << 12 | x << 8 | x << 4 | x << 0;
                        fr += fs;
                        rp += rs;
                }
@@ -434,10 +444,18 @@
                fs = font->stride;
 
                while (height--) {
-                       rp[0] = stamp[(fr[0] >> 4) & 0xf];
-                       rp[1] = stamp[fr[0] & 0xf];
-                       rp[2] = stamp[(fr[1] >> 4) & 0xf];
-                       rp[3] = stamp[fr[1] & 0xf];
+//                     rp[0] = stamp[(fr[0] >> 4) & 0xf];
+//                     rp[1] = stamp[fr[0] & 0xf];
+//                     rp[2] = stamp[(fr[1] >> 4) & 0xf];
+//                     rp[3] = stamp[fr[1] & 0xf];
+u_char x = (fr[0] >> 4) & 0xf;
+rp[0] = x << 12 | x << 8 | x << 4 | x << 0;
+       x = (fr[0] >> 0) & 0xf;
+rp[1] = x << 12 | x << 8 | x << 4 | x << 0;
+       x = (fr[1] >> 4) & 0xf;
+rp[2] = x << 12 | x << 8 | x << 4 | x << 0;
+       x = (fr[1] >> 0) & 0xf;
+rp[3] = x << 12 | x << 8 | x << 4 | x << 0;
                        fr += fs;
                        rp += rs;
                }


Home | Main Index | Thread Index | Old Index