socsvn commit: r270066 - in soc2014/estaszuk/microblaze-head/head: . sys/conf sys/contrib/altq/altq sys/dev/ofw sys/kern sys/libkern/microblaze sys/microblaze sys/microblaze/include sys/microblaze/...

estaszuk at FreeBSD.org estaszuk at FreeBSD.org
Thu Jun 26 10:51:42 UTC 2014


Author: estaszuk
Date: Thu Jun 26 10:51:34 2014
New Revision: 270066
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=270066

Log:
  Compilable version

Added:
  soc2014/estaszuk/microblaze-head/head/sys/conf/ldscript.microblaze
  soc2014/estaszuk/microblaze-head/head/sys/libkern/microblaze/mulsi3.S
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/ofw_machdep.h
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/make-chip-folder_std.rpi
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/elf_trampoline.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/inckern.S
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/pmap.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/std.mb
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/sampleBoard/
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/sampleBoard/if_emac.c
Modified:
  soc2014/estaszuk/microblaze-head/head/src.conf
  soc2014/estaszuk/microblaze-head/head/sys/conf/Makefile.microblaze
  soc2014/estaszuk/microblaze-head/head/sys/conf/files.microblaze
  soc2014/estaszuk/microblaze-head/head/sys/contrib/altq/altq/if_altq.h
  soc2014/estaszuk/microblaze-head/head/sys/dev/ofw/ofw_bus.h
  soc2014/estaszuk/microblaze-head/head/sys/dev/ofw/ofw_bus_subr.h
  soc2014/estaszuk/microblaze-head/head/sys/kern/kern_clock.c
  soc2014/estaszuk/microblaze-head/head/sys/kern/kern_et.c
  soc2014/estaszuk/microblaze-head/head/sys/kern/kern_shutdown.c
  soc2014/estaszuk/microblaze-head/head/sys/kern/kern_tc.c
  soc2014/estaszuk/microblaze-head/head/sys/kern/kern_timeout.c
  soc2014/estaszuk/microblaze-head/head/sys/kern/link_elf.c
  soc2014/estaszuk/microblaze-head/head/sys/kern/subr_bus_dma.c
  soc2014/estaszuk/microblaze-head/head/sys/libkern/microblaze/divsi3.S
  soc2014/estaszuk/microblaze-head/head/sys/libkern/microblaze/ffs.S
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/asm.h
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/cpu.h
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/cpufunc.h
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/pmap.h
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/bcopy_page.S
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/cpufunc_asm.S
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/cpufunc_asm_armv4.S
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/devmap.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/dump_machdep.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/exception.S
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/fiq.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/identcpu.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/intr.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/locore.S
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/machdep.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/mem.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/minidump_machdep.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/nexus.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/stack_machdep.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/std.microblaze
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/support.S
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/trap.c
  soc2014/estaszuk/microblaze-head/head/sys/microblaze/microblaze/vm_machdep.c
  soc2014/estaszuk/microblaze-head/head/sys/net/if.c
  soc2014/estaszuk/microblaze-head/head/sys/sys/buf_ring.h
  soc2014/estaszuk/microblaze-head/head/sys/vm/vm_kern.c
  soc2014/estaszuk/microblaze-head/head/sys/vm/vm_map.c
  soc2014/estaszuk/microblaze-head/head/sys/vm/vm_mmap.c
  soc2014/estaszuk/microblaze-head/head/sys/vm/vm_object.c
  soc2014/estaszuk/microblaze-head/head/sys/vm/vm_page.c
  soc2014/estaszuk/microblaze-head/head/sys/vm/vm_pageout.c
  soc2014/estaszuk/microblaze-head/head/sys/vm/vm_phys.c
  soc2014/estaszuk/microblaze-head/head/sys/vm/vm_reserv.c
  soc2014/estaszuk/microblaze-head/head/sys/vm/vnode_pager.c

Modified: soc2014/estaszuk/microblaze-head/head/src.conf
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/src.conf	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/src.conf	Thu Jun 26 10:51:34 2014	(r270066)
@@ -9,12 +9,14 @@
 TARGET_ARCH=	microblaze
 KERNCONF=		MICROBLAZEDEF
 #KERN=	RPI-B
-CC=             /mnt/install/bin/mb-gcc
-CXX=            /mnt/install/bin/mb-g++
-AS=            /mnt/install/bin/mb-as 
-LD=            /mnt/install/bin/mb-ld
-AR=		/mnt/install/bin/mb-ar
-NM=		/mnt/install/bin/mb-nm
+CC=             /mnt/install3/bin/mb-gcc
+CXX=            /mnt/install3/bin/mb-g++
+AS=            /mnt/install3/bin/mb-as 
+LD=            /mnt/install3/bin/mb-ld
+AR=		/mnt/install3/bin/mb-ar
+NM=		/mnt/install3/bin/mb-nm
+OBJCOPY=	/mnt/install3/bin/mb-objcopy
+SIZE=		/mnt/install3/bin/mb-size
 NO_WERROR=yes
 WERROR=
 

Modified: soc2014/estaszuk/microblaze-head/head/sys/conf/Makefile.microblaze
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/conf/Makefile.microblaze	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/conf/Makefile.microblaze	Thu Jun 26 10:51:34 2014	(r270066)
@@ -49,6 +49,10 @@
 CFLAGS.clang += -mllvm -arm-enable-ehabi
 .endif
 
+# This is to prevent DSO mode when linking bfd due to used ld 
+# (caused problems which may need further investigations)
+HACK_EXTRA_FLAGS= 
+
 # hack because genassym.c includes sys/bus.h which includes these.
 genassym.o: bus_if.h device_if.h
 

Modified: soc2014/estaszuk/microblaze-head/head/sys/conf/files.microblaze
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/conf/files.microblaze	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/conf/files.microblaze	Thu Jun 26 10:51:34 2014	(r270066)
@@ -54,29 +54,29 @@
 microblaze/microblaze/undefined.c		standard
 microblaze/microblaze/vm_machdep.c		standard
 microblaze/microblaze/vfp.c			standard
-board_id.h			standard				   \
-	dependency	"$S/arm/conf/genboardid.awk $S/arm/conf/mach-types" \
-	compile-with	"${AWK} -f $S/arm/conf/genboardid.awk $S/arm/conf/mach-types > board_id.h" \
-	no-obj no-implicit-rule before-depend				   \
-	clean		"board_id.h"
-cddl/compat/opensolaris/kern/opensolaris_atomic.c	optional zfs compile-with "${ZFS_C}"
-crypto/blowfish/bf_enc.c	optional	crypto | ipsec 
-crypto/des/des_enc.c		optional	crypto | ipsec | netsmb
-dev/fb/fb.c			optional	sc
-dev/fdt/fdt_arm_platform.c	optional	platform fdt
-dev/hwpmc/hwpmc_arm.c		optional	hwpmc
-dev/kbd/kbd.c			optional	sc | vt
-dev/syscons/scgfbrndr.c		optional	sc
-dev/syscons/scterm-teken.c	optional	sc
-dev/syscons/scvtb.c		optional	sc
-dev/uart/uart_cpu_fdt.c		optional	uart fdt
+microblaze/microblaze/pmap.c			standard
+microblaze/sampleBoard/if_emac.c		standard
+#board_id.h			standard				   \
+#	dependency	"$S/arm/conf/genboardid.awk $S/arm/conf/mach-types" \
+#	compile-with	"${AWK} -f $S/arm/conf/genboardid.awk $S/arm/conf/mach-types > board_id.h" \
+#	no-obj no-implicit-rule before-depend				   \
+#	clean		"board_id.h"
+#cddl/compat/opensolaris/kern/opensolaris_atomic.c	optional zfs compile-with "${ZFS_C}"
+#crypto/blowfish/bf_enc.c	optional	crypto | ipsec 
+#crypto/des/des_enc.c		optional	crypto | ipsec | netsmb
+#dev/fb/fb.c			optional	sc
+#dev/fdt/fdt_arm_platform.c	optional	platform fdt
+#dev/hwpmc/hwpmc_arm.c		optional	hwpmc
+#dev/kbd/kbd.c			optional	sc | vt
+#dev/syscons/scgfbrndr.c		optional	sc
+#dev/syscons/scterm-teken.c	optional	sc
+#dev/syscons/scvtb.c		optional	sc
+#dev/uart/uart_cpu_fdt.c		optional	uart fdt
 
-font.h				optional	sc			\
-	compile-with	"uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \
-	no-obj no-implicit-rule before-depend				\
-	clean	"font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8"
-kern/subr_busdma_bufalloc.c	standard
-kern/subr_dummy_vdso_tc.c	standard
+#font.h				optional	sc			\
+
+#kern/subr_busdma_bufalloc.c	standard
+#kern/subr_dummy_vdso_tc.c	standard
 libkern/microblaze/aeabi_unwind.c	standard
 libkern/microblaze/divsi3.S		standard
 libkern/microblaze/ffs.S		standard
@@ -98,3 +98,4 @@
 libkern/ucmpdi2.c		standard
 libkern/udivdi3.c		standard
 libkern/umoddi3.c		standard
+libkern/microblaze/mulsi3.S	standard

Added: soc2014/estaszuk/microblaze-head/head/sys/conf/ldscript.microblaze
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2014/estaszuk/microblaze-head/head/sys/conf/ldscript.microblaze	Thu Jun 26 10:51:34 2014	(r270066)
@@ -0,0 +1,142 @@
+/* $FreeBSD$ */
+
+OUTPUT_FORMAT("elf32-microblaze", "elf32-microblaze", "elf32-microblaze")
+OUTPUT_ARCH(microblaze)
+ENTRY(__start)
+SEARCH_DIR(/usr/lib);
+PROVIDE (__stack = 0);
+SECTIONS
+{
+  /* Read-only sections, merged into text segment: */
+
+  . = kernbase + SIZEOF_HEADERS;
+
+  .text      :
+  {
+    *(.text)
+    *(.stub)
+    /* .gnu.warning sections are handled specially by elf32.em.  */
+    *(.gnu.warning)
+    *(.gnu.linkonce.t*)
+  } =0
+  _etext = .;
+  PROVIDE (etext = .);
+
+  .interp     : { *(.interp) 	}
+  .hash          : { *(.hash)		}
+  .dynsym        : { *(.dynsym)		}
+  .dynstr        : { *(.dynstr)		}
+  .gnu.version   : { *(.gnu.version)	}
+  .gnu.version_d   : { *(.gnu.version_d)	}
+  .gnu.version_r   : { *(.gnu.version_r)	}
+  .rela.text     :
+    { *(.rela.text) *(.rela.gnu.linkonce.t*) }
+  .rela.data     :
+    { *(.rela.data) *(.rela.gnu.linkonce.d*) }
+  .rela.rodata   :
+    { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }
+  .rela.got      : { *(.rela.got)		}
+  .rela.got1     : { *(.rela.got1)		}
+  .rela.got2     : { *(.rela.got2)		}
+  .rela.ctors    : { *(.rela.ctors)	}
+  .rela.dtors    : { *(.rela.dtors)	}
+  .rela.init     : { *(.rela.init)	}
+  .rela.fini     : { *(.rela.fini)	}
+  .rela.bss      : { *(.rela.bss)		}
+  .rela.plt      : { *(.rela.plt)		}
+  .rela.sdata    : { *(.rela.sdata)		}
+  .rela.sbss     : { *(.rela.sbss)		}
+  .rela.sdata2   : { *(.rela.sdata2)		}
+  .rela.sbss2    : { *(.rela.sbss2)		}
+
+  .init      : { *(.init)    } =0
+  .fini      : { *(.fini)    } =0
+  .rodata    : { *(.rodata) *(.gnu.linkonce.r*) }
+  .rodata1   : { *(.rodata1) }
+  .sdata2    : { *(.sdata2)  }
+  .sbss2     : { *(.sbss2)   }
+  /* Adjust the address for the data segment to the next page up. */
+  . = ((. + 0x1000) & ~(0x1000 - 1));
+  .data    :
+  {
+    *(.data)
+    *(.gnu.linkonce.d*)
+    CONSTRUCTORS
+  }
+  .data1   : { *(.data1) }
+  .got1           : { *(.got1) }
+  .dynamic        : { *(.dynamic) }
+  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
+     get relocated with -mrelocatable. Also put in the .fixup pointers.
+     The current compiler no longer needs this, but keep it around for 2.7.2  */
+                PROVIDE (_GOT2_START_ = .);
+  .got2           :  { *(.got2) }
+                PROVIDE (__CTOR_LIST__ = .);
+  .ctors          : { *(.ctors) }
+                PROVIDE (__CTOR_END__ = .);
+                PROVIDE (__DTOR_LIST__ = .);
+  .dtors          : { *(.dtors) }
+                PROVIDE (__DTOR_END__ = .);
+                PROVIDE (_FIXUP_START_ = .);
+  .fixup          : { *(.fixup) }
+                PROVIDE (_FIXUP_END_ = .);
+                PROVIDE (_GOT2_END_ = .);
+                PROVIDE (_GOT_START_ = .);
+  .got            : { *(.got) }
+  .got.plt        : { *(.got.plt) }
+                PROVIDE (_GOT_END_ = .);
+  /* We want the small data sections together, so single-instruction offsets
+     can access them all, and initialized data all before uninitialized, so
+     we can shorten the on-disk segment size.  */
+  .sdata     : { *(.sdata) }
+  _edata  =  .;
+  PROVIDE (edata = .);
+  .sbss      :
+  {
+    PROVIDE (__sbss_start = .);
+    *(.sbss)
+    *(.scommon)
+    *(.dynsbss)
+    PROVIDE (__sbss_end = .);
+  }
+  .plt   : { *(.plt) }
+  .bss       :
+  {
+   PROVIDE (__bss_start = .);
+   *(.dynbss)
+   *(.bss)
+   *(COMMON)
+  }
+  _end = . ;
+  PROVIDE (end = .);
+  /* Stabs debugging sections.  */
+  .stab 0 : { *(.stab) }
+  .stabstr 0 : { *(.stabstr) }
+  /* DWARF debug sections.
+     Symbols in the DWARF debugging sections are relative to the beginning
+     of the section so we begin them at 0.  */
+  /* DWARF 1 */
+  .debug          0 : { *(.debug) }
+  .line           0 : { *(.line) }
+  /* GNU DWARF 1 extensions */
+  .debug_srcinfo  0 : { *(.debug_srcinfo) }
+  .debug_sfnames  0 : { *(.debug_sfnames) }
+  /* DWARF 1.1 and DWARF 2 */
+  .debug_aranges  0 : { *(.debug_aranges) }
+  .debug_pubnames 0 : { *(.debug_pubnames) }
+  /* DWARF 2 */
+  .debug_info     0 : { *(.debug_info) }
+  .debug_abbrev   0 : { *(.debug_abbrev) }
+  .debug_line     0 : { *(.debug_line) }
+  .debug_frame    0 : { *(.debug_frame) }
+  .debug_str      0 : { *(.debug_str) }
+  .debug_loc      0 : { *(.debug_loc) }
+  .debug_macinfo  0 : { *(.debug_macinfo) }
+  /* SGI/MIPS DWARF 2 extensions */
+  .debug_weaknames 0 : { *(.debug_weaknames) }
+  .debug_funcnames 0 : { *(.debug_funcnames) }
+  .debug_typenames 0 : { *(.debug_typenames) }
+  .debug_varnames  0 : { *(.debug_varnames) }
+  /* These must appear regardless of  .  */
+}
+

Modified: soc2014/estaszuk/microblaze-head/head/sys/contrib/altq/altq/if_altq.h
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/contrib/altq/altq/if_altq.h	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/contrib/altq/altq/if_altq.h	Thu Jun 26 10:51:34 2014	(r270066)
@@ -51,9 +51,10 @@
 	int	ifq_len;
 	int	ifq_maxlen;
 	int	ifq_drops;
-#ifdef __FreeBSD__
+// TODO litle dirty comment
+//#ifdef __FreeBSD__
 	struct	mtx ifq_mtx;
-#endif
+//#endif
 
 	/* driver owned queue (used for bulk dequeue and prepend) UNLOCKED */
 	struct	mbuf *ifq_drv_head;

Modified: soc2014/estaszuk/microblaze-head/head/sys/dev/ofw/ofw_bus.h
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/dev/ofw/ofw_bus.h	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/dev/ofw/ofw_bus.h	Thu Jun 26 10:51:34 2014	(r270066)
@@ -33,7 +33,20 @@
 
 #include <dev/ofw/openfirm.h>
 
-#include "ofw_bus_if.h"
+// TODO #include "ofw_bus_if.h" <- this should be generated
+
+// TODO ------v this should be removed
+#ifndef BUS_INFO_STUB
+#define BUS_INFO_STUB
+	struct ofw_bus_devinfo {
+		phandle_t	obd_node;
+		char		*obd_compat;
+		char		*obd_model;
+		char		*obd_name;
+		char		*obd_type;
+		char		*obd_status;
+	};
+#endif
 
 static __inline const char *
 ofw_bus_get_compat(device_t dev)

Modified: soc2014/estaszuk/microblaze-head/head/sys/dev/ofw/ofw_bus_subr.h
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/dev/ofw/ofw_bus_subr.h	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/dev/ofw/ofw_bus_subr.h	Thu Jun 26 10:51:34 2014	(r270066)
@@ -35,7 +35,20 @@
 
 #include <dev/ofw/openfirm.h>
 
-#include "ofw_bus_if.h"
+// TODO #include "ofw_bus_if.h" <- this should be generated
+
+// TODO ------v this should be removed
+#ifndef BUS_INFO_STUB
+#define BUS_INFO_STUB
+	struct ofw_bus_devinfo {
+		phandle_t	obd_node;
+		char		*obd_compat;
+		char		*obd_model;
+		char		*obd_name;
+		char		*obd_type;
+		char		*obd_status;
+	};
+#endif
 
 #define	ORIP_NOINT	-1
 #define	ORIR_NOTFOUND	0xffffffff
@@ -52,15 +65,18 @@
 	uintptr_t	 ocd_data;
 };
 
+
 /* Generic implementation of ofw_bus_if.m methods and helper routines */
 int	ofw_bus_gen_setup_devinfo(struct ofw_bus_devinfo *, phandle_t);
 void	ofw_bus_gen_destroy_devinfo(struct ofw_bus_devinfo *);
 
+/* TODO
 ofw_bus_get_compat_t	ofw_bus_gen_get_compat;
 ofw_bus_get_model_t	ofw_bus_gen_get_model;
 ofw_bus_get_name_t	ofw_bus_gen_get_name;
 ofw_bus_get_node_t	ofw_bus_gen_get_node;
 ofw_bus_get_type_t	ofw_bus_gen_get_type;
+*/
 
 /* Helper method to report interesting OF properties in pnpinfo */
 bus_child_pnpinfo_str_t	ofw_bus_gen_child_pnpinfo_str;

Modified: soc2014/estaszuk/microblaze-head/head/sys/kern/kern_clock.c
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/kern/kern_clock.c	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/kern/kern_clock.c	Thu Jun 26 10:51:34 2014	(r270066)
@@ -652,7 +652,7 @@
 		p->p_flag |= P_PROFIL;
 		mtx_lock(&time_lock);
 		if (++profprocs == 1)
-			cpu_startprofclock();
+// TODO			cpu_startprofclock();
 		mtx_unlock(&time_lock);
 	}
 }
@@ -679,7 +679,7 @@
 		p->p_flag &= ~P_PROFIL;
 		mtx_lock(&time_lock);
 		if (--profprocs == 0)
-			cpu_stopprofclock();
+// TODO			cpu_stopprofclock();
 		mtx_unlock(&time_lock);
 	}
 }

Modified: soc2014/estaszuk/microblaze-head/head/sys/kern/kern_et.c
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/kern/kern_et.c	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/kern/kern_et.c	Thu Jun 26 10:51:34 2014	(r270066)
@@ -124,7 +124,7 @@
 {
 
 #ifndef NO_EVENTTIMERS
-	cpu_et_frequency(et, newfreq);
+// TODO	cpu_et_frequency(et, newfreq);
 #endif
 }
 

Modified: soc2014/estaszuk/microblaze-head/head/sys/kern/kern_shutdown.c
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/kern/kern_shutdown.c	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/kern/kern_shutdown.c	Thu Jun 26 10:51:34 2014	(r270066)
@@ -539,7 +539,7 @@
 #endif
 
 	/* cpu_boot(howto); */ /* doesn't do anything at the moment */
-	cpu_reset();
+// TODO	cpu_reset();
 	/* NOTREACHED */ /* assuming reset worked */
 }
 

Modified: soc2014/estaszuk/microblaze-head/head/sys/kern/kern_tc.c
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/kern/kern_tc.c	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/kern/kern_tc.c	Thu Jun 26 10:51:34 2014	(r270066)
@@ -1331,10 +1331,10 @@
 	/* Now is a good time to change timecounters. */
 	if (th->th_counter != timecounter) {
 #ifndef __arm__
-		if ((timecounter->tc_flags & TC_FLAGS_C3STOP) != 0)
-			cpu_disable_deep_sleep++;
-		if ((th->th_counter->tc_flags & TC_FLAGS_C3STOP) != 0)
-			cpu_disable_deep_sleep--;
+// TODO	microblaze to def?	if ((timecounter->tc_flags & TC_FLAGS_C3STOP) != 0)
+// TODO			cpu_disable_deep_sleep++;
+// TODO		if ((th->th_counter->tc_flags & TC_FLAGS_C3STOP) != 0)
+// TODO			cpu_disable_deep_sleep--;
 #endif
 		th->th_counter = timecounter;
 		th->th_offset_count = ncount;
@@ -2000,7 +2000,7 @@
 	vdso_th->th_counter_mask = th->th_counter->tc_counter_mask;
 	vdso_th->th_offset = th->th_offset;
 	vdso_th->th_boottime = boottimebin;
-	enabled = cpu_fill_vdso_timehands(vdso_th);
+// TODO	enabled = cpu_fill_vdso_timehands(vdso_th);
 	if (!vdso_th_enable)
 		enabled = 0;
 	return (enabled);

Modified: soc2014/estaszuk/microblaze-head/head/sys/kern/kern_timeout.c
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/kern/kern_timeout.c	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/kern/kern_timeout.c	Thu Jun 26 10:51:34 2014	(r270066)
@@ -533,7 +533,7 @@
 	} while (((int)(firstb - lastb)) <= 0);
 	cc->cc_firstevent = last;
 #ifndef NO_EVENTTIMERS
-	cpu_new_callout(curcpu, last, first);
+// TODO	cpu_new_callout(curcpu, last, first);
 #endif
 #ifdef CALLOUT_PROFILING
 	avg_depth_dir += (depth_dir * 1000 - avg_depth_dir) >> 8;
@@ -608,7 +608,7 @@
 	sbt = c->c_time + c->c_precision;
 	if (sbt < cc->cc_firstevent) {
 		cc->cc_firstevent = sbt;
-		cpu_new_callout(cpu, sbt, c->c_time);
+// TODO		cpu_new_callout(cpu, sbt, c->c_time);
 	}
 #endif
 }
@@ -965,10 +965,10 @@
 			 * active ones.
 			 */
 #ifdef __LP64__
-			to_sbt = DPCPU_GET(hardclocktime);
+// TODO			to_sbt = DPCPU_GET(hardclocktime);
 #else
 			spinlock_enter();
-			to_sbt = DPCPU_GET(hardclocktime);
+// TODO			to_sbt = DPCPU_GET(hardclocktime);
 			spinlock_exit();
 #endif
 #endif

Modified: soc2014/estaszuk/microblaze-head/head/sys/kern/link_elf.c
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/kern/link_elf.c	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/kern/link_elf.c	Thu Jun 26 10:51:34 2014	(r270066)
@@ -397,7 +397,7 @@
 #ifdef SPARSE_MAPPING
 	ef->object = 0;
 #endif
-	ef->dynamic = dp;
+// TODO - propably ifdef or sth	ef->dynamic = dp;
 
 	if (dp != NULL)
 		parse_dynamic(ef);

Modified: soc2014/estaszuk/microblaze-head/head/sys/kern/subr_bus_dma.c
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/kern/subr_bus_dma.c	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/kern/subr_bus_dma.c	Thu Jun 26 10:51:34 2014	(r270066)
@@ -65,9 +65,9 @@
 
 	error = 0;
 	for (; sglist_cnt > 0; sglist_cnt--, list++) {
-		error = _bus_dmamap_load_buffer(dmat, map,
-		    (void *)(uintptr_t)list->ds_addr, list->ds_len, pmap,
-		    flags, NULL, nsegs);
+// TODO		error = _bus_dmamap_load_buffer(dmat, map,
+// TODO		    (void *)(uintptr_t)list->ds_addr, list->ds_len, pmap,
+// TODO		    flags, NULL, nsegs);
 		if (error)
 			break;
 	}
@@ -85,9 +85,9 @@
 
 	error = 0;
 	for (; sglist_cnt > 0; sglist_cnt--, list++) {
-		error = _bus_dmamap_load_phys(dmat, map,
-		    (vm_paddr_t)list->ds_addr, list->ds_len, flags, NULL,
-		    nsegs);
+// TODO		error = _bus_dmamap_load_phys(dmat, map,
+// TODO		    (vm_paddr_t)list->ds_addr, list->ds_len, flags, NULL,
+// TODO		    nsegs);
 		if (error)
 			break;
 	}
@@ -107,9 +107,9 @@
 	error = 0;
 	for (m = m0; m != NULL && error == 0; m = m->m_next) {
 		if (m->m_len > 0) {
-			error = _bus_dmamap_load_buffer(dmat, map, m->m_data,
-			    m->m_len, kernel_pmap, flags | BUS_DMA_LOAD_MBUF,
-			    segs, nsegs);
+// TODO			error = _bus_dmamap_load_buffer(dmat, map, m->m_data,
+// TODO			    m->m_len, kernel_pmap, flags | BUS_DMA_LOAD_MBUF,
+// TODO			    segs, nsegs);
 		}
 	}
 	CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
@@ -149,8 +149,8 @@
 	for (i = 0; tlen > 0; i++, tlen -= len) {
 		len = min(PAGE_SIZE - ma_offs, tlen);
 		paddr = VM_PAGE_TO_PHYS(ma[i]) + ma_offs;
-		error = _bus_dmamap_load_phys(dmat, map, paddr, len,
-		    flags, segs, segp);
+// TODO		error = _bus_dmamap_load_phys(dmat, map, paddr, len,
+// TODO		    flags, segs, segp);
 		if (error != 0)
 			break;
 		ma_offs = 0;
@@ -208,13 +208,13 @@
 
 	switch ((ccb_h->flags & CAM_DATA_MASK)) {
 	case CAM_DATA_VADDR:
-		error = _bus_dmamap_load_buffer(dmat, map, data_ptr, dxfer_len,
-		    kernel_pmap, flags, NULL, nsegs);
+// TODO		error = _bus_dmamap_load_buffer(dmat, map, data_ptr, dxfer_len,
+// TODO		    kernel_pmap, flags, NULL, nsegs);
 		break;
 	case CAM_DATA_PADDR:
-		error = _bus_dmamap_load_phys(dmat, map,
-		    (vm_paddr_t)(uintptr_t)data_ptr, dxfer_len, flags, NULL,
-		    nsegs);
+// TODO		error = _bus_dmamap_load_phys(dmat, map,
+// TODO		    (vm_paddr_t)(uintptr_t)data_ptr, dxfer_len, flags, NULL,
+// TODO		    nsegs);
 		break;
 	case CAM_DATA_SG:
 		error = _bus_dmamap_load_vlist(dmat, map,
@@ -269,8 +269,8 @@
 		addr = (caddr_t) iov[i].iov_base;
 		minlen = resid < iov[i].iov_len ? resid : iov[i].iov_len;
 		if (minlen > 0) {
-			error = _bus_dmamap_load_buffer(dmat, map, addr,
-			    minlen, pmap, flags, NULL, nsegs);
+// TODO			error = _bus_dmamap_load_buffer(dmat, map, addr,
+// TODO		    minlen, pmap, flags, NULL, nsegs);
 			resid -= minlen;
 		}
 	}
@@ -293,12 +293,12 @@
 
 	if ((flags & BUS_DMA_NOWAIT) == 0) {
 		mem = memdesc_vaddr(buf, buflen);
-		_bus_dmamap_waitok(dmat, map, &mem, callback, callback_arg);
+// TODO		_bus_dmamap_waitok(dmat, map, &mem, callback, callback_arg);
 	}
 
 	nsegs = -1;
-	error = _bus_dmamap_load_buffer(dmat, map, buf, buflen, kernel_pmap,
-	    flags, NULL, &nsegs);
+// TODO	error = _bus_dmamap_load_buffer(dmat, map, buf, buflen, kernel_pmap,
+// TODO	    flags, NULL, &nsegs);
 	nsegs++;
 
 	CTR5(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d nsegs %d",
@@ -307,7 +307,7 @@
 	if (error == EINPROGRESS)
 		return (error);
 
-	segs = _bus_dmamap_complete(dmat, map, NULL, nsegs, error);
+// TODO	segs = _bus_dmamap_complete(dmat, map, NULL, nsegs, error);
 	if (error)
 		(*callback)(callback_arg, segs, 0, error);
 	else
@@ -337,7 +337,7 @@
 	error = _bus_dmamap_load_mbuf_sg(dmat, map, m0, NULL, &nsegs, flags);
 	++nsegs;
 
-	segs = _bus_dmamap_complete(dmat, map, NULL, nsegs, error);
+// TODO	segs = _bus_dmamap_complete(dmat, map, NULL, nsegs, error);
 	if (error)
 		(*callback)(callback_arg, segs, 0, 0, error);
 	else
@@ -358,7 +358,7 @@
 	*nsegs = -1;
 	error = _bus_dmamap_load_mbuf_sg(dmat, map, m0, segs, nsegs, flags);
 	++*nsegs;
-	_bus_dmamap_complete(dmat, map, segs, *nsegs, error);
+// TODO	_bus_dmamap_complete(dmat, map, segs, *nsegs, error);
 	return (error);
 }
 
@@ -374,7 +374,7 @@
 	error = _bus_dmamap_load_uio(dmat, map, uio, &nsegs, flags);
 	nsegs++;
 
-	segs = _bus_dmamap_complete(dmat, map, NULL, nsegs, error);
+// TODO	segs = _bus_dmamap_complete(dmat, map, NULL, nsegs, error);
 	if (error)
 		(*callback)(callback_arg, segs, 0, 0, error);
 	else
@@ -390,6 +390,7 @@
 		    bus_dmamap_callback_t *callback, void *callback_arg,
 		    int flags)
 {
+/* TODO
 	bus_dma_segment_t *segs;
 	struct ccb_hdr *ccb_h;
 	struct memdesc mem;
@@ -423,11 +424,13 @@
 	/*
 	 * Return ENOMEM to the caller so that it can pass it up the stack.
 	 * This error only happens when NOWAIT is set, so deferral is disabled.
-	 */
+	 * /
 	if (error == ENOMEM)
 		return (error);
 
 	return (0);
+*/
+	return('NULL');
 }
 
 int
@@ -435,6 +438,7 @@
 		    bus_dmamap_callback_t *callback, void *callback_arg,
 		    int flags)
 {
+/* TODO
 	bus_dma_segment_t *segs;
 	struct memdesc mem;
 	int error;
@@ -462,11 +466,13 @@
 	/*
 	 * Return ENOMEM to the caller so that it can pass it up the stack.
 	 * This error only happens when NOWAIT is set, so deferral is disabled.
-	 */
+	 * /
 	if (error == ENOMEM)
 		return (error);
 
 	return (0);
+*/
+	return('NULL');
 }
 
 int
@@ -474,6 +480,7 @@
     struct memdesc *mem, bus_dmamap_callback_t *callback,
     void *callback_arg, int flags)
 {
+/* TODO
 	bus_dma_segment_t *segs;
 	int error;
 	int nsegs;
@@ -525,7 +532,7 @@
 	if (error == EINPROGRESS)
 		return (error);
 
-	segs = _bus_dmamap_complete(dmat, map, NULL, nsegs, error);
+// TODO	segs = _bus_dmamap_complete(dmat, map, NULL, nsegs, error);
 	if (error)
 		(*callback)(callback_arg, segs, 0, error);
 	else
@@ -534,9 +541,10 @@
 	/*
 	 * Return ENOMEM to the caller so that it can pass it up the stack.
 	 * This error only happens when NOWAIT is set, so deferral is disabled.
-	 */
+	 * /
 	if (error == ENOMEM)
 		return (error);
-
-	return (0);
+*/
+	return ('NULL');
+// TODO	return (0);
 }

Modified: soc2014/estaszuk/microblaze-head/head/sys/libkern/microblaze/divsi3.S
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/libkern/microblaze/divsi3.S	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/libkern/microblaze/divsi3.S	Thu Jun 26 10:51:34 2014	(r270066)
@@ -23,32 +23,36 @@
  */
 
 ENTRY_NP(__umodsi3)
+/* TODO
 	stmfd	sp!, {lr}
-	sub	sp, sp, #4	/* align stack */
+	sub	sp, sp, #4	/* align stack * /
 	bl	.L_udivide
-	add	sp, sp, #4	/* unalign stack */
+	add	sp, sp, #4	/* unalign stack * /
 	mov	r0, r1
 	ldmfd	sp!, {pc}
+*/
 END(__umodsi3)
 
 ENTRY_NP(__modsi3)
+/* TODO
 	stmfd	sp!, {lr}
-	sub	sp, sp, #4	/* align stack */
+	sub	sp, sp, #4	/* align stack * /
 	bl	.L_divide
-	add	sp, sp, #4	/* unalign stack */
+	add	sp, sp, #4	/* unalign stack * /
 	mov	r0, r1
 	ldmfd	sp!, {pc}
 
 .L_overflow:
 #if !defined(_KERNEL) && !defined(_STANDALONE)
-	mov	r0, #8			/* SIGFPE */
-	bl	PIC_SYM(_C_LABEL(raise), PLT)	/* raise it */
+	mov	r0, #8			/* SIGFPE * /
+	bl	PIC_SYM(_C_LABEL(raise), PLT)	/* raise it * /
 	mov	r0, #0
 #else
-	/* XXX should cause a fatal error */
+	/* XXX should cause a fatal error * /
 	mvn	r0, #0
 #endif
 	RET
+*/
 END(__modsi3)
 
 #ifdef __ARM_EABI__
@@ -57,25 +61,28 @@
 #endif
 ENTRY_NP(__udivsi3)
 .L_udivide:				/* r0 = r0 / r1; r1 = r0 % r1 */
+/* TODO
+
 	eor     r0, r1, r0 
 	eor     r1, r0, r1 
 	eor     r0, r1, r0 
-					/* r0 = r1 / r0; r1 = r1 % r0 */
+					/* r0 = r1 / r0; r1 = r1 % r0 * /
 	cmp	r0, #1
 	bcc	.L_overflow
 	beq	.L_divide_l0
 	mov	ip, #0
 	movs	r1, r1
 	bpl	.L_divide_l1
-	orr	ip, ip, #0x20000000	/* ip bit 0x20000000 = -ve r1 */
+	orr	ip, ip, #0x20000000	/* ip bit 0x20000000 = -ve r1 * /
 	movs	r1, r1, lsr #1
-	orrcs	ip, ip, #0x10000000	/* ip bit 0x10000000 = bit 0 of r1 */
+	orrcs	ip, ip, #0x10000000	/* ip bit 0x10000000 = bit 0 of r1 * /
 	b	.L_divide_l1
 
-.L_divide_l0:				/* r0 == 1 */
+.L_divide_l0:				/* r0 == 1 * /
 	mov	r0, r1
 	mov	r1, #0
 	RET
+*/
 #ifdef __ARM_EABI__
 END(__aeabi_uidiv)
 END(__aeabi_uidivmod)
@@ -87,11 +94,13 @@
 ENTRY_NP(__aeabi_idivmod)
 #endif
 ENTRY_NP(__divsi3)
-.L_divide:				/* r0 = r0 / r1; r1 = r0 % r1 */
+/* TODO
+
+.L_divide:				/* r0 = r0 / r1; r1 = r0 % r1 * /
 	eor     r0, r1, r0 
 	eor     r1, r0, r1 
 	eor     r0, r1, r0 
-					/* r0 = r1 / r0; r1 = r1 % r0 */
+					/* r0 = r1 / r0; r1 = r1 % r0 * /
 	cmp	r0, #1
 	bcc	.L_overflow
 	beq	.L_divide_l0
@@ -100,8 +109,8 @@
 	ands	r2, r1, #0x80000000
 	eor	ip, ip, r2
 	rsbmi	r1, r1, #0
-	orr	ip, r2, ip, lsr #1	/* ip bit 0x40000000 = -ve division */
-					/* ip bit 0x80000000 = -ve remainder */
+	orr	ip, r2, ip, lsr #1	/* ip bit 0x40000000 = -ve division * /
+					/* ip bit 0x80000000 = -ve remainder * /
 
 .L_divide_l1:
 	mov	r2, #1
@@ -110,15 +119,15 @@
 	/*
 	 * If the highest bit of the dividend is set, we have to be
 	 * careful when shifting the divisor. Test this. 
-	 */
+	 * /
 	movs	r1,r1
 	bpl	.L_old_code
 
 	/*
 	 * At this point, the highest bit of r1 is known to be set.
 	 * We abuse this below in the tst instructions.
-	 */
-	tst	r1, r0 /*, lsl #0 */
+	 * /
+	tst	r1, r0 /*, lsl #0 * /
 	bmi	.L_divide_b1
 	tst	r1, r0, lsl #1
 	bmi	.L_divide_b2
@@ -184,7 +193,7 @@
  * instead of:
  *	tst	r1, r0, lsl #31
  *	bmi	.L_divide_b32
- */
+ * /
 	b	.L_divide_b32
 
 .L_old_code:
@@ -386,7 +395,7 @@
 	cmp	ip, #0
 	rsbmi	r1, r1, #0
 	movs	ip, ip, lsl #1
-	bicmi	r0, r0, #0x80000000	/* Fix incase we divided 0x80000000 */
+	bicmi	r0, r0, #0x80000000	/* Fix incase we divided 0x80000000 * /
 	rsbmi	r0, r0, #0
 	RET
 
@@ -400,6 +409,7 @@
 	addhs	r3, r3, r2
 	mov	r0, r3
 	RET
+*/
 #ifdef __ARM_EABI__
 END(__aeabi_idiv)
 END(__aeabi_idivmod)

Modified: soc2014/estaszuk/microblaze-head/head/sys/libkern/microblaze/ffs.S
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/libkern/microblaze/ffs.S	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/libkern/microblaze/ffs.S	Thu Jun 26 10:51:34 2014	(r270066)
@@ -46,8 +46,9 @@
  */
 
 ENTRY(ffs)
+/* TODO
 
-	/* Standard trick to isolate bottom bit in r0 or 0 if r0 = 0 on entry */
+	/* Standard trick to isolate bottom bit in r0 or 0 if r0 = 0 on entry * /
  	rsb     r1, r0, #0
  	ands    r0, r0, r1
 #ifndef _ARM_ARCH_5
@@ -55,32 +56,33 @@
 	/*
 	 * now r0 has at most one set bit, call this X
 	 * if X = 0, all further instructions are skipped
-	 */
+	 * /
 	adrne   r2, .L_ffs_table
-	orrne   r0, r0, r0, lsl #4  /* r0 = X * 0x11 */ 
-	orrne   r0, r0, r0, lsl #6  /* r0 = X * 0x451 */
-	rsbne   r0, r0, r0, lsl #16 /* r0 = X * 0x0450fbaf */
+	orrne   r0, r0, r0, lsl #4  /* r0 = X * 0x11 * / 
+	orrne   r0, r0, r0, lsl #6  /* r0 = X * 0x451 * /
+	rsbne   r0, r0, r0, lsl #16 /* r0 = X * 0x0450fbaf * /
               
-	/* now lookup in table indexed on top 6 bits of r0 */
+	/* now lookup in table indexed on top 6 bits of r0 * /
 	ldrneb  r0, [ r2, r0, lsr #26 ]
 
 	RET
 .text;
 .type .L_ffs_table, _ASM_TYPE_OBJECT;
 .L_ffs_table:
-/*               0   1   2   3   4   5   6   7           */
-	.byte	 0,  1,  2, 13,  3,  7,  0, 14  /*  0- 7 */
-	.byte	 4,  0,  8,  0,  0,  0,  0, 15  /*  8-15 */
-	.byte	11,  5,  0,  0,  9,  0,  0, 26  /* 16-23 */
-	.byte	 0,  0,  0,  0,  0, 22, 28, 16  /* 24-31 */
-	.byte	32, 12,  6,  0,  0,  0,  0,  0	/* 32-39 */
-	.byte	10,  0,  0, 25,  0,  0, 21, 27  /* 40-47 */
-	.byte	31,  0,  0,  0,  0, 24,  0, 20  /* 48-55 */
-	.byte   30,  0, 23, 19, 29, 18, 17,  0  /* 56-63 */
+/*               0   1   2   3   4   5   6   7           * /
+	.byte	 0,  1,  2, 13,  3,  7,  0, 14  /*  0- 7 * /
+	.byte	 4,  0,  8,  0,  0,  0,  0, 15  /*  8-15 * /
+	.byte	11,  5,  0,  0,  9,  0,  0, 26  /* 16-23 * /
+	.byte	 0,  0,  0,  0,  0, 22, 28, 16  /* 24-31 * /
+	.byte	32, 12,  6,  0,  0,  0,  0,  0	/* 32-39 * /
+	.byte	10,  0,  0, 25,  0,  0, 21, 27  /* 40-47 * /
+	.byte	31,  0,  0,  0,  0, 24,  0, 20  /* 48-55 * /
+	.byte   30,  0, 23, 19, 29, 18, 17,  0  /* 56-63 * /
 #else
 	clzne	r0, r0
 	rsbne	r0, r0, #32
 	RET
 #endif
+*/
 END(ffs)
 

Added: soc2014/estaszuk/microblaze-head/head/sys/libkern/microblaze/mulsi3.S
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2014/estaszuk/microblaze-head/head/sys/libkern/microblaze/mulsi3.S	Thu Jun 26 10:51:34 2014	(r270066)
@@ -0,0 +1,69 @@
+###################################-*-asm*- 
+# 
+#  Copyright (C) 2009-2014 Free Software Foundation, Inc.
+#
+#  Contributed by Michael Eager <eager at eagercon.com>.
+#
+#  This file is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU General Public License as published by the
+#  Free Software Foundation; either version 3, or (at your option) any
+#  later version.
+#
+#  GCC is distributed in the hope that it will be useful, but WITHOUT
+#  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+#  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+#  License for more details.
+#
+#  Under Section 7 of GPL version 3, you are granted additional
+#  permissions described in the GCC Runtime Library Exception, version
+#  3.1, as published by the Free Software Foundation.
+#
+#  You should have received a copy of the GNU General Public License and
+#  a copy of the GCC Runtime Library Exception along with this program;
+#  see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+#  <http://www.gnu.org/licenses/>. 
+# 
+#  mulsi3.S
+# 
+#  Multiply operation for 32 bit integers.
+#	Input :	Operand1 in Reg r5
+#		Operand2 in Reg r6
+#	Output: Result [op1 * op2] in Reg r3
+# 
+#######################################
+
+	.globl	__mulsi3
+	.ent	__mulsi3
+	.type	__mulsi3, at function
+__mulsi3:
+	.frame	r1,0,r15
+	add	r3,r0,r0
+	BEQI	r5,$L_Result_Is_Zero      # Multiply by Zero
+	BEQI	r6,$L_Result_Is_Zero      # Multiply by Zero
+	BGEId	r5,$L_R5_Pos 
+	XOR	r4,r5,r6                  # Get the sign of the result
+	RSUBI	r5,r5,0	                  # Make r5 positive
+$L_R5_Pos:
+	BGEI	r6,$L_R6_Pos
+	RSUBI	r6,r6,0	                  # Make r6 positive
+$L_R6_Pos:	
+	bri	$L1
+$L2:	
+	add	r5,r5,r5
+$L1:	
+	srl	r6,r6
+	addc	r7,r0,r0
+	beqi	r7,$L2
+	bneid	r6,$L2
+	add	r3,r3,r5	
+	blti	r4,$L_NegateResult			
+	rtsd	r15,8
+	nop
+$L_NegateResult:
+	rtsd	r15,8
+	rsub	r3,r3,r0
+$L_Result_Is_Zero:
+	rtsd	r15,8
+	addi	r3,r0,0
+	.end __mulsi3
+	.size	__mulsi3, . - __mulsi3

Modified: soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/asm.h
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/asm.h	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/asm.h	Thu Jun 26 10:51:34 2014	(r270066)
@@ -72,8 +72,16 @@
 #define _ASM_TYPE_FUNCTION	#function
 #define _ASM_TYPE_OBJECT	#object
 #define GLOBAL(X) .globl x
+// TODO was (.type removed), inspect microblaze asm: 
+/*
 #define _ENTRY(x) \
 	.text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x: _FNSTART
+*/
+#define _ENTRY(x) \
+	.text; 		\
+	_ALIGN_TEXT; 	\
+	.globl x; 	\
+	x: _FNSTART
 
 #define	_END(x)	.size x, . - x; _FNEND
 

Modified: soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/cpu.h
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/cpu.h	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/cpu.h	Thu Jun 26 10:51:34 2014	(r270066)
@@ -7,6 +7,9 @@
 #include <machine/armreg.h>
 #include <machine/frame.h>
 
+// TODO
+#define	DELAY(x)	
+
 void	cpu_halt(void);
 void	swi_vm(void *);
 

Modified: soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/cpufunc.h
==============================================================================
--- soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/cpufunc.h	Thu Jun 26 09:42:00 2014	(r270065)
+++ soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/cpufunc.h	Thu Jun 26 10:51:34 2014	(r270066)
@@ -594,16 +594,28 @@
 #define	ARM_CPSR_I32	(1 << 7)	/* IRQ disable */
 
 #define disable_interrupts(mask)					\
+	0x424c4144;							\
+	__asm(".word      0x424c4144")					
+
+/* TODO disable
 	(__set_cpsr_c((mask) & (ARM_CPSR_I32 | ARM_CPSR_F32),		\
 		      (mask) & (ARM_CPSR_I32 | ARM_CPSR_F32)))
+*/
 
 #define enable_interrupts(mask)						\
-	(__set_cpsr_c((mask) & (ARM_CPSR_I32 | ARM_CPSR_F32), 0))
+	__asm(".word      0x424c4144")
+
+/* TODO disable
+(__set_cpsr_c((mask) & (ARM_CPSR_I32 | ARM_CPSR_F32), 0))
+*/
 
 #define restore_interrupts(old_cpsr)					\
-	(__set_cpsr_c((ARM_CPSR_I32 | ARM_CPSR_F32),			\
-		      (old_cpsr) & (ARM_CPSR_I32 | ARM_CPSR_F32)))
+	__asm(".word      0x424c4144")
 
+/* TODO disable
+(__set_cpsr_c((ARM_CPSR_I32 | ARM_CPSR_F32),			\
+		      (old_cpsr) & (ARM_CPSR_I32 | ARM_CPSR_F32)))
+*/
 static __inline register_t
 intr_disable(void)
 {

Added: soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/ofw_machdep.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2014/estaszuk/microblaze-head/head/sys/microblaze/include/ofw_machdep.h	Thu Jun 26 10:51:34 2014	(r270066)
@@ -0,0 +1,44 @@
+/*-
+ * Copyright (c) 2009 The FreeBSD Foundation
+ * All rights reserved.

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-soc-all mailing list