From: Jack Lange Date: Tue, 7 Oct 2008 23:26:05 +0000 (-0500) Subject: Merge branch '64bit' into 64bit-right X-Git-Tag: 1.0~3^2~5 X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=452885dcf15a56694ba283a079877ac38b545b0f;hp=-c Merge branch '64bit' into 64bit-right Conflicts: geekos/build/Makefile geekos/src/geekos/net.c --- 452885dcf15a56694ba283a079877ac38b545b0f diff --combined geekos/build/Makefile index 1877773,0601b6d..210b39a --- a/geekos/build/Makefile +++ b/geekos/build/Makefile @@@ -53,7 -53,7 +53,7 @@@ VPATH := $(PROJECT_ROOT)/sr # - #TCPSTACK, uIP is used currently + #uIP, ON -- used, OFF -- not used # UIP=OFF @@@ -138,17 -138,11 +138,11 @@@ COMMON_C_SRCS := fmtout.c string.c memm COMMON_C_OBJS := $(COMMON_C_SRCS:%.c=common/%.o) V3_LD_FLAGS := -L./palacios/ #V3_LIBS := -lxed -lv3vee V3_LIBS := ./palacios/libxed.a ./palacios/libv3vee.a ./palacios/libxed.a ./palacios/libv3vee.a - +V3_OBJS := ./palacios/libxed.a ./palacios/libv3vee.a ./palacios/vm_kernel - - - - 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) @@@ -158,8 -152,8 +152,13 @@@ els endif ifeq ($(LWIP),ON) ++<<<<<<< HEAD:geekos/build/Makefile + LWIP_OBJS := lwip + CC_LWIP_OPTS := -I$(PROJECT_ROOT)/include/lwip -I$(PROJECT_ROOT)/include/lwip/ipv4 -I$(PROJECT_ROOT)/include/libc -DLWIP_DEBUG ++======= + LWIP_OBJS := lwip/*.o + CC_LWIP_OPTS := -I$(PROJECT_ROOT)/include/lwip -I$(PROJECT_ROOT)/include/lwip/ipv4 -I$(PROJECT_ROOT)/include/libc -DLWIP_DEBUG -DLWIP ++>>>>>>> 64bit:geekos/build/Makefile else LWIP_OBJS := CC_LWIP_OPTS := @@@ -283,7 -277,7 +282,7 @@@ net/%.o : net/%. all : $(ALL_TARGETS) -force_lwip: +lwip: (cd ../src/lwip/build; make clean; make) @@@ -340,7 -334,7 +339,7 @@@ geekos/kernel.bin : geekos/kernel.ex $(PAD) $@ 512 # The kernel executable and symbol map. -geekos/kernel.exe : $(KERNEL_OBJS) $(COMMON_C_OBJS) force_lwip +geekos/kernel.exe : $(KERNEL_OBJS) $(COMMON_C_OBJS) $(TCPSTACK_OBJS) $(V3_OBJS) $(TARGET_LD) -o geekos/kernel.exe -Ttext $(KERNEL_BASE_ADDR) -e $(KERNEL_ENTRY) \ $(V3_LD_FLAGS) \ $(KERNEL_OBJS) $(COMMON_C_OBJS) $(TCPSTACK_OBJS) $(V3_LIBS) -b binary ./palacios/vm_kernel diff --combined geekos/src/geekos/net.c index a97de89,9487d69..0716519 --- a/geekos/src/geekos/net.c +++ b/geekos/src/geekos/net.c @@@ -5,10 -5,10 +5,11 @@@ #include #include #include + #include #ifdef LWIP + #include #include #include @@@ -16,7 -16,6 +17,7 @@@ #include #include #include + #include @@@ -28,10 -27,14 +29,14 @@@ tcpip_init_done(void *arg sys_sem_signal(*sem); } + #endif + void Init_Network() { //temporay now we are using lwip sockets // init_socket_layer(); + + #ifdef LWIP struct ip_addr ipaddr, netmask, gateway; sys_sem_t sem; @@@ -69,10 -72,11 +74,13 @@@ //initial a network application ping_init(); + + #endif + } +#endif + #if 0 void test_network() { diff --combined palacios/include/devices/ide.h index e529f93,85c26af..c001550 --- a/palacios/include/devices/ide.h +++ b/palacios/include/devices/ide.h @@@ -41,7 -41,7 +41,7 @@@ #ifdef __V3VEE__ #include - #ifdef __V3_32BIT__ + typedef long off_t; typedef sint32_t ssize_t; typedef unsigned int rd_bool; @@@ -49,7 -49,7 +49,7 @@@ typedef uchar_t Bit8u typedef ushort_t Bit16u; typedef uint32_t Bit32u; typedef uint64_t Bit64u; - #endif + #define MAX_ATA_CHANNEL 4 @@@ -132,7 -132,7 +132,7 @@@ struct cdrom_t rd_bool ready; rd_bool locked; - struct cdrom_interface * cd; + struct cdrom_ops * cd; uint32_t capacity; int next_lba; @@@ -204,9 -204,6 +204,9 @@@ struct drive_t struct sense_info_t sense; struct atapi_t atapi; + /* JRL */ + void * private_data; + Bit8u model_no[41]; }; @@@ -242,29 -239,3 +242,29 @@@ struct ramdisk_t #endif +#if 0 + +// FLAT MODE +// Open a image. Returns non-negative if successful. +//int open (const char* pathname); + +// Open an image with specific flags. Returns non-negative if successful. +int rd_open (const char* pathname, int flags); + +// Close the image. +void rd_close (); + +// Position ourselves. Return the resulting offset from the +// beginning of the file. +off_t rd_lseek (off_t offset, int whence); + +// Read count bytes to the buffer buf. Return the number of +// bytes read (count). +ssize_t rd_read (void* buf, size_t count); + +// Write count bytes from buf. Return the number of bytes +// written (count). +ssize_t rd_write (const void* buf, size_t count); + + +#endif