Tabs to spaces, more consistent formatting, childs -> children, typos in
[AROS.git] / test / boot / testboot.c
blob4d8e4aa4c526696257a1e92067a9852bbdc73b0b
1 #include <aros/kernel.h>
2 #include <hardware/vbe.h>
3 #include <utility/tagitem.h>
5 #include <bootconsole.h>
6 #include <stdarg.h>
8 int __vcformat(void *data, int(*outc)(int, void *), const char * format, va_list args);
9 int kprintf(const char *format, ...);
11 void __startup start(struct TagItem *tags)
13 struct vbe_mode *vbemode = NULL;
15 fb_Mirror = (void *)0x100000;
17 con_InitTagList(tags);
19 kprintf("Test module succesfully started\n");
21 kprintf("Taglist at 0x%p:\n", tags);
22 for (; tags->ti_Tag != TAG_DONE; tags++)
24 kprintf("0x%08lX 0x%p\n", tags->ti_Tag, tags->ti_Data);
26 switch (tags->ti_Tag)
28 case KRN_VBEModeInfo:
29 vbemode = (struct vbe_mode *)tags->ti_Data;
30 break;
34 if (vbemode)
36 kprintf("VBE mode structure at 0x%p\n", vbemode);
37 kprintf("Mode : %dx%dx%d\n", vbemode->x_resolution, vbemode->y_resolution, vbemode->bits_per_pixel);
38 kprintf("Base : 0x%08X\n", vbemode->phys_base);
39 kprintf("Pitch: %u\n", vbemode->bytes_per_scanline);
40 kprintf("Flags: 0x%08X\n", vbemode->mode_attributes);
43 for (;;);
46 static int kputc(int c, void *data)
48 con_Putc(c);
49 return 1;
52 int kprintf(const char *format, ...)
54 va_list ap;
55 int res;
57 va_start(ap, format);
58 res = __vcformat(NULL, kputc, format, ap);
59 va_end(ap);
61 return res;
64 #ifdef __arm__
67 * ARM bootconsole doesn't have own serial port code because
68 * no known ARM hardware uses PC-compatible serial ports.
70 void serial_Init(char *opts)
74 void serial_Putc(char chr)
78 #endif