Eric Biederman | 8d9c123 | 2003-06-17 08:42:17 +0000 | [diff] [blame] | 1 | void main(void) |
| 2 | { |
| 3 | unsigned long addr, start, stop; |
| 4 | start = 0x00100000; |
| 5 | stop = 0x00180000; |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame^] | 6 | |
Eric Biederman | 8d9c123 | 2003-06-17 08:42:17 +0000 | [diff] [blame] | 7 | |
| 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 Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame^] | 15 | |
Eric Biederman | 8d9c123 | 2003-06-17 08:42:17 +0000 | [diff] [blame] | 16 | 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 | } |