Merge GCC_SURGE with current default head.
--- a/baseport/syborg/bld.inf Fri Aug 27 17:26:55 2010 +0100
+++ b/baseport/syborg/bld.inf Tue Sep 07 12:23:10 2010 +0100
@@ -36,9 +36,9 @@
PRJ_EXTENSIONS
start extension base/genexec
#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-option INC_PATH /epoc32/include
+option INC_PATH $(EPOCROOT)epoc32/include
#else
-option INC_PATH /epoc32/include/platform
+option INC_PATH $(EPOCROOT)epoc32/include/platform
#endif
option EXTRA_SRC_PATH $(EXTENSION_ROOT)/../../../../os/kernelhwsrv/kernel/eka/kernel
end
@@ -114,19 +114,26 @@
PRJ_EXTENSIONS
start extension base/bootstrap
#ifdef SYMBIAN_OLD_EXPORT_LOCATION
-option INC_PATH /epoc32/include
+option INC_PATH $(EPOCROOT)epoc32/include
#else
-option INC_PATH /epoc32/include/platform
+option INC_PATH $(EPOCROOT)epoc32/include/platform
+#endif
+#ifdef GCCE
+option GCCE GCCE
+#endif
+#ifdef ARMCC
+option ARMCC ARMCC
#endif
option NAME _syborg_bootloader_bootrom
option MEMMODEL multiple
//option MEMMODEL flexible
//option MEMMODEL moving
option SOURCES syborg.s
+//option INCLUDES $(EXTENSION_ROOT)/config.inc $(EXTENSION_ROOT)/bootstrap/syborg.inc
option INCLUDES config.inc syborg.inc
option E32PATH $(EXTENSION_ROOT)/../../../../os/kernelhwsrv/kernel
option EXTRA_INC_PATH $(EXTENSION_ROOT)/bootstrap
-option EXTRA_SRC_PATH $(EXTENSION_ROOT)/bootstrap
+option EXTRA_SRC_PATH $(EXTENSION_ROOT)/bootstrap
end
// Build image armv5 for urel and udeb
--- a/baseport/syborg/bootstrap/syborg.s Fri Aug 27 17:26:55 2010 +0100
+++ b/baseport/syborg/bootstrap/syborg.s Tue Sep 07 12:23:10 2010 +0100
@@ -487,7 +487,7 @@
GetDebugPortBase ROUT
ldr r1, [r12, #TRomHeader_iDebugPort]
cmp r1, #42 ; JTAG?
- movseq r1, #0
+ moveqs r1, #0
bxeq lr ; yes - return 0 and set Z
cmp r1, #1
blo GetUartPort0
--- a/baseport/syborg/rom/base_syborg.iby Fri Aug 27 17:26:55 2010 +0100
+++ b/baseport/syborg/rom/base_syborg.iby Tue Sep 07 12:23:10 2010 +0100
@@ -66,7 +66,7 @@
#endif
// IEEE-mode VFP support
-extension[VARID]= KERNEL_DIR\DEBUG_DIR\evfp.dll \sys\bin\evfp.dll
+//extension[VARID]= KERNEL_DIR\DEBUG_DIR\evfp.dll \sys\bin\evfp.dll
// Either include NGA or Non NGA Framebuffer
--- a/baseport/syborg/rom/kernel.iby Fri Aug 27 17:26:55 2010 +0100
+++ b/baseport/syborg/rom/kernel.iby Tue Sep 07 12:23:10 2010 +0100
@@ -25,7 +25,7 @@
variant[VARID]= \epoc32\release\##KMAIN##\##BUILD##\_##VARIANT##_KASYBORG.DLL \sys\bin\KASYBORG.DLL
// IEEE-mode VFP support
-extension[VARID]= \epoc32\release\##KMAIN##\##BUILD##\EVFP.DLL \sys\bin\EVFP.DLL
+//extension[VARID]= \epoc32\release\##KMAIN##\##BUILD##\EVFP.DLL \sys\bin\EVFP.DLL
// Common monitor support. Must be before both interactive debugger and automatic logger.
extension[VARID]= \Epoc32\release\##KMAIN##\##BUILD##\_##VARIANT##_EXMONCOMMON.DLL \sys\bin\EXMONCOMMON.DLL
--- a/baseport/syborg/specific/interrupts.cia Fri Aug 27 17:26:55 2010 +0100
+++ b/baseport/syborg/specific/interrupts.cia Tue Sep 07 12:23:10 2010 +0100
@@ -86,7 +86,7 @@
asm("__KHwBaseSic:");
asm(".word %a0" : : "i" ((TInt)KHwBaseSic));
asm("__SicHandlerStart:");
- asm(".word %a0" : : "i" ((TInt)&Handlers[0]));
+ asm(".word %a0" : : "i" (&Handlers[0]));
}
__NAKED__ void SyborgInterrupt::FiqDispatch()
--- a/baseport/syborg/specific/syborg.cia Fri Aug 27 17:26:55 2010 +0100
+++ b/baseport/syborg/specific/syborg.cia Tue Sep 07 12:23:10 2010 +0100
@@ -71,5 +71,5 @@
asm("bx lr");
asm("__KHwInt:");
- asm(".word %a0" : : "i" (TInt)(KHwBaseSic));
+ asm(".word %a0" : : "i" ((TInt)(KHwBaseSic)));
}
--- a/baseport/syborg/svphostfs/fs/svphostfsy.cpp Fri Aug 27 17:26:55 2010 +0100
+++ b/baseport/syborg/svphostfs/fs/svphostfsy.cpp Tue Sep 07 12:23:10 2010 +0100
@@ -131,9 +131,14 @@
{
DP(_L("** (SVPHOSTFSY) CSVPHostFileSystem::DriveInfo()"));
- /* !@! TODO: are these the best values? */
anInfo.iMediaAtt=KMediaAttVariableSize;
- anInfo.iType=EMediaRam;
+// SF BUG 1313 - T_FSYS fails - start
+// Media type changed from RAM drive to Hard Disk - HOSTFS cannot use FAT file system so various
+// tests fail, but T_FSYS fails on any drive as all available drives are exercised by the test.
+// EMediaHardDisk is more appropriate.
+ anInfo.iType=EMediaHardDisk; // was EMediaRam;
+// SF BUG 1312 - T_FSYS fails - end
+
#if 0
// !@! can't execute from remote drives
anInfo.iDriveAtt=KDriveAttRemote;
--- a/baseport/syborg/variant.mmh Fri Aug 27 17:26:55 2010 +0100
+++ b/baseport/syborg/variant.mmh Tue Sep 07 12:23:10 2010 +0100
@@ -99,9 +99,10 @@
//macro __CPU_ARM1136_ERRATUM_411920_FIXED
-
+#ifndef GCCE
macro __CPU_HAS_VFP
#define USE_VFP_MATH
+#endif
// !@! not moving when 1136
//#define MM_MOVING
macro __DEBUGGER_SUPPORT__
--- a/baseport/syborg/webcamera/webcamera_pdd.cpp Fri Aug 27 17:26:55 2010 +0100
+++ b/baseport/syborg/webcamera/webcamera_pdd.cpp Tue Sep 07 12:23:10 2010 +0100
@@ -168,6 +168,7 @@
break;
default:
//
+ break;
}
WriteReg(iPortAddr,WEBCAMERA_REG_DMA_ADDR, 0);
WriteReg(iPortAddr,WEBCAMERA_REG_DMA_SIZE, 0);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/Makefile Tue Sep 07 12:23:10 2010 +0100
@@ -0,0 +1,21 @@
+# Copyright (c) 2010 Symbian Foundation.
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Mike Kinghan, mikek@symbian.org, for Symbian Foundation - Initial contribution
+#
+# Description:
+# Makefile to build all available model libraries.
+
+.phony: all clean install distclean
+
+# Append new model library dirs here.
+subdirs := nvmemmory
+
+all clean install distclean:
+ for d in $(subdirs); do $(MAKE) -C $$d $@; done
+
--- a/symbian-qemu-0.9.1-12/model-libraries/commoninc/platformtypes.h Fri Aug 27 17:26:55 2010 +0100
+++ b/symbian-qemu-0.9.1-12/model-libraries/commoninc/platformtypes.h Tue Sep 07 12:23:10 2010 +0100
@@ -1,6 +1,8 @@
#ifndef PLATFORMTYPES_H
#define PLATFORMTYPES_H
-
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
// TODO: We should have a proper type definition file created common for standalone model libraries
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
@@ -15,5 +17,7 @@
typedef unsigned __int64 uint64_t;
typedef unsigned __int64 u_int64_t;
typedef unsigned char byte_t;
+#endif
+
#endif // PLATFORMTYPES_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/nvmemmory/Makefile Tue Sep 07 12:23:10 2010 +0100
@@ -0,0 +1,27 @@
+# Copyright (c) 2010 Symbian Foundation.
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Mike Kinghan, mikek@symbian.org, for Symbian Foundation - Initial contribution
+#
+# Description:
+# Toplevel Makefile to build libnvmemmory.so in either debug or release mode
+
+.phony: all clean install distclean
+
+
+# Ensure DEBUG_LIBS is defined to make a debug build
+ifneq ($(DEBUG_LIBS),)
+build_dir=Debug
+else
+build_dir=Release
+endif
+
+all clean install distclean:
+ $(MAKE) -C $(build_dir) $@ -f ../target.mak
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/symbian-qemu-0.9.1-12/model-libraries/nvmemmory/target.mak Tue Sep 07 12:23:10 2010 +0100
@@ -0,0 +1,61 @@
+# Copyright (c) 2010 Symbian Foundation.
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Mike Kinghan, mikek@symbian.org, for Symbian Foundation - Initial contribution
+#
+# Description:
+# Bottom level Makefile to build libnvmemmory.so in the current directory
+
+include ../../../qemu-symbian-svp/config-host.mak
+
+sources := nvmemmory.cpp
+objs := nvmemmory.o
+libname := libnvmemmory.so
+soname := $(libname).1
+targ := $(soname).0
+
+.phony: all build clean install distclean uninstall
+
+cflags=-DHAVE_STDINT_H
+ifneq ($(DEBUG_LIBS),)
+cflags+="-O0 -g"
+else
+cflags+=-O2
+endif
+
+vpath %.cpp ..
+
+all: $(targ)
+
+%.o : %.cpp
+ g++ $(cflags) -fPIC -I../../commoninc -c -o $@ $<
+
+$(objs): $(sources)
+
+$(targ): $(objs)
+ g++ $(cflags) -shared -Wl,-soname,$(soname) -Wl,-l,stdc++ -o $@ $(objs)
+
+clean:
+ rm -f $(objs) $(targ)
+
+install: $(targ)
+ if [ ! -d "$(DESTDIR)$(libdir)" ]; then mkdir -p "$(DESTDIR)$(libdir)"; fi && \
+ $(INSTALL) -m 755 $(targ) "$(DESTDIR)$(libdir)" && \
+ rm -f "$(DESTDIR)$(libdir)/$(libname)" && \
+ ln -s "$(DESTDIR)$(libdir)/$(targ)" "$(DESTDIR)$(libdir)/$(libname)"
+
+distclean: clean
+# Nothing for distclean
+
+uninstall:
+ rm -f "$(DESTDIR)$(libdir)/$(libname)" "$(DESTDIR)$(libdir)/$(targ)" && \
+ files=`ls -A "$(DESTDIR)$(libdir)"` && \
+ if [ -z "$$files" ]; then rmdir "$(DESTDIR)$(libdir)"; fi
+
+
+
--- a/symbian-qemu-0.9.1-12/qemu-symbian-svp/Makefile Fri Aug 27 17:26:55 2010 +0100
+++ b/symbian-qemu-0.9.1-12/qemu-symbian-svp/Makefile Tue Sep 07 12:23:10 2010 +0100
@@ -3,7 +3,7 @@
include config-host.mak
.PHONY: all clean cscope distclean dvi html info install install-doc \
- recurse-all speed tar tarbin test
+ recurse-all model-libs speed tar tarbin test
VPATH=$(SRC_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/libfdt
@@ -32,7 +32,15 @@
LIBS+=-lwinmm -lws2_32 -liphlpapi
endif
-all: $(TOOLS) $(DOCS) recurse-all
+all:: $(TOOLS) $(DOCS) recurse-all
+
+ifneq ($(MODEL_LIBS_DIR),)
+all:: model-libs
+
+model-libs:
+ $(MAKE) -C $(MODEL_LIBS_DIR) all
+endif
+
SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
@@ -203,6 +211,9 @@
$(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS)
clean:
+ifneq ($(MODEL_LIBS_DIR),)
+ $(MAKE) -C $(MODEL_LIBS_DIR) $@
+endif
# avoid old build problems by removing potentially incorrect old files
rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
rm -f *.o *.d *.a $(TOOLS) TAGS cscope.* *.pod *~ */*~
@@ -213,6 +224,9 @@
done
distclean: clean
+ifneq ($(MODEL_LIBS_DIR),)
+ $(MAKE) -C $(MODEL_LIBS_DIR) $@
+endif
rm -f config-host.mak config-host.h $(DOCS)
rm -f qemu-{doc,tech}.{info,aux,cp,dvi,fn,info,ky,log,pg,toc,tp,vr}
for d in $(TARGET_DIRS); do \
@@ -261,6 +275,10 @@
for d in $(TARGET_DIRS); do \
$(MAKE) -C $$d $@ || exit 1 ; \
done
+ifneq ($(MODEL_LIBS_DIR),)
+ $(MAKE) -C $(MODEL_LIBS_DIR) $@
+endif
+
# various test targets
test speed: all
--- a/symbian-qemu-0.9.1-12/qemu-symbian-svp/Makefile.target Fri Aug 27 17:26:55 2010 +0100
+++ b/symbian-qemu-0.9.1-12/qemu-symbian-svp/Makefile.target Tue Sep 07 12:23:10 2010 +0100
@@ -787,6 +787,10 @@
main.o: CFLAGS+=-p
endif
+ifneq ($(MODEL_LIBS_DIR),)
+LDFLAGS+=$(RPATH_FLAGS)
+endif
+
$(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(PNG_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS)
--- a/symbian-qemu-0.9.1-12/qemu-symbian-svp/configure Fri Aug 27 17:26:55 2010 +0100
+++ b/symbian-qemu-0.9.1-12/qemu-symbian-svp/configure Tue Sep 07 12:23:10 2010 +0100
@@ -1091,6 +1091,7 @@
datasuffix=""
docsuffix=""
binsuffix=""
+ libsuffix=""
else
if test -z "$prefix" ; then
prefix="/usr/local"
@@ -1099,11 +1100,22 @@
datasuffix="/share/qemu"
docsuffix="/share/doc/qemu"
binsuffix="/bin"
+ libsuffix="/lib"
fi
+MODEL_LIBS_DIR=""
+if test `expr "$source_path" : ".*\/qemu-symbian-svp$"` != 0 ; then
+ if [ "$linux" = "yes" -a -f "$source_path/../model-libraries/Makefile" ]; then
+ MODEL_LIBS_DIR="$source_path/../model-libraries"
+ fi
+fi
+
echo "Install prefix $prefix"
echo "BIOS directory $prefix$datasuffix"
echo "binary directory $prefix$binsuffix"
+if [ ! -z "$MODEL_LIBS_DIR" ]; then
+ echo "lib directory $prefix$libsuffix"
+fi
if test "$mingw32" = "no" ; then
echo "Manual directory $prefix$mansuffix"
echo "ELF interp prefix $interp_prefix"
@@ -1181,6 +1193,9 @@
echo "prefix=$prefix" >> $config_mak
echo "bindir=\${prefix}$binsuffix" >> $config_mak
+if [ ! -z "$MODEL_LIBS_DIR" ]; then
+ echo "libdir=\${prefix}$libsuffix" >> $config_mak
+fi
echo "mandir=\${prefix}$mansuffix" >> $config_mak
echo "datadir=\${prefix}$datasuffix" >> $config_mak
echo "docdir=\${prefix}$docsuffix" >> $config_mak
@@ -1200,6 +1215,10 @@
echo "ARCH_LDFLAGS=$ARCH_LDFLAGS" >> $config_mak
echo "CFLAGS=$CFLAGS" >> $config_mak
echo "LDFLAGS=$LDFLAGS" >> $config_mak
+if [ ! -z "$MODEL_LIBS_DIR" ]; then
+ echo "RPATH_FLAGS=-Wl,-rpath=\"${prefix}$libsuffix\"" >> $config_mak
+ echo "MODEL_LIBS_DIR=$MODEL_LIBS_DIR" >> $config_mak
+fi
echo "EXESUF=$EXESUF" >> $config_mak
echo "AIOLIBS=$AIOLIBS" >> $config_mak
case "$cpu" in
@@ -1811,6 +1830,7 @@
echo "#define CONFIG_BSD_USER 1" >> $config_h
fi
+
test -f ${config_h}~ && cmp -s $config_h ${config_h}~ && mv ${config_h}~ $config_h
done # for target in $targets
--- a/symbian-qemu-0.9.1-12/qemu-symbian-svp/gui_common.h Fri Aug 27 17:26:55 2010 +0100
+++ b/symbian-qemu-0.9.1-12/qemu-symbian-svp/gui_common.h Tue Sep 07 12:23:10 2010 +0100
@@ -49,7 +49,7 @@
# define SET_GUI_AREA_Y0(area_ptr,y0) (area_ptr)->y0 = (y0)
# define SET_GUI_AREA_X1(area_ptr,x1) (area_ptr)->x1 = (x1)
# define SET_GUI_AREA_Y1(area_ptr,y1) (area_ptr)->y1 = (y1)
-#elif define WIDTH_HEIGHT
+#elif defined WIDTH_HEIGHT
# define GET_GUI_AREA_WIDTH(area_ptr) (area_ptr)->width
# define GET_GUI_AREA_HEIGHT(area_ptr) (area_ptr)->height
# define GET_GUI_AREA_X1(area_ptr) ((area_ptr)->x0 + (area_ptr)->width)
--- a/symbian-qemu-0.9.1-12/qemu-symbian-svp/plugins/qemu_arm_plugins.py Fri Aug 27 17:26:55 2010 +0100
+++ b/symbian-qemu-0.9.1-12/qemu-symbian-svp/plugins/qemu_arm_plugins.py Tue Sep 07 12:23:10 2010 +0100
@@ -5,5 +5,5 @@
import syborg_timer
import syborg_keyboard
import syborg_pointer
-import syborg_usbtest
-import syborg_nvmemorydevice
\ No newline at end of file
+#import syborg_usbtest
+import syborg_nvmemorydevice
--- a/symbian-qemu-0.9.1-12/qemu-symbian-svp/plugins/syborg_nvmemorydevice.py Fri Aug 27 17:26:55 2010 +0100
+++ b/symbian-qemu-0.9.1-12/qemu-symbian-svp/plugins/syborg_nvmemorydevice.py Tue Sep 07 12:23:10 2010 +0100
@@ -28,6 +28,8 @@
import sys
import os
import array
+import platform
+import re
class syborg_nvmemorydevice(qemu.devclass):
# 256 MB default empty drive size if there is no readymade image available
@@ -35,7 +37,7 @@
DEVICE_SECTOR_SIZE = 0x200
DRIVE_NAME = "qemudrive.img"
DRIVE_PATH = "nvmemory"
-
+
# Memory device registers
R_NVMEM_ID = 0x0000
R_NVMEM_TRANSACTION_OFFSET = 0x0004
@@ -54,40 +56,50 @@
# Variables to store the information for current transaction
shared_memory_base = 0
shared_memory_size = 0
- transaction_offset = 0
- transaction_size = 0
- transaction_direction = 0
+ transaction_offset = 0
+ transaction_size = 0
+ transaction_direction = 0
# Variables to validate transaction
- transaction_offset_set = 0
- transaction_size_set = 0
+ transaction_offset_set = 0
+ transaction_size_set = 0
transaction_direction_set = 0
nvmemory_sector_count = 0
drive_size = 0
sector_size = 0
- drive_image_name = ""
+ drive_image_name = ""
+ host_plat = platform.platform();
def create(self):
print "syborg_nvmemorydevice: create\n"
# Get properties
- self.drive_size = self.properties["drive_size"]
- self.sector_size = self.properties["sector_size"]
+ self.drive_size = self.properties["drive_size"]
+ self.sector_size = self.properties["sector_size"]
self.drive_image_name = self.properties["drive_image_name"]
print "drive size: ", self.drive_size
print "sector size: ", self.sector_size
- print "drive name: ", self.drive_image_name
+ print "drive name: ", self.drive_image_name
- drive_path_and_name = self.DRIVE_PATH + "\\" + self.drive_image_name
+ drive_path_and_name = os.path.join(self.DRIVE_PATH, self.drive_image_name)
# Save working directory
self.working_dir = os.getcwd()
+ nvmem_lib = ""
+ open_mode = 0
+ if re.match('^linux',self.host_plat,re.I):
+ nvmemlib_name = "libnvmemmory.so"
+ open_mode = os.O_RDWR
+ else:
+ nvmemlib_name = "nvmemmory.dll"
+ open_mode = os.O_RDWR|os.O_BINARY
# Open the nvmemory library
try:
- self.nvmemlib = ctypes.CDLL("nvmemmory.dll")
- except:
- sys.exit("syborg_nvmemorydevice: nvmemmory.dll load failed")
+ self.nvmemlib = ctypes.CDLL(nvmemlib_name)
+ except Exception, e:
+ print repr(e)
+ sys.exit("syborg_nvmemorydevice: nvmemmory load failed")
# Create an instance of non volatile memory handler class
self.obj = self.nvmemlib.nvmem_create( self.sector_size )
@@ -101,7 +113,7 @@
# Here we could check why we failed - usually because the path already exists \n"
pass
try:
- self.filehandle = os.open( drive_path_and_name, os.O_RDWR|os.O_BINARY )
+ self.filehandle = os.open( drive_path_and_name, open_mode )
os.close( self.filehandle )
except:
print "syborg_nvmemorydevice: drive image not found - create\n"
@@ -119,7 +131,7 @@
index = index+1
# Create path and get handle to the raw memory array
- imagepath = self.working_dir + "\\" + drive_path_and_name
+ imagepath = os.path.join(self.working_dir, drive_path_and_name)
print "imagepath: ", imagepath
self.nvmemhandle = self.nvmemlib.nvmem_open( self.obj, imagepath )
if( self.nvmemhandle < 0 ):
@@ -132,7 +144,7 @@
print "syborg_nvmemorydevice: created\n"
def updateIrq(self,new_value):
- self.set_irq_level(0, new_value)
+ self.set_irq_level(0, new_value)
def nvmem_request_callback(self, result):
#print "graphics_request_callback: " , result
@@ -145,48 +157,48 @@
self.nvmem_callback = self.CALLBACKFUNC(self.nvmem_request_callback)
self.nvmemlib.nvmem_set_callback( self.obj, self.nvmem_callback )
- def read_reg(self, offset):
+ def read_reg(self, offset):
offset >>= 2
- #print "read register: 0x%x" % (offset)
- if offset == self.R_NVMEM_ID:
- return 0xDEADBEEF
- elif offset == self.R_NVMEM_TRANSACTION_OFFSET:
- return self.transaction_offset
- elif offset == self.R_NVMEM_TRANSACTION_SIZE:
- return self.transaction_size
- elif offset == self.R_NVMEM_TRANSACTION_DIRECTION:
- return self.transaction_direction
+ #print "read register: 0x%x" % (offset)
+ if offset == self.R_NVMEM_ID:
+ return 0xDEADBEEF
+ elif offset == self.R_NVMEM_TRANSACTION_OFFSET:
+ return self.transaction_offset
+ elif offset == self.R_NVMEM_TRANSACTION_SIZE:
+ return self.transaction_size
+ elif offset == self.R_NVMEM_TRANSACTION_DIRECTION:
+ return self.transaction_direction
elif offset == self.R_NVMEM_SHARED_MEMORY_BASE:
- return self.shared_memory_base
+ return self.shared_memory_base
elif offset == self.R_NVMEM_SHARED_MEMORY_SIZE:
- return self.shared_memory_size
+ return self.shared_memory_size
elif offset == self.R_NVMEM_NV_MEMORY_SIZE:
- return self.nvmemory_sector_count
+ return self.nvmemory_sector_count
elif offset == self.R_NVMEM_STATUS:
self.updateIrq(0)
- return self.status_reg
- else:
- reg_read_error = "syborg_nvmemorydevice: Illegal register read at: ", offset
+ return self.status_reg
+ else:
+ reg_read_error = "syborg_nvmemorydevice: Illegal register read at: ", offset
sys.exit( reg_read_error )
-
- def write_reg(self, offset, value):
- offset >>= 2
- #print "write register: 0x%x value: 0x%x" % (offset, value)
- if offset == self.R_NVMEM_TRANSACTION_OFFSET:
- self.transaction_offset = value
- self.transaction_offset_set = 1
- elif offset == self.R_NVMEM_TRANSACTION_SIZE:
- self.transaction_size = value
- self.transaction_size_set = 1
- elif offset == self.R_NVMEM_TRANSACTION_DIRECTION:
- self.transaction_direction = value
- self.transaction_direction_set = 1
+
+ def write_reg(self, offset, value):
+ offset >>= 2
+ #print "write register: 0x%x value: 0x%x" % (offset, value)
+ if offset == self.R_NVMEM_TRANSACTION_OFFSET:
+ self.transaction_offset = value
+ self.transaction_offset_set = 1
+ elif offset == self.R_NVMEM_TRANSACTION_SIZE:
+ self.transaction_size = value
+ self.transaction_size_set = 1
+ elif offset == self.R_NVMEM_TRANSACTION_DIRECTION:
+ self.transaction_direction = value
+ self.transaction_direction_set = 1
elif offset == self.R_NVMEM_TRANSACTION_EXECUTE:
if( (self.transaction_offset_set == 0) | (self.transaction_size_set == 0) | (self.transaction_direction_set == 0) ):
- error_msg = "syborg_nvmemorydevice: Illegal transaction! All the required parameters are not set"
+ error_msg = "syborg_nvmemorydevice: Illegal transaction! All the required parameters are not set"
sys.exit( error_msg )
elif(self.transaction_size == 0 ):
- error_msg = "syborg_nvmemorydevice: Zero size transaction issued!"
+ error_msg = "syborg_nvmemorydevice: Zero size transaction issued!"
sys.exit( error_msg )
else:
if( self.transaction_direction == self.NVMEM_TRANSACTION_READ ):
@@ -194,28 +206,28 @@
elif( self.transaction_direction == self.NVMEM_TRANSACTION_WRITE ):
self.nvmemlib.nvmem_write( self.obj, self.nvmemory_sharedmemory_host_address, self.nvmemhandle, self.transaction_offset, self.transaction_size )
else:
- error_msg = "syborg_nvmemorydevice: Transaction direction not set!"
+ error_msg = "syborg_nvmemorydevice: Transaction direction not set!"
sys.exit( error_msg )
- self.transaction_offset_set = 0
- self.transaction_size_set = 0
- self.transaction_direction_set = 0
+ self.transaction_offset_set = 0
+ self.transaction_size_set = 0
+ self.transaction_direction_set = 0
elif offset == self.R_NVMEM_SHARED_MEMORY_BASE:
self.shared_memory_base = value
elif offset == self.R_NVMEM_SHARED_MEMORY_SIZE:
- self.shared_memory_size = value
+ self.shared_memory_size = value
elif offset == self.R_NVMEM_ENABLE:
if( value > 0 ):
self.nvmemory_memregion = qemu.memregion( self.shared_memory_base, self.shared_memory_size )
self.nvmemory_sharedmemory_host_address = self.nvmemory_memregion.region_host_addr()
print"syborg_nvmemorydevice: host addr: 0x%08x" % (self.nvmemory_sharedmemory_host_address)
else:
- reg_write_error = "syborg_nvmemorydevice: Illegal register write to: ", offset
+ reg_write_error = "syborg_nvmemorydevice: Illegal register write to: ", offset
sys.exit( reg_write_error )
- # Device class properties
- regions = [qemu.ioregion(0x1000, readl=read_reg, writel=write_reg)]
- irqs = 1
- name = "syborg,nvmemorydevice"
- properties = {"drive_size":DEFAULT_DRIVE_SIZE, "sector_size":DEVICE_SECTOR_SIZE, "drive_image_name":DRIVE_NAME}
-
-qemu.register_device(syborg_nvmemorydevice)
+ # Device class properties
+ regions = [qemu.ioregion(0x1000, readl=read_reg, writel=write_reg)]
+ irqs = 1
+ name = "syborg,nvmemorydevice"
+ properties = {"drive_size":DEFAULT_DRIVE_SIZE, "sector_size":DEVICE_SECTOR_SIZE, "drive_image_name":DRIVE_NAME}
+
+qemu.register_device(syborg_nvmemorydevice)
--- a/symbian-qemu-0.9.1-12/qemu-symbian-svp/qemu-char.c Fri Aug 27 17:26:55 2010 +0100
+++ b/symbian-qemu-0.9.1-12/qemu-symbian-svp/qemu-char.c Tue Sep 07 12:23:10 2010 +0100
@@ -615,7 +615,7 @@
{
CharDriverState *ret = NULL;
const char *temp_format = "/tmp/%s";
- char *fname = qemu_mallocz(sizeof(char) * (strlen(temp_path) + strlen(temp_file)));
+ char *fname = qemu_mallocz(sizeof(char) * (strlen(temp_format) + strlen(temp_file)));
if (fname)
{
sprintf(fname, temp_format, temp_file);