25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_sfb.c,v 1.10 2006/12/30 13:30:59 debug Exp $ |
* $Id: dev_sfb.c,v 1.11 2007/06/15 19:57:34 debug Exp $ |
29 |
* |
* |
30 |
* SFB TURBOchannel framebuffer. |
* COMMENT: SFB TURBOchannel framebuffer (graphics card) |
31 |
* |
* |
32 |
* See include/sfbreg.h (and NetBSD's arch/pmax/dev/sfb.c) for more info. |
* See include/sfbreg.h (and NetBSD's arch/pmax/dev/sfb.c) for more info. |
33 |
* |
* |
64 |
}; |
}; |
65 |
|
|
66 |
|
|
|
/* |
|
|
* dev_sfb_access(): |
|
|
*/ |
|
67 |
DEVICE_ACCESS(sfb) |
DEVICE_ACCESS(sfb) |
68 |
{ |
{ |
69 |
uint64_t idata = 0, odata = 0; |
uint64_t idata = 0, odata = 0; |
97 |
{ |
{ |
98 |
struct sfb_data *d; |
struct sfb_data *d; |
99 |
|
|
100 |
d = malloc(sizeof(struct sfb_data)); |
CHECK_ALLOCATION(d = malloc(sizeof(struct sfb_data))); |
|
if (d == NULL) { |
|
|
fprintf(stderr, "out of memory\n"); |
|
|
exit(1); |
|
|
} |
|
101 |
memset(d, 0, sizeof(struct sfb_data)); |
memset(d, 0, sizeof(struct sfb_data)); |
102 |
|
|
103 |
d->vfb_data = fb; |
d->vfb_data = fb; |