Date: Tue, 8 Apr 2003 18:49:21 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 28590 for review Message-ID: <200304090149.h391nLql020523@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=28590 Change 28590 by peter@peter_daintree on 2003/04/08 18:48:34 make syscons/fb/vga probe/attach. XXX more work needed. There is some nasty stuff where alpha has a copy of machine/pc/bios.h simply because it describes how to convert a physical address in the isa hole to virtual. I've deliberately left this broken to remind me. Affected files ... .. //depot/projects/hammer/sys/dev/fb/fbreg.h#4 edit .. //depot/projects/hammer/sys/dev/fb/vga.c#7 edit .. //depot/projects/hammer/sys/isa/vga_isa.c#4 edit Differences ... ==== //depot/projects/hammer/sys/dev/fb/fbreg.h#4 (text+ko) ==== @@ -44,6 +44,14 @@ void generic_bcopy(const void *s, void *d, size_t c); void generic_bzero(void *d, size_t c); #else /* !__i386__ */ +#ifdef __x86_64__ +#define bcopy_io(s, d, c) bcopy((void *)(s), (void *)(d), (c)) +#define bcopy_toio(s, d, c) bcopy((void *)(s), (void *)(d), (c)) +#define bcopy_fromio(s, d, c) bcopy((void *)(s), (void *)(d), (c)) +#define bzero_io(d, c) bzero((void *)(d), (c)) +#define fill_io(p, d, c) fill((p), (void *)(d), (c)) +#define fillw_io(p, d, c) fillw((p), (void *)(d), (c)) +#else #define bcopy_io(s, d, c) memcpy_io((d), (s), (c)) #define bcopy_toio(s, d, c) memcpy_toio((d), (void *)(s), (c)) #define bcopy_fromio(s, d, c) memcpy_fromio((void *)(d), (s), (c)) @@ -51,6 +59,7 @@ #define fill_io(p, d, c) memset_io((d), (p), (c)) #define fillw(p, d, c) memsetw((d), (p), (c)) #define fillw_io(p, d, c) memsetw_io((d), (p), (c)) +#endif #endif /* !__i386__ */ /* video function table */ ==== //depot/projects/hammer/sys/dev/fb/vga.c#7 (text+ko) ==== @@ -46,7 +46,9 @@ #include <vm/pmap.h> #include <machine/md_var.h> +#ifdef __i386__ #include <machine/pc/bios.h> +#endif #include <machine/bus.h> #include <dev/fb/fbreg.h> @@ -58,6 +60,7 @@ #define VGA_DEBUG 0 #endif +#define BIOS_PADDRTOVADDR(x) (((x) - ISA_HOLE_START) + atdevbase) int vga_probe_unit(int unit, video_adapter_t *buf, int flags) { @@ -143,7 +146,9 @@ /* LOW-LEVEL */ #include <machine/clock.h> +#ifdef __i386__ #include <machine/pc/vesa.h> +#endif #define probe_done(adp) ((adp)->va_flags & V_ADP_PROBED) #define init_done(adp) ((adp)->va_flags & V_ADP_INITIALIZED) @@ -163,7 +168,7 @@ #endif /* architecture dependent option */ -#if defined(__alpha__) || defined(__ia64__) +#ifndef __i386__ #define VGA_NO_BIOS 1 #endif @@ -1315,7 +1320,7 @@ return 0; } -#ifdef __i386__ /* XXX */ +#if defined(__i386__) || defined(__x86_64__) /* XXX */ static void fill(int val, void *d, size_t size) { @@ -1820,10 +1825,10 @@ set_font_mode(adp, buf); if (fontsize == 32) { - bcopy_fromio(segment + ch*32, data, fontsize*count); + bcopy_fromio((uintptr_t)segment + ch*32, data, fontsize*count); } else { for (c = ch; count > 0; ++c, --count) { - bcopy_fromio(segment + c*32, data, fontsize); + bcopy_fromio((uintptr_t)segment + c*32, data, fontsize); data += fontsize; } } @@ -1900,10 +1905,10 @@ set_font_mode(adp, buf); if (fontsize == 32) { - bcopy_toio(data, segment + ch*32, fontsize*count); + bcopy_toio(data, (uintptr_t)segment + ch*32, fontsize*count); } else { for (c = ch; count > 0; ++c, --count) { - bcopy_toio(data, segment + c*32, fontsize); + bcopy_toio(data, (uintptr_t)segment + c*32, fontsize); data += fontsize; } } ==== //depot/projects/hammer/sys/isa/vga_isa.c#4 (text+ko) ==== @@ -46,7 +46,9 @@ #include <vm/pmap.h> #include <machine/md_var.h> +#ifdef __i386__ #include <machine/pc/bios.h> +#endif #include <dev/fb/fbreg.h> #include <dev/fb/vgareg.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304090149.h391nLql020523>