X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fpiix3.c;fp=palacios%2Fsrc%2Fdevices%2Fpiix3.c;h=60bec64eef65811458afa9549a731eb95836f040;hb=a7dc3322984b3c76fe990de506418e180ec1b0de;hp=0000000000000000000000000000000000000000;hpb=92d5e22e6c67ea0164ff6e94059989971eb85b99;p=palacios.git diff --git a/palacios/src/devices/piix3.c b/palacios/src/devices/piix3.c new file mode 100644 index 0000000..60bec64 --- /dev/null +++ b/palacios/src/devices/piix3.c @@ -0,0 +1,68 @@ +/* + * This file is part of the Palacios Virtual Machine Monitor developed + * by the V3VEE Project with funding from the United States National + * Science Foundation and the Department of Energy. + * + * The V3VEE Project is a joint project between Northwestern University + * and the University of New Mexico. You can find out more at + * http://www.v3vee.org + * + * Copyright (c) 2009, Lei Xia + * Copyright (c) 2009, Chang Seok Bae + * Copyright (c) 2009, Jack Lange + * Copyright (c) 2009, The V3VEE Project + * All rights reserved. + * + * Author: Lei Xia + * Chang Seok Bae + * Jack Lange + * + * This is free software. You are permitted to use, + * redistribute, and modify it as specified in the file "V3VEE_LICENSE". + */ + +#include +#include +#include + + +struct piix3_state { + uint8_t pci_dev_num; + + struct vm_device * pci; + +}; + + +static int init_piix3(struct vm_device * dev) { + + return 0; +} + + +static int deinit_piix3(struct vm_device * dev) { + return 0; +} + + +static struct vm_device_ops dev_ops = { + .init = init_piix3, + .deinit = deinit_piix3, + .reset = NULL, + .start = NULL, + .stop = NULL, +}; + + +struct vm_device * v3_create_piix3(struct vm_device * pci) { + struct piix3_state * piix3 = (struct piix3_state *)V3_Malloc(sizeof(struct piix3_state)); + struct vm_device * dev = NULL; + + piix3->pci = pci; + + dev = v3_create_device("PIIX3", &dev_ops, piix3); + + PrintDebug("Created PIIX3\n"); + + return dev; +}