Re: kloader in current
Izumi Tsutsui <[email protected]> Sat, 20 Mar 2004 01:33:54 +0900
| Newsgroups | gmane.os.netbsd.ports.dreamcast,gmane.os.netbsd.ports.hpcsh,gmane.os.netbsd.ports.hpcmips,gmane.os.netbsd.ports.playstation2 |
|---|---|
| Message-ID | <[email protected]> |
In article <[email protected]> [email protected] wrote: > I'd like to hear if kloader in current works/doesn't work for you. I > remember a short period of time that it worked for me on hpcsh, but > it's been dying with "TLB miss" for more than an year now. I use kloader on my dreamcast and it still works fine. I also use the attached patch since I thought -fstrict-aliasing optimization introduced on gcc3 might cause problems, but I have not confirmed yet if it really solves the problem. --- Izumi Tsutsui [email protected] Index: kloader.c =================================================================== RCS file: /cvsroot/src/sys/arch/dreamcast/dreamcast/kloader.c,v retrieving revision 1.2 diff -u -r1.2 kloader.c --- kloader.c 15 Jul 2003 01:31:41 -0000 1.2 +++ kloader.c 19 Mar 2004 16:24:47 -0000 @@ -263,7 +263,7 @@ pg = TAILQ_PREV(kloader.cur_pg, pglist, pageq); - ((struct kloader_page_tag *)PG_VADDR(pg))->next = 0; + ((struct kloader_page_tag *)(void *)PG_VADDR(pg))->next = 0; } void @@ -340,7 +340,7 @@ void kloader_boot(u_int32_t entry, struct kloader_page_tag *p) { - int tmp; + int tmp = 0; /* XXX: gcc */ /* Disable interrupt. block exception. */ __asm__ __volatile__( @@ -352,12 +352,12 @@ SH4_TLB_DISABLE; do { - u_int32_t *dst =(u_int32_t *)p->dst; - u_int32_t *src =(u_int32_t *)p->src; + u_int32_t *dst =(u_int32_t *)(void *)p->dst; + u_int32_t *src =(u_int32_t *)(void *)p->src; u_int32_t sz = p->sz / sizeof (int); while (sz--) *dst++ = *src++; - } while ((p = (struct kloader_page_tag *)p->next) != 0); + } while ((p = (struct kloader_page_tag *)(void *)p->next) != 0); SH7750_CACHE_FLUSH(); @@ -387,7 +387,7 @@ } op = p; i++; - } while ((p = (struct kloader_page_tag *)(p->next)) != 0); + } while ((p = (struct kloader_page_tag *)(void *)(p->next)) != 0); DPRINTF("[%d(last)] next 0x%08x src 0x%08x dst 0x%08x sz 0x%x\n", i - 1, op->next, op->src, op->dst, op->sz);