blob: 28dbb8972e88604e62e06242ed89127e69b133e8 [file] [log] [blame]
Eric Biederman8d9c1232003-06-17 08:42:17 +00001void main(void)
2{
3 unsigned long addr, start, stop;
4 start = 0x00100000;
5 stop = 0x00180000;
Stefan Reinauer14e22772010-04-27 06:56:47 +00006
Eric Biederman8d9c1232003-06-17 08:42:17 +00007
8 for(addr = start; addr < stop ;) {
9 unsigned char ch;
10 const char *str = "\r";
11 while((ch = *str++) != '\0') {
12 while(__builtin_inb(0x3f))
13 ;
14 __builtin_outb(ch, 0x3f8);
Stefan Reinauer14e22772010-04-27 06:56:47 +000015
Eric Biederman8d9c1232003-06-17 08:42:17 +000016 while(__builtin_inb(0x3f))
17 ;
18 }
19 asm (
20 "jmp 2f\n\t"
21 "1:\n\t"
22 "testl $0xffff, %0\n\t"
23 "jz 3f\n\t"
24 "movnti %0, (%0)\n\t"
25 "add $4, %0\n\t"
26 "2:\n\t"
27 "cmp %2, %0\n\t"
28 "jl 1b\n\t"
29 "3:\n\t"
30 : "=b" (addr) /* outputs */
31 : "0" (addr), "r" (stop) /* intputs */
32 : /* clobbers */
33 );
34 };
35}