Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Merge branch 'lwip_dev' of /home/palacios/palacios into lwip_dev
Lei Xia [Tue, 30 Sep 2008 22:27:02 +0000 (17:27 -0500)]
Conflicts:
palacios/src/lwip/arch/sys_arch.c

1  2 
palacios/build/Makefile
palacios/src/lwip/arch/sys_arch.c

diff --combined palacios/build/Makefile
@@@ -181,12 -181,7 +181,12 @@@ endi
  #
  #TCPSTACK, uIP is used currently
  #
 -TCPSTACK=UIP
 +UIP=ON
 +
 +#
 +#LWIP, ON -- used, OFF -- not used
 +#
 +LWIP=ON
  
  #
  #RAMDISK
@@@ -309,23 -304,11 +309,23 @@@ DEVICE_OBJS := $(DEVICE_C_OBJS
  V3LIBS := $(DECODER_LIBS)
  
  
 -TCPSTACK_C_SRCS := psock.c timer.c uip_arp.c uip.c uip-fw.c uiplib.c uip-neighbor.c uip-split.c resolv.c
  
 -TCPSTACK_C_OBJS := $(TCPSTACK_C_SRCS:%.c=net/%.o)
  
 -TCPSTACK_OBJS := $(TCPSTACK_C_OBJS)
 +ifeq ($(UIP),ON)
 +      UIP_C_SRCS := psock.c timer.c uip_arp.c uip.c uip-fw.c uiplib.c uip-neighbor.c uip-split.c resolv.c
 +      UIP_C_OBJS := $(UIP_C_SRCS:%.c=net/%.o)
 +else
 +      UIP_C_SRCS :=
 +      UIP_C_OBJS :=   
 +endif
 +
 +ifeq ($(LWIP),ON)
 +      LWIP_OBJS := lwip/*.o
 +else
 +      LWIP_OBJS := 
 +endif
 +
 +TCPSTACK_OBJS := $(UIP_C_OBJS) $(LWIP_OBJS)
  
  
  
@@@ -456,7 -439,7 +456,7 @@@ devices/%.o : devices/%.as
        $(NASM) $(NASM_VMM_OPTS) $< -o devices/$*.o
  
  net/%.o : net/%.c
-       $(TARGET_CC) -c $(CC_GENERAL_OPTS) $(CC_VMM_OPTS)  $(CC_USER_OPTS) $< -o net/$*.o
+       $(TARGET_CC) -c $(CC_GENERAL_OPTS)  $(CC_USER_OPTS) $< -o net/$*.o
  
  # ----------------------------------------------------------------------
  # Targets -
@@@ -494,9 -477,6 +494,9 @@@ rombios_link
  vgabios_link:
        ln -s -f ../src/vmboot/vgabios/VGABIOS-lgpl-latest.bin vgabios
  
 +force_lwip:
 +      (cd ../src/lwip/build; make clean; make)
 +
  force_rombios: rombios_link
        (cd ../src/vmboot/rombios; make clean; make)
  
@@@ -506,7 -486,7 +506,7 @@@ force_vgabios: vgabios_lin
  force_payload: force_rombios force_vgabios
        ../scripts/make_payload.pl payload_layout.txt vm_kernel
  
 -inter1: force_payload
 +inter1: force_payload force_lwip
        -make clean
  
  world: inter1 vmm.img
   *    will block until there is more room instead of just
   *    leaking messages.
   */
 +/*
 + * Modified by Lei Xia (lxia@northwestern.edu) to fit to Palacios, 9/29/2008
 + */
  #include "lwip/debug.h"
  
  #include <string.h>
 -#include <sys/time.h>
 -#include <sys/types.h>
 -#include <stdlib.h>
 -#include <unistd.h>
 -#include <pthread.h>
  
 +#include <palacios/vmm.h>
  #include <geekos/synch.h>
  #include <geekos/kthread.h>
  #include <geekos/debug.h>
 +#include <geekos/timer.h>
  #include <geekos/malloc.h>
  
  #include "lwip/sys.h"
@@@ -103,15 -103,15 +103,15 @@@ struct sys_thread 
  };
  
  
 -static struct timeval starttime;
 +//static struct timeval starttime;
  
  //static pthread_mutex_t lwprot_mutex = PTHREAD_MUTEX_INITIALIZER;
  static struct Mutex lwprot_mutex; // !!!! need to be initiated, void Mutex_Init(struct Mutex* mutex);
  
  //static pthread_t lwprot_thread = (pthread_t) 0xDEAD;
 -static struct Kernel_Thread lwprot_thread = (struct Kernel_Thread) 0xDEAD;  //!!!!! how to set it to a NULL thread?
 +//static struct Kernel_Thread lwprot_thread = (struct Kernel_Thread) 0xDEAD;  //!!!!! how to set it to a NULL thread?
  
 -static int lwprot_count = 0;
 +//static int lwprot_count = 0;
  
  static struct sys_sem *sys_sem_new_(u8_t count);
  static void sys_sem_free_(struct sys_sem *sem);
@@@ -188,12 -188,12 +188,11 @@@ current_thread(void
  }
  
  
--//!!!!!!!!!!!!backto this function later
  /*-----------------------------------------------------------------------------------*/
  sys_thread_t
  sys_thread_new(char *name, void (* function)(void *arg), void *arg, int stacksize, int prio)
  {
 -  int code;
 +  //int code;
    //pthread_t tmp;
    struct Kernel_Thread *tmp;
    struct sys_thread *st = NULL;
@@@ -610,8 -610,6 +609,8 @@@ sys_arch_timeouts(void
    thread = current_thread();
    return &thread->timeouts;
  }
 +
 +
  /*-----------------------------------------------------------------------------------*/
  /** sys_prot_t sys_arch_protect(void)
  
@@@ -627,8 -625,6 +626,8 @@@ that case the return value indicates th
  sys_arch_protect() is only required if your port is supporting an operating
  system.
  */
 +
 +#if 0
  sys_prot_t
  sys_arch_protect(void)
  {
@@@ -663,12 -659,11 +662,12 @@@ sys_arch_unprotect(sys_prot_t pval
      {
          if (--lwprot_count == 0)
          {
 -            lwprot_thread = (Kernel_Thread) 0xDEAD;
 +            lwprot_thread = (struc Kernel_Thread) 0xDEAD;
              Mutex_Unlock(&lwprot_mutex);
          }
      }
  }
 +#endif
  
  /*-----------------------------------------------------------------------------------*/
  
  #define HZ 100
  #endif
  
 +#if 0
  unsigned long
  sys_jiffies(void)
  {
      usec /= 1000000L / HZ;
      return HZ * sec + usec;
  }
 +#endif
  
  #if PPP_DEBUG
  
@@@ -710,7 -703,7 +709,7 @@@ void ppp_trace(int level, const char *f
      va_start(args, format);
        
      //vprintf(format, args);
 -    SerialPrintList(format, args);
 +    PrintDebug(format, args);
        
      va_end(args);
  }