summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-11-01 03:50:57 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2014-02-11 02:07:50 (GMT)
commitb5e7e15463f255628c76679bb050402ac57f37e0 (patch)
tree58c60239dfba79bf3f93023ef34ae30719c85345
parenteaebd1255af70654f4a41fad530d948f91b45360 (diff)
downloadabc8000-b5e7e15463f255628c76679bb050402ac57f37e0.zip
abc8000-b5e7e15463f255628c76679bb050402ac57f37e0.tar.gz
abc8000-b5e7e15463f255628c76679bb050402ac57f37e0.tar.bz2
abc8000-b5e7e15463f255628c76679bb050402ac57f37e0.tar.xz
Rename ivt to __ivt
Rename the interrupt vector table to __ivt to avoid namespace pollution.
-rw-r--r--data/sysrom/include/sys/cpu.h3
-rw-r--r--data/sysrom/ivt.asm6
-rw-r--r--data/sysrom/sysstart.c12
3 files changed, 12 insertions, 9 deletions
diff --git a/data/sysrom/include/sys/cpu.h b/data/sysrom/include/sys/cpu.h
index 985f242..818eb5b 100644
--- a/data/sysrom/include/sys/cpu.h
+++ b/data/sysrom/include/sys/cpu.h
@@ -54,4 +54,7 @@ static inline void cpu_set_spl(unsigned int __v)
}
}
+typedef void (*__ivt_entry_t)(void);
+extern __ivt_entry_t __ivt[256];
+
#endif /* _SYS_CPU_H */
diff --git a/data/sysrom/ivt.asm b/data/sysrom/ivt.asm
index be87049..85c6b81 100644
--- a/data/sysrom/ivt.asm
+++ b/data/sysrom/ivt.asm
@@ -3,8 +3,8 @@
*/
.section ".ivt","aw"
- .global ivt
-ivt:
+ .global __ivt
+__ivt:
ivt_reset_ssp:
.long __stack_top
ivt_reset_pc:
@@ -25,4 +25,4 @@ n = n + 1
ivt_spurious:
.long __spurious_irq
- .size ivt, .-ivt
+ .size __ivt, .-__ivt
diff --git a/data/sysrom/sysstart.c b/data/sysrom/sysstart.c
index b6190c0..48c5e7e 100644
--- a/data/sysrom/sysstart.c
+++ b/data/sysrom/sysstart.c
@@ -156,8 +156,8 @@ void __attribute__((interrupt)) __spurious_irq(void)
static void irq_init(void)
{
- ivt[0x4e] = vsync_irq; /* GPIP6 = vertical retrace */
- ivt[0x4d] = timer_irq; /* Timer A = clock */
+ __ivt[0x4e] = vsync_irq; /* GPIP6 = vertical retrace */
+ __ivt[0x4d] = timer_irq; /* Timer A = clock */
/* Disable and mask all interrupts */
writeb(0x00, IO_MFP_IERA);
@@ -193,7 +193,7 @@ static void irq_init(void)
static void picture(void)
{
volatile uint8_t *ptr, *aptr, *bptr;
- int x, y, i, j;
+ unsigned int x, y, i, j;
ptr = IO_FRAMEBUF;
printf("Initializing frame buffer image @ %p\n", ptr);
@@ -216,14 +216,14 @@ static void picture(void)
printf("Drawing test frame picture at %p\n", ptr);
writel(640*400*8, IO_VIDEO_ROW0START);
- memset(ptr, 0, 256000); /* Clear picture 1 */
+ memset((void *)ptr, 0, 256000); /* Clear picture 1 */
for (i = 0; i < 100; i++) {
unsigned int ofs = i*2;
unsigned int col = i+1;
aptr = &ptr[ofs*641];
bptr = &ptr[(399*640)-ofs*639];
- memset(aptr, col, 640-2*ofs);
- memset(bptr, col, 640-2*ofs);
+ memset((void *)aptr, col, 640-2*ofs);
+ memset((void *)bptr, col, 640-2*ofs);
aptr = &ptr[ofs*641+640];
bptr = &ptr[639+ofs*639+640];