From e2d03a377751a9fc12e5f2dba597baa44982a893 Mon Sep 17 00:00:00 2001 From: Alexander Tarasikov Date: Wed, 23 Jan 2013 20:05:05 +0400 Subject: [PATCH] Update l4android to kernel 3.5, sync with l4linux --- ports-foc/Makefile | 6 +- ports-foc/config/android_config.arm | 308 ++++--- ports-foc/patches/android_binder.patch | 110 +++ ports-foc/patches/l4android_genode.patch | 1043 ---------------------- 4 files changed, 311 insertions(+), 1156 deletions(-) create mode 100644 ports-foc/patches/android_binder.patch delete mode 100644 ports-foc/patches/l4android_genode.patch diff --git a/ports-foc/Makefile b/ports-foc/Makefile index a6b866611..445bb5d9a 100644 --- a/ports-foc/Makefile +++ b/ports-foc/Makefile @@ -12,8 +12,8 @@ PATCH-l4linux = $(addprefix patches/,l4lx_genode.patch icmp_align.patch tcp_me REV-l4linux = 25 REPO-l4linux = http://svn.tudos.org/repos/oc/l4linux/trunk -PATCH-l4android = patches/l4android_genode.patch -REV-l4android = 90ca43bd629452ffd38d85fe8c976f069b5bb3d9 +PATCH-l4android = $(addprefix patches/,l4lx_genode.patch icmp_align.patch tcp_mem.patch android_binder.patch) +REV-l4android = bf83cc85e672bfafddc0fb85398129e427d6780f REPO-l4android = git://git.l4android.org/kernel.git UPDATE_PATCH = $(word 1, $(PATCH-$(TARGET))) @@ -29,7 +29,7 @@ ifeq ($(TARGET), l4android) $(call check_tool,git) DIFF = git diff UPDATE = cd $(REAL_CONTRIB_DIR)/l4android; git fetch; git reset --hard $(REV-l4android) -PATCH = patch -p1 +PATCH = patch -p0 else $(call check_tool,svn) FILTER_DIR = net diff --git a/ports-foc/config/android_config.arm b/ports-foc/config/android_config.arm index b3ef10324..1658f390b 100644 --- a/ports-foc/config/android_config.arm +++ b/ports-foc/config/android_config.arm @@ -1,6 +1,6 @@ # -# Automatically generated make config: don't edit -# Linux/l4 3.0.0-l4 Kernel Configuration +# Automatically generated file; DO NOT EDIT. +# Linux/l4 3.5.0-l4 Kernel Configuration # # @@ -8,17 +8,18 @@ # CONFIG_L4=y CONFIG_L4_LINUX=y -CONFIG_L4_OBJ_TREE="" +CONFIG_L4_OBJ_TREE="/mnt/disk1/workspace/work/genode/builds/tuna-git/l4" # CONFIG_L4_ARCH_X86 is not set CONFIG_L4_ARCH_ARM=y CONFIG_L4_VMLINUZ_SUFFIX=".android" CONFIG_HZ=100 CONFIG_PHYSICAL_START=0x0 +CONFIG_L4_PLATFORM_GENERIC=y +# CONFIG_L4_PLATFORM_REALVIEW is not set # # Features # -# CONFIG_L4_ARM_UPAGE_TLS is not set # CONFIG_L4_SERVER is not set # @@ -34,13 +35,15 @@ CONFIG_PHYSICAL_START=0x0 # CONFIG_L4_NET_L4SHM is not set # CONFIG_L4_SERIAL is not set # CONFIG_L4_SERIAL_SHM is not set +CONFIG_SCREEN_GENODE=y +CONFIG_SERIAL_GENODE=y # # Debugging options # CONFIG_L4_DEBUG=y CONFIG_L4_DEBUG_REGISTER_NAMES=y -CONFIG_L4_DEBUG_SEGFAULTS=y +# CONFIG_L4_DEBUG_SEGFAULTS is not set # CONFIG_L4_DEBUG_STATS is not set # @@ -49,6 +52,7 @@ CONFIG_L4_DEBUG_SEGFAULTS=y CONFIG_L4_MEMSIZE=32 CONFIG_L4_TAMED=y CONFIG_L4_VCPU=y +# CONFIG_L4_DMAPOOL is not set # # Priority configuration @@ -62,32 +66,26 @@ CONFIG_L4_PRIO_L4FB_REFRESH=7 CONFIG_L4_PRIO_L4ANKH=7 CONFIG_L4_CONFIG_CHECKS=y # CONFIG_L4_SAMPLE_MODULE is not set -CONFIG_SCREEN_GENODE=y -CONFIG_SERIAL_GENODE=y +CONFIG_L4_CLK_NOOP=y # # # CONFIG_ARM=y +CONFIG_MIGHT_HAVE_PCI=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y -# CONFIG_ARCH_USES_GETTIMEOFFSET is not set -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_KTIME_SCALAR=y CONFIG_HAVE_PROC_CPU=y CONFIG_STACKTRACE_SUPPORT=y -CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_TRACE_IRQFLAGS_SUPPORT=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_GENERIC_IRQ_PROBE=y CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_ZONE_DMA=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_VECTORS_BASE=0xbffff000 # CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_NEED_MACH_MEMORY_H=y +CONFIG_GENERIC_BUG=y CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" CONFIG_HAVE_IRQ_WORK=y @@ -95,16 +93,17 @@ CONFIG_HAVE_IRQ_WORK=y # General setup # CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE="" CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y CONFIG_HAVE_KERNEL_GZIP=y CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_XZ=y CONFIG_HAVE_KERNEL_LZO=y CONFIG_KERNEL_GZIP=y # CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_XZ is not set # CONFIG_KERNEL_LZO is not set CONFIG_DEFAULT_HOSTNAME="(none)" CONFIG_SWAP=y @@ -122,20 +121,34 @@ CONFIG_HAVE_GENERIC_HARDIRQS=y # IRQ subsystem # CONFIG_GENERIC_HARDIRQS=y -CONFIG_HAVE_SPARSE_IRQ=y +CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_IRQ_SHOW=y -# CONFIG_SPARSE_IRQ is not set +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# Timers subsystem +# +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set # # RCU Subsystem # -CONFIG_TINY_RCU=y +CONFIG_TREE_RCU=y +# CONFIG_TREE_PREEMPT_RCU is not set # CONFIG_PREEMPT_RCU is not set -# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 +# CONFIG_RCU_FANOUT_EXACT is not set # CONFIG_TREE_RCU_TRACE is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=15 # CONFIG_CGROUPS is not set +# CONFIG_CHECKPOINT_RESTORE is not set # CONFIG_NAMESPACES is not set # CONFIG_SCHED_AUTOGROUP is not set CONFIG_SYSFS_DEPRECATED=y @@ -151,7 +164,6 @@ CONFIG_RD_GZIP=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SYSCTL=y CONFIG_ANON_INODES=y -CONFIG_PANIC_TIMEOUT=0 CONFIG_EXPERT=y CONFIG_UID16=y CONFIG_SYSCTL_SYSCALL=y @@ -168,7 +180,6 @@ CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_ASHMEM=y CONFIG_AIO=y CONFIG_EMBEDDED=y CONFIG_HAVE_PERF_EVENTS=y @@ -178,7 +189,6 @@ CONFIG_PERF_USE_VMALLOC=y # Kernel Performance Events And Counters # # CONFIG_PERF_EVENTS is not set -# CONFIG_PERF_COUNTERS is not set CONFIG_VM_EVENT_COUNTERS=y CONFIG_COMPAT_BRK=y CONFIG_SLAB=y @@ -187,11 +197,18 @@ CONFIG_SLAB=y # CONFIG_PROFILING is not set CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set +# CONFIG_JUMP_LABEL is not set CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_CLK=y CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y # # GCOV-based kernel profiling @@ -206,11 +223,19 @@ CONFIG_MODULES=y # CONFIG_MODULE_UNLOAD is not set # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_STOP_MACHINE=y CONFIG_BLOCK=y CONFIG_LBDAF=y # CONFIG_BLK_DEV_BSG is not set +# CONFIG_BLK_DEV_BSGLIB is not set # CONFIG_BLK_DEV_INTEGRITY is not set +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + # # IO Schedulers # @@ -227,7 +252,6 @@ CONFIG_DEFAULT_IOSCHED="cfq" # CONFIG_INLINE_SPIN_LOCK_BH is not set # CONFIG_INLINE_SPIN_LOCK_IRQ is not set # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set -CONFIG_INLINE_SPIN_UNLOCK=y # CONFIG_INLINE_SPIN_UNLOCK_BH is not set CONFIG_INLINE_SPIN_UNLOCK_IRQ=y # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set @@ -263,9 +287,11 @@ CONFIG_MMU=y # CONFIG_ARCH_AT91 is not set CONFIG_ARCH_L4=y # CONFIG_ARCH_BCMRING is not set +# CONFIG_ARCH_HIGHBANK is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CNS3XXX is not set # CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_PRIMA2 is not set # CONFIG_ARCH_EBSA110 is not set # CONFIG_ARCH_EP93XX is not set # CONFIG_ARCH_FOOTBRIDGE is not set @@ -276,34 +302,30 @@ CONFIG_ARCH_L4=y # CONFIG_ARCH_IOP13XX is not set # CONFIG_ARCH_IOP32X is not set # CONFIG_ARCH_IOP33X is not set -# CONFIG_ARCH_IXP23XX is not set -# CONFIG_ARCH_IXP2000 is not set # CONFIG_ARCH_IXP4XX is not set # CONFIG_ARCH_DOVE is not set # CONFIG_ARCH_KIRKWOOD is not set -# CONFIG_ARCH_LOKI is not set # CONFIG_ARCH_LPC32XX is not set # CONFIG_ARCH_MV78XX0 is not set # CONFIG_ARCH_ORION5X is not set # CONFIG_ARCH_MMP is not set # CONFIG_ARCH_KS8695 is not set # CONFIG_ARCH_W90X900 is not set -# CONFIG_ARCH_NUC93X is not set # CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PICOXCELL is not set # CONFIG_ARCH_PNX4008 is not set # CONFIG_ARCH_PXA is not set # CONFIG_ARCH_MSM is not set # CONFIG_ARCH_SHMOBILE is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set -# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_S3C24XX is not set # CONFIG_ARCH_S3C64XX is not set # CONFIG_ARCH_S5P64X0 is not set # CONFIG_ARCH_S5PC100 is not set # CONFIG_ARCH_S5PV210 is not set -# CONFIG_ARCH_EXYNOS4 is not set +# CONFIG_ARCH_EXYNOS is not set # CONFIG_ARCH_SHARK is not set -# CONFIG_ARCH_TCC_926 is not set # CONFIG_ARCH_U300 is not set # CONFIG_ARCH_U8500 is not set # CONFIG_ARCH_NOMADIK is not set @@ -311,15 +333,12 @@ CONFIG_ARCH_L4=y # CONFIG_ARCH_OMAP is not set # CONFIG_PLAT_SPEAR is not set # CONFIG_ARCH_VT8500 is not set +# CONFIG_ARCH_ZYNQ is not set CONFIG_MACH_L4=y # CONFIG_L4_ARM_BUILD_FOR_V5 is not set # CONFIG_L4_ARM_BUILD_FOR_V6K is not set CONFIG_L4_ARM_BUILD_FOR_V7=y -# -# System MMU -# - # # Processor Type # @@ -339,27 +358,38 @@ CONFIG_CPU_CP15_MMU=y # # Processor Features # +# CONFIG_ARM_LPAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set CONFIG_ARM_THUMB=y # CONFIG_ARM_THUMBEE is not set # CONFIG_SWP_EMULATE is not set # CONFIG_CPU_ICACHE_DISABLE is not set # CONFIG_CPU_DCACHE_DISABLE is not set # CONFIG_CPU_BPREDICT_DISABLE is not set -CONFIG_ARM_L1_CACHE_SHIFT=5 +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_NR_BANKS=8 CONFIG_CPU_HAS_PMU=y # CONFIG_ARM_ERRATA_430973 is not set # CONFIG_ARM_ERRATA_458693 is not set # CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_742230 is not set +# CONFIG_ARM_ERRATA_742231 is not set +# CONFIG_ARM_ERRATA_720789 is not set # CONFIG_ARM_ERRATA_743622 is not set +# CONFIG_ARM_ERRATA_751472 is not set # CONFIG_ARM_ERRATA_754322 is not set -CONFIG_DMABOUNCE=y -# CONFIG_FIQ_DEBUGGER is not set +# CONFIG_ARM_ERRATA_754327 is not set +# CONFIG_ARM_ERRATA_764369 is not set # # Bus support # CONFIG_ARM_AMBA=y +# CONFIG_PCI is not set # CONFIG_PCI_SYSCALL is not set # CONFIG_ARCH_SUPPORTS_MSI is not set # CONFIG_PCCARD is not set @@ -367,14 +397,20 @@ CONFIG_ARM_AMBA=y # # Kernel Features # -# CONFIG_NO_HZ is not set -# CONFIG_HIGH_RES_TIMERS is not set -CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -# CONFIG_SMP is not set +CONFIG_HAVE_SMP=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +# CONFIG_ARM_CPU_TOPOLOGY is not set +CONFIG_HAVE_ARM_SCU=y +# CONFIG_ARM_ARCH_TIMER is not set CONFIG_VMSPLIT_3G=y # CONFIG_VMSPLIT_2G is not set # CONFIG_VMSPLIT_1G is not set CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_NR_CPUS=4 +CONFIG_HOTPLUG_CPU=y +# CONFIG_LOCAL_TIMERS is not set +CONFIG_ARCH_NR_GPIO=0 CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT_VOLUNTARY is not set # CONFIG_PREEMPT is not set @@ -394,13 +430,13 @@ CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_SPLIT_PTLOCK_CPUS=4 # CONFIG_COMPACTION is not set # CONFIG_PHYS_ADDR_T_64BIT is not set -CONFIG_ZONE_DMA_FLAG=1 -CONFIG_BOUNCE=y +CONFIG_ZONE_DMA_FLAG=0 CONFIG_VIRT_TO_BUS=y # CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 -CONFIG_NEED_PER_CPU_KM=y +CONFIG_CROSS_MEMORY_ATTACH=y # CONFIG_CLEANCACHE is not set +# CONFIG_FRONTSWAP is not set CONFIG_FORCE_MAX_ZONEORDER=11 CONFIG_ALIGNMENT_TRAP=y # CONFIG_UACCESS_WITH_MEMCPY is not set @@ -442,6 +478,7 @@ CONFIG_VFPv3=y # Userspace binary formats # CONFIG_BINFMT_ELF=y +CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set CONFIG_HAVE_AOUT=y # CONFIG_BINFMT_AOUT is not set @@ -452,22 +489,20 @@ CONFIG_BINFMT_MISC=y # CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y -CONFIG_HAS_WAKELOCK=y -CONFIG_HAS_EARLYSUSPEND=y -CONFIG_WAKELOCK=y -CONFIG_WAKELOCK_STAT=y -CONFIG_USER_WAKELOCK=y -CONFIG_EARLYSUSPEND=y -# CONFIG_NO_USER_SPACE_SCREEN_ACCESS_CONTROL is not set -# CONFIG_CONSOLE_EARLYSUSPEND is not set -CONFIG_FB_EARLYSUSPEND=y CONFIG_PM_SLEEP=y +CONFIG_PM_SLEEP_SMP=y +# CONFIG_PM_AUTOSLEEP is not set +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=100 +CONFIG_PM_WAKELOCKS_GC=y # CONFIG_PM_RUNTIME is not set CONFIG_PM=y # CONFIG_PM_DEBUG is not set # CONFIG_APM_EMULATION is not set -# CONFIG_SUSPEND_TIME is not set +CONFIG_PM_CLK=y +CONFIG_CPU_PM=y CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARM_CPU_SUSPEND=y CONFIG_NET=y # @@ -475,6 +510,7 @@ CONFIG_NET=y # CONFIG_PACKET=y CONFIG_UNIX=y +# CONFIG_UNIX_DIAG is not set CONFIG_XFRM=y # CONFIG_XFRM_USER is not set # CONFIG_XFRM_SUB_POLICY is not set @@ -503,13 +539,12 @@ CONFIG_INET_XFRM_MODE_BEET=y # CONFIG_INET_LRO is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y +# CONFIG_INET_UDP_DIAG is not set # CONFIG_TCP_CONG_ADVANCED is not set CONFIG_TCP_CONG_CUBIC=y CONFIG_DEFAULT_TCP_CONG="cubic" # CONFIG_TCP_MD5SIG is not set # CONFIG_IPV6 is not set -CONFIG_ANDROID_PARANOID_NETWORK=y -CONFIG_NET_ACTIVITY_STATS=y # CONFIG_NETWORK_SECMARK is not set # CONFIG_NETWORK_PHY_TIMESTAMPING is not set # CONFIG_NETFILTER is not set @@ -527,13 +562,18 @@ CONFIG_NET_ACTIVITY_STATS=y # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set -# CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_PHONET is not set # CONFIG_IEEE802154 is not set # CONFIG_NET_SCHED is not set # CONFIG_DCB is not set # CONFIG_BATMAN_ADV is not set +# CONFIG_OPENVSWITCH is not set +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +CONFIG_BQL=y +# CONFIG_BPF_JIT is not set # # Network testing @@ -550,6 +590,8 @@ CONFIG_NET_ACTIVITY_STATS=y # CONFIG_NET_9P is not set # CONFIG_CAIF is not set # CONFIG_CEPH_LIB is not set +# CONFIG_NFC is not set +CONFIG_HAVE_BPF_JIT=y # # Device Drivers @@ -568,6 +610,9 @@ CONFIG_EXTRA_FIRMWARE="" # CONFIG_DEBUG_DRIVER is not set # CONFIG_DEBUG_DEVRES is not set # CONFIG_SYS_HYPERVISOR is not set +# CONFIG_GENERIC_CPU_DEVICES is not set +# CONFIG_DMA_SHARED_BUFFER is not set +# CONFIG_CMA is not set # CONFIG_CONNECTOR is not set # CONFIG_MTD is not set # CONFIG_PARPORT is not set @@ -586,14 +631,13 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 # CONFIG_CDROM_PKTCDVD is not set # CONFIG_ATA_OVER_ETH is not set # CONFIG_BLK_DEV_RBD is not set + +# +# Misc devices +# # CONFIG_SENSORS_LIS3LV02D is not set -CONFIG_MISC_DEVICES=y -CONFIG_ANDROID_PMEM=y -# CONFIG_INTEL_MID_PTI is not set +# CONFIG_ATMEL_PWM is not set # CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_KERNEL_DEBUGGER_CORE is not set -# CONFIG_UID_STAT is not set -# CONFIG_APANIC is not set # CONFIG_C2PORT is not set # @@ -604,8 +648,10 @@ CONFIG_ANDROID_PMEM=y # # Texas Instruments shared transport line discipline # -CONFIG_HAVE_IDE=y -# CONFIG_IDE is not set + +# +# Altera FPGA firmware download module +# # # SCSI device support @@ -619,7 +665,6 @@ CONFIG_SCSI_MOD=y # CONFIG_MD is not set # CONFIG_NETDEVICES is not set # CONFIG_ISDN is not set -# CONFIG_PHONE is not set # # Input device support @@ -628,6 +673,7 @@ CONFIG_INPUT=y # CONFIG_INPUT_FF_MEMLESS is not set # CONFIG_INPUT_POLLDEV is not set # CONFIG_INPUT_SPARSEKMAP is not set +# CONFIG_INPUT_MATRIXKMAP is not set # # Userland interfaces @@ -639,7 +685,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_EVBUG is not set -# CONFIG_INPUT_KEYRESET is not set # # Input Device Drivers @@ -663,6 +708,7 @@ CONFIG_INPUT_EVDEV=y CONFIG_VT=y CONFIG_CONSOLE_TRANSLATIONS=y CONFIG_VT_CONSOLE=y +CONFIG_VT_CONSOLE_SLEEP=y CONFIG_HW_CONSOLE=y # CONFIG_VT_HW_CONSOLE_BINDING is not set CONFIG_UNIX98_PTYS=y @@ -672,7 +718,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # CONFIG_SERIAL_NONSTANDARD is not set # CONFIG_N_GSM is not set # CONFIG_TRACE_SINK is not set -CONFIG_DEVMEM=y CONFIG_DEVKMEM=y # @@ -696,13 +741,13 @@ CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_IPMI_HANDLER is not set CONFIG_HW_RANDOM=m # CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_HW_RANDOM_ATMEL is not set # CONFIG_R3964 is not set # CONFIG_RAW_DRIVER is not set # CONFIG_TCG_TPM is not set -# CONFIG_DCC_TTY is not set -# CONFIG_RAMOOPS is not set # CONFIG_I2C is not set # CONFIG_SPI is not set +# CONFIG_HSI is not set # # PPS support @@ -720,12 +765,14 @@ CONFIG_HW_RANDOM=m # # Enable Device Drivers -> PPS to see the PTP clock options. # +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y # CONFIG_W1 is not set CONFIG_POWER_SUPPLY=y CONFIG_POWER_SUPPLY_DEBUG=y CONFIG_PDA_POWER=y # CONFIG_TEST_POWER is not set # CONFIG_BATTERY_DS2780 is not set +# CONFIG_BATTERY_DS2781 is not set # CONFIG_BATTERY_BQ27x00 is not set # CONFIG_CHARGER_MAX8903 is not set # CONFIG_HWMON is not set @@ -743,7 +790,10 @@ CONFIG_BCMA_POSSIBLE=y # Broadcom specific AMBA # # CONFIG_BCMA is not set -CONFIG_MFD_SUPPORT=y + +# +# Multifunction device drivers +# # CONFIG_MFD_CORE is not set # CONFIG_MFD_SM501 is not set # CONFIG_HTC_PASIC3 is not set @@ -758,7 +808,6 @@ CONFIG_MFD_SUPPORT=y # Graphics support # # CONFIG_DRM is not set -# CONFIG_ION is not set # CONFIG_VGASTATE is not set # CONFIG_VIDEO_OUTPUT_CONTROL is not set CONFIG_FB=y @@ -789,13 +838,10 @@ CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_VIRTUAL is not set # CONFIG_FB_METRONOME is not set # CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_AUO_K190X is not set +# CONFIG_EXYNOS_VIDEO is not set # CONFIG_BACKLIGHT_LCD_SUPPORT is not set -# -# Display device support -# -# CONFIG_DISPLAY_SUPPORT is not set - # # Console display driver support # @@ -840,14 +886,21 @@ CONFIG_SND_ARM=y # CONFIG_SND_ARMAACI is not set # CONFIG_SND_SOC is not set # CONFIG_SOUND_PRIME is not set -CONFIG_HID_SUPPORT=y + +# +# HID support +# CONFIG_HID=y +# CONFIG_HID_BATTERY_STRENGTH is not set # CONFIG_HIDRAW is not set -# CONFIG_HID_PID is not set +CONFIG_HID_GENERIC=y # # Special HID drivers # +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_EHCI is not set +# CONFIG_USB_ARCH_HAS_XHCI is not set # CONFIG_USB_SUPPORT is not set # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set @@ -857,13 +910,12 @@ CONFIG_LEDS_CLASS=y # # LED drivers # +# CONFIG_LEDS_OT200 is not set # CONFIG_LEDS_TRIGGERS is not set # # LED Triggers # -# CONFIG_NFC_DEVICES is not set -# CONFIG_SWITCH is not set # CONFIG_ACCESSIBILITY is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y @@ -878,8 +930,6 @@ CONFIG_RTC_INTF_SYSFS=y CONFIG_RTC_INTF_PROC=y CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set -CONFIG_RTC_INTF_ALARM=y -CONFIG_RTC_INTF_ALARM_DEV=y # CONFIG_RTC_DRV_TEST is not set # @@ -911,37 +961,60 @@ CONFIG_RTC_INTF_ALARM_DEV=y # CONFIG_DMADEVICES is not set # CONFIG_AUXDISPLAY is not set # CONFIG_UIO is not set -CONFIG_STAGING=y -# CONFIG_ECHO is not set -# CONFIG_BRCMUTIL is not set # -# Android +# Virtio drivers # -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_LOGGER=y -# CONFIG_ANDROID_RAM_CONSOLE is not set -CONFIG_ANDROID_TIMED_OUTPUT=y -CONFIG_ANDROID_LOW_MEMORY_KILLER=y -# CONFIG_POHMELFS is not set -# CONFIG_IIO is not set -# CONFIG_XVMALLOC is not set -# CONFIG_ZRAM is not set +# CONFIG_VIRTIO_BALLOON is not set +# CONFIG_VIRTIO_MMIO is not set + +# +# Microsoft Hyper-V guest support +# +CONFIG_STAGING=y +# CONFIG_ECHO is not set # CONFIG_FB_SM7XX is not set -CONFIG_MACH_NO_WESTBRIDGE=y # CONFIG_FT1000 is not set # # Speakup console speech # # CONFIG_SPEAKUP is not set +# CONFIG_STAGING_MEDIA is not set # -# Altera FPGA firmware download module +# Android # +CONFIG_ANDROID=y +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ASHMEM=y +CONFIG_ANDROID_LOGGER=y +CONFIG_ANDROID_TIMED_OUTPUT=y +CONFIG_ANDROID_LOW_MEMORY_KILLER=y +# CONFIG_ANDROID_INTF_ALARM_DEV is not set +# CONFIG_PHONE is not set +# CONFIG_IPACK_BUS is not set +# CONFIG_WIMAX_GDM72XX is not set CONFIG_CLKDEV_LOOKUP=y +# +# Hardware Spinlock drivers +# +CONFIG_IOMMU_SUPPORT=y + +# +# Remoteproc drivers (EXPERIMENTAL) +# + +# +# Rpmsg drivers (EXPERIMENTAL) +# +# CONFIG_VIRT_DRIVERS is not set +# CONFIG_PM_DEVFREQ is not set +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set + # # File systems # @@ -1013,17 +1086,12 @@ CONFIG_CRAMFS=y # CONFIG_OMFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set +# CONFIG_QNX6FS_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_PSTORE is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set # CONFIG_NETWORK_FILESYSTEMS is not set - -# -# Partition Types -# -# CONFIG_PARTITION_ADVANCED is not set -CONFIG_MSDOS_PARTITION=y # CONFIG_NLS is not set # @@ -1036,6 +1104,7 @@ CONFIG_ENABLE_MUST_CHECK=y CONFIG_FRAME_WARN=1024 CONFIG_MAGIC_SYSRQ=y # CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set # CONFIG_UNUSED_SYMBOLS is not set CONFIG_DEBUG_FS=y # CONFIG_HEADERS_CHECK is not set @@ -1044,6 +1113,8 @@ CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_SHIRQ is not set # CONFIG_LOCKUP_DETECTOR is not set # CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 CONFIG_DETECT_HUNG_TASK=y CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set @@ -1062,9 +1133,8 @@ CONFIG_DEBUG_MUTEXES=y # CONFIG_PROVE_LOCKING is not set # CONFIG_SPARSE_RCU_POINTER is not set # CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -CONFIG_STACKTRACE=y # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUG_KOBJECT is not set CONFIG_DEBUG_BUGVERBOSE=y @@ -1081,13 +1151,16 @@ CONFIG_DEBUG_INFO=y CONFIG_FRAME_POINTER=y # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=60 +# CONFIG_RCU_CPU_STALL_INFO is not set +# CONFIG_RCU_TRACE is not set # CONFIG_BACKTRACE_SELF_TEST is not set # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set # CONFIG_LKDTM is not set +# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set # CONFIG_FAULT_INJECTION is not set -# CONFIG_LATENCYTOP is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y # CONFIG_DEBUG_PAGEALLOC is not set CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y @@ -1105,6 +1178,7 @@ CONFIG_BRANCH_PROFILE_NONE=y # CONFIG_PROFILE_ALL_BRANCHES is not set # CONFIG_STACK_TRACER is not set # CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_PROBE_EVENTS is not set # CONFIG_DYNAMIC_DEBUG is not set # CONFIG_DMA_API_DEBUG is not set # CONFIG_ATOMIC64_SELFTEST is not set @@ -1134,8 +1208,10 @@ CONFIG_CRYPTO=y # # CONFIG_CRYPTO_MANAGER is not set # CONFIG_CRYPTO_MANAGER2 is not set +# CONFIG_CRYPTO_USER is not set # CONFIG_CRYPTO_GF128MUL is not set # CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set # CONFIG_CRYPTO_CRYPTD is not set # CONFIG_CRYPTO_AUTHENC is not set # CONFIG_CRYPTO_TEST is not set @@ -1222,13 +1298,21 @@ CONFIG_CRYPTO_HW=y # Library routines # CONFIG_BITREVERSE=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_IO=y # CONFIG_CRC_CCITT is not set # CONFIG_CRC16 is not set # CONFIG_CRC_T10DIF is not set # CONFIG_CRC_ITU_T is not set CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set # CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set +# CONFIG_CRC8 is not set CONFIG_ZLIB_INFLATE=y # CONFIG_XZ_DEC is not set # CONFIG_XZ_DEC_BCJ is not set @@ -1237,5 +1321,9 @@ CONFIG_GENERIC_ALLOCATOR=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y +CONFIG_CPU_RMAP=y +CONFIG_DQL=y CONFIG_NLATTR=y # CONFIG_AVERAGE is not set +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set diff --git a/ports-foc/patches/android_binder.patch b/ports-foc/patches/android_binder.patch new file mode 100644 index 000000000..de89ed847 --- /dev/null +++ b/ports-foc/patches/android_binder.patch @@ -0,0 +1,110 @@ +--- drivers/staging/android/binder.c ++++ drivers/staging/android/binder.c +@@ -34,6 +34,8 @@ + #include + #include + ++#include ++ + #include "binder.h" + + static DEFINE_MUTEX(binder_lock); +@@ -49,6 +51,8 @@ static struct dentry *binder_debugfs_dir_entry_proc; + static struct binder_node *binder_context_mgr_node; + static uid_t binder_context_mgr_uid = -1; + static int binder_last_id; ++static struct task_struct *binder_deferred_task; ++static DECLARE_WAIT_QUEUE_HEAD(binder_deferred_wq); + static struct workqueue_struct *binder_deferred_workqueue; + + #define BINDER_DEBUG_ENTRY(name) \ +@@ -3075,14 +3079,23 @@ static void binder_deferred_release(struct binder_proc *proc) + kfree(proc); + } + +-static void binder_deferred_func(struct work_struct *work) ++static int binder_deferred_thread(void *ignore) + { + struct binder_proc *proc; + struct files_struct *files; +- ++ int ret; + int defer; +- do { ++ ++ for (;;) { ++ ++ do { ++ ret = wait_event_interruptible(binder_deferred_wq, !hlist_empty(&binder_deferred_list)); ++ } while (ret == -ERESTARTSYS); ++ if (kthread_should_stop()) ++ break; ++ + mutex_lock(&binder_lock); ++ + mutex_lock(&binder_deferred_lock); + if (!hlist_empty(&binder_deferred_list)) { + proc = hlist_entry(binder_deferred_list.first, +@@ -3097,24 +3110,27 @@ static void binder_deferred_func(struct work_struct *work) + mutex_unlock(&binder_deferred_lock); + + files = NULL; +- if (defer & BINDER_DEFERRED_PUT_FILES) { +- files = proc->files; +- if (files) +- proc->files = NULL; +- } ++ if (proc != NULL) { + +- if (defer & BINDER_DEFERRED_FLUSH) +- binder_deferred_flush(proc); ++ if (defer & BINDER_DEFERRED_PUT_FILES) { ++ files = proc->files; ++ if (files) ++ proc->files = NULL; ++ } + +- if (defer & BINDER_DEFERRED_RELEASE) +- binder_deferred_release(proc); /* frees proc */ ++ if (defer & BINDER_DEFERRED_FLUSH) ++ binder_deferred_flush(proc); ++ ++ if (defer & BINDER_DEFERRED_RELEASE) ++ binder_deferred_release(proc); /* frees proc */ ++ } + + mutex_unlock(&binder_lock); + if (files) + put_files_struct(files); +- } while (proc); ++ } ++ return 0; + } +-static DECLARE_WORK(binder_deferred_work, binder_deferred_func); + + static void + binder_defer_work(struct binder_proc *proc, enum binder_deferred_state defer) +@@ -3124,9 +3140,9 @@ binder_defer_work(struct binder_proc *proc, enum binder_deferred_state defer) + if (hlist_unhashed(&proc->deferred_work_node)) { + hlist_add_head(&proc->deferred_work_node, + &binder_deferred_list); +- queue_work(binder_deferred_workqueue, &binder_deferred_work); + } + mutex_unlock(&binder_deferred_lock); ++ wake_up_interruptible(&binder_deferred_wq); + } + + static void print_binder_transaction(struct seq_file *m, const char *prefix, +@@ -3603,6 +3619,12 @@ static int __init binder_init(void) + &binder_transaction_log_failed, + &binder_transaction_log_fops); + } ++ ++ if (ret == 0) { ++ binder_deferred_task = kthread_run(binder_deferred_thread, NULL, "binder_deferred_thread"); ++ if (binder_deferred_task == NULL) ++ ret = PTR_ERR(binder_deferred_task); ++ } + return ret; + } + diff --git a/ports-foc/patches/l4android_genode.patch b/ports-foc/patches/l4android_genode.patch deleted file mode 100644 index fe41e9ff8..000000000 --- a/ports-foc/patches/l4android_genode.patch +++ /dev/null @@ -1,1043 +0,0 @@ -diff --git a/arch/l4/Kconfig b/arch/l4/Kconfig -index 995122e..ed181ff 100644 ---- a/arch/l4/Kconfig -+++ b/arch/l4/Kconfig -@@ -394,6 +394,18 @@ endmenu # l4linux options - config L4_USE_L4SHMC - bool - -+config SCREEN_GENODE -+ bool -+ select FB_CFB_FILLRECT -+ select FB_CFB_COPYAREA -+ select FB_CFB_IMAGEBLIT -+ default y -+ -+config SERIAL_GENODE -+ bool -+ default y -+ select SERIAL_CORE -+ select SERIAL_CORE_CONSOLE - - # some delimiter (for .config) - comment "" -diff --git a/arch/l4/Makefile b/arch/l4/Makefile -index 806ef23..e577a7e 100644 ---- a/arch/l4/Makefile -+++ b/arch/l4/Makefile -@@ -170,6 +170,12 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables - # prevent gcc from generating any FP code by mistake - KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) - -+# -+# Prevent the gcc from linking Linux memmove into compiler-generated -+# Genode stuff. -+# -+KBUILD_CFLAGS += -Dmemmove=lx_memmove -+ - endif - - ifeq ($(BASEARCH),arm) -@@ -252,6 +258,8 @@ endif - - endif - -+# Genode compiler is build without Linux defines. -+KBUILD_CFLAGS +=-D__linux__ -Dlinux - - # ----------------------------------------------- - -@@ -274,14 +282,15 @@ L4LX_E_L-$(CONFIG_L4_PDSPBLK_DRV) += pers_dsp - L4LX_E_L-$(CONFIG_L4_TCG_STPM) += stpm-client - L4LX_E_L-$(CONFIG_L4_FERRET) += ferret - --L4INC = -I$(L4OBJ)/include/$(L4_MK_ARCH)/$(L4_MK_API) \ -- -I$(L4OBJ)/include/$(L4_MK_ARCH) \ -- -I$(L4OBJ)/include/$(L4_MK_API) \ -- -I$(L4OBJ)/include -+#L4INC = -I$(L4OBJ)/include/$(L4_MK_ARCH)/$(L4_MK_API) \ -+# -I$(L4OBJ)/include/$(L4_MK_ARCH) \ -+# -I$(L4OBJ)/include/$(L4_MK_API) \ -+# -I$(L4OBJ)/include - - head-y := arch/l4/kernel/head.o arch/l4/kernel/init_task.o - --libs-y += arch/l4/lib/arch-$(BASEARCH)/ \ -+libs-y += arch/l4/lib/arch-$(BASEARCH)/ -+# \ - arch/l4/l4lxlib/generic/ \ - arch/l4/l4lxlib/$(BASEENV)/ - -@@ -299,7 +308,7 @@ endif - - core-y += arch/l4/ - ---include $(L4OBJ)/l4defs.mk.inc -+#-include $(L4OBJ)/l4defs.mk.inc - - L4_REQUIRED_MODS := libc_be_minimal_log_io \ - libc_minimal libc_minimal_l4re \ -@@ -315,15 +324,16 @@ $(info L4_REQUIRED_MODS: $(L4_REQUIRED_MODS)) - $(error Aborting.) - endif - --libs-y += -Bstatic $(L4_LIBDIRS) -ll4sys -ll4sys-direct -+libs-y += $(GENODE_LIBS) - export L4INC L4_REQUIRED_MODS - --LDFLAGS_vmlinux = \ -- --defsym __L4_KIP_ADDR__=$(L4_BID_KIP_ADDR) \ -- --defsym __l4sys_invoke_direct=$(L4_BID_KIP_ADDR)+$(L4_BID_KIP_OFFS_SYS_INVOKE) \ -- --defsym __l4sys_debugger_direct=$(L4_BID_KIP_ADDR)+$(L4_BID_KIP_OFFS_SYS_DEBUGGER) -+LDFLAGS_vmlinux = -nostdlib -+# --defsym __L4_KIP_ADDR__=$(L4_BID_KIP_ADDR) \ -+ -nostdlib -+#--defsym __l4sys_invoke_direct=$(L4_BID_KIP_ADDR)+$(L4_BID_KIP_OFFS_SYS_INVOKE) \ -+ --defsym __l4sys_debugger_direct=$(L4_BID_KIP_ADDR)+$(L4_BID_KIP_OFFS_SYS_DEBUGGER) \ - --KBUILD_CPPFLAGS += -Iarch/l4/include/asm/l4-arch \ -+KBUILD_CPPFLAGS += $(GENODE_INCLUDES) -Iarch/l4/include/asm/l4-arch \ - -I$(src)/arch/$(LINSRCARCH)/include \ - -Iarch/l4/include/asm/$(LINSRCARCH)-arch \ - -Iarch/l4/include/asm/orig-arch \ -@@ -342,6 +352,8 @@ ifneq ($(CONFIG_L4_ARCH_ARM),) - KBUILD_CPPFLAGS += -DTEXT_OFFSET=0x0100000 - endif - -+drivers-y += arch/l4/drivers/ -+ - all: lImage - - boot := arch/l4/boot -@@ -350,11 +362,11 @@ lImage: check_for_l4defs $(if $(CONFIG_L4_SERVER),server) vmlinux - $(Q)$(MAKE) $(build)=$(boot) $@ - - check_for_l4defs: -- $(Q)if [ ! -e $(L4OBJ)/l4defs.mk.inc ]; then \ -- echo "No $(L4OBJ)/l4defs.mk.inc available."; \ -- echo "Did you run 'make' in $(L4OBJ) to a successful end?"; \ -- exit 1; \ -- fi -+# $(Q)if [ ! -e $(L4OBJ)/l4defs.mk.inc ]; then \ -+# echo "No $(L4OBJ)/l4defs.mk.inc available."; \ -+# echo "Did you run 'make' in $(L4OBJ) to a successful end?"; \ -+# exit 1; \ -+# fi - - server: - $(Q)$(MAKE) $(build)=arch/l4/server -diff --git a/arch/l4/boot/Makefile b/arch/l4/boot/Makefile -index 391b037..afd4c2a 100644 ---- a/arch/l4/boot/Makefile -+++ b/arch/l4/boot/Makefile -@@ -10,7 +10,7 @@ $(obj)/Image: vmlinux FORCE - $(call if_changed,objcopy) - @echo ' Kernel: $@ is ready' - --lImage: $(obj)/Image vmlinuz$(VMLINUZ_SUFFIX) l4linux$(VMLINUZ_SUFFIX) -+lImage: $(obj)/Image - - vmlinuz$(VMLINUZ_SUFFIX): ldrImage FORCE - $(call if_changed,gzip) -@@ -21,8 +21,8 @@ l4linux$(VMLINUZ_SUFFIX): ldrImage FORCE - - objects-y := ldr.o res.o image.o - --include $(L4OBJ)/l4defs.mk.inc -- -+#include $(L4OBJ)/l4defs.mk.inc -+KBUILD_CFLAGS_i386 = -m32 - KBUILD_CFLAGS := $(filter-out -mregparm=3,$(KBUILD_CFLAGS)) \ - $(L4INC) -I$(L4OBJ)/include/uclibc \ - -Wall -fno-strict-aliasing -O2 -pipe \ -diff --git a/arch/l4/include/asm/generic/l4lib.h b/arch/l4/include/asm/generic/l4lib.h -index a5711ea..db5d812 100644 ---- a/arch/l4/include/asm/generic/l4lib.h -+++ b/arch/l4/include/asm/generic/l4lib.h -@@ -3,6 +3,7 @@ - - #include - -+#if 0 - #ifdef ARCH_arm - #define L4_EXTERNAL_FUNC(func) \ - asm(".section \".data.l4externals.str\" \n" \ -@@ -58,5 +59,8 @@ - ".previous \n" \ - ) - #endif -+#endif -+ -+#define L4_EXTERNAL_FUNC(func) ; - - #endif /* __INCLUDE__ASM_L4__GENERIC__L4LIB_H__ */ -diff --git a/arch/l4/include/asm/l4lxapi/thread.h b/arch/l4/include/asm/l4lxapi/thread.h -index db02c8c..0f75ba9 100644 ---- a/arch/l4/include/asm/l4lxapi/thread.h -+++ b/arch/l4/include/asm/l4lxapi/thread.h -@@ -15,6 +15,7 @@ - * \ingroup l4lxapi - */ - -+void l4lx_thread_alloc_irq(l4_cap_idx_t c); - - /** - * \brief Initialize thread handling. -diff --git a/arch/l4/kernel/arch-arm/traps.c b/arch/l4/kernel/arch-arm/traps.c -index d6a3b4f..a44f5eb 100644 ---- a/arch/l4/kernel/arch-arm/traps.c -+++ b/arch/l4/kernel/arch-arm/traps.c -@@ -66,6 +66,7 @@ void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long - dump_mem("", "Exception stack", frame + 4, frame + 4 + sizeof(struct pt_regs)); - } - -+#if 0 - #ifndef CONFIG_ARM_UNWIND - /* - * Stack pointers should always be within the kernels view of -@@ -81,6 +82,7 @@ static int verify_stack(unsigned long sp) - return 0; - } - #endif -+#endif - - /* - * Dump out the contents of some memory nicely... -@@ -170,6 +172,7 @@ static inline void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) - #else - static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) - { -+#if 0 - unsigned int fp, mode; - int ok = 1; - -@@ -201,6 +204,7 @@ static void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) - - if (ok) - c_backtrace(fp, mode); -+#endif - } - #endif - -diff --git a/arch/l4/kernel/arch-arm/vmlinux.lds.S b/arch/l4/kernel/arch-arm/vmlinux.lds.S -index 169f257..4e25408 100644 ---- a/arch/l4/kernel/arch-arm/vmlinux.lds.S -+++ b/arch/l4/kernel/arch-arm/vmlinux.lds.S -@@ -36,6 +36,12 @@ jiffies = jiffies_64; - jiffies = jiffies_64 + 4; - #endif - -+PHDRS -+{ -+ ro PT_LOAD; -+ rw PT_LOAD; -+} -+ - SECTIONS - { - #ifdef CONFIG_XIP_KERNEL -@@ -46,6 +52,19 @@ SECTIONS - - .init : { /* Init code and data */ - _stext = .; -+ _prog_img_beg = .; -+ -+ /* -+ * Leave space for parent capability parameters at start of data -+ * section. The protection domain creator is reponsible for storing -+ * sane values here. -+ */ -+ _parent_cap = .; -+ _parent_cap_thread_id = .; -+ LONG(0xffffffff); -+ _parent_cap_local_name = .; -+ LONG(0xffffffff); -+ - _sinittext = .; - HEAD_TEXT - INIT_TEXT -@@ -80,7 +99,7 @@ SECTIONS - INIT_DATA - ARM_EXIT_KEEP(EXIT_DATA) - #endif -- } -+ } : rw - - PERCPU_SECTION(32) - -@@ -126,6 +145,7 @@ SECTIONS - #ifdef CONFIG_MMU - *(.fixup) - #endif -+ *(.text.*) /* put all Genode .text entries in here */ - *(.gnu.warning) - *(.rodata) - *(.rodata.*) -@@ -134,7 +154,8 @@ SECTIONS - . = ALIGN(4); - *(.got) /* Global offset table */ - ARM_CPU_KEEP(PROC_INFO) -- } -+ -+ } : rw - - RO_DATA(PAGE_SIZE) - -@@ -155,6 +176,42 @@ SECTIONS - } - #endif - -+ /* -+ * When building L4Linux for Genode, the 'CONFIG_ARM_UNWIND' option is -+ * disabled to avoid conflicts between unwinding-related symbols provided -+ * by the Linux kernel and the C++ compiler's libsupc++. Hence, the linker -+ * script section above is not used. Instead, the '.ARM.exidx' entries are -+ * handled as follows (taken from the Genode linker script. -+ */ -+ /* .ARM.exidx is sorted, so has to go in its own output section */ -+ __exidx_start = .; -+ .ARM.exidx : { -+ *(.ARM.exidx* .gnu.linkonce.armexidx.*) -+ } -+ __exidx_end = .; -+ -+ .ARM.extab : { -+ *(.ARM.extab*) -+ } : rw -+ -+ /* exception frames for C++ */ -+ .eh_frame : { -+ __eh_frame_start__ = .; -+ KEEP (*(.eh_frame)) -+ LONG(0) -+ } : rw -+ -+ .init_array : { -+ __init_array_start = .; -+ _ctors_start = .; -+ KEEP (*(SORT(.init_array.*))) -+ KEEP (*(.init_array)) -+ __init_array_end = .; -+ _ctors_end = .; -+ _dtors_start = .; -+ _dtors_end = .; -+ } -+ - _etext = .; /* End of text and rodata section */ - - #ifdef CONFIG_XIP_KERNEL -@@ -204,8 +261,10 @@ SECTIONS - DATA_DATA - CONSTRUCTORS - -+ *(.data.*) /* put all Genode .data entries in here */ -+ - _edata = .; -- } -+ } : rw - _edata_loc = __data_loc + SIZEOF(.data); - - #ifdef CONFIG_HAVE_TCM -@@ -267,10 +326,20 @@ SECTIONS - - NOTES - -- BSS_SECTION(0, 0, 0) -+ /* BSS */ -+ . = ALIGN(PAGE_SIZE); -+ .bss : AT(ADDR(.bss) - LOAD_OFFSET) { -+ __bss_start = .; -+ *(.bss..page_aligned) -+ *(.bss) -+ *(.bss.*) /* put all Genode .bss entries in here */ -+ . = ALIGN(4); -+ __bss_stop = .; -+ } - - /* L4: Align to full superpage */ - . = ALIGN(1048576); -+ _prog_img_end = .; - _end = .; - - /* L4: Add NOTES so that .note.gnu.build-id is caught, because we do -diff --git a/arch/l4/kernel/arch-x86/vmlinux.lds.S b/arch/l4/kernel/arch-x86/vmlinux.lds.S -index 42ee2bc..2e1e1db 100644 ---- a/arch/l4/kernel/arch-x86/vmlinux.lds.S -+++ b/arch/l4/kernel/arch-x86/vmlinux.lds.S -@@ -33,7 +33,7 @@ OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT) - - #ifdef CONFIG_X86_32 - OUTPUT_ARCH(i386) --ENTRY(phys_startup_32) -+ENTRY(_start) - jiffies = jiffies_64; - #else - OUTPUT_ARCH(i386:x86-64) -@@ -67,17 +67,10 @@ jiffies_64 = jiffies; - - #endif - --PHDRS { -- text PT_LOAD FLAGS(5); /* R_E */ -- data PT_LOAD FLAGS(6); /* RW_ */ --#ifdef CONFIG_X86_64 -- user PT_LOAD FLAGS(5); /* R_E */ --#ifdef CONFIG_SMP -- percpu PT_LOAD FLAGS(6); /* RW_ */ --#endif -- init PT_LOAD FLAGS(7); /* RWE */ --#endif -- note PT_NOTE FLAGS(0); /* ___ */ -+PHDRS -+{ -+ ro PT_LOAD; -+ rw PT_LOAD; - } - - SECTIONS -@@ -97,6 +90,29 @@ SECTIONS - /*_stext = .;*/ - .text : AT(ADDR(.text) - LOAD_OFFSET) { - _text = .; -+ _prog_img_beg = .; -+ -+ /* -+ * Leave space for parent capability parameters at start of data -+ * section. The protection domain creator is reponsible for storing -+ * sane values here. -+ */ -+ _parent_cap = .; -+ _parent_cap_thread_id = .; -+ LONG(0xffffffff); -+ _parent_cap_local_name = .; -+ LONG(0xffffffff); -+ -+ /* -+ * Platform-specific entry for Fiasco.OC. -+ * -+ * PIC-code compiled for Fiasco.OC, needs some PIC-compatible -+ * way to enter the kernel, the fixed address of the kernel -+ * entry code address needs to be found here. -+ */ -+ __l4sys_invoke_indirect = .; -+ LONG(0xeacff000); -+ - /* bootstrapping code */ - HEAD_TEXT - #ifdef CONFIG_X86_32 -@@ -112,19 +128,55 @@ SECTIONS - ENTRY_TEXT - IRQENTRY_TEXT - *(.fixup) -+ *(.text.*) /* put all Genode .text entries in here */ - *(.gnu.warning) -+ -+ . = ALIGN(0x08); -+ -+ _ctors_start = .; -+ KEEP (*(.ctors)) -+ KEEP (*(SORT(.ctors.*))) -+ KEEP (*(.init_array)) /* list of constructors specific for ARM eabi */ -+ _ctors_end = .; -+ _dtors_start = .; -+ KEEP (*(SORT(.dtors.*))) -+ KEEP (*(.dtors)) -+ _dtors_end = .; -+ - /* End of text section */ - _etext = .; -- } :text = 0x9090 -+ } : rw - -- NOTES :text :note -+ NOTES :rw - -- EXCEPTION_TABLE(16) :text = 0x9090 -+ .eh_frame_hdr : { *(.eh_frame_hdr) } - - #if defined(CONFIG_DEBUG_RODATA) - /* .text should occupy whole number of pages */ - . = ALIGN(PAGE_SIZE); - #endif -+ -+ /* -+ * because in Genode we collect all data.* entries in the data section -+ * we have to put the per_cpu section before defining the data section -+ * otherwise it's symbols would end up in the data section too. -+ */ -+#if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP) -+ PERCPU_SECTION(INTERNODE_CACHE_BYTES) -+#endif -+ -+ /* -+ * smp_locks might be freed after init -+ * start/end must be page aligned -+ */ -+ . = ALIGN(PAGE_SIZE); -+ .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { -+ __smp_locks = .; -+ *(.smp_locks) -+ . = ALIGN(PAGE_SIZE); -+ __smp_locks_end = .; -+ } -+ - X64_ALIGN_DEBUG_RODATA_BEGIN - RO_DATA(PAGE_SIZE) - X64_ALIGN_DEBUG_RODATA_END -@@ -152,9 +204,33 @@ SECTIONS - /* rarely changed data like cpu maps */ - READ_MOSTLY_DATA(INTERNODE_CACHE_BYTES) - -+ *(.data.*) /* put all Genode .data entries in here */ -+ -+ - /* End of data section */ - _edata = .; -- } :data -+ } : rw -+ -+ EXCEPTION_TABLE(16) : rw -+ -+ /* exception frames for C++ */ -+ .eh_frame : { -+ __eh_frame_start__ = .; -+ KEEP (*(.eh_frame)) -+ LONG(0) -+ } : rw -+ -+ .init_array : { -+ __init_array_start = .; -+ KEEP (*(SORT(.init_array.*))) -+ KEEP (*(.init_array)) -+ __init_array_end = .; -+ } -+ -+ .gcc_except_table : { -+ KEEP(*(.gcc_except_table)) -+ KEEP(*(.gcc_except_table.*)) -+ } - - #ifdef CONFIG_X86_64 - -@@ -331,10 +407,6 @@ SECTIONS - EXIT_DATA - } - --#if !defined(CONFIG_X86_64) || !defined(CONFIG_SMP) -- PERCPU_SECTION(INTERNODE_CACHE_BYTES) --#endif -- - . = ALIGN(PAGE_SIZE); - - /* freed after init ends here */ -@@ -342,18 +414,6 @@ SECTIONS - __init_end = .; - } - -- /* -- * smp_locks might be freed after init -- * start/end must be page aligned -- */ -- . = ALIGN(PAGE_SIZE); -- .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) { -- __smp_locks = .; -- *(.smp_locks) -- . = ALIGN(PAGE_SIZE); -- __smp_locks_end = .; -- } -- - #ifdef CONFIG_X86_64 - .data_nosave : AT(ADDR(.data_nosave) - LOAD_OFFSET) { - NOSAVE_DATA -@@ -366,6 +426,7 @@ SECTIONS - __bss_start = .; - *(.bss..page_aligned) - *(.bss) -+ *(.bss.*) /* put all Genode .bss entries in here */ - . = ALIGN(PAGE_SIZE); - __bss_stop = .; - } -@@ -378,6 +439,7 @@ SECTIONS - __brk_limit = .; - } - -+ _prog_img_end = .; - _end = .; - - STABS_DEBUG -diff --git a/arch/l4/kernel/arch-x86/x86_init.c b/arch/l4/kernel/arch-x86/x86_init.c -index f4dec4e..b14e161 100644 ---- a/arch/l4/kernel/arch-x86/x86_init.c -+++ b/arch/l4/kernel/arch-x86/x86_init.c -@@ -38,7 +38,7 @@ void iommu_shutdown_noop(void) { } - struct x86_init_ops x86_init __initdata = { - - .resources = { -- .probe_roms = probe_roms, -+ .probe_roms = x86_init_noop, - .reserve_resources = reserve_standard_io_resources, - .memory_setup = l4x_memory_setup, - }, -diff --git a/arch/l4/kernel/dispatch.c b/arch/l4/kernel/dispatch.c -index 4ef10e4..83e2bc4 100644 ---- a/arch/l4/kernel/dispatch.c -+++ b/arch/l4/kernel/dispatch.c -@@ -274,7 +274,7 @@ static int l4x_hybrid_return(struct thread_info *ti, - return 0; - - if (l4_msgtag_is_page_fault(tag)) { -- l4x_printf("HYBRID PF!!\n"); -+ LOG_printf("HYBRID PF!!\n"); - /* No exception IPC, it's a page fault, but shouldn't happen */ - goto out_fail; - } -@@ -694,7 +694,7 @@ wait_again: - enter_kdebug("non hybrid in idle?!"); - } else { - if (unlikely(l4x_handle_async_event(label, utcb, tag))) -- l4x_printf("Async return with error\n"); -+ LOG_printf("Async return with error\n"); - } - } - } -diff --git a/arch/l4/kernel/head.S b/arch/l4/kernel/head.S -index 302d211..8a8e96c 100644 ---- a/arch/l4/kernel/head.S -+++ b/arch/l4/kernel/head.S -@@ -53,6 +53,7 @@ ENTRY(swapper_pg_dir) - .previous - #endif - -+#ifdef NOT_GENODE - #ifdef ARCH_arm - .section ".text" - .globl _start -@@ -82,6 +83,10 @@ __address_l4re_global_env: - __address_l4lx_kinfo: - .long l4lx_kinfo - .previous -+#endif -+#endif /* NOT_GENODE */ -+ -+#ifdef ARCH_arm - .section .data.head, "wa" - .p2align 12 - ENTRY(swapper_pg_dir) -diff --git a/arch/l4/kernel/main.c b/arch/l4/kernel/main.c -index d71a2b9..59c512c 100644 ---- a/arch/l4/kernel/main.c -+++ b/arch/l4/kernel/main.c -@@ -305,7 +305,7 @@ static void l4x_configuration_sanity_check(const char *cmdline) - } - #endif - --#ifndef CONFIG_L4_SERIAL -+#if 0 //ndef CONFIG_L4_SERIAL - if (strstr(cmdline, "console=ttyLv")) { - LOG_printf("Console output set to ttyLvx but driver not compiled in.\n"); - enter_kdebug("L4 serial driver not enabled"); -@@ -363,6 +363,26 @@ static void l4x_virt_to_phys_show(void) - } - } - -+static spinlock_t migrate_lock; -+ -+void l4x_irq_save(unsigned long flags) { local_irq_save(flags); } -+void l4x_irq_restore(unsigned long flags) { local_irq_restore(flags); } -+unsigned long l4x_hz(void) { return HZ; } -+int l4x_nr_irqs(void) { return NR_IRQS; } -+void l4x_migrate_lock(unsigned long flags) { spin_lock_irqsave(&migrate_lock, flags); } -+void l4x_migrate_unlock(unsigned long flags) { spin_unlock_irqrestore(&migrate_lock, fla -+ -+unsigned l4x_target_cpu(const struct cpumask *dest) -+{ -+ if (!cpumask_intersects(dest, cpu_online_mask)) -+ return (unsigned) -1; -+ return cpumask_any_and(dest, cpu_online_mask); -+} -+ -+void l4x_cpumask_copy(struct irq_data *data, const struct cpumask *dest) { -+ cpumask_copy(data->affinity, dest); } -+ -+ - unsigned long l4x_virt_to_phys(volatile void * address) - { - int i; -@@ -375,14 +395,14 @@ unsigned long l4x_virt_to_phys(volatile void * address) - + l4x_phys_virt_addrs[i].phys; - } - -- l4x_virt_to_phys_show(); -+// l4x_virt_to_phys_show(); - /* Whitelist: */ - - /* Debugging check: don't miss a translation, can give nasty - * DMA problems */ -- l4x_printf("%s: Could not translate virt. address %p\n", -+ LOG_printf("%s: Could not translate virt. address %p\n", - __func__, address); -- WARN_ON(1); -+// WARN_ON(1); - - return __pa(address); - } -@@ -414,7 +434,7 @@ void *l4x_phys_to_virt(unsigned long address) - - /* Debugging check: don't miss a translation, can give nasty - * DMA problems */ -- l4x_printf("%s: Could not translate phys. address 0x%lx\n", -+ LOG_printf("%s: Could not translate phys. address 0x%lx\n", - __func__, address); - WARN_ON(1); - -@@ -532,7 +552,7 @@ int l4x_re_resolve_name(const char *name, l4_cap_idx_t *cap) - - r = l4re_ns_query_srv(entry->cap, n + 1, *cap); - if (r) { -- l4x_printf("Failed to query name '%s': %s(%d)\n", -+ LOG_printf("Failed to query name '%s': %s(%d)\n", - name, l4sys_errtostr(r), r); - L4XV_U(f); - return -ENOENT; -@@ -713,6 +733,7 @@ static const int at_exit_nr_of_functions - = sizeof(at_exit_functions) / sizeof(at_exit_functions[0]); - static int __current_exititem; - -+#if 0 - static struct cxa_atexit_item *__next_atexit(void) - { - if (__current_exititem >= at_exit_nr_of_functions) { -@@ -721,20 +742,9 @@ static struct cxa_atexit_item *__next_atexit(void) - } - return &at_exit_functions[__current_exititem++]; - } -+#endif - --int __cxa_atexit(void (*f)(void *), void *arg, void *dso_handle) --{ -- struct cxa_atexit_item *h = __next_atexit(); -- -- if (!h) -- return -1; -- -- h->f = f; -- h->arg = arg; -- h->dso_handle = dso_handle; -- -- return 0; --} -+extern int __cxa_atexit(void (*f)(void *), void *arg, void *dso_handle); - - void __cxa_finalize(void *dso_handle) - { -@@ -790,9 +800,19 @@ static inline int l4x_is_writable_area(unsigned long a) - } - static int l4x_forward_pf(l4_umword_t addr, l4_umword_t pc, int extra_write) - { -+#if 0 - l4_msgtag_t tag; - l4_umword_t err; - l4_utcb_t *u = l4_utcb(); -+#endif -+ -+ if (!extra_write) -+ l4_touch_ro((void*)l4_trunc_page(addr), L4_LOG2_PAGESIZE); -+ else -+ l4_touch_rw((void*)l4_trunc_page(addr), L4_LOG2_PAGESIZE); -+ -+ // TODO: Reenable this part -+#if 0 - - do { - l4_msg_regs_t *mr = l4_utcb_mr_u(u); -@@ -815,6 +835,7 @@ static int l4x_forward_pf(l4_umword_t addr, l4_umword_t pc, int extra_write) - // unresolvable page fault, we're supposed to trigger an - // exception - return 0; -+#endif - - return 1; - } -@@ -1054,7 +1075,7 @@ static void l4x_register_pointer_section(void *p_in_addr, - addr = (l4_addr_t)p_in_addr; - size = 1; - if (l4re_rm_find(&addr, &size, &off, &flags, &ds)) { -- LOG_printf("Cannot anything at %p?!", p_in_addr); -+ LOG_printf("Cannot anything at %p\n?!", p_in_addr); - l4re_rm_show_lists(); - enter_kdebug("l4re_rm_find failed"); - return; -@@ -1254,7 +1275,7 @@ void __init l4x_setup_memory(char *cmdl, - 0, "Main memory"); - - /* Reserve some part of the virtual address space for vmalloc */ -- l4x_vmalloc_memory_start = (unsigned long)l4x_main_memory_start; -+ l4x_vmalloc_memory_start = (unsigned long)l4x_main_memory_start + l4x_mainmem_size; - if (l4re_rm_reserve_area(&l4x_vmalloc_memory_start, - #ifdef CONFIG_X86_32 - __VMALLOC_RESERVE, -@@ -1381,6 +1402,10 @@ unsigned long l4x_get_isa_dma_memory_end(void) - - static void l4x_create_ugate(l4_cap_idx_t forthread, unsigned cpu) - { -+ LOG_printf("thread=%lx cpu=%x\n", forthread, cpu); -+ l4x_user_gate[cpu] = forthread; -+ -+#if 0 - l4_msgtag_t r; - - l4x_user_gate[cpu] = l4x_cap_alloc(); -@@ -1401,6 +1426,7 @@ static void l4x_create_ugate(l4_cap_idx_t forthread, unsigned cpu) - l4_debugger_set_object_name(l4x_user_gate[cpu], n); - #endif - } -+#endif - } - - #ifdef CONFIG_HOTPLUG_CPU -@@ -1607,11 +1633,15 @@ void l4x_cpu_ipi_setup(unsigned cpu) - l4x_exit_l4linux(); - } - -+#if 0 - t = l4_factory_create_irq(l4re_env()->factory, c); - if (l4_error(t)) { - LOG_printf("Failed to create IRQ\n"); - l4x_exit_l4linux(); - } -+#else -+ l4lx_thread_alloc_irq(c); -+#endif - - #ifdef CONFIG_L4_DEBUG_REGISTER_NAMES - l4_debugger_set_object_name(c, s); -@@ -1890,11 +1920,11 @@ static inline void l4x_repnop_init(void) {} - - static int l4x_cpu_virt_phys_map_init(const char *boot_command_line) - { -- l4_umword_t max_cpus = 1; -- l4_sched_cpu_set_t cs = l4_sched_cpu_set(0, 0, 0); - unsigned i; - - #ifdef CONFIG_SMP -+ l4_umword_t max_cpus = 1; -+ l4_sched_cpu_set_t cs = l4_sched_cpu_set(0, 0, 0); - char overbooking = 0; - char *p; - -@@ -1907,9 +1937,10 @@ static int l4x_cpu_virt_phys_map_init(const char *boot_command_line) - } - } - -- -+#if 0 - if (l4_error(l4_scheduler_info(l4re_env()->scheduler, - &max_cpus, &cs)) == L4_EOK) { -+#endif - if ((p = strstr(boot_command_line, "l4x_cpus_map="))) { - // l4x_cpus_map=0,1,2,3,4,... - // the list specifies the physical CPU for each -@@ -1958,12 +1989,16 @@ static int l4x_cpu_virt_phys_map_init(const char *boot_command_line) - l4x_nr_cpus = v; - - } -+#if 0 - } -+#endif - #ifndef CONFIG_L4_VCPU - l4x_tamed_set_mapping(0, l4x_cpu_physmap_get_id(0)); - #endif - - #else /* UP */ -+ -+#if 0 - if (l4_error(l4_scheduler_info(l4re_env()->scheduler, - &max_cpus, &cs)) == L4_EOK) { - -@@ -1973,6 +2008,8 @@ static int l4x_cpu_virt_phys_map_init(const char *boot_command_line) - l4x_cpu_physmap[0].phys_id = p; - } - #endif -+ l4x_cpu_physmap[0].phys_id = 0; -+#endif - - LOG_printf("CPU mapping (l:p)[%d]: ", l4x_nr_cpus); - for (i = 0; i < l4x_nr_cpus; i++) -@@ -2018,6 +2055,7 @@ static long l4x_blink(int state) - printk("panic: going to sleep forever, bye\n"); - L4XV_L(f); - LOG_printf("panic: going to sleep forever, bye\n"); -+ enter_kdebug("PANIC"); - l4_sleep_forever(); - return 0; - } -@@ -2298,7 +2336,7 @@ static void l4x_scan_hw_resources(void) - } - } - --int __init_refok L4_CV main(int argc, char **argv) -+int __init_refok L4_CV linux_main(int argc, char **argv) - { - l4lx_thread_t main_id; - extern char _end[]; -@@ -2410,10 +2448,13 @@ int __init_refok L4_CV main(int argc, char **argv) - - l4x_start_thread_id = l4re_env()->main_thread; - -+#if 0 - l4_thread_control_start(); - l4_thread_control_commit(l4x_start_thread_id); - l4x_start_thread_pager_id - = l4_utcb_mr()->mr[L4_THREAD_CONTROL_MR_IDX_PAGER]; -+#endif -+ l4x_start_thread_pager_id = l4re_env()->rm; - - #ifndef CONFIG_L4_VCPU - #ifdef CONFIG_L4_TAMED -@@ -3180,6 +3221,10 @@ static inline int l4x_handle_pagefault(unsigned long pfa, unsigned long ip, - /* Not resolvable: Ooops */ - LOG_printf("Non-resolvable page fault at %lx, ip %lx.\n", pfa, ip); - // will trigger an oops in caller -+ -+#ifdef CONFIG_L4_DEBUG_SEGFAULTS -+ enter_kdebug("PF"); -+#endif - return 0; - } - -@@ -3560,7 +3605,9 @@ module_init(l4x_power_mgmt_init); - void exit(int code) - { - __cxa_finalize(0); -+#if 0 - l4x_external_exit(code); -+#endif - LOG_printf("Still alive, going zombie???\n"); - l4_sleep_forever(); - } -diff --git a/arch/l4/lib/pte.c b/arch/l4/lib/pte.c -index f59bf94..858f668 100644 ---- a/arch/l4/lib/pte.c -+++ b/arch/l4/lib/pte.c -@@ -19,6 +19,9 @@ - #include - #include - #include -+#include -+ -+extern void l4lx_memory_map_physical_page(unsigned long address); - - static void l4x_flush_page(struct mm_struct *mm, - unsigned long address, -@@ -78,7 +81,7 @@ static void l4x_flush_page(struct mm_struct *mm, - if (mm && !l4_is_invalid_cap(mm->context.task)) { - L4XV_V(f); - if (!mm->context.task) -- l4x_printf("%s: Ups, task == 0\n", __func__); -+ LOG_printf("%s: Ups, task == 0\n", __func__); - /* Direct flush in the child, use virtual address in the - * child address space */ - L4XV_L(f); -@@ -94,10 +97,11 @@ static void l4x_flush_page(struct mm_struct *mm, - tag = l4_task_unmap(L4RE_THIS_TASK_CAP, - l4_fpage(address & PAGE_MASK, size, flush_rights), - L4_FP_OTHER_SPACES); -+ l4lx_memory_map_physical_page(address); - L4XV_U(f); - } - if (l4_error(tag)) -- l4x_printf("l4_task_unmap error %ld\n", l4_error(tag)); -+ LOG_printf("l4_task_unmap error %ld\n", l4_error(tag)); - } - - #ifdef ARCH_arm -diff --git a/drivers/tty/serial/l4ser.c b/drivers/tty/serial/l4ser.c -index 3efd8ea..faa72bd 100644 ---- a/drivers/tty/serial/l4ser.c -+++ b/drivers/tty/serial/l4ser.c -@@ -22,10 +22,12 @@ - #include - - #include -+#include - #include - #include - #include - #include -+#include - #include - #include - #include -@@ -135,7 +137,10 @@ static void l4ser_tx_chars(struct uart_port *port) - - if (port->x_char) { - L4XV_L(f); -+#if 0 - l4_vcon_write(l4port->vcon_cap, &port->x_char, 1); -+#endif -+ LOG_printf("%c", port->x_char); - L4XV_U(f); - port->icount.tx++; - port->x_char = 0; -@@ -147,7 +152,14 @@ static void l4ser_tx_chars(struct uart_port *port) - if (c > L4_VCON_WRITE_SIZE) - c = L4_VCON_WRITE_SIZE; - L4XV_L(f); -+#if 0 - l4_vcon_write(l4port->vcon_cap, &xmit->buf[xmit->tail], c); -+#endif -+ char *ptr = (char*)&xmit->buf[xmit->tail], old = ptr[c]; -+ ptr[c] = 0; -+ LOG_printf("%s", ptr); -+ ptr[c] = old; -+ - L4XV_U(f); - xmit->tail = (xmit->tail + c) & (UART_XMIT_SIZE - 1); - port->icount.tx += c; -@@ -267,7 +279,7 @@ static int __init l4ser_init_port(int num, const char *name) - if (l4ser_port[num].inited) - return 0; - l4ser_port[num].inited = 1; -- -+#if 0 - if ((r = l4x_re_resolve_name(name, &l4ser_port[num].vcon_cap))) { - if (num == 0) - l4ser_port[num].vcon_cap = l4re_env()->log; -@@ -308,11 +320,13 @@ static int __init l4ser_init_port(int num, const char *name) - L4XV_U(f); - return -EIO; - } -- -+#endif - vcon_attr.i_flags = 0; - vcon_attr.o_flags = 0; - vcon_attr.l_flags = 0; -+#if 0 - l4_vcon_set_attr(l4ser_port[num].vcon_cap, &vcon_attr); -+#endif - L4XV_U(f); - - l4ser_port[num].port.uartclk = 3686400; -@@ -356,7 +370,14 @@ l4ser_console_write(struct console *co, const char *s, unsigned int count) - if (c > L4_VCON_WRITE_SIZE) - c = L4_VCON_WRITE_SIZE; - L4XV_L(f); -+#if 0 - l4_vcon_write(l4ser_port[co->index].vcon_cap, s, c); -+#endif -+ char *ptr = (char*)s, old = ptr[c]; -+ ptr[c] = 0; -+ LOG_printf("%s", ptr); -+ ptr[c] = old; -+ - L4XV_U(f); - count -= c; - } while (count); -@@ -403,6 +424,7 @@ static int __init l4ser_serial_init(void) - int ret, i; - - printk(KERN_INFO "L4 serial driver\n"); -+ LOG_printf("L4 serial driver\n"); - - if (l4ser_init_port(0, PORT0_NAME)) - return -ENODEV;