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