ia64/xen-unstable

changeset 3639:f89816eaeaad

bitkeeper revision 1.1159.241.1 (4202bb72zRYg-QWeXrkKfXwmuL5I3A)

Add checking ISA DMA flag in cpu_loop. Also need to do bios_init manually
for now. With this change, floppy is functional.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: ian.pratt@cl.cam.ac.uk
author iap10@labyrinth.cl.cam.ac.uk
date Fri Feb 04 00:01:54 2005 +0000 (2005-02-04)
parents 0ef6e8e6e85d
children 44232b00c34a
files tools/ioemu/iodev/cpu.cc tools/ioemu/iodev/dma.cc tools/ioemu/iodev/dma.h
line diff
     1.1 --- a/tools/ioemu/iodev/cpu.cc	Wed Feb 02 15:24:31 2005 +0000
     1.2 +++ b/tools/ioemu/iodev/cpu.cc	Fri Feb 04 00:01:54 2005 +0000
     1.3 @@ -213,6 +213,10 @@ bx_cpu_c::cpu_loop(int max_instr_count)
     1.4  #endif
     1.5  			interrupt(vector);
     1.6  		}
     1.7 +		/* we check DMA after interrupt check*/
     1.8 +		while(BX_HRQ){
     1.9 +			DEV_dma_raise_hlda();
    1.10 +		}
    1.11  
    1.12  		if (send_event) {
    1.13  			int ret;
     2.1 --- a/tools/ioemu/iodev/dma.cc	Wed Feb 02 15:24:31 2005 +0000
     2.2 +++ b/tools/ioemu/iodev/dma.cc	Fri Feb 04 00:01:54 2005 +0000
     2.3 @@ -182,6 +182,14 @@ bx_dma_c::init(void)
     2.4      }
     2.5    BX_DMA_THIS s[1].chan[0].used = 1; // cascade channel in use
     2.6    BX_INFO(("channel 4 used by cascade"));
     2.7 +  bios_init();
     2.8 +}
     2.9 +
    2.10 +/* Remove it when guest fw ready*/
    2.11 +  void
    2.12 +bx_dma_c::bios_init(void){
    2.13 +  BX_DMA_THIS s[1].mask[0] = 0; // unmask cascade channel  
    2.14 +  BX_DMA_THIS s[1].chan[0].mode.mode_type = 3; // cascade mode for channel 4
    2.15  }
    2.16  
    2.17    void
    2.18 @@ -189,6 +197,7 @@ bx_dma_c::reset(unsigned type)
    2.19  {
    2.20    reset_controller(0);
    2.21    reset_controller(1);
    2.22 +  bios_init();
    2.23  }
    2.24  
    2.25    void
     3.1 --- a/tools/ioemu/iodev/dma.h	Wed Feb 02 15:24:31 2005 +0000
     3.2 +++ b/tools/ioemu/iodev/dma.h	Fri Feb 04 00:01:54 2005 +0000
     3.3 @@ -46,6 +46,7 @@ public:
     3.4    ~bx_dma_c(void);
     3.5  
     3.6    virtual void     init(void);
     3.7 +  virtual void     bios_init(void);
     3.8    virtual void     reset(unsigned type);
     3.9    virtual void     raise_HLDA(void);
    3.10    virtual void     set_DRQ(unsigned channel, bx_bool val);