shithub: riscv

Download patch

ref: 5e50b13d3422c5c6b55b82602c20555807599b88
parent: 6afce2e422614341756c2e4c19dc68135d440013
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Jan 16 06:36:11 EST 2015

devvga: use uintptr for VGAscr.paddr and VGAscr.storage

some vga drivers use virtual addresses in VGAscr.storage,
so has to be uintptr sized for amd64.

--- a/sys/src/9/pc/devvga.c
+++ b/sys/src/9/pc/devvga.c
@@ -217,7 +217,7 @@
 		len += snprint(p+len, READSTR-len, "hwaccel %s\n", hwaccel ? "on" : "off");
 		len += snprint(p+len, READSTR-len, "hwblank %s\n", hwblank ? "on" : "off");
 		len += snprint(p+len, READSTR-len, "panning %s\n", panning ? "on" : "off");
-		len += snprint(p+len, READSTR-len, "addr p 0x%lux v 0x%p size 0x%ux\n", scr->paddr, scr->vaddr, scr->apsize);
+		len += snprint(p+len, READSTR-len, "addr p %#p v %#p size %#ux\n", scr->paddr, scr->vaddr, scr->apsize);
 		len += snprint(p+len, READSTR-len, "softscreen %s\n", scr->softscreen ? "on" : "off");
 		USED(len);
 
--- a/sys/src/9/pc/screen.h
+++ b/sys/src/9/pc/screen.h
@@ -95,16 +95,16 @@
 	Pcidev*	pci;
 
 	VGAcur*	cur;
-	ulong	storage;
+	uintptr	storage;
 	Cursor;
 
 	int	useflush;
 
-	ulong	paddr;		/* frame buffer */
+	uintptr	paddr;		/* frame buffer */
 	void*	vaddr;
-	int		apsize;
+	int	apsize;
 
-	ulong	io;				/* device specific registers */
+	ulong	io;		/* device specific registers */
 	ulong	*mmio;
 	
 	ulong	colormap[Pcolours][3];
@@ -118,9 +118,9 @@
 	int	(*scroll)(VGAscr*, Rectangle, Rectangle);
 	void	(*blank)(VGAscr*, int);
 	ulong	id;	/* internal identifier for driver use */
-	int isblank;
-	int overlayinit;
-	int softscreen;
+	int	isblank;
+	int	overlayinit;
+	int	softscreen;
 };
 
 extern VGAscr vgascreen[];