1 /////////////////////////////////////////////////////////////////////////
2 // $Id: pci_ide.h,v 1.12 2007/09/28 19:52:03 sshwarts Exp $
3 /////////////////////////////////////////////////////////////////////////
5 // Copyright (C) 2004 MandrakeSoft S.A.
9 // 75002 Paris - France
10 // http://www.linux-mandrake.com/
11 // http://www.mandrakesoft.com/
13 // This library is free software; you can redistribute it and/or
14 // modify it under the terms of the GNU Lesser General Public
15 // License as published by the Free Software Foundation; either
16 // version 2 of the License, or (at your option) any later version.
18 // This library is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 // Lesser General Public License for more details.
23 // You should have received a copy of the GNU Lesser General Public
24 // License along with this library; if not, write to the Free Software
25 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #ifndef BX_IODEV_PCIIDE_H
28 #define BX_IODEV_PCIIDE_H
31 # define BX_PIDE_SMF static
32 # define BX_PIDE_THIS thePciIdeController->
33 # define BX_PIDE_THIS_PTR thePciIdeController
36 # define BX_PIDE_THIS this->
37 # define BX_PIDE_THIS_PTR this
40 class bx_pci_ide_c
: public bx_pci_ide_stub_c
{
43 virtual ~bx_pci_ide_c();
44 virtual void init(void);
45 virtual void reset(unsigned type
);
46 virtual bx_bool
bmdma_present(void);
47 virtual void bmdma_set_irq(Bit8u channel
);
48 virtual void register_state(void);
49 virtual void after_restore_state(void);
50 static Bit64s
param_save_handler(void *devptr
, bx_param_c
*param
, Bit64s val
);
51 static Bit64s
param_restore_handler(void *devptr
, bx_param_c
*param
, Bit64s val
);
53 Bit64s
param_save(bx_param_c
*param
, Bit64s val
);
54 Bit64s
param_restore(bx_param_c
*param
, Bit64s val
);
57 virtual Bit32u
pci_read_handler(Bit8u address
, unsigned io_len
);
58 virtual void pci_write_handler(Bit8u address
, Bit32u value
, unsigned io_len
);
60 static void timer_handler(void *);
61 BX_PIDE_SMF
void timer(void);
81 static Bit32u
read_handler(void *this_ptr
, Bit32u address
, unsigned io_len
);
82 static void write_handler(void *this_ptr
, Bit32u address
, Bit32u value
, unsigned io_len
);
84 Bit32u
read(Bit32u address
, unsigned io_len
);
85 void write(Bit32u address
, Bit32u value
, unsigned io_len
);