Subject: Patch to support RiscServer 2200 and RiscServer Express
To: None <port-arc@netbsd.org>
From: bob meader <bob@cci.net>
List: port-arc
Date: 08/18/2000 13:54:49
diff -b -B -r current/sys/arch/arc/arc/arcbios.c
new/sys/arch/arc/arc/arcbios.c
50a51
> arc_config_t *Bios_GetPeer __P((arc_config_t *));
52c53,56
<
---
> static void bios_config_component __P((arc_config_t *));
> static void scan_bios_subtree __P((arc_config_t *));
> void bios_get_arc_config __P((void));
> int ArcDcacheSize = 0;
347a352,384
> static void bios_config_component(cf)
> arc_config_t *cf;
> {
> /* currently only config secondary cache */
> switch(cf->class) {
> case arc_CacheClass:
> if(cf->type == arc_SecondaryDcache)
> ArcDcacheSize = 4096 << (cf->key &
0xffff);
> break;
> default:
> break;
> }
> }
>
> static
> void scan_bios_subtree(cf)
> arc_config_t *cf;
> {
> for (cf=Bios_GetChild(cf); cf !=NULL; cf=Bios_GetPeer(cf)) {
> bios_config_component(cf);
> scan_bios_subtree(cf);
> }
> }
>
>
> /* Currently only get secondarydcache size */
>
> void
> bios_get_arc_config(void)
> {
> scan_bios_subtree(NULL);
> }
>
356a394
> bios_get_arc_config();
diff -b -B -r current/sys/arch/arc/arc/machdep.c
new/sys/arch/arc/arc/machdep.c
176a177,178
> extern void pcinithandle __P((void));
> extern int ArcDcacheSize;
513a516,521
>
> switch (cputype) {
> case NEC_R96:
>
makebootdev("eisa()disk(0)rdisk(0)partition(1)\\netbsd");
> break;
> default:
514a523,524
> break;
> }
765,769c775
< #if 0
< mips_L2CacheSize = 1 * 1024 * 1024;
< #else /* bigger is safer - XXX use arc bios to get the size */
< mips_L2CacheSize = 2 * 1024 * 1024;
< #endif
---
> mips_L2CacheSize = ArcDcacheSize;
998,1020c1004
< /* XXX - some machines have jazz, and others
have vga */
< #if NPC_PICA > 0
< pccnattach();
< return;
< #endif
< #if NVGA_JAZZIO > 0
< if (vga_jazzio_cnattach() == 0) {
< #if NPCKBC_JAZZIO > 0
< pckbc_cnattach(&pica_bus, PICA_SYS_KBD,
< JAZZIO_KBCMDP, PCKBC_KBD_SLOT);
< #endif
< return;
< }
< #endif
< #if NRASDISPLAY_JAZZIO > 0
< if (rasdisplay_jazzio_cnattach()) {
< #if NPCKBC_JAZZIO > 0
< pckbc_cnattach(&pica_bus, PICA_SYS_KBD,
< JAZZIO_KBCMDP, PCKBC_KBD_SLOT);
< #endif
< return;
< }
< #endif
---
> /* XXX - physical address unknown */
1057a1042,1050
> #if NPC >0
> switch (cputype) {
> case NEC_R96:
> pcinithandle();
> break;
> default:
> break;
> }
> #endif