2003-01-11 01:43:54 +03:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
2011-02-25 01:05:47 +03:00
|
|
|
// $Id$
|
2003-01-11 01:43:54 +03:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2002,2003 Mike Nordell
|
|
|
|
//
|
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
2009-02-08 12:05:52 +03:00
|
|
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2003-01-11 01:43:54 +03:00
|
|
|
|
2006-03-07 21:16:41 +03:00
|
|
|
#ifndef BX_IODEV_PCIVGA_H
|
|
|
|
#define BX_IODEV_PCIVGA_H
|
|
|
|
|
2003-01-23 22:31:28 +03:00
|
|
|
#if BX_USE_PCIVGA_SMF
|
2003-01-11 01:43:54 +03:00
|
|
|
# define BX_PCIVGA_THIS thePciVgaAdapter->
|
2011-06-26 21:42:07 +04:00
|
|
|
# define BX_PCIVGA_SMF static
|
2003-01-11 01:43:54 +03:00
|
|
|
#else
|
|
|
|
# define BX_PCIVGA_THIS this->
|
2011-06-26 21:42:07 +04:00
|
|
|
# define BX_PCIVGA_SMF
|
2003-01-11 01:43:54 +03:00
|
|
|
#endif
|
|
|
|
|
2006-03-08 00:11:20 +03:00
|
|
|
class bx_pcivga_c : public bx_devmodel_c, public bx_pci_device_stub_c {
|
2003-01-11 01:43:54 +03:00
|
|
|
public:
|
2006-03-07 21:16:41 +03:00
|
|
|
bx_pcivga_c();
|
2006-03-08 00:11:20 +03:00
|
|
|
virtual ~bx_pcivga_c();
|
2006-03-07 21:16:41 +03:00
|
|
|
virtual void init(void);
|
|
|
|
virtual void reset(unsigned type);
|
2006-05-27 19:54:49 +04:00
|
|
|
virtual void register_state(void);
|
2009-04-10 15:10:32 +04:00
|
|
|
virtual void after_restore_state(void);
|
2003-01-11 01:43:54 +03:00
|
|
|
|
2011-06-26 21:42:07 +04:00
|
|
|
BX_PCIVGA_SMF bx_bool mem_read_handler(bx_phy_address addr, unsigned len, void *data, void *param);
|
|
|
|
BX_PCIVGA_SMF bx_bool mem_write_handler(bx_phy_address addr, unsigned len, void *data, void *param);
|
|
|
|
|
2006-03-08 00:11:20 +03:00
|
|
|
virtual Bit32u pci_read_handler(Bit8u address, unsigned io_len);
|
|
|
|
virtual void pci_write_handler(Bit8u address, Bit32u value, unsigned io_len);
|
2003-01-11 01:43:54 +03:00
|
|
|
|
2006-03-08 00:11:20 +03:00
|
|
|
private:
|
2011-06-24 01:03:39 +04:00
|
|
|
bx_bool vbe_present;
|
2003-01-11 01:43:54 +03:00
|
|
|
};
|
2006-03-07 21:16:41 +03:00
|
|
|
|
|
|
|
#endif
|