Lines 36-41
__FBSDID("$FreeBSD$");
Link Here
|
36 |
#include <sys/param.h> |
36 |
#include <sys/param.h> |
37 |
#include <sys/kernel.h> |
37 |
#include <sys/kernel.h> |
38 |
#include <sys/systm.h> |
38 |
#include <sys/systm.h> |
|
|
39 |
#include <sys/bus.h> |
40 |
#include <sys/module.h> |
41 |
#include <sys/rman.h> |
39 |
|
42 |
|
40 |
#include <dev/vt/vt.h> |
43 |
#include <dev/vt/vt.h> |
41 |
#include <dev/vt/hw/vga/vt_vga_reg.h> |
44 |
#include <dev/vt/hw/vga/vt_vga_reg.h> |
Lines 1241-1243
vga_postswitch(struct vt_device *vd)
Link Here
|
1241 |
/* Ask vt(9) to update chars on visible area. */ |
1244 |
/* Ask vt(9) to update chars on visible area. */ |
1242 |
vd->vd_flags |= VDF_INVALID; |
1245 |
vd->vd_flags |= VDF_INVALID; |
1243 |
} |
1246 |
} |
|
|
1247 |
|
1248 |
/* Dummy newbus functions to reserve the resources used by the vt_vga driver */ |
1249 |
static void |
1250 |
vtvga_identify(driver_t *driver, device_t parent) |
1251 |
{ |
1252 |
|
1253 |
BUS_ADD_CHILD(parent, 0, driver->name, 0); |
1254 |
} |
1255 |
|
1256 |
static int |
1257 |
vtvga_probe(device_t dev) |
1258 |
{ |
1259 |
|
1260 |
device_set_desc(dev, "vt_vga driver"); |
1261 |
return (BUS_PROBE_NOWILDCARD); |
1262 |
} |
1263 |
|
1264 |
static int |
1265 |
vtvga_attach(device_t dev) |
1266 |
{ |
1267 |
struct resource *pseudo_phys_res; |
1268 |
int res_id; |
1269 |
|
1270 |
res_id = 0; |
1271 |
pseudo_phys_res = bus_alloc_resource(dev, SYS_RES_MEMORY, |
1272 |
&res_id, VGA_MEM_BASE, VGA_MEM_BASE + VGA_MEM_SIZE, |
1273 |
VGA_MEM_SIZE, RF_ACTIVE); |
1274 |
if (pseudo_phys_res == NULL) |
1275 |
panic("Unable to reserve vt_vga memory"); |
1276 |
return (0); |
1277 |
} |
1278 |
|
1279 |
/*-------------------- Private Device Attachment Data -----------------------*/ |
1280 |
static device_method_t vtvga_methods[] = { |
1281 |
/* Device interface */ |
1282 |
DEVMETHOD(device_identify, vtvga_identify), |
1283 |
DEVMETHOD(device_probe, vtvga_probe), |
1284 |
DEVMETHOD(device_attach, vtvga_attach), |
1285 |
|
1286 |
DEVMETHOD_END |
1287 |
}; |
1288 |
|
1289 |
DEFINE_CLASS_0(vtvga, vtvga_driver, vtvga_methods, 0); |
1290 |
devclass_t vtvga_devclass; |
1291 |
|
1292 |
DRIVER_MODULE(vtvga, nexus, vtvga_driver, vtvga_devclass, NULL, NULL); |