25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_fbctrl.c,v 1.5 2006/12/30 13:30:58 debug Exp $ |
* $Id: dev_fbctrl.c,v 1.6 2007/06/15 19:11:15 debug Exp $ |
29 |
|
* |
30 |
|
* COMMENT: Framebuffer controller device (control's dev_fb in test machines) |
31 |
* |
* |
32 |
* A "framebuffer control" device. It can be used to manipulate the |
* A "framebuffer control" device. It can be used to manipulate the |
33 |
* framebuffer device in testmachines. |
* framebuffer device in testmachines. |
38 |
#include <string.h> |
#include <string.h> |
39 |
|
|
40 |
#include "cpu.h" |
#include "cpu.h" |
|
#include "cpu_mips.h" |
|
41 |
#include "device.h" |
#include "device.h" |
42 |
#include "devices.h" |
#include "devices.h" |
43 |
#include "machine.h" |
#include "machine.h" |
156 |
{ |
{ |
157 |
struct fbctrl_data *d; |
struct fbctrl_data *d; |
158 |
|
|
159 |
d = malloc(sizeof(struct fbctrl_data)); |
CHECK_ALLOCATION(d = malloc(sizeof(struct fbctrl_data))); |
|
if (d == NULL) { |
|
|
fprintf(stderr, "out of memory\n"); |
|
|
exit(1); |
|
|
} |
|
160 |
memset(d, 0, sizeof(struct fbctrl_data)); |
memset(d, 0, sizeof(struct fbctrl_data)); |
161 |
|
|
162 |
d->vfb_data = dev_fb_init(devinit->machine, devinit->machine->memory, |
d->vfb_data = dev_fb_init(devinit->machine, devinit->machine->memory, |