2006-04-27 15:11:45 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////
|
2011-02-24 22:05:47 +00:00
|
|
|
// $Id$
|
2002-04-01 21:53:23 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2009-12-04 19:50:29 +00:00
|
|
|
// Copyright (C) 2002-2009 The Bochs Project
|
2002-04-01 21:53:23 +00:00
|
|
|
//
|
|
|
|
// 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 09:05:52 +00:00
|
|
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2002-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
|
2006-03-07 18:16:41 +00:00
|
|
|
#ifndef BX_IODEV_BIOSDEV_H
|
|
|
|
#define BX_IODEV_BIOSDEV_H
|
2002-04-01 21:53:23 +00:00
|
|
|
|
2006-03-07 18:16:41 +00:00
|
|
|
#define BX_BIOS_MESSAGE_SIZE 80
|
2002-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
#if BX_USE_BIOS_SMF
|
|
|
|
# define BX_BIOS_SMF static
|
2002-10-24 21:07:56 +00:00
|
|
|
# define BX_BIOS_THIS theBiosDevice->
|
2002-04-01 21:53:23 +00:00
|
|
|
#else
|
|
|
|
# define BX_BIOS_SMF
|
|
|
|
# define BX_BIOS_THIS this->
|
|
|
|
#endif
|
|
|
|
|
2002-10-24 21:07:56 +00:00
|
|
|
class bx_biosdev_c : public bx_devmodel_c {
|
2002-04-01 21:53:23 +00:00
|
|
|
public:
|
2006-03-07 18:16:41 +00:00
|
|
|
bx_biosdev_c();
|
2006-03-07 21:11:20 +00:00
|
|
|
virtual ~bx_biosdev_c();
|
2002-04-01 21:53:23 +00:00
|
|
|
|
2002-10-24 21:07:56 +00:00
|
|
|
virtual void init(void);
|
2006-09-10 17:18:44 +00:00
|
|
|
virtual void reset(unsigned type) {}
|
2002-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
static void write_handler(void *this_ptr, Bit32u address, Bit32u value, unsigned io_len);
|
|
|
|
#if !BX_USE_BIOS_SMF
|
|
|
|
void write(Bit32u address, Bit32u value, unsigned io_len);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct {
|
|
|
|
Bit8u bios_message[BX_BIOS_MESSAGE_SIZE];
|
|
|
|
unsigned int bios_message_i;
|
2004-09-05 17:57:22 +00:00
|
|
|
bx_bool bios_panic_flag;
|
2002-04-01 21:53:23 +00:00
|
|
|
|
|
|
|
Bit8u vgabios_message[BX_BIOS_MESSAGE_SIZE];
|
|
|
|
unsigned int vgabios_message_i;
|
2004-09-05 17:57:22 +00:00
|
|
|
bx_bool vgabios_panic_flag;
|
2006-03-07 18:16:41 +00:00
|
|
|
} s; // state information
|
|
|
|
};
|
2002-04-01 21:53:23 +00:00
|
|
|
|
2006-03-07 18:16:41 +00:00
|
|
|
#endif
|