ia64/xen-unstable

changeset 3642:26a00896163a

bitkeeper revision 1.1159.240.3 (4202bd17uoTYqnlSeqvW9fHjznmCHg)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/iap10/xeno-clone/xen-unstable.bk
author iap10@labyrinth.cl.cam.ac.uk
date Fri Feb 04 00:08:55 2005 +0000 (2005-02-04)
parents 8710698e57e1 b66cde79fd78
children d3f0465c034e
files tools/ioemu/iodev/cpu.cc tools/ioemu/iodev/dma.cc tools/ioemu/iodev/dma.h xen/arch/x86/domain.c xen/arch/x86/vmx_platform.c
line diff
     1.1 --- a/tools/ioemu/iodev/cpu.cc	Thu Feb 03 20:10:48 2005 +0000
     1.2 +++ b/tools/ioemu/iodev/cpu.cc	Fri Feb 04 00:08:55 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	Thu Feb 03 20:10:48 2005 +0000
     2.2 +++ b/tools/ioemu/iodev/dma.cc	Fri Feb 04 00:08:55 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	Thu Feb 03 20:10:48 2005 +0000
     3.2 +++ b/tools/ioemu/iodev/dma.h	Fri Feb 04 00:08:55 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);
     4.1 --- a/xen/arch/x86/domain.c	Thu Feb 03 20:10:48 2005 +0000
     4.2 +++ b/xen/arch/x86/domain.c	Fri Feb 04 00:08:55 2005 +0000
     4.3 @@ -330,6 +330,8 @@ static void monitor_rm_pagetable(struct 
     4.4      l2_pgentry_t *mpl2e;
     4.5      unsigned long mpfn;
     4.6  
     4.7 +    ASSERT( pagetable_val(m->monitor_table) );
     4.8 +    
     4.9      mpl2e = (l2_pgentry_t *) map_domain_mem(pagetable_val(m->monitor_table));
    4.10      /*
    4.11       * First get the pfn for guest_pl2e_cache by looking at monitor_table
     5.1 --- a/xen/arch/x86/vmx_platform.c	Thu Feb 03 20:10:48 2005 +0000
     5.2 +++ b/xen/arch/x86/vmx_platform.c	Fri Feb 04 00:08:55 2005 +0000
     5.3 @@ -372,7 +372,7 @@ static int inst_copy_from_guest(char *bu
     5.4          ma = (mfn << PAGE_SHIFT) | (guest_eip & (PAGE_SIZE - 1));
     5.5          inst_start = (unsigned char *)map_domain_mem(ma);
     5.6                  
     5.7 -        strncpy(buf, inst_start, inst_len);
     5.8 +        memcpy(buf, inst_start, inst_len);
     5.9          unmap_domain_mem(inst_start);
    5.10      } else {
    5.11          // Todo: In two page frames