1
0
mirror of synced 2026-02-03 14:52:51 +00:00

CG3 is usable as console and with X11, despite the ugly colors

This commit is contained in:
Romain Dolbeau
2021-10-08 20:37:32 +02:00
parent df7f1e819f
commit 11cfd3ba40
9 changed files with 366 additions and 76 deletions

View File

@@ -198,6 +198,22 @@ dma_init(struct sbusfpga_sdram_softc *sc);
int
dma_memtest(struct sbusfpga_sdram_softc *sc);
int
init_last_blocks(struct sbusfpga_sdram_softc *sc);
int
init_last_blocks(struct sbusfpga_sdram_softc *sc) {
u_int32_t data[512];
u_int32_t i;
int res = 0;
for (i = 0 ; i < 512 ; i++) {
data[i] = 0x00FF00FF;
}
for (i = 254*1024*2 ; i < 256*1024*2 && !res; i+=4) {
res = sbusfpga_sdram_write_block(sc, i, 4, data);
}
return res;
}
/*
* Attach all the sub-devices we can find
*/
@@ -366,6 +382,11 @@ sbusfpga_sdram_attach(device_t parent, device_t self, void *aux)
lp->d_checksum = dkcksum(lp);
}
/*
// initialize some blocks were the FB lives to test the output
init_last_blocks(sc);
*/
/*
aprint_normal_dev(self, "sc->dk.sc_dkdev.dk_blkshift = %d\n", sc->dk.sc_dkdev.dk_blkshift);
aprint_normal_dev(self, "sc->dk.sc_dkdev.dk_byteshift = %d\n", sc->dk.sc_dkdev.dk_byteshift);