diff options
author | Eric Biederman <ebiederm@xmission.com> | 2003-06-17 08:42:17 +0000 |
---|---|---|
committer | Eric Biederman <ebiederm@xmission.com> | 2003-06-17 08:42:17 +0000 |
commit | 8d9c123812492a80a43112c8dd217fcfb3cee2c5 (patch) | |
tree | 0bc841279e289f958d85cc8f2873b42770ecbce1 /util/romcc/tests | |
parent | f96a810f11681ba436b446e9451e02cffcd525f5 (diff) |
- Minor mod to reset16.inc to work with newer binutils hopefully this works with older ones...
- Update apic.h to include the APIC_TASK_PRI register definition
- Update mptable.c to have a reasonable board OEM and productid
- Additional testfiles for romcc.
- Split out auto.c and early failover.c moving their generic bits elsewere
- Enable cache of the rom
- Fixes to amd8111_lpc.c so that we successfully setup virtual wire mode on the ioapic
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@880 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/romcc/tests')
-rw-r--r-- | util/romcc/tests/simple_test22.c | 12 | ||||
-rw-r--r-- | util/romcc/tests/simple_test30.c | 12 | ||||
-rw-r--r-- | util/romcc/tests/simple_test32.c | 35 |
3 files changed, 47 insertions, 12 deletions
diff --git a/util/romcc/tests/simple_test22.c b/util/romcc/tests/simple_test22.c index 247369b80b..81d2ed008d 100644 --- a/util/romcc/tests/simple_test22.c +++ b/util/romcc/tests/simple_test22.c @@ -21,7 +21,7 @@ static struct syscall_result syscall0(unsigned long nr) long res; asm volatile( "int $0x80" - : "a" (res) + : "=a" (res) : "a" (nr)); return syscall_return(res); } @@ -31,7 +31,7 @@ static struct syscall_result syscall1(unsigned long nr, unsigned long arg1) long res; asm volatile( "int $0x80" - : "a" (res) + : "=a" (res) : "a" (nr), "b" (arg1)); return syscall_return(res); @@ -42,7 +42,7 @@ static struct syscall_result syscall2(unsigned long nr, unsigned long arg1, unsi long res; asm volatile( "int $0x80" - : "a" (res) + : "=a" (res) : "a" (nr), "b" (arg1), "c" (arg2)); return syscall_return(res); @@ -55,7 +55,7 @@ static struct syscall_result syscall3(unsigned long nr, unsigned long arg1, unsi long res; asm volatile( "int $0x80" - : "a" (res) + : "=a" (res) : "a" (nr), "b" (arg1), "c" (arg2), "d" (arg3)); return syscall_return(res); @@ -67,7 +67,7 @@ static struct syscall_result syscall4(unsigned long nr, unsigned long arg1, unsi long res; asm volatile( "int $0x80" - : "a" (res) + : "=a" (res) : "a" (nr), "b" (arg1), "c" (arg2), "d" (arg3), "S" (arg4)); return syscall_return(res); @@ -79,7 +79,7 @@ static struct syscall_result syscall5(unsigned long nr, unsigned long arg1, unsi long res; asm volatile( "int $0x80" - : "a" (res) + : "=a" (res) : "a" (nr), "b" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5)); return syscall_return(res); diff --git a/util/romcc/tests/simple_test30.c b/util/romcc/tests/simple_test30.c index fc21fc6833..6582a91c1a 100644 --- a/util/romcc/tests/simple_test30.c +++ b/util/romcc/tests/simple_test30.c @@ -21,7 +21,7 @@ static struct syscall_result syscall0(unsigned long nr) long res; asm volatile( "int $0x80" - : "a" (res) + : "=a" (res) : "a" (nr)); return syscall_return(res); } @@ -31,7 +31,7 @@ static struct syscall_result syscall1(unsigned long nr, unsigned long arg1) long res; asm volatile( "int $0x80" - : "a" (res) + : "=a" (res) : "a" (nr), "b" (arg1)); return syscall_return(res); @@ -42,7 +42,7 @@ static struct syscall_result syscall2(unsigned long nr, unsigned long arg1, unsi long res; asm volatile( "int $0x80" - : "a" (res) + : "=a" (res) : "a" (nr), "b" (arg1), "c" (arg2)); return syscall_return(res); @@ -55,7 +55,7 @@ static struct syscall_result syscall3(unsigned long nr, unsigned long arg1, unsi long res; asm volatile( "int $0x80" - : "a" (res) + : "=a" (res) : "a" (nr), "b" (arg1), "c" (arg2), "d" (arg3)); return syscall_return(res); @@ -67,7 +67,7 @@ static struct syscall_result syscall4(unsigned long nr, unsigned long arg1, unsi long res; asm volatile( "int $0x80" - : "a" (res) + : "=a" (res) : "a" (nr), "b" (arg1), "c" (arg2), "d" (arg3), "S" (arg4)); return syscall_return(res); @@ -79,7 +79,7 @@ static struct syscall_result syscall5(unsigned long nr, unsigned long arg1, unsi long res; asm volatile( "int $0x80" - : "a" (res) + : "=a" (res) : "a" (nr), "b" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5)); return syscall_return(res); diff --git a/util/romcc/tests/simple_test32.c b/util/romcc/tests/simple_test32.c new file mode 100644 index 0000000000..bd6947a2ba --- /dev/null +++ b/util/romcc/tests/simple_test32.c @@ -0,0 +1,35 @@ +void main(void) +{ + unsigned long addr, start, stop; + start = 0x00100000; + stop = 0x00180000; + + + for(addr = start; addr < stop ;) { + unsigned char ch; + const char *str = "\r"; + while((ch = *str++) != '\0') { + while(__builtin_inb(0x3f)) + ; + __builtin_outb(ch, 0x3f8); + + while(__builtin_inb(0x3f)) + ; + } + asm ( + "jmp 2f\n\t" + "1:\n\t" + "testl $0xffff, %0\n\t" + "jz 3f\n\t" + "movnti %0, (%0)\n\t" + "add $4, %0\n\t" + "2:\n\t" + "cmp %2, %0\n\t" + "jl 1b\n\t" + "3:\n\t" + : "=b" (addr) /* outputs */ + : "0" (addr), "r" (stop) /* intputs */ + : /* clobbers */ + ); + }; +} |