]> rtime.felk.cvut.cz Git - l4.git/commitdiff
update
authorl4check <l4check@d050ee49-bd90-4346-b210-929a50b99cfc>
Thu, 5 Aug 2010 13:00:57 +0000 (13:00 +0000)
committerl4check <l4check@d050ee49-bd90-4346-b210-929a50b99cfc>
Thu, 5 Aug 2010 13:00:57 +0000 (13:00 +0000)
git-svn-id: http://svn.tudos.org/repos/oc/tudos/trunk@15 d050ee49-bd90-4346-b210-929a50b99cfc

82 files changed:
kernel/fiasco/src/Kconfig
kernel/fiasco/src/Makeconf.amd64
kernel/fiasco/src/Makeconf.ia32
kernel/fiasco/src/Makefile
kernel/fiasco/src/Modules.amd64
kernel/fiasco/src/Modules.ia32
kernel/fiasco/src/abi/virt-ia32-amd64.cpp
kernel/fiasco/src/jdb/jdb.cpp
kernel/fiasco/src/jdb/jdb_ipi.cpp
kernel/fiasco/src/jdb/ux/jdb-ux.cpp
kernel/fiasco/src/kern/arm/dirq-arm.cpp
kernel/fiasco/src/kern/arm/ipi-arm.cpp
kernel/fiasco/src/kern/arm/main.cpp
kernel/fiasco/src/kern/arm/startup-arm.cpp
kernel/fiasco/src/kern/context.cpp
kernel/fiasco/src/kern/factory.cpp
kernel/fiasco/src/kern/ia32/32/entry-native.S
kernel/fiasco/src/kern/ia32/32/vm_svm_asm.S [new file with mode: 0644]
kernel/fiasco/src/kern/ia32/64/entry-native.S
kernel/fiasco/src/kern/ia32/64/vm_svm_asm.S [new file with mode: 0644]
kernel/fiasco/src/kern/ia32/apic-ia32.cpp
kernel/fiasco/src/kern/ia32/cpu-ia32.cpp
kernel/fiasco/src/kern/ia32/dirq-ia32-ux.cpp
kernel/fiasco/src/kern/ia32/ipi-ia32.cpp
kernel/fiasco/src/kern/ia32/main-ia32.cpp
kernel/fiasco/src/kern/ia32/startup-ia32.cpp
kernel/fiasco/src/kern/ia32/svm.cpp
kernel/fiasco/src/kern/ia32/vm.cpp [new file with mode: 0644]
kernel/fiasco/src/kern/ia32/vm_factory-ia32.cpp [new file with mode: 0644]
kernel/fiasco/src/kern/ia32/vm_svm.cpp [new file with mode: 0644]
kernel/fiasco/src/kern/ipi.cpp
kernel/fiasco/src/kern/irq.cpp
kernel/fiasco/src/kern/thread.cpp
kernel/fiasco/src/kern/ux/ipi-ux.cpp
kernel/fiasco/src/kern/ux/startup.cpp
kernel/fiasco/src/kern/vm_factory.cpp [new file with mode: 0644]
kernel/fiasco/src/templates/globalconfig.out.amd64-1
kernel/fiasco/src/templates/globalconfig.out.amd64-2
kernel/fiasco/src/templates/globalconfig.out.amd64-3-noinl
kernel/fiasco/src/templates/globalconfig.out.amd64-mp
kernel/fiasco/src/templates/globalconfig.out.arm-a9-mp-1
kernel/fiasco/src/templates/globalconfig.out.arm-a9-mp-2
kernel/fiasco/src/templates/globalconfig.out.arm-imx21
kernel/fiasco/src/templates/globalconfig.out.arm-imx51
kernel/fiasco/src/templates/globalconfig.out.arm-int-1
kernel/fiasco/src/templates/globalconfig.out.arm-int-2
kernel/fiasco/src/templates/globalconfig.out.arm-omap3evm
kernel/fiasco/src/templates/globalconfig.out.arm-pxa
kernel/fiasco/src/templates/globalconfig.out.arm-rv-1
kernel/fiasco/src/templates/globalconfig.out.arm-rv-2
kernel/fiasco/src/templates/globalconfig.out.arm-rv-3
kernel/fiasco/src/templates/globalconfig.out.arm-rv-4-noinl
kernel/fiasco/src/templates/globalconfig.out.arm-sa
kernel/fiasco/src/templates/globalconfig.out.arm-t2
kernel/fiasco/src/templates/globalconfig.out.arm-v6
kernel/fiasco/src/templates/globalconfig.out.arm-v6-mp-eb
kernel/fiasco/src/templates/globalconfig.out.arm-v6-mp-pb
kernel/fiasco/src/templates/globalconfig.out.arm-v7
kernel/fiasco/src/templates/globalconfig.out.ia32-1
kernel/fiasco/src/templates/globalconfig.out.ia32-2
kernel/fiasco/src/templates/globalconfig.out.ia32-3-noinl
kernel/fiasco/src/templates/globalconfig.out.ia32-big
kernel/fiasco/src/templates/globalconfig.out.ia32-mp
kernel/fiasco/src/templates/globalconfig.out.ia32-ndebug
kernel/fiasco/src/templates/globalconfig.out.ux-1
kernel/fiasco/src/templates/globalconfig.out.ux-2
kernel/fiasco/src/templates/globalconfig.out.ux-3-noinl
l4/mk/binary.inc
l4/mk/lib.mk
l4/pkg/cxx/lib/Makefile.inc
l4/pkg/dde/linux26/lib/src/Makefile
l4/pkg/input/lib/contrib/input/serio/i8042-io.h
l4/pkg/io/server/src/resource.h
l4/pkg/io/server/src/vbus.cc
l4/pkg/moe/server/src/boot_fs.cc
l4/pkg/ned/server/src/app_model.cc
l4/pkg/ned/server/src/app_model.h
l4/pkg/ned/server/src/debug.h
l4/pkg/ned/server/src/lua_exec.cc
l4/pkg/uclibc/lib/uclibc/Makefile
l4/pkg/uclibc/lib/uclibc/contrib_files_all.lst
l4/pkg/udis86/lib/include/Makefile

index 78f906d6a906ff2cc42f9791198f7e4db16101cc..4510c52cfc634cc6b72bc3c59b88fb8027dc0e8f 100644 (file)
@@ -177,6 +177,18 @@ config IA32_PM
        help
          Choose this if you have an Intel Pentium M.
 
+config IA32_CORE2
+       bool "Intel Core 2"
+       depends on IA32
+       help
+         Choose this if you have an Intel Core 2.
+
+config IA32_ATOM
+       bool "Intel Atom"
+       depends on IA32
+       help
+         Choose this if you have an Intel Atom.
+
 config IA32_K6
        bool "AMD K6 / K6-II / K6-III"
        depends on IA32
@@ -195,12 +207,38 @@ config IA32_K8
        help
          Choose this if you have an AMD Opteron or Athlon64 CPU.
 
+config IA32_K10
+       bool "AMD Barcelona (K10)"
+       depends on IA32
+       help
+         Choose this if you have an AMD Barcelona based CPU.
+
+
 config AMD64_K8
        bool "AMD Opteron / Athlon64"
        depends on AMD64
        help
          Choose this if you have an AMD Opteron or Athlon64 CPU.
 
+config AMD64_CORE2
+       bool "Intel Core 2"
+       depends on AMD64
+       help
+         Choose this if you have an Intel Core 2.
+
+config AMD64_ATOM
+       bool "Intel Atom"
+       depends on AMD64
+       help
+         Choose this if you have an Intel Atom.
+
+config AMD64_K10
+       bool "AMD Barcelona (K10)"
+       depends on AMD64
+       help
+         Choose this if you have an AMD Barcelona based CPU.
+
+
 config PPC32_603e
        bool "PowerPC 603e"
        depends on PPC32
@@ -211,13 +249,13 @@ endchoice
 
 
 
-config SVM
-       bool "Enable SVM support"
+config CPU_VIRT
+       bool "Enable CPU virtualization (SVM and VT)"
        depends on PF_PC
        help
-         Support SVM virtualization extension that comes with AMD CPUs,
-         including nested paging (NPT). This feature allows you to run a
-         virtual machine monitor (VMM) on top of Fiasco.
+         Support virtualization extensions that comes with x86 CPUs,
+         including nested paging. This feature allows you to run a virtual
+         machine monitor (VMM) on top of Fiasco.
 
 config ARM_ALIGNMENT_CHECK
        bool "Enable alignment check"
@@ -751,7 +789,7 @@ config XARCH
        default "ux" if PF_UX
        default "amd64" if AMD64 && PF_PC
        default "ia32" if IA32 && PF_PC
-       default  "ppc32" if PPC32
+       default "ppc32" if PPC32
 
 config IA32_TARGET
        string
@@ -764,7 +802,9 @@ config IA32_TARGET
        default "Pentium M" if IA32_PM
        default "AMD K6" if IA32_K6
        default "AMD Athlon" if IA32_K7
-       default "AMD Opteron" if IA32_K8 || AMD64_K8
+       default "Intel Core2" if IA32_CORE2 || AMD64_CORE2
+       default "Intel Atom" if IA32_ATOM || AMD64_ATOM
+       default "AMD Opteron" if IA32_K8 || AMD64_K8 || AMD64_K10 || IA32_K10
 
 config ABI
        string
index 2e3de2066936119c41f0e8d9941f518c36b0868e..79f2fa428106310a4f4265c8cf2683fd4b991acc 100644 (file)
@@ -13,12 +13,14 @@ SHARED_FLAGS                += -mpreferred-stack-boundary=4 -m64 -mcmodel=kernel \
 OPT_CFLAGS             += -mno-red-zone -funit-at-a-time
 OPT_CXXFLAGS           += -mno-red-zone -funit-at-a-time
 
-SHARED_FLAGS-$(CONFIG_AMD64_K8) += $(call CHECKCC,-march=k8,-march=i686)
-SHARED_FLAGS                    += $(call CHECKCC,-mno-mmx,)
-SHARED_FLAGS                    += $(call CHECKCC,-mno-sse,)
-SHARED_FLAGS                    += $(call CHECKCC,-mno-sse2,)
-SHARED_FLAGS                    += $(call CHECKCC,-mno-sse3,)
-SHARED_FLAGS                    += $(call CHECKCC,-mno-3dnow,)
+SHARED_FLAGS-$(CONFIG_AMD64_CORE2) += $(call CHECKCC,-march=core2,-march=i686)
+SHARED_FLAGS-$(CONFIG_AMD64_ATOM)  += $(call CHECKCC,-march=atom,-march=i686)
+SHARED_FLAGS-$(CONFIG_AMD64_K8)    += $(call CHECKCC,-march=k8,-march=i686)
+SHARED_FLAGS                       += $(call CHECKCC,-mno-mmx,)
+SHARED_FLAGS                       += $(call CHECKCC,-mno-sse,)
+SHARED_FLAGS                       += $(call CHECKCC,-mno-sse2,)
+SHARED_FLAGS                       += $(call CHECKCC,-mno-sse3,)
+SHARED_FLAGS                       += $(call CHECKCC,-mno-3dnow,)
 
 ASFLAGS                                += -m64 -mcmodel=kernel
 OFORMAT                                := elf64-x86-64
index 63f3ed105307b8491ca881762e0820b1b5aa0b3f..3e1673340ced7c758b20db6c509a3e17704b6ee5 100644 (file)
@@ -9,29 +9,32 @@ OPT_CFLAGS            += $(call CHECKCC,--param large-function-insns=10000)
 NOOPT_SHARED_FLAGS     += $(call CHECKCC,--param max-inline-insns-single=50)
 SHARED_FLAGS           += -mpreferred-stack-boundary=2 -m32
 
-SHARED_FLAGS-$(CONFIG_REGPARM3) += -mregparm=3
-SHARED_FLAGS-$(CONFIG_IA32_486)        += -march=i486
-SHARED_FLAGS-$(CONFIG_IA32_586)        += -march=i586
-SHARED_FLAGS-$(CONFIG_IA32_686)        += -march=i686
-SHARED_FLAGS-$(CONFIG_IA32_P2) += -march=i686 $(call CHECKCC,-mtune=pentium2,\
-                                                 $(call CHECKCC,-mcpu=pentium2))
-SHARED_FLAGS-$(CONFIG_IA32_P3)  += -march=i686 $(call CHECKCC,-mtune=pentium3,\
-                                                 $(call CHECKCC,-mcpu=pentium3))
-SHARED_FLAGS-$(CONFIG_IA32_P4)  += -march=i686 $(call CHECKCC,-mtune=pentium4,\
-                                                 $(call CHECKCC,-mcpu=pentium4))
-SHARED_FLAGS-$(CONFIG_IA32_PM)  += -march=i686 $(call CHECKCC,-mtune=pentium-m,\
-                                                 $(call CHECKCC,-mcpu=pentiumm))
-SHARED_FLAGS-$(CONFIG_IA32_K6)  += $(call CHECKCC,-march=k6,-march=i586)
-SHARED_FLAGS-$(CONFIG_IA32_K7)  += $(call CHECKCC,-march=athlon,-march=i686)
-SHARED_FLAGS-$(CONFIG_IA32_K8)  += $(call CHECKCC,-march=k8,-march=i686)
+SHARED_FLAGS-$(CONFIG_REGPARM3)   += -mregparm=3
+SHARED_FLAGS-$(CONFIG_IA32_486)          += -march=i486
+SHARED_FLAGS-$(CONFIG_IA32_586)          += -march=i586
+SHARED_FLAGS-$(CONFIG_IA32_686)          += -march=i686
+SHARED_FLAGS-$(CONFIG_IA32_P2)   += -march=i686 $(call CHECKCC,-mtune=pentium2,\
+                                                   $(call CHECKCC,-mcpu=pentium2))
+SHARED_FLAGS-$(CONFIG_IA32_P3)    += -march=i686 $(call CHECKCC,-mtune=pentium3,\
+                                                   $(call CHECKCC,-mcpu=pentium3))
+SHARED_FLAGS-$(CONFIG_IA32_P4)    += -march=i686 $(call CHECKCC,-mtune=pentium4,\
+                                                   $(call CHECKCC,-mcpu=pentium4))
+SHARED_FLAGS-$(CONFIG_IA32_PM)    += -march=i686 $(call CHECKCC,-mtune=pentium-m,\
+                                                   $(call CHECKCC,-mcpu=pentiumm))
+SHARED_FLAGS-$(CONFIG_IA32_CORE2) += $(call CHECKCC,-march=core2,-march=i686)
+SHARED_FLAGS-$(CONFIG_IA32_ATOM)  += $(call CHECKCC,-march=atom,-march=i686)
+SHARED_FLAGS-$(CONFIG_IA32_K6)    += $(call CHECKCC,-march=k6,-march=i586)
+SHARED_FLAGS-$(CONFIG_IA32_K7)    += $(call CHECKCC,-march=athlon,-march=i686)
+SHARED_FLAGS-$(CONFIG_IA32_K8)    += $(call CHECKCC,-march=k8,-march=i686)
+SHARED_FLAGS-$(CONFIG_IA32_K10)   += $(call CHECKCC,-march=barcelona,-march=i686)
 
-SHARED_FLAGS                    += $(call CHECKCC,-mno-mmx,)
-SHARED_FLAGS                    += $(call CHECKCC,-mno-sse,)
-SHARED_FLAGS                    += $(call CHECKCC,-mno-sse2,)
-SHARED_FLAGS                    += $(call CHECKCC,-mno-sse3,)
-SHARED_FLAGS                    += $(call CHECKCC,-mno-3dnow,)
+SHARED_FLAGS                      += $(call CHECKCC,-mno-mmx,)
+SHARED_FLAGS                      += $(call CHECKCC,-mno-sse,)
+SHARED_FLAGS                      += $(call CHECKCC,-mno-sse2,)
+SHARED_FLAGS                      += $(call CHECKCC,-mno-sse3,)
+SHARED_FLAGS                      += $(call CHECKCC,-mno-3dnow,)
 
-ASFLAGS                                += -m32
-OFORMAT                                := elf32-i386
-LD_EMULATION-SYSTEM-FreeBSD    := elf_i386_fbsd
-LD_EMULATION-SYSTEM-default    := elf_i386
+ASFLAGS                                  += -m32
+OFORMAT                                  := elf32-i386
+LD_EMULATION-SYSTEM-FreeBSD      := elf_i386_fbsd
+LD_EMULATION-SYSTEM-default      := elf_i386
index b23b5fd7fd0d1b3bd37f0872ab9fc90c2c50d5c1..2571eae89f06796885f0e33db97a573d5a062a30 100644 (file)
@@ -140,10 +140,13 @@ DEPS_FILES=DEPS DEPS.a4 DEPS.tred
 #
 # Makefile.sub2: Create everything else.
 #
-all doc $(addsuffix .ps,$(DEPS_FILES)) $(addsuffix .svg,$(DEPS_FILES)) TAGS tags %.o %_t: \
+all doc $(addsuffix .ps,$(DEPS_FILES)) $(addsuffix .svg,$(DEPS_FILES)) TAGS tags: \
   $(MODULES_FILES) .Modules.deps create-sources globalconfig.h
        $(MAKE) srcdir=$(srcdir) objbase=$(objbase) -f $(srcdir)/Makefile.sub2 $@
 
+%.o %_t: $(MODULES_FILES) .Modules.deps create-sources globalconfig.h
+       $(MAKE) srcdir=$(srcdir) objbase=$(objbase) -f $(srcdir)/Makefile.sub2 $@
+
 # Divert any target we do not explicitly mention in this Makefile to
 # Makefile.sub2.  (Unfortunately 1, this does not work for file
 # targets that already exist in this directory.  Unfortunately 2,
index 2f775150b7138fb065a81eb02c6b2dc197f2c2ae..0f325cc073186654157134d25e2bb19f35ce5858 100644 (file)
@@ -11,6 +11,7 @@ PREPROCESS_PARTS      += arch $(CONFIG_ABI) 64bit iofp         \
                           $(CONFIG_XARCH) apic abs-timeout-hack \
                           i8259 pc i8254 fpu                    \
                           auto_map_kip
+
 OBJ_SPACE-y = phys
 OBJ_SPACE-  = virt
 OBJ_SPACE   = $(OBJ_SPACE-$(CONFIG_DISABLE_VIRT_OBJ_SPACE))
@@ -29,14 +30,13 @@ PREPROCESS_PARTS-$(CONFIG_SERIAL)            += serial 16550
 PREPROCESS_PARTS-$(CONFIG_WATCHDOG)          += watchdog
 PREPROCESS_PARTS-$(CONFIG_PERF_CNT)          += perf_cnt
 PREPROCESS_PARTS-$(CONFIG_IO_PROT)           += io
-PREPROCESS_PARTS-$(CONFIG_SVM)               += svm
+PREPROCESS_PARTS-$(CONFIG_CPU_VIRT)          += svm
 PREPROCESS_PARTS-$(CONFIG_SCHED_FIXED_PRIO)  += sched_fixed_prio
 PREPROCESS_PARTS-$(CONFIG_SCHED_WFQ)         += sched_wfq
 PREPROCESS_PARTS-$(CONFIG_SCHED_FP_WFQ)      += sched_fp_wfq
 
 PREPROCESS_PARTS        += $(PREPROCESS_PARTS-y)
 
-
 #
 # TYPES subsystem
 #
@@ -45,7 +45,6 @@ PRIVATE_INCDIR                += types/$(CONFIG_XARCH) types
 #
 # ABI Subsystem
 #
-PRIVATE_INCDIR         += abi
 ABI                    := libabi.a
 VPATH                  += abi/$(CONFIG_XARCH) abi
 INTERFACES_ABI         := l4_fpage l4_msg_item l4_buf_desc kip l4_types \
@@ -80,44 +79,48 @@ NOOPT                       += $(patsubst %.o, %, $(OBJ_DRIVERS))
 
 keyb_IMPL              := keyb keyb-pc 
 io_IMPL                        := io io-amd64
-processor_IMPL         := processor processor-amd64
 mem_IMPL               := mem mem-amd64
+processor_IMPL         := processor processor-amd64
 
 #
 # KERNEL subsystem
 #
 KERNEL                 := fiasco.image
 VPATH                  += kern/$(CONFIG_XARCH) kern/shared kern/ia32/64 kern/ia32 kern
-VPATH                  += jdb/ia32/64 jdb/ia32 jdb
 PRIVATE_INCDIR         += kern/$(CONFIG_XARCH) kern/shared kern/ia32/64 kern/ia32 kern 
 
-INTERFACES_KERNEL      := startup boot_info cmdline __main mapping mappable \
-                          mapping_tree mapdb region pic \
-                          queue_item queue l4_buf_iter cpu_mask rcupdate \
-                          bitmap acpi io_apic spin_lock mem_region mem_space \
-                          mem_space_sigma0 space factory lock irq_pin \
-                          obj_space ptab_base vlog pages kobject_mapdb \
+INTERFACES_KERNEL      := cpu_mask rcupdate pages kobject_mapdb \
+                          mem_region per_cpu_data startup boot_info cmdline \
+                          __main queue queue_item l4_buf_iter irq_pin \
+                          bitmap acpi io_apic mapping spin_lock \
+                          mapping_tree mappable dbg_page_info  \
+                          mapdb region pic dirq_pic_pin dirq_io_apic \
+                          kobject_dbg kobject ready_queue_wfq ready_queue_fp \
+                          obj_space ptab_base io_space_sigma0 irq_msi \
+                          io_space ram_quota ref_ptr ref_obj \
+                          mem_space mem_space_sigma0 space vlog \
                           kmem kmem_alloc slab_cache_anon mem_layout        \
                           kmem_slab_simple kmem_slab switch_lock kip_init   \
                           thread_lock helping_lock cpu_lock timer timeout   \
-                          ipc_timeout timeslice_timeout ipc_sender   \
-                          thread_state context mp_lock sender receiver \
-                          mem_unit kobject_dbg kobject ref_obj ref_ptr vcpu  \
-                          thread kobject_helper icu_helper \
-                          syscalls kernel_thread map_util irq banner \
-                          warn per_cpu_data per_cpu_data_alloc              \
+                          ipc_timeout timeslice_timeout    \
+                          per_cpu_data_alloc vcpu kobject_helper icu_helper \
+                          thread_state context mp_lock sender receiver      \
+                          mem_unit factory lock ipc_sender \
+                          thread syscalls kernel_thread map_util irq banner \
+                          warn app_cpu_thread                               \
                           dirq globals apic watchdog kernel_uart pit        \
-                          dirq_pic_pin dirq_io_apic irq_msi irq_controller \
                           checksum main config mapped_alloc      \
                           vmem_alloc paging fpu fpu_state fpu_alloc cpu     \
                           entry_frame kernel_console boot_console profile   \
-                          ipc_gate task irq_chip terminate \
-                          sched_context utcb_init continuation   \
-                          perf_cnt x86desc gdt idt tss trap_state           \
-                          buddy_alloc vkey kdb_ke kernel_task dbg_page_info \
-                          io_space io_space_sigma0 ram_quota scheduler \
-                          prio_list app_cpu_thread ipi timer_irq       \
-                           clock svm vm ready_queue_wfq ready_queue_fp
+                          ipc_gate task kernel_task irq_controller          \
+                          irq_chip terminate continuation \
+                          sched_context utcb_init \
+                          perf_cnt x86desc gdt idt tss trap_state \
+                          buddy_alloc vkey kdb_ke prio_list ipi timer_irq \
+                          scheduler clock vm_factory \
+
+
+INTERFACES_KERNEL-$(CONFIG_CPU_VIRT) += svm vm vm_svm
 
 PREPROCESS_PARTS       += ulock
 INTERFACES_KERNEL      += u_semaphore
@@ -143,7 +146,6 @@ kernel_uart_IMPL    := kernel_uart kernel_uart-16550
 kip_init_IMPL          := kip_init-ia32
 kmem_IMPL              := kmem-ia32 kmem-ia32-64
 kmem_alloc_IMPL                := kmem_alloc kmem_alloc-ia32
-
 main_IMPL              := main-ia32-64 main-ia32
 mapping_IMPL           := mapping-ia32-64 mapping
 map_util_IMPL          := map_util map_util-mem map_util-io map_util-objs
@@ -174,12 +176,10 @@ trap_state_IMPL           := trap_state-amd64
 tss_IMPL               := tss-amd64
 utcb_init_IMPL         := utcb_init utcb_init-ia32
 vmem_alloc_IMPL                := vmem_alloc vmem_alloc-ia32
-vm_IMPL                        := vm-svm
+vm_factory_IMPL         := vm_factory vm_factory-ia32
 watchdog_IMPL          := watchdog watchdog-ia32
 
-ifeq ("$(CONFIG_SERIAL)","y")
-  INTERFACES_KERNEL    += uart_console
-endif
+INTERFACES_KERNEL-$(CONFIG_SERIAL) += uart_console
 
 ifeq ("$(CONFIG_PROFILE)","y")
   cpu_lock_IMPL                := cpu_lock cpu_lock-pic
@@ -209,60 +209,56 @@ ifeq ("$(CONFIG_IO_PROT)","y")
 endif
 
 ifeq ("$(CONFIG_JDB)","y")
-INTERFACES_KERNEL      += jdb_entry_frame jdb jdb_prompt_ext jdb_symbol \
-                          jdb_dbinfo jdb_bp jdb_thread_list jdb_lines \
+VPATH                  += jdb/ia32/64 jdb/ia32 jdb
+INTERFACES_KERNEL      += jdb jdb_util jdb_prompt_ext jdb_symbol jdb_lines \
+                          jdb_dbinfo jdb_bp \
                           jdb_tbuf jdb_module jdb_core jdb_io_ports \
                           jdb_kern_info jdb_prompt_module jdb_tbuf_output \
                           jdb_input jdb_dump jdb_ptab jdb_misc jdb_mapdb \
                           jdb_tcb jdb_attach_irq jdb_tbuf_init jdb_trace \
                           jdb_trace_set jdb_counters jdb_table kern_cnt  \
-                          jdb_bt tb_entry tb_entry_output jdb_exit_module \
+                          tb_entry tb_entry_output jdb_exit_module \
                           jdb_tbuf_show jdb_console_buffer virq \
                           jdb_list jdb_screen push_console jdb_timeout \
                           jdb_handler_queue jdb_halt_thread \
                           jdb_kern_info_kmem_alloc jdb_kern_info_region \
                           jdb_kern_info_kip jdb_kern_info_config \
-                          loadcnt jdb_util jdb_space \
-                          jdb_kobject jdb_kobject_names jdb_ipc_gate \
-                          jdb_obj_space jdb_log jdb_factory jdb_semaphore \
-                          jdb_io_apic jdb_trap_state jdb_ipi jdb_rcupdate \
+                          loadcnt jdb_utcb jdb_thread_list \
+                          jdb_entry_frame jdb_kobject jdb_space jdb_io_apic \
+                          jdb_trap_state jdb_ipi jdb_kobject_names \
+                          jdb_rcupdate jdb_bt jdb_ipc_gate jdb_obj_space \
+                          jdb_log jdb_factory jdb_semaphore jdb_iomap \
                            jdb_thread jdb_scheduler jdb_sender_list \
-                          jdb_disasm jdb_regex
+                          jdb_regex jdb_disasm
 
 apic_IMPL              += apic-debug
 jdb_IMPL               := jdb jdb-ia32-amd64 jdb-ansi jdb-ia32-ux jdb-thread \
                           jdb-int3-ia32-amd64 jdb-int3-ia32-ux
 jdb_bp_IMPL            := jdb_bp-ia32-ux jdb_bp-ia32-amd64 jdb_bp-amd64
 jdb_bt_IMPL            := jdb_bt-ia32-ux
+jdb_entry_frame_IMPL   := jdb_entry_frame-ia32
 jdb_kern_info_IMPL     := jdb_kern_info jdb_kern_info-ia32-amd64 \
                           jdb_kern_info-ia32-ux jdb_kern_info-apic \
-                          jdb_kern_info-pci \
-                          jdb_kern_info-bench \
-                          jdb_kern_info-bench-ia32-64 jdb_kern_info-dr
+                          jdb_kern_info-pci jdb_kern_info-bench \
+                          jdb_kern_info-bench-ia32-64 \
+                          jdb_kern_info-dr
 jdb_misc_IMPL          := jdb_misc-ia32-amd64
-jdb_screen_IMPL                := jdb_screen jdb_screen-ia32
 jdb_ptab_IMPL          := jdb_ptab jdb_ptab-amd64
+jdb_screen_IMPL                := jdb_screen jdb_screen-ia32
 jdb_tcb_IMPL           := jdb_tcb jdb_tcb-amd64
-jdb_entry_frame_IMPL   := jdb_entry_frame-ia32
 jdb_trace_set_IMPL     := jdb_trace_set jdb_trace_set-ia32-ux
-#jdb_utcb_IMPL         := jdb_utcb-ia32-ux
 
-#  ifeq ("$(CONFIG_JDB_MISC)","y")
-    INTERFACES_KERNEL  += jdb_tetris
-#  endif
+INTERFACES_KERNEL-$(CONFIG_JDB_MISC)   += jdb_tetris
 endif
 
 
 CXXSRC_KERNEL          := kernel_panic.cc libc_backend_lock.cc
 ASSRC_KERNEL           := entry.S entry-native.S shortcut.S
 
-ifeq ($(CONFIG_KIP_SYSCALLS_ABS),y)
-  ASSRC_KERNEL         += sys_call_page-asm.S
-endif
-
-ifeq ($(CONFIG_MP),y)
-  ASSRC_KERNEL         += tramp-mp.S entry-mp.S
-endif
+ASSRC_KERNEL-$(CONFIG_KIP_SYSCALLS_ABS) += sys_call_page-asm.S
+ASSRC_KERNEL-$(CONFIG_MP)               += tramp-mp.S entry-mp.S
+ASSRC_KERNEL-$(CONFIG_CPU_VIRT)         += vm_svm_asm.S
+ASSRC_KERNEL                            += $(ASSRC_KERNEL-y)
 
 NOOPT                  += $(filter jdb%,\
                             $(foreach in,$(INTERFACES_KERNEL), \
@@ -391,10 +387,10 @@ CSRC_LIBAMM       := amm_alloc_entry.c amm_allocate.c amm_deallocate.c \
 #
 ifneq ($(CONFIG_JDB_GZIP),)
   LIBGZIP              := libgzip.a
-  VPATH                += lib/gzip
+  VPATH                        += lib/gzip
   PRIVATE_INCDIR       += lib/gzip
-  CSRC_LIBGZIP := adler32.c crc32.c gzip.c trees.c deflate.c zutil.c
-  NOOPT                += $(patsubst %.o, %, $(OBJ_LIBGZIP))
+  CSRC_LIBGZIP         := adler32.c crc32.c gzip.c trees.c deflate.c zutil.c
+  NOOPT                        += $(patsubst %.o, %, $(OBJ_LIBGZIP))
 endif
 
 #
@@ -419,7 +415,7 @@ ifeq ("$(CONFIG_JDB_DISASM)","y")
                        lib/disasm/libiberty lib/disasm/bfd
   PRIVATE_INCDIR    += lib/disasm
   CSRC_LIBDISASM    := disasm.c dis-init.c i386-dis.c dis-buf.c
-  NOOPT                    += $(patsubst %.o, %, $(OBJ_LIBDISASM))
+  NOOPT             += $(patsubst %.o, %, $(OBJ_LIBDISASM))
 endif
 
 #
@@ -487,3 +483,5 @@ endif
 endif
 
 MODULES_FILES = $(MODULES_FILE) $(MODULES_FILE_BSP)
+
+INTERFACES_KERNEL       += $(INTERFACES_KERNEL-y)
index 17c2ea22d7b60a687c65499ea7801ce617a186b8..d0c8129e622403063d98ac4b1476e4b90f3817df 100644 (file)
@@ -17,6 +17,7 @@ OBJ_SPACE-  = virt
 OBJ_SPACE   = $(OBJ_SPACE-$(CONFIG_DISABLE_VIRT_OBJ_SPACE))
 
 PREPROCESS_PARTS += obj_space_$(OBJ_SPACE)
+
 PREPROCESS_PARTS-$(CONFIG_MP)                += mp
 PREPROCESS_PARTS-$(CONFIG_LIST_ALLOC_SANITY) += list_alloc_debug
 PREPROCESS_PARTS-$(CONFIG_JDB)               += debug log
@@ -31,7 +32,7 @@ PREPROCESS_PARTS-$(CONFIG_PERF_CNT)          += perf_cnt
 PREPROCESS_PARTS-$(CONFIG_HANDLE_SEGMENTS)   += segments
 PREPROCESS_PARTS-$(CONFIG_IO_PROT)           += io
 PREPROCESS_PARTS-$(CONFIG_IO_PROT_IOPL_3)    += iopl3
-PREPROCESS_PARTS-$(CONFIG_SVM)               += svm
+PREPROCESS_PARTS-$(CONFIG_CPU_VIRT)          += svm
 PREPROCESS_PARTS-$(CONFIG_SCHED_FIXED_PRIO)  += sched_fixed_prio
 PREPROCESS_PARTS-$(CONFIG_SCHED_WFQ)         += sched_wfq
 PREPROCESS_PARTS-$(CONFIG_SCHED_FP_WFQ)      += sched_fp_wfq
@@ -98,8 +99,8 @@ INTERFACES_KERNEL     := cpu_mask rcupdate pages kobject_mapdb \
                           mapdb region pic dirq_pic_pin dirq_io_apic \
                           kobject_dbg kobject ready_queue_wfq ready_queue_fp \
                           obj_space ptab_base io_space_sigma0 irq_msi \
-                          io_space ram_quota ref_ptr ref_obj     \
-                          mem_space mem_space_sigma0 space vlog        \
+                          io_space ram_quota ref_ptr ref_obj \
+                          mem_space mem_space_sigma0 space vlog \
                           kmem kmem_alloc slab_cache_anon mem_layout        \
                           kmem_slab_simple kmem_slab switch_lock kip_init   \
                           thread_lock helping_lock cpu_lock timer timeout   \
@@ -114,32 +115,32 @@ INTERFACES_KERNEL := cpu_mask rcupdate pages kobject_mapdb \
                           vmem_alloc paging fpu fpu_state fpu_alloc cpu     \
                           entry_frame kernel_console boot_console profile   \
                           ipc_gate task kernel_task irq_controller          \
-                          irq_chip terminate continuation       \
-                          sched_context utcb_init sys_call_page  \
-                          perf_cnt x86desc gdt idt tss trap_state      \
+                          irq_chip terminate continuation \
+                          sched_context utcb_init \
+                          perf_cnt x86desc gdt idt tss trap_state \
                           buddy_alloc vkey kdb_ke prio_list ipi timer_irq \
-                          scheduler clock svm vm
+                          scheduler clock vm_factory \
+                          sys_call_page
+
+INTERFACES_KERNEL-$(CONFIG_CPU_VIRT) += svm vm vm_svm
 
+PREPROCESS_PARTS       += ulock
+INTERFACES_KERNEL      += u_semaphore
 
-#ifeq ("$(CONFIG_USER_LOCKS)","y")
-  PREPROCESS_PARTS     += ulock
-  INTERFACES_KERNEL    += u_semaphore
-#endif
 
 apic_IMPL              := apic-ia32 apic-ia32-mp
 boot_console_IMPL      := boot_console-ia32-amd64
 boot_info_IMPL         := boot_info boot_info-ia32
+clock_IMPL              := clock clock-ia32
 config_IMPL            := config config-ia32-32 config-ia32
 context_IMPL           := context context-ia32 context-ia32-32 context-vcpu
 continuation_IMPL      := continuation-ia32-32
-clock_IMPL              := clock clock-ia32
 cpu_IMPL               := cpu cpu-ia32 cpu-32
 dirq_IMPL              := dirq dirq-ia32-ux
 dirq_pic_pin_IMPL       := dirq_pic_pin dirq_pic_pin-ia32-ux
 entry_frame_IMPL       := entry_frame entry_frame-ia32-ux \
                           entry_frame-abs-timeout-hack
 fpu_IMPL               := fpu fpu-ia32-ux fpu-ia32
-ioapic_IMPL            := ioapic-ia32
 ipi_IMPL               := ipi ipi-ia32
 kdb_ke_IMPL            := kdb_ke kdb_ke-ia32
 kernel_thread_IMPL     := kernel_thread kernel_thread-std kernel_thread-ia32
@@ -149,7 +150,6 @@ kmem_IMPL           := kmem-ia32 kmem-ia32-32
 kmem_alloc_IMPL                := kmem_alloc kmem_alloc-ia32
 main_IMPL              := main-ia32-32 main-ia32
 mapping_IMPL           := mapping-ia32-32 mapping
-mapdb_IMPL             := mapdb
 map_util_IMPL          := map_util map_util-mem map_util-io map_util-objs
 mem_layout_IMPL                := mem_layout mem_layout-ia32-32 mem_layout-ia32
 mem_space_IMPL         := mem_space mem_space-user mem_space-ia32
@@ -172,17 +172,15 @@ tb_entry_IMPL             := tb_entry tb_entry-ia32-32
 timer_IMPL             := timer timer-ia32-amd64-ux
 thread_IMPL            := thread thread-ia32 thread-ia32-32 \
                           thread-ipc \
-                          thread-list      \
+                          thread-list \
                           thread-pagefault thread-log      \
                           thread-debug thread-dbf thread-ulock thread-vcpu
 utcb_init_IMPL         := utcb_init utcb_init-ia32
 vmem_alloc_IMPL                := vmem_alloc vmem_alloc-ia32
-vm_IMPL                        := vm-svm
+vm_factory_IMPL         := vm_factory vm_factory-ia32
 watchdog_IMPL          := watchdog watchdog-ia32
 
-ifeq ("$(CONFIG_SERIAL)","y")
-  INTERFACES_KERNEL    += uart_console
-endif
+INTERFACES_KERNEL-$(CONFIG_SERIAL) += uart_console
 
 ifeq ("$(CONFIG_PROFILE)","y")
   cpu_lock_IMPL                := cpu_lock cpu_lock-pic
@@ -251,19 +249,16 @@ jdb_screen_IMPL           := jdb_screen jdb_screen-ia32
 jdb_tcb_IMPL           := jdb_tcb jdb_tcb-ia32-ux
 jdb_trace_set_IMPL     := jdb_trace_set jdb_trace_set-ia32-ux
 
-  ifeq ("$(CONFIG_JDB_MISC)","y")
-    INTERFACES_KERNEL  += jdb_tetris
-  endif
+INTERFACES_KERNEL-$(CONFIG_JDB_MISC)   += jdb_tetris
 endif
 
 
 CXXSRC_KERNEL          := kernel_panic.cc libc_backend_lock.cc
-ASSRC_KERNEL           := entry.S entry-native.S \
-                           sys_call_page-asm.S 
-ifeq ($(CONFIG_MP),y)
-ASSRC_KERNEL           += tramp-mp.S entry-mp.S
-endif
+ASSRC_KERNEL           := entry.S entry-native.S sys_call_page-asm.S
 
+ASSRC_KERNEL-$(CONFIG_MP)               += tramp-mp.S entry-mp.S
+ASSRC_KERNEL-$(CONFIG_CPU_VIRT)         += vm_svm_asm.S
+ASSRC_KERNEL                            += $(ASSRC_KERNEL-y)
 
 NOOPT                  += $(filter jdb%,\
                             $(foreach in,$(INTERFACES_KERNEL), \
@@ -488,3 +483,5 @@ endif
 endif
 
 MODULES_FILES = $(MODULES_FILE) $(MODULES_FILE_BSP)
+
+INTERFACES_KERNEL       += $(INTERFACES_KERNEL-y)
index 4633b32a9dc57a838d5d69c22cb8e2552e54715b..dcf1d8098f32f03d9d8776077abe41a19d9e3914 100644 (file)
@@ -1,4 +1,4 @@
-INTERFACE:
+INTERFACE [svm]:
 
 #include "l4_types.h"
 
index 664a67caa4305fffeac108bcbb43fa5b1a924a85..4f9ec86dc1ed93d459807314218616d81ba90267 100644 (file)
@@ -1190,7 +1190,7 @@ Jdb::check_for_cpus(bool try_nmi)
   for (unsigned c = 1; c < Config::Max_num_cpus; ++c)
     {
       if (Cpu::online(c) && !running.cpu(c))
-       Ipi::send(c, Ipi::Debug);
+       Ipi::cpu(c).send(Ipi::Debug);
     }
   Mem::barrier();
 retry:
@@ -1271,7 +1271,7 @@ Jdb::stop_all_cpus(unsigned current_cpu)
       // Huh, not CPU 0, so notify CPU 0 to enter JDB too
       // The notification is ignored if CPU 0 is already within JDB
       jdb_active = true;
-      Ipi::send(0, Ipi::Debug);
+      Ipi::cpu(0).send(Ipi::Debug);
 
       unsigned long wait_count = Max_wait_cnt;
       while (!running.cpu(0) && wait_count)
@@ -1400,7 +1400,7 @@ Jdb::remote_work_ipi(unsigned this_cpu, unsigned to_cpu,
   _remote_work_ipi_func_data = data;
   _remote_work_ipi_done      = 0;
 
-  Ipi::send(to_cpu, Ipi::Debug);
+  Ipi::cpu(to_cpu).send(Ipi::Debug);
 
   if (wait)
     while (!*(volatile unsigned long *)&_remote_work_ipi_done)
index cde9d2b04d740ab4b9b588e50a772a7ef3b5c8d3..159849ab032c928687560ed730a7a97d2f7928a8 100644 (file)
@@ -20,8 +20,9 @@ PRIVATE static
 void
 Jdb_ipi_module::print_info(unsigned cpu)
 {
+  Ipi &ipi = Ipi::cpu(cpu);
   printf("CPU%02u sent/rcvd: %ld/%ld\n",
-         cpu, Ipi::_stat_sent.cpu(cpu), Ipi::_stat_received.cpu(cpu));
+         cpu, ipi._stat_sent, ipi._stat_received);
 }
 
 PUBLIC
index dcc1e49b3e413652b9fff93000efb0dcdfa01582..00a4286954b5a7cc3bd3fbc8c26bca1c6e589243 100644 (file)
@@ -98,6 +98,10 @@ Jdb::leave_trap_handler(unsigned)
     signal (SIGIO, SIG_IGN);           // Ignore hardware interrupts
 }
 
+PROTECTED static inline
+void
+Jdb::monitor_address(unsigned, void *)
+{}
 
 IMPLEMENT inline
 bool
index c2ac338fa877f04ad492bc7c98e13c5e6812fb65..da3c9ef20ef2599e12d9cb8c5a0269058559c5a8 100644 (file)
@@ -25,7 +25,7 @@ next_irq:
 
        if (Pic::is_pending(irqs, Config::Scheduling_irq))
          {
-           Irq::log_irq(0, Config::Scheduling_irq);
+           Irq::log_timer_irq(Config::Scheduling_irq);
            Timer::acknowledge();
            Timer::update_system_clock();
            current_thread()->handle_timer_interrupt();
@@ -60,7 +60,7 @@ next_irq:
 
        if (Pic::is_pending(irq, Config::Scheduling_irq))
          {
-           Irq::log_irq(0, irq);
+           Irq::log_timer_irq(irq);
            Timer::acknowledge();
            Timer::update_system_clock();
            current_thread()->handle_timer_interrupt();
index cc98b04a822f72bc5104af0c28b9a941da63c8e8..5cea554dfdccabb5a8d59ff1aa1d86d4c0fc2623 100644 (file)
@@ -10,6 +10,9 @@ INTERFACE [mp]:
 
 EXTENSION class Ipi
 {
+private:
+  Unsigned32 _phys_id;
+
 public:
   enum Message {
     Ipi_start = 1,
@@ -24,24 +27,36 @@ IMPLEMENTATION [mp]:
 
 #include "cpu.h"
 #include "gic.h"
+#include "processor.h"
+
+PUBLIC inline
+Ipi::Ipi() : _phys_id(~0)
+{}
+
+IMPLEMENT inline NEEDS["processor.h"]
+void
+Ipi::init()
+{
+  _phys_id = Proc::cpu_id();
+}
 
 PUBLIC static
 void Ipi::ipi_call_debug_arch()
 {
 }
 
-PUBLIC static inline NEEDS["gic.h"]
+PUBLIC static inline
 void Ipi::eoi(Message)
 {
   // with the ARM-GIC we have to do the EOI right after the ACK
   stat_received();
 }
 
-PUBLIC static
-void Ipi::send(int logical_cpu, Message m)
+PUBLIC inline NEEDS["gic.h"]
+void Ipi::send(Message m)
 {
-  Gic_pin::_gic[0].softint_cpu(1 << Cpu::cpus.cpu(logical_cpu).phys_id(), m);
-  stat_sent(logical_cpu);
+  Gic_pin::_gic[0].softint_cpu(1 << _phys_id, m);
+  stat_sent();
 }
 
 PUBLIC static inline
index b8a2d23bec1f1ca40580112794d616bc77f3e3ab..d6292789e77cd36ec0439b6fa2d56e251a773b64 100644 (file)
@@ -127,6 +127,7 @@ int boot_ap_cpu(unsigned _cpu)
 
   Utcb_init::init_ap(cpu);
   Pic::init_ap();
+  Ipi::cpu(_cpu).init();
   Timer::init();
   Perf_cnt::init_ap();
 
index 9d525fdfe0d9eb60220486c8699b199e902041b1..6b671e7d0f26ed929e76b3a9af30508fe6cfb13e 100644 (file)
@@ -4,6 +4,7 @@ IMPLEMENTATION [arm]:
 #include "config.h"
 #include "cpu.h"
 #include "fpu.h"
+#include "ipi.h"
 #include "kern_lib_page.h"
 #include "kernel_task.h"
 #include "kip_init.h"
@@ -40,7 +41,7 @@ Startup::stage2()
 
   // The first 4MB of phys memory are always mapped to Map_base
   Mem_layout::add_pmem(Mem_layout::Sdram_phys_base, Mem_layout::Map_base,
-      4<<20);
+                       4 << 20);
   Kip_init::init();
   Kmem_alloc::init();
 
@@ -58,6 +59,7 @@ Startup::stage2()
   Cpu::init_mmu();
   Cpu::cpus.cpu(0).init(true);
   Fpu::init(0);
+  Ipi::cpu(0).init();
   Timer::init();
   Kern_lib_page::init();
   Utcb_init::init();
index 09787a48a655e9eae5e3100158054169c94c94f0..edffc28c77fa4d9224f33e84776306147db443e6 100644 (file)
@@ -1923,7 +1923,7 @@ Context::global_drq(unsigned cpu, Drq::Request_func *func, void *arg,
 
   _glbl_drq_q.cpu(cpu).enq(&_drq);
 
-  Ipi::send(cpu, Ipi::Global_request);
+  Ipi::cpu(cpu).send(Ipi::Global_request);
 
   //LOG_MSG_3VAL(src, "<drq", src->state(), Mword(this), 0);
   while (wait && (state() & Thread_drq_wait))
@@ -1976,7 +1976,7 @@ Context::enqueue_drq(Drq *rq, Drq::Exec_mode exec)
       if (ipi)
        {
          //LOG_MSG_3VAL(this, "sipi", current_cpu(), cpu(), (Mword)current());
-         Ipi::send(cpu, Ipi::Request);
+         Ipi::cpu(cpu).send(Ipi::Request);
        }
     }
   else
index 3647fc1dfebc4d7b58423de734aa38ad8791eca8..e75fa2cbc82149b50d8470c32975de7839068dd3 100644 (file)
@@ -282,13 +282,13 @@ Factory::kinvoke(L4_obj_ref ref, Mword rights, Syscall_frame *f,
 //----------------------------------------------------------------------------
 IMPLEMENTATION [svm]:
 
-#include "vm.h"
+#include "vm_factory.h"
 
 PRIVATE inline NOEXPORT
 Kobject_iface *
 Factory::new_vm(Utcb const *)
 {
-  Vm *new_t = Vm::create(this);
+  Vm *new_t = Vm_factory::create(this);
 
   if (!new_t)
     return 0;
index a21c8379c8ce107a1e9dc9d940274624c0df9e5f..be9694f6fd6505b60e54c5de41be8bed4a8725cc 100644 (file)
@@ -305,76 +305,6 @@ leave_alien_from_sysenter_by_iret:
        pusha
        jmp     slowtraps
 
-
-#ifdef CONFIG_SVM
-/**
- * Function resume_vm, arguments:
- *  - eax: physical VMCB address
- *  - edx: Pointer to registers (layout specific...)
- *
- * Note: To be called with interrupts disabled!
- */
-
-       .p2align(4)
-       .globl  resume_vm
-resume_vm:
-
-       // save callee saved regs
-       pushl %edi
-       pushl %esi
-       pushl %ebx
-       pushl %ebp
-
-       pushl %edx              // store pointer to register struct
-
-       clgi                    // super CLI
-
-       sti
-       nop
-
-       movl 4(%edx), %ecx      // restore guest GP registers
-       movl 8(%edx), %ebx
-       movl 12(%edx), %ebp
-       movl 16(%edx), %esi
-       movl 20(%edx), %edi
-       movl (%edx), %edx
-       
-       // TODO: Debugregs etc.
-               
-       // eax used as implicit operand for vm* instructions
-       vmload
-       vmrun           
-       vmsave
-
-       pushl %edx
-       movl 4(%esp), %edx     // get previously saved register struct pointer
-
-       movl %ecx, 4(%edx)     // save guest GP registers
-       movl %ebx, 8(%edx)
-       movl %ebp, 12(%edx)
-       movl %esi, 16(%edx)
-       movl %edi, 20(%edx)
-
-       movl (%esp), %ecx      // guest EDX to ECX
-       movl %ecx, (%edx)      // EDX has offset 0 in structure
-
-       // TODO: restore task register, clear busy flag
-
-       cli
-       nop
-       stgi
-                                               
-       addl $8, %esp         // adjust stack after two pushs
-
-       // restore callee saved registers
-       popl %ebp
-       popl %ebx
-       popl %esi
-       popl %edi
-               
-       ret
-#endif
-
        .bss
        .space  4096
        .global dbf_stack_top
diff --git a/kernel/fiasco/src/kern/ia32/32/vm_svm_asm.S b/kernel/fiasco/src/kern/ia32/32/vm_svm_asm.S
new file mode 100644 (file)
index 0000000..d7f190c
--- /dev/null
@@ -0,0 +1,66 @@
+/**
+ * Function resume_vm_svm, arguments:
+ *  - eax: physical VMCB address
+ *  - edx: Pointer to registers (layout specific...)
+ *
+ * Note: To be called with interrupts disabled!
+ */
+
+       .p2align(4)
+       .globl  resume_vm_svm
+resume_vm_svm:
+
+       // save callee saved regs
+       pushl %edi
+       pushl %esi
+       pushl %ebx
+       pushl %ebp
+
+       pushl %edx              // store pointer to register struct
+
+       clgi                    // super CLI
+
+       sti
+       nop
+
+       movl 4(%edx), %ecx      // restore guest GP registers
+       movl 8(%edx), %ebx
+       movl 12(%edx), %ebp
+       movl 16(%edx), %esi
+       movl 20(%edx), %edi
+       movl (%edx), %edx
+       
+       // TODO: Debugregs etc.
+               
+       // eax used as implicit operand for vm* instructions
+       vmload
+       vmrun           
+       vmsave
+
+       pushl %edx
+       movl 4(%esp), %edx     // get previously saved register struct pointer
+
+       movl %ecx, 4(%edx)     // save guest GP registers
+       movl %ebx, 8(%edx)
+       movl %ebp, 12(%edx)
+       movl %esi, 16(%edx)
+       movl %edi, 20(%edx)
+
+       movl (%esp), %ecx      // guest EDX to ECX
+       movl %ecx, (%edx)      // EDX has offset 0 in structure
+
+       // TODO: restore task register, clear busy flag
+
+       cli
+       nop
+       stgi
+                                               
+       addl $8, %esp         // adjust stack after two pushs
+
+       // restore callee saved registers
+       popl %ebp
+       popl %ebx
+       popl %esi
+       popl %edi
+               
+       ret
index f256a6b0b31e58a7533be9f0d7eae3db640d7f7c..425c865139beef3d069fae440169cfc9f0e5533a 100644 (file)
@@ -208,88 +208,6 @@ leave_from_sysenter_by_iret:
        orq     $EFLAGS_IF, 8(%rsp)
        iretq
 
-#ifdef CONFIG_SVM
-       .p2align(4)
-       .globl  resume_vm
-resume_vm:
-       
-       // save callee saved regs
-       push    %rbx
-       push    %r12
-       push    %r13
-       push    %r14
-       push    %r15
-       push    %rbp
-
-       mov     %rdi, %rax      // first arg goes to rax for vm*
-       push    %rsi            // store pointer to register struct
-
-       clgi
-
-       sti
-       nop
-
-       // restore guest GP regs
-       mov       8(%rsi), %rdx
-       mov      16(%rsi), %rcx
-       mov      24(%rsi), %rdi
-       mov      32(%rsi), %r8
-       mov      40(%rsi), %r9
-       mov      48(%rsi), %rbx
-       mov      56(%rsi), %rbp
-       mov      64(%rsi), %r10
-       mov      72(%rsi), %r11
-       mov      80(%rsi), %r12
-       mov      88(%rsi), %r13
-       mov      96(%rsi), %r14
-       mov     104(%rsi), %r15
-       mov        (%rsi), %rsi
-
-       // TODO: Debugregs
-
-       // rax used as implicit operand for vm* instructions
-       vmload
-       vmrun
-       vmsave
-
-       push    %rsi
-       mov     8(%rsp), %rsi   // get previously saved register struct pointer
-
-       mov     %rdx,   8(%rsi) // save guest GP registers
-       mov     %rcx,  16(%rsi)
-       mov     %rdi,  24(%rsi)
-       mov     %r8,   32(%rsi)
-       mov     %r9,   40(%rsi)
-       mov     %rbx,  48(%rsi)
-       mov     %rbp,  56(%rsi)
-       mov     %r10,  64(%rsi)
-       mov     %r11,  72(%rsi)
-       mov     %r12,  80(%rsi)
-       mov     %r13,  88(%rsi)
-       mov     %r14,  96(%rsi)
-       mov     %r15, 104(%rsi)
-
-       mov     (%rsp), %rdx      // guest rsi to rdx
-       mov     %rdx, (%rsi)      // store in regs structure
-
-       cli
-       nop
-       stgi
-
-       add     $16, %rsp
-       
-       // restore callee saved registers
-       pop     %rbp
-       pop     %r15
-       pop     %r14
-       pop     %r13
-       pop     %r12
-       pop     %rbx
-
-       ret
-#endif
-
-
        .bss
        .space  4096
        .global dbf_stack_top
diff --git a/kernel/fiasco/src/kern/ia32/64/vm_svm_asm.S b/kernel/fiasco/src/kern/ia32/64/vm_svm_asm.S
new file mode 100644 (file)
index 0000000..9ac8882
--- /dev/null
@@ -0,0 +1,78 @@
+       .p2align(4)
+       .globl  resume_vm_svm
+resume_vm_svm:
+       
+       // save callee saved regs
+       push    %rbx
+       push    %r12
+       push    %r13
+       push    %r14
+       push    %r15
+       push    %rbp
+
+       mov     %rdi, %rax      // first arg goes to rax for vm*
+       push    %rsi            // store pointer to register struct
+
+       clgi
+
+       sti
+       nop
+
+       // restore guest GP regs
+       mov       8(%rsi), %rdx
+       mov      16(%rsi), %rcx
+       mov      24(%rsi), %rdi
+       mov      32(%rsi), %r8
+       mov      40(%rsi), %r9
+       mov      48(%rsi), %rbx
+       mov      56(%rsi), %rbp
+       mov      64(%rsi), %r10
+       mov      72(%rsi), %r11
+       mov      80(%rsi), %r12
+       mov      88(%rsi), %r13
+       mov      96(%rsi), %r14
+       mov     104(%rsi), %r15
+       mov        (%rsi), %rsi
+
+       // TODO: Debugregs
+
+       // rax used as implicit operand for vm* instructions
+       vmload
+       vmrun
+       vmsave
+
+       push    %rsi
+       mov     8(%rsp), %rsi   // get previously saved register struct pointer
+
+       mov     %rdx,   8(%rsi) // save guest GP registers
+       mov     %rcx,  16(%rsi)
+       mov     %rdi,  24(%rsi)
+       mov     %r8,   32(%rsi)
+       mov     %r9,   40(%rsi)
+       mov     %rbx,  48(%rsi)
+       mov     %rbp,  56(%rsi)
+       mov     %r10,  64(%rsi)
+       mov     %r11,  72(%rsi)
+       mov     %r12,  80(%rsi)
+       mov     %r13,  88(%rsi)
+       mov     %r14,  96(%rsi)
+       mov     %r15, 104(%rsi)
+
+       mov     (%rsp), %rdx      // guest rsi to rdx
+       mov     %rdx, (%rsi)      // store in regs structure
+
+       cli
+       nop
+       stgi
+
+       add     $16, %rsp
+       
+       // restore callee saved registers
+       pop     %rbp
+       pop     %r15
+       pop     %r14
+       pop     %r13
+       pop     %r12
+       pop     %rbx
+
+       ret
index b35e56c823c7e16019285d254a25f54ed906a0f7..fd172e93a73d0906593f44280dcae8f041c14d4d 100644 (file)
@@ -212,6 +212,7 @@ PRIVATE static inline NOEXPORT
 Unsigned32
 Apic::get_num_errors()
 {
+  reg_write(APIC_esr, 0);
   return reg_read(APIC_esr);
 }
 
@@ -220,6 +221,7 @@ void
 Apic::clear_num_errors()
 {
   reg_write(APIC_esr, 0);
+  reg_write(APIC_esr, 0);
 }
 
 PUBLIC static inline
@@ -291,7 +293,7 @@ void
 Apic::map_apic_page()
 {
   Address offs;
-  Address base = Cpu::rdmsr(APIC_base_msr) & 0xfffff000;
+  Address base = apic_page_phys();
   // We should not change the physical address of the Local APIC page if
   // possible since some versions of VMware would complain about a
   // non-implemented feature
@@ -761,13 +763,13 @@ Apic::error_interrupt(Return_frame *regs)
       if (ignore_invalid_apic_reg_access)
        return;
 
-      printf("APIC invalid register access error at "L4_PTR_FMT"\n",
-            regs->ip());
+      printf("cpu%d: APIC invalid register access error at "L4_PTR_FMT"\n",
+            current_cpu(), regs->ip());
       return;
     }
 
   apic_error_cnt++;
-  printf("APIC error %08x(%08x)\n", err1, err2);
+  printf("cpu%d: APIC error %08x(%08x)\n", current_cpu(), err1, err2);
 }
 
 // deactivate APIC by writing to appropriate MSR
index e045f64b4a3d28aaf7a23310663a52fab3fcf1e0..59b8a8a7f118c87a002f61015b4919772a2ef4bc 100644 (file)
@@ -39,6 +39,7 @@ public:
     Tlb_inst_4M,
     Tlb_data_4k_4M,
     Tlb_inst_4k_4M,
+    Tlb_data_2M_4M,
   };
 
   enum
@@ -544,6 +545,8 @@ Cpu::Cache_table const Cpu::intel_cache_table[] FIASCO_INITDATA_CPU =
   { 0x52, Tlb_inst_4k_4M,    256,   0,    0 },
   { 0x56, Tlb_data_4M,        16,   4,    0 },
   { 0x57, Tlb_data_4k,        16,   4,    0 },
+  { 0x59, Tlb_data_4k,        16,   0,    0 },
+  { 0x5A, Tlb_data_2M_4M,     32,   4,    0 },
   { 0x5B, Tlb_data_4k_4M,     64,   0,    0 },
   { 0x5C, Tlb_data_4k_4M,    128,   0,    0 },
   { 0x5D, Tlb_data_4k_4M,    256,   0,    0 },
@@ -563,6 +566,7 @@ Cpu::Cache_table const Cpu::intel_cache_table[] FIASCO_INITDATA_CPU =
   { 0x7D, Cache_l2,         2048,   8,   64 },
   { 0x7E, Cache_l2,          256,   8,  128 },
   { 0x7F, Cache_l2,          512,   2,   64 },
+  { 0x80, Cache_l2,          512,  16,   64 },
   { 0x82, Cache_l2,          256,   8,   32 },
   { 0x83, Cache_l2,          512,   8,   32 },
   { 0x84, Cache_l2,         1024,   8,   32 },
index 97abad39075385836c6454fdd1a1f0424239a0d7..cc996e05b0952ac7971240d09f083a6f020f1414 100644 (file)
@@ -30,7 +30,7 @@ static inline void irq_spinners(int irqnum)
 
 /** Hardware interrupt entry point.  Calls corresponding Dirq instance's
     Dirq::hit() method.
-    @param irqobj hardware-interrupt object 
+    @param irqobj hardware-interrupt object
  */
 extern "C" FIASCO_FASTCALL
 void
@@ -73,7 +73,7 @@ thread_timer_interrupt (Address ip)
   Timer::acknowledge();
   Timer::update_system_clock();
 
-  Irq::log_irq(0, Config::scheduler_irq_vector);
+  Irq::log_timer_irq(Config::scheduler_irq_vector);
   (void)ip;
   irq_spinners(Config::scheduler_irq_vector);
 
index 58155a7d850717cd2e8bdd9c9fe3529eed697269..9b221b5500f3879f0e096cfa93cb255be4697520 100644 (file)
@@ -5,7 +5,9 @@ INTERFACE [mp]:
 EXTENSION class Ipi
 {
 private:
-  static Per_cpu<unsigned> _count;
+  Unsigned32 _apic_id;
+  unsigned _count;
+
 public:
   enum Message
   {
@@ -19,13 +21,22 @@ public:
 //---------------------------------------------------------------------------
 IMPLEMENTATION[mp]:
 
-Per_cpu<unsigned> DEFINE_PER_CPU Ipi::_count; // debug
-
 #include <cstdio>
 #include "apic.h"
-#include "cpu.h"
 #include "kmem.h"
 
+PUBLIC inline
+Ipi::Ipi() : _apic_id(~0)
+{}
+
+IMPLEMENT inline NEEDS["apic.h"]
+void
+Ipi::init()
+{
+  _apic_id = Apic::get_id();
+}
+
+
 PUBLIC static inline
 void
 Ipi::ipi_call_debug_arch()
@@ -41,12 +52,12 @@ Ipi::eoi(Message)
   stat_received();
 }
 
-PUBLIC static inline NEEDS["apic.h", "cpu.h"]
+PUBLIC inline NEEDS["apic.h"]
 void
-Ipi::send(int logical_cpu, Message m)
+Ipi::send(Message m)
 {
-  Apic::mp_send_ipi(Cpu::cpus.cpu(logical_cpu).phys_id(), (Unsigned8)m);
-  stat_sent(logical_cpu);
+  Apic::mp_send_ipi(_apic_id, (Unsigned8)m);
+  stat_sent();
 }
 
 PUBLIC static inline NEEDS["apic.h"]
@@ -57,16 +68,30 @@ Ipi::bcast(Message m)
 }
 
 #if defined(CONFIG_IRQ_SPINNER)
-#include "apic.h"
 
 // debug
 PRIVATE static
 void Ipi::ipi_call_spin()
 {
-  int cpu = Cpu::p2l(Apic::get_id());
-  if (cpu >= 0)
-    *(unsigned char*)(Mem_layout::Adap_vram_cga_beg + 22*160 + cpu*+2)
-      = '0' + (_count.cpu(cpu)++ % 10);
+  unsigned cpu;
+  Ipi *ipi = 0;
+  for (cpu = 0; cpu < Config::Max_num_cpus; ++cpu)
+    {
+      if (!Per_cpu_data::valid(cpu))
+       continue;
+
+      if (Ipi::cpu(cpu)._apic_id == Apic::get_id())
+       {
+         ipi = &Ipi::cpu(cpu);
+         break;
+       }
+    }
+
+  if (!ipi)
+    return;
+
+  *(unsigned char*)(Mem_layout::Adap_vram_cga_beg + 22*160 + cpu*+2)
+    = '0' + (ipi->_count++ % 10);
 }
 #endif
 
index bf7479f6b27512f13f27c9ec50a03ae2d592b2b8..31c8dc4226b0bd45e3e530471908e6e78a8a79b8 100644 (file)
@@ -93,6 +93,7 @@ IMPLEMENTATION[(ia32,amd64) && mp]:
 #include "div32.h"
 #include "fpu.h"
 #include "globals.h"
+#include "ipi.h"
 #include "kernel_task.h"
 #include "processor.h"
 #include "per_cpu_data_alloc.h"
@@ -120,6 +121,7 @@ int boot_ap_cpu(unsigned _cpu)
   Utcb_init::init_ap(cpu);
 
   Apic::init_ap();
+  Ipi::cpu(_cpu).init();
   Timer::init();
   Apic::check_still_getting_interrupts();
 
index 956024e034cb759f7e82350447e8ebaa35c3e6c2..c4328a5c36952b8183ef3c95a29b5191b8c4599a 100644 (file)
@@ -14,6 +14,7 @@ IMPLEMENTATION[ia32,amd64]:
 #include "fpu.h"
 #include "idt.h"
 #include "initcalls.h"
+#include "ipi.h"
 #include "kernel_console.h"
 #include "kernel_task.h"
 #include "kip_init.h"
@@ -94,6 +95,7 @@ Startup::stage2()
   Idt::init();
   Fpu::init(0);
   Apic::init();
+  Ipi::cpu(0).init();
   Timer::init();
   Timer::master_cpu(0);
   Apic::check_still_getting_interrupts();
index 21f528ede813fab4f7b9f224c89aa7c9a5bbb3cd..06dfcbe5f08f9d2e670f5889a290fbeb597505e8 100644 (file)
@@ -101,10 +101,10 @@ Svm::Svm(unsigned cpu)
   Unsigned32 eax, ebx, ecx, edx;
   c.cpuid (0x8000000a, &eax, &ebx, &ecx, &edx);
   if (edx & 1)
-  {
-    printf("Nested Paging supported\n");
-    _has_npt = true;
-  }
+    {
+      printf("Nested Paging supported\n");
+      _has_npt = true;
+    }
   printf("NASID: 0x%x\n", ebx);
   _max_asid = ebx - 1;
   assert(_max_asid > 0);
@@ -133,7 +133,7 @@ Svm::Svm(unsigned cpu)
   /* clean out vmcb */
   memset(_kernel_vmcb, 0, Vmcb_size);
 
-  /* 8kB MSR permission map */ 
+  /* 8kB MSR permission map */
   check(_msrpm = Mapped_allocator::allocator()->unaligned_alloc(Msr_pm_size));
   _msrpm_base_pa = Kmem::virt_to_phys(_msrpm);
   memset(_msrpm, ~0, Msr_pm_size);
diff --git a/kernel/fiasco/src/kern/ia32/vm.cpp b/kernel/fiasco/src/kern/ia32/vm.cpp
new file mode 100644 (file)
index 0000000..c08b089
--- /dev/null
@@ -0,0 +1,83 @@
+INTERFACE:
+
+#include "task.h"
+
+class Vm : public Task
+{
+public:
+  ~Vm() {}
+
+  void invoke(L4_obj_ref obj, Mword rights, Syscall_frame *f, Utcb *utcb) = 0;
+
+  enum Operation
+  {
+    Vm_run_op = Task::Vm_ops + 0,
+  };
+};
+
+// ------------------------------------------------------------------------
+IMPLEMENTATION:
+
+#include "cpu.h"
+
+class Mem_space_vm : public Mem_space
+{
+public:
+  Mem_space_vm(Ram_quota *q) : Mem_space(q, false) {}
+  virtual Page_number map_max_address() const
+  { return Page_number::create(1UL << (MWORD_BITS - Page_shift)); }
+};
+
+struct Vm_space_factory
+{
+  /** Create a usual Mem_space object. */
+  template< typename A1 >
+  static void create(Mem_space *v, A1 a1)
+  { new (v) Mem_space_vm(a1); }
+
+  template< typename S >
+  static void create(S *v)
+  { new (v) S(); }
+};
+
+
+PUBLIC
+Vm::Vm(Ram_quota *q)
+  : Task(Vm_space_factory(), q, L4_fpage(0))
+{
+}
+
+
+PUBLIC static
+template< typename VM >
+slab_cache_anon *
+Vm::allocator()
+{
+  static slab_cache_anon *slabs = new Kmem_slab_simple (sizeof (VM),
+                                                        sizeof (Mword),
+                                                        "Vm");
+  return slabs;
+}
+
+
+PUBLIC
+template< typename Vm_impl >
+void
+Vm::vm_invoke(L4_obj_ref obj, Mword rights, Syscall_frame *f, Utcb *utcb)
+{
+  if (EXPECT_FALSE(f->tag().proto() != L4_msg_tag::Label_task))
+    {
+      f->tag(commit_result(-L4_err::EBadproto));
+      return;
+    }
+
+  switch (utcb->values[0])
+    {
+    case Vm_run_op:
+      f->tag(static_cast<Vm_impl *>(this)->sys_vm_run(f, utcb));
+      return;
+    default:
+      Task::invoke(obj, rights, f, utcb);
+      return;
+    }
+}
diff --git a/kernel/fiasco/src/kern/ia32/vm_factory-ia32.cpp b/kernel/fiasco/src/kern/ia32/vm_factory-ia32.cpp
new file mode 100644 (file)
index 0000000..7e8a57f
--- /dev/null
@@ -0,0 +1,39 @@
+IMPLEMENTATION [svm]:
+
+#include "ram_quota.h"
+#include "svm.h"
+#include "vm_svm.h"
+
+PRIVATE static inline
+template< typename VM >
+VM *
+Vm_factory::allocate(Ram_quota *quota)
+{
+  if (void *t = Vm::allocator<VM>()->q_alloc(quota))
+    {
+      VM *a = new (t) VM(quota);
+      if (a->valid())
+        return a;
+
+      delete a;
+    }
+
+  return 0;
+}
+
+IMPLEMENT
+Vm *
+Vm_factory::create(Ram_quota *quota)
+{
+  if (Svm::cpus.cpu(current_cpu()).svm_enabled())
+    return allocate<Vm_svm>(quota);
+
+  return 0;
+}
+
+IMPLEMENTATION [!svm]:
+
+IMPLEMENT
+Vm *
+Vm_factory::create(Ram_quota *)
+{ return 0; }
diff --git a/kernel/fiasco/src/kern/ia32/vm_svm.cpp b/kernel/fiasco/src/kern/ia32/vm_svm.cpp
new file mode 100644 (file)
index 0000000..f8273a9
--- /dev/null
@@ -0,0 +1,726 @@
+INTERFACE [svm]:
+
+#include "config.h"
+#include "vm.h"
+
+class Vmcb;
+
+class Vm_svm : public Vm
+{
+private:
+  static void resume_vm_svm(Mword phys_vmcb, Mword *regs)
+    asm("resume_vm_svm") __attribute__((__regparm__(3)));
+  Unsigned8 _asid[Config::Max_num_cpus];
+  Unsigned32 _asid_generation[Config::Max_num_cpus];
+
+  enum
+  {
+    EFER_LME = 1 << 8,
+    EFER_LMA = 1 << 10,
+  };
+};
+
+// ------------------------------------------------------------------------
+INTERFACE [svm && debug]:
+
+EXTENSION class Vm_svm
+{
+protected:
+  struct Log_vm_svm_exit
+  {
+    Mword exitcode, exitinfo1, exitinfo2, rip;
+  };
+
+  static unsigned log_fmt_svm(Tb_entry *, int max, char *buf) asm ("__fmt_vm_svm_exit");
+};
+
+// ------------------------------------------------------------------------
+IMPLEMENTATION [svm]:
+
+#include "context.h"
+#include "mem_space.h"
+#include "fpu.h"
+#include "ref_ptr.h"
+#include "svm.h"
+#include "thread.h" // XXX: circular dep, move this out here!
+#include "thread_state.h" // XXX: circular dep, move this out here!
+
+
+// ------------------------------------------------------------------------
+IMPLEMENTATION [svm && ia32]:
+
+#include "virt.h"
+
+PRIVATE static inline
+bool
+Vm_svm::is_64bit()
+{ return false; }
+
+PRIVATE inline NEEDS["virt.h"]
+Address
+Vm_svm::get_vm_cr3(Vmcb *)
+{
+  // When running in 32bit mode we already return the page-table of our Vm
+  // object, whether we're running with shadow or nested paging
+  return mem_space()->phys_dir();
+}
+
+//----------------------------------------------------------------------------
+IMPLEMENTATION [svm && amd64]:
+
+#include "virt.h"
+
+PRIVATE static inline
+bool
+Vm_svm::is_64bit()
+{ return true; }
+
+PRIVATE inline NEEDS["virt.h"]
+Address
+Vm_svm::get_vm_cr3(Vmcb *v)
+{
+  // When we have nested paging, we just return the 4lvl host page-table of
+  // our Vm.
+  if (v->np_enabled())
+     return mem_space()->phys_dir();
+
+  // When running with shadow paging and the guest is running in long mode
+  // and has paging enabled, we can just return the 4lvl page table of our
+  // host Vm object.
+  if (   (v->state_save_area.efer & EFER_LME)
+      && (v->state_save_area.cr0 & CR0_PG))
+    return mem_space()->phys_dir();
+
+  // Now it's getting tricky when running with shadow paging.
+  // We need to obey the following rules:
+  //  - When the guest is not running in 64bit mode the CR3 one can set for
+  //    the page-table must be below 4G physical memory (i.e. bit 32-63 must
+  //    be zero). This is unfortunate when the host has memory above 4G as
+  //    Fiasco gets its memory from the end of physical memory, i.e.
+  //    page-table memory is above 4G.
+  //  - We need an appropriate page-table format for 32bit!
+  //    That means either a 2lvl page-table or a 3lvl PAE one. That would
+  //    require to maintain two page-tables for the guest, one for 32bit
+  //    mode execution and one for 64 bit execution. It is needed either for
+  //    the transition from real to long-mode via protected mode or for
+  //    32bit only guests.
+  //    There's one trick to avoid having two PTs: 4lvl-PTs and 3lvl-PAE-PTs
+  //    have much in common so that it's possible to just take the the PDPE
+  //    one of the host as the 3lvl-PAE-PT for the guest. Well, not quite.
+  //    The problem is that SVM checks that MBZ bits in the PAE-PT entries
+  //    are really 0 as written in the spec. Now the 4lvl PT contains rights
+  //    bits there, so that this type of PT is refused and does not work on
+  //    real hardware.
+  //    So why is the code still here? Well, QEmu isn't so picky about the
+  //    bits in the PDPE and it thus works there...
+  Address vm_cr3 = mem_space()->dir()->walk(Virt_addr(0), 0).e->addr();
+  if (EXPECT_FALSE(!vm_cr3))
+    {
+      // force allocation of new secondary page-table level
+      mem_space()->dir()->alloc_cast<Mem_space_q_alloc>()
+                 ->walk(Virt_addr(0), 1, Mem_space_q_alloc(ram_quota(),
+                        Mapped_allocator::allocator()));
+      vm_cr3 = mem_space()->dir()->walk(Virt_addr(0), 0).e->addr();
+    }
+
+  if (EXPECT_FALSE(vm_cr3 >= 1UL << 32))
+    {
+      WARN("svm: Host page-table not under 4G, sorry.\n");
+      return 0;
+    }
+
+  return vm_cr3;
+}
+
+//----------------------------------------------------------------------------
+IMPLEMENTATION [svm]:
+
+PRIVATE inline
+Unsigned8
+Vm_svm::asid ()
+{
+  return _asid[current_cpu()];
+}
+
+PRIVATE inline
+void
+Vm_svm::asid (Unsigned8 asid)
+{
+  _asid[current_cpu()] = asid;
+}
+
+PRIVATE inline
+Unsigned32
+Vm_svm::asid_generation ()
+{
+  return _asid_generation[current_cpu()];
+}
+
+PRIVATE inline
+void
+Vm_svm::asid_generation (Unsigned32 generation)
+{
+  _asid_generation[current_cpu()] = generation;
+}
+
+PUBLIC
+Vm_svm::Vm_svm(Ram_quota *q)
+  : Vm(q)
+{
+  memset(_asid, 0, sizeof(_asid));
+  memset(_asid_generation, 0, sizeof(_asid_generation));
+}
+
+PUBLIC inline
+void *
+Vm_svm::operator new (size_t size, void *p)
+{
+  assert (size == sizeof (Vm_svm));
+  return p;
+}
+
+PUBLIC
+void
+Vm_svm::operator delete (void *ptr)
+{
+  Vm_svm *t = reinterpret_cast<Vm_svm*>(ptr);
+  allocator<Vm_svm>()->q_free(t->ram_quota(), ptr);
+}
+
+
+// to do:
+//   - handle cr2
+//   - force fpu ownership
+//   - debug registers not covered by VMCB
+
+PRIVATE
+void
+Vm_svm::copy_state_save_area(Vmcb *dest, Vmcb *src)
+{
+  Vmcb_state_save_area *d = &dest->state_save_area;
+  Vmcb_state_save_area *s = &src->state_save_area;
+
+  d->es_sel       = s->es_sel;
+  d->es_attrib    = s->es_attrib;
+  d->es_limit     = s->es_limit;
+  d->es_base      = s->es_base;
+
+  d->cs_sel       = s->cs_sel;
+  d->cs_attrib    = s->cs_attrib;
+  d->cs_limit     = s->cs_limit;
+  d->cs_base      = s->cs_base;
+
+  d->ss_sel       = s->ss_sel;
+  d->ss_attrib    = s->ss_attrib;
+  d->ss_limit     = s->ss_limit;
+  d->ss_base      = s->ss_base;
+
+  d->ds_sel       = s->ds_sel;
+  d->ds_attrib    = s->ds_attrib;
+  d->ds_limit     = s->ds_limit;
+  d->ds_base      = s->ds_base;
+
+  d->fs_sel       = s->fs_sel;
+  d->fs_attrib    = s->fs_attrib;
+  d->fs_limit     = s->fs_limit;
+  d->fs_base      = s->fs_base;
+
+  d->gs_sel       = s->gs_sel;
+  d->gs_attrib    = s->gs_attrib;
+  d->gs_limit     = s->gs_limit;
+  d->gs_base      = s->gs_base;
+
+  d->gdtr_sel     = s->gdtr_sel;
+  d->gdtr_attrib  = s->gdtr_attrib;
+  d->gdtr_limit   = s->gdtr_limit;
+  d->gdtr_base    = s->gdtr_base;
+
+  d->ldtr_sel     = s->ldtr_sel;
+  d->ldtr_attrib  = s->ldtr_attrib;
+  d->ldtr_limit   = s->ldtr_limit;
+  d->ldtr_base    = s->ldtr_base;
+
+  d->idtr_sel     = s->idtr_sel;
+  d->idtr_attrib  = s->idtr_attrib;
+  d->idtr_limit   = s->idtr_limit;
+  d->idtr_base    = s->idtr_base;
+
+  d->tr_sel       = s->tr_sel;
+  d->tr_attrib    = s->tr_attrib;
+  d->tr_limit     = s->tr_limit;
+  d->tr_base      = s->tr_base;
+
+  d->cpl          = s->cpl;
+  d->efer         = s->efer;
+
+  d->cr4          = s->cr4;
+  d->cr3          = s->cr3;
+  d->cr0          = s->cr0;
+  d->dr7          = s->dr7;
+  d->dr6          = s->dr6;
+  d->rflags       = s->rflags;
+
+  d->rip          = s->rip;
+  d->rsp          = s->rsp;
+  d->rax          = s->rax;
+
+  d->star         = s->star;
+  d->lstar        = s->lstar;
+  d->cstar        = s->cstar;
+  d->sfmask       = s->sfmask;
+  d->kernelgsbase = s->kernelgsbase;
+  d->sysenter_cs  = s->sysenter_cs;
+  d->sysenter_esp = s->sysenter_esp;
+  d->sysenter_eip = s->sysenter_eip;
+  d->cr2          = s->cr2;
+
+  d->g_pat        = s->g_pat;
+  d->dbgctl       = s->dbgctl;
+  d->br_from      = s->br_from;
+  d->br_to        = s->br_to;
+  d->lastexcpfrom = s->lastexcpfrom;
+  d->last_excpto  = s->last_excpto;
+}
+
+
+PRIVATE
+void
+Vm_svm::copy_control_area(Vmcb *dest, Vmcb *src)
+{
+  Vmcb_control_area *d = &dest->control_area;
+  Vmcb_control_area *s = &src->control_area;
+
+  d->intercept_rd_crX          = s->intercept_rd_crX;
+  d->intercept_wr_crX          = s->intercept_wr_crX;
+
+  d->intercept_rd_drX          = s->intercept_rd_drX;
+  d->intercept_wr_drX          = s->intercept_wr_drX;
+
+  d->intercept_exceptions      = s->intercept_exceptions;
+
+  d->intercept_instruction0    = s->intercept_instruction0;
+  d->intercept_instruction1    = s->intercept_instruction1;
+
+  // skip iopm_base_pa and msrpm_base_pa
+
+  d->tsc_offset                = s->tsc_offset;
+  d->guest_asid_tlb_ctl        = s->guest_asid_tlb_ctl;
+  d->interrupt_ctl             = s->interrupt_ctl;
+  d->interrupt_shadow          = s->interrupt_shadow;
+  d->exitcode                  = s->exitcode;
+  d->exitinfo1                 = s->exitinfo1;
+  d->exitinfo2                 = s->exitinfo2;
+  d->exitintinfo               = s->exitintinfo;
+  d->np_enable                 = s->np_enable;
+
+  d->eventinj                  = s->eventinj;
+  d->n_cr3                     = s->n_cr3;
+  d->lbr_virtualization_enable = s->lbr_virtualization_enable;
+}
+
+
+/* skip anything that does not change */
+PRIVATE
+void
+Vm_svm::copy_control_area_back(Vmcb *dest, Vmcb *src)
+{
+  Vmcb_control_area *d = &dest->control_area;
+  Vmcb_control_area *s = &src->control_area;
+
+  d->interrupt_ctl    = s->interrupt_ctl;
+  d->interrupt_shadow = s->interrupt_shadow;
+
+  d->exitcode         = s->exitcode;
+  d->exitinfo1        = s->exitinfo1;
+  d->exitinfo2        = s->exitinfo2;
+  d->exitintinfo      = s->exitintinfo;
+
+  d->eventinj = s->eventinj;
+}
+
+/** \brief Choose an ASID for this Vm.
+ *
+ * Choose an ASID for this Vm. The ASID provided by userspace is ignored
+ * instead the kernel picks one.
+ * Userspace uses the flush-bit to receive a new ASID for this Vm.
+ * All ASIDs are flushed as soon as the kernel runs out of ASIDs.
+ *
+ * @param vmcb_s external VMCB provided by userspace
+ * @param kernel_vmcb_s our VMCB
+ *
+ */
+PRIVATE
+void
+Vm_svm::configure_asid (Vmcb *vmcb_s, Vmcb *kernel_vmcb_s)
+{
+  assert (cpu_lock.test());
+
+  Svm &s = Svm::cpus.cpu(current_cpu());
+
+  if (// vmm requests flush
+      ((vmcb_s->control_area.guest_asid_tlb_ctl >> 32) & 1) == 1 ||
+      // our asid is not valid or expired
+      !(s.asid_valid(asid(), asid_generation())))
+    {
+      asid(s.next_asid());
+      asid_generation(s.global_asid_generation());
+    }
+
+  assert(s.asid_valid(asid(), asid_generation()));
+#if 1
+  kernel_vmcb_s->control_area.guest_asid_tlb_ctl = asid();
+  if (s.flush_all_asids())
+    {
+      kernel_vmcb_s->control_area.guest_asid_tlb_ctl |= (1ULL << 32);
+      s.flush_all_asids(false);
+    }
+#else
+  kernel_vmcb_s->control_area.guest_asid_tlb_ctl = 1;
+  kernel_vmcb_s->control_area.guest_asid_tlb_ctl |= (1ULL << 32);
+#endif
+}
+
+PUBLIC
+L4_msg_tag
+Vm_svm::sys_vm_run(Syscall_frame *f, Utcb *utcb)
+{
+  //Mword host_cr0;
+  Unsigned64 orig_cr3, orig_ncr3;
+
+  assert (cpu_lock.test());
+
+  /* these 4 must not use ldt entries */
+  assert (!(Cpu::get_cs() & (1 << 2)));
+  assert (!(Cpu::get_ss() & (1 << 2)));
+  assert (!(Cpu::get_ds() & (1 << 2)));
+  assert (!(Cpu::get_es() & (1 << 2)));
+
+  Svm &s = Svm::cpus.cpu(current_cpu());
+
+  L4_msg_tag const &tag = f->tag();
+
+  if (EXPECT_FALSE(!s.svm_enabled()))
+    {
+      WARN("svm: not supported/enabled\n");
+      return commit_result(-L4_err::EInval);
+    }
+
+  if (EXPECT_FALSE(tag.words() < 1 + Svm::Gpregs_words))
+    {
+      WARN("svm: Invalid message length\n");
+      return commit_result(-L4_err::EInval);
+    }
+
+  L4_snd_item_iter vmcb_item(utcb, tag.words());
+
+  if (EXPECT_FALSE(!tag.items() || !vmcb_item.next()))
+    return commit_result(-L4_err::EInval);
+
+  L4_fpage vmcb_fpage(vmcb_item.get()->d);
+
+  if (EXPECT_FALSE(!vmcb_fpage.is_mempage()))
+    {
+      WARN("svm: Fpage invalid\n");
+      return commit_error(utcb, L4_error::Overflow);
+    }
+
+  if (EXPECT_FALSE(vmcb_fpage.order() < 12))
+    return commit_result(-L4_err::EInval);
+
+  Vmcb *vmcb_s = (Vmcb *)(Virt_addr(vmcb_fpage.mem_address()).value());
+  Vmcb *kernel_vmcb_s = s.kernel_vmcb();
+
+  if (EXPECT_FALSE(vmcb_s->np_enabled() && !s.has_npt()))
+    {
+      WARN("svm: No NPT available\n");
+      return commit_result(-L4_err::EInval);
+    }
+
+  Address vm_cr3 = get_vm_cr3(vmcb_s);
+  // can only fail on 64bit, will be optimized away on 32bit
+  if (EXPECT_FALSE(is_64bit() && !vm_cr3))
+    return commit_result(-L4_err::ENomem);
+
+  Mem_space::Phys_addr phys_vmcb;
+  Mem_space::Size size;
+  bool resident;
+  unsigned int page_attribs;
+
+  Mem_space *const curr_mem_space = current()->space()->mem_space();
+  resident = curr_mem_space->v_lookup(Virt_addr(vmcb_s), &phys_vmcb, &size, &page_attribs);
+
+  if (!resident)
+    {
+      WARN("svm: VMCB invalid\n");
+      return commit_result(-L4_err::EInval);
+    }
+#if 0
+  // currently only support for nested pagetables
+  // if shadow page tables are to be allowed then cr0
+  // needs further scrutiny and cr3 must not be accessible
+  if((vmcb_s->control_area.np_enable & 1) != 1) 
+    return commit_result(-L4_err::EInval);
+#endif
+
+  // neither EFER.LME nor EFER.LMA must be set
+  if (EXPECT_FALSE(!is_64bit()
+                  && (vmcb_s->state_save_area.efer & (EFER_LME | EFER_LMA))))
+    {
+      WARN("svm: EFER invalid %llx\n", vmcb_s->state_save_area.efer);
+      return commit_result(-L4_err::EInval);
+    }
+
+  // EFER.SVME must be set
+  if (!(vmcb_s->state_save_area.efer & 0x1000))
+    {
+      WARN("svm: EFER invalid %llx\n", vmcb_s->state_save_area.efer);
+      return commit_result(-L4_err::EInval);
+    }
+  // allow PAE in combination with NPT
+#if 0
+  // CR4.PAE must be clear
+  if(vmcb_s->state_save_area.cr4 & 0x20)
+    return commit_result(-L4_err::EInval);
+#endif
+
+  // XXX:
+  // This generates a circular dep between thread<->task, this cries for a
+  // new abstraction...
+  if (!(current()->state() & Thread_fpu_owner))
+    {
+      if (!current_thread()->switchin_fpu())
+        {
+          WARN("svm: switchin_fpu failed\n");
+          return commit_result(-L4_err::EInval); 
+        }
+    }
+
+#if 0  //should never happen
+  host_cr0 = Cpu::get_cr0();
+  // the VMM does not currently own the fpu but wants to
+  // make it available for the guest. This may happen
+  // if it was descheduled between activating the fpu and
+  // executing the vm_run operation
+  if (!(vmcb_s->state_save_area.cr0 & 0x8) && (host_cr0 & 0x8))
+    {
+      WARN("svm: FPU TS\n");
+      return commit_result(-L4_err::EInval);
+    }
+#endif
+
+  // increment our refcount, and drop it at the end automatically
+  Ref_ptr<Vm_svm> pin_myself(this);
+
+  // sanitize VMCB
+
+  orig_cr3  = vmcb_s->state_save_area.cr3;
+  orig_ncr3 = vmcb_s->control_area.n_cr3;
+
+  copy_control_area(kernel_vmcb_s, vmcb_s);
+  copy_state_save_area(kernel_vmcb_s, vmcb_s);
+
+  if (EXPECT_FALSE(is_64bit() && !kernel_vmcb_s->np_enabled()
+                   && (kernel_vmcb_s->state_save_area.cr0 & CR0_PG)
+                   && !(kernel_vmcb_s->state_save_area.cr4 & CR4_PAE)))
+    {
+      WARN("svm: No 32bit shadow page-tables on AMD64, use PAE!\n");
+      return commit_result(-L4_err::EInval);
+    }
+
+  // set MCE according to host
+  kernel_vmcb_s->state_save_area.cr4 |= Cpu::get_cr4() & CR4_MCE;
+
+  // allow w access to cr0, cr2, cr3
+  // allow r access to cr0, cr2, cr3, cr4
+  // to do: check if enabling PAE in cr4 needs to be controlled
+
+  // allow r/w access to dr[0-7]
+  kernel_vmcb_s->control_area.intercept_rd_drX |= 0xff00;
+  kernel_vmcb_s->control_area.intercept_wr_drX |= 0xff00;
+
+#if 0
+  // intercept exception vectors 0-31
+  kernel_vmcb_s->control_area.intercept_exceptions = 0xffffffff;
+#endif
+
+  // enable iopm and msrpm
+  kernel_vmcb_s->control_area.intercept_instruction0 |= 0x18000000;
+  // intercept FERR_FREEZE and shutdown events
+  kernel_vmcb_s->control_area.intercept_instruction0 |= 0xc0000000;
+  // intercept INTR/NMI/SMI/INIT
+  kernel_vmcb_s->control_area.intercept_instruction0 |= 0xf;
+  // intercept INVD
+  kernel_vmcb_s->control_area.intercept_instruction0 |= (1 << 22);
+  // intercept HLT
+  kernel_vmcb_s->control_area.intercept_instruction0 |= (1 << 24);
+  // intercept task switch
+  kernel_vmcb_s->control_area.intercept_instruction0 |= (1 << 29);
+  // intercept shutdown
+  kernel_vmcb_s->control_area.intercept_instruction0 |= (1 << 31);
+  // intercept MONITOR/MWAIT
+  kernel_vmcb_s->control_area.intercept_instruction1 |= (1 << 10) | (1 << 11);
+
+  // intercept virtualization related instructions
+  //  vmrun interception is required by the hardware
+  kernel_vmcb_s->control_area.intercept_instruction1 |= 0xff;
+
+  Mword kernel_vmcb_pa = s.kernel_vmcb_pa();
+  Unsigned64 iopm_base_pa = s.iopm_base_pa();
+  Unsigned64 msrpm_base_pa = s.msrpm_base_pa();
+
+  kernel_vmcb_s->control_area.iopm_base_pa = iopm_base_pa;
+  kernel_vmcb_s->control_area.msrpm_base_pa = msrpm_base_pa;
+
+  configure_asid(vmcb_s, kernel_vmcb_s);
+
+  // 7:0 V_TPR, 8 V_IRQ, 15:9 reserved SBZ,
+  // 19:16 V_INTR_PRIO, 20 V_IGN_TPR, 23:21 reserved SBZ
+  // 24 V_INTR_MASKING 31:25 reserved SBZ
+  // 39:32 V_INTR_VECTOR, 63:40 reserved SBZ
+#if 0
+  kernel_vmcb_s->control_area.interrupt_ctl = 0x10f0000;
+#endif
+  // enable IRQ masking virtualization
+  kernel_vmcb_s->control_area.interrupt_ctl |= 0x01000000;
+
+#if 0
+  // 0 INTERRUPT_SHADOW, 31:1 reserved SBZ
+  // 63:32 reserved SBZ
+  kernel_vmcb_s->control_area.interrupt_shadow = 0;
+#endif
+
+  kernel_vmcb_s->control_area.exitcode = 0;
+  kernel_vmcb_s->control_area.exitinfo1 = 0;
+  kernel_vmcb_s->control_area.exitinfo2 = 0;
+  kernel_vmcb_s->control_area.exitintinfo = 0;
+
+#if 0
+  // 0/1 NP_ENABLE, 31:1 reserved SBZ
+  kernel_vmcb_s->control_area.np_enable = 1;
+
+  // 31 VALID, EVENTINJ
+  kernel_vmcb_s->control_area.eventinj = 0;
+#endif
+
+  // N_CR3
+  kernel_vmcb_s->control_area.n_cr3 = vm_cr3;
+
+  if (!kernel_vmcb_s->np_enabled())
+    {
+      // to do: check that the vmtask has the
+      // VM property set, i.e. does not contain mappings
+      // to the fiasco kernel regions or runs with PL 3
+
+      // printf("nested paging disabled, use n_cr3 as cr3\n");
+      kernel_vmcb_s->state_save_area.cr3 = vm_cr3;
+
+      // intercept accesses to cr0, cr3 and cr4
+      kernel_vmcb_s->control_area.intercept_rd_crX = 0xfff9;
+      kernel_vmcb_s->control_area.intercept_wr_crX = 0xfff9;
+    }
+
+#if 0
+  kernel_vmcb_s->control_area.lbr_virtualization_enable = 0;
+#endif
+
+
+  // to do:
+  // - initialize VM_HSAVE_PA (done)
+  // - supply trusted msrpm_base_pa and iopm_base_pa (done)
+  // - save host state not covered by VMRUN/VMEXIT (ldt, some segments etc) (done)
+  // - disable interupts (done)
+  // - trigger interecepted device and timer interrupts (done, not necessary)
+  // - check host CR0.TS (floating point registers) (done)
+
+  Unsigned64 sysenter_cs, sysenter_eip, sysenter_esp;
+  Unsigned32 fs, gs;
+  Unsigned16 tr, ldtr;
+  //Unsigned32 cr4;
+
+  sysenter_cs = Cpu::rdmsr(MSR_SYSENTER_CS);
+  sysenter_eip = Cpu::rdmsr(MSR_SYSENTER_EIP);
+  sysenter_esp = Cpu::rdmsr(MSR_SYSENTER_ESP);
+
+  fs = Cpu::get_fs();
+  gs = Cpu::get_gs();
+  tr = Cpu::get_tr();
+  ldtr = Cpu::get_ldt();
+
+  Gdt_entry tr_entry;
+
+  tr_entry = (*Cpu::cpus.cpu(current_cpu()).get_gdt())[tr / 8];
+
+#if 0
+  // to do: check if the nested page table walker looks
+  // into the TLB. if so, global pages have to be disabled in
+  // the host
+  cr4 = Cpu::get_cr4();
+
+  if (cr4 & CR4_PGE)
+    // disable support for global pages as the vm task has
+    // a divergent upper memory region from the regular tasks
+    Cpu::set_cr4(cr4 & ~CR4_PGE);
+#endif
+
+  resume_vm_svm(kernel_vmcb_pa, &utcb->values[1]);
+
+
+#if 0
+  if (cr4 & CR4_PGE)
+    Cpu::set_cr4(cr4);
+#endif
+
+  Cpu::wrmsr(sysenter_cs, MSR_SYSENTER_CS);
+  Cpu::wrmsr(sysenter_eip, MSR_SYSENTER_EIP);
+  Cpu::wrmsr(sysenter_esp, MSR_SYSENTER_ESP);
+
+  Cpu::set_ldt(ldtr);
+  Cpu::set_fs(fs);
+  Cpu::set_gs(gs);
+
+  // clear busy flag
+  Gdt_entry tss_entry;
+
+  tss_entry = (*Cpu::cpus.cpu(current_cpu()).get_gdt())[tr / 8];
+  tss_entry.access &= 0xfd;
+  (*Cpu::cpus.cpu(current_cpu()).get_gdt())[tr / 8] = tss_entry;
+
+  Cpu::set_tr(tr); // TODO move under stgi in asm
+
+  copy_state_save_area(vmcb_s, kernel_vmcb_s);
+  copy_control_area_back(vmcb_s, kernel_vmcb_s);
+
+  if (!(vmcb_s->np_enabled()))
+    vmcb_s->state_save_area.cr3 = orig_cr3;
+
+  vmcb_s->control_area.n_cr3 = orig_ncr3;
+
+  LOG_TRACE("VM-SVM", "svm", current(), __fmt_vm_svm_exit,
+            Log_vm_svm_exit *l = tbe->payload<Log_vm_svm_exit>();
+            l->exitcode = vmcb_s->control_area.exitcode;
+            l->exitinfo1 = vmcb_s->control_area.exitinfo1;
+            l->exitinfo2 = vmcb_s->control_area.exitinfo2;
+            l->rip       = vmcb_s->state_save_area.rip;
+           );
+
+  return commit_result(L4_error::None);
+}
+
+PUBLIC
+void
+Vm_svm::invoke(L4_obj_ref obj, Mword rights, Syscall_frame *f, Utcb *utcb)
+{
+  vm_invoke<Vm_svm>(obj, rights, f, utcb);
+}
+
+// ------------------------------------------------------------------------
+IMPLEMENTATION [svm && debug]:
+
+IMPLEMENT
+unsigned
+Vm_svm::log_fmt_svm(Tb_entry *e, int max, char *buf)
+{
+  Log_vm_svm_exit *l = e->payload<Log_vm_svm_exit>();
+  return snprintf(buf, max, "ec=%lx ei1=%08lx ei2=%08lx rip=%08lx",
+                  l->exitcode, l->exitinfo1, l->exitinfo2, l->rip);
+}
index b473a8e1572325cbc8e651da6813efc587153f77..da43c4973228c9e90d7f9e94e0db35a689c25879 100644 (file)
@@ -3,7 +3,7 @@ INTERFACE:
 class Ipi
 {
 public:
-  static void init(unsigned _lcpu);
+  void init();
 };
 
 INTERFACE[!mp]:
@@ -27,6 +27,8 @@ private:
   static void (*_remote_call_func)(void *);
   static void *_remote_call_func_data;
   static unsigned long _remote_call_done;
+
+  static Per_cpu<Ipi> _ipi;
 };
 
 
@@ -37,21 +39,29 @@ INTERFACE[mp && debug]:
 EXTENSION class Ipi
 {
 public:
-  static Per_cpu <Mword> _stat_sent;
-  static Per_cpu <Mword> _stat_received;
+  Mword _stat_sent;
+  Mword _stat_received;
 };
 
 // ------------------------------------------------------------------------
 IMPLEMENTATION[!mp]:
 
-IMPLEMENT static inline
+PUBLIC static inline
+Ipi &
+Ipi::cpu(unsigned)
+{
+  return *reinterpret_cast<Ipi*>(0);
+}
+
+
+IMPLEMENT inline
 void
-Ipi::init(unsigned)
+Ipi::init()
 {}
 
-PUBLIC static inline
+PUBLIC inline
 void
-Ipi::send(int, Message)
+Ipi::send(Message)
 {}
 
 PUBLIC static inline
@@ -64,12 +74,23 @@ void
 Ipi::bcast(Message)
 {}
 
+
+// ------------------------------------------------------------------------
+IMPLEMENTATION[mp]:
+
+Per_cpu<Ipi> DEFINE_PER_CPU Ipi::_ipi;
+
+PUBLIC static inline
+Ipi &
+Ipi::cpu(unsigned cpu)
+{ return Ipi::_ipi.cpu(cpu); }
+
 // ------------------------------------------------------------------------
 IMPLEMENTATION[!(mp && debug)]:
 
 PUBLIC static inline
 void
-Ipi::stat_sent(unsigned)
+Ipi::stat_sent()
 {}
 
 PUBLIC static inline
@@ -82,15 +103,12 @@ IMPLEMENTATION[mp && debug]:
 
 #include "globals.h"
 
-Per_cpu <Mword> DEFINE_PER_CPU Ipi::_stat_sent;
-Per_cpu <Mword> DEFINE_PER_CPU Ipi::_stat_received;
-
-PUBLIC static inline
+PUBLIC inline
 void
-Ipi::stat_sent(unsigned to_cpu)
-{ atomic_mp_add(&_stat_sent.cpu(to_cpu), 1); }
+Ipi::stat_sent()
+{ atomic_mp_add(&_stat_sent, 1); }
 
 PUBLIC static inline NEEDS["globals.h"]
 void
 Ipi::stat_received()
-{ _stat_received.cpu(current_cpu())++; }
+{ _ipi.cpu(current_cpu())._stat_received++; }
index c5180520e22552e4ef00e34dbe9d106a1cb3c2a8..1d6646f8ceb565b4307ddca9e0019fc926f83204 100644 (file)
@@ -640,8 +640,6 @@ Irq::obj_id() const
 // --------------------------------------------------------------------------
 IMPLEMENTATION [debug]:
 
-#include "kobject.h"
-
 PUBLIC
 char const *
 Chain_irq_pin::pin_type() const
@@ -652,7 +650,7 @@ unsigned
 Irq::irq_log_fmt(Tb_entry *e, int maxlen, char *buf)
 {
   Irq_log *l = e->payload<Irq_log>();
-  return snprintf(buf, maxlen, "0x%x/%d D:%lx", l->irq_number, l->irq_number,
+  return snprintf(buf, maxlen, "0x%x/%u D:%lx", l->irq_number, l->irq_number,
                   l->irq_obj);
 }
 
@@ -660,14 +658,23 @@ PUBLIC static inline
 void
 Irq::log_irq(Irq *irq, int nr)
 {
-  LOG_TRACE("IRQ", "irq", current(), __irq_log_fmt,
+  LOG_TRACE("IRQ-HW", "irq-hw", current(), __irq_log_fmt,
       Irq::Irq_log *l = tbe->payload<Irq::Irq_log>();
       l->irq_number = nr;
       l->irq_obj = irq ? irq->dbg_id() : ~0UL;
   );
 }
 
-
+PUBLIC static inline NEEDS["config.h"]
+void
+Irq::log_timer_irq(int nr)
+{
+  LOG_TRACE("IRQ-Timer", "irq-ti", current(), __irq_log_fmt,
+      Irq::Irq_log *l = tbe->payload<Irq::Irq_log>();
+      l->irq_number = nr;
+      l->irq_obj = ~0UL;
+  );
+}
 
 // --------------------------------------------------------------------------
 IMPLEMENTATION [!debug]:
@@ -676,3 +683,8 @@ PUBLIC static inline
 void
 Irq::log_irq(Irq *, int)
 {}
+
+PUBLIC static inline
+void
+Irq::log_timer_irq(int)
+{}
index 4f87487d27a2f87d629272bea622884b2f6eece1..3c6ab3d4e03fb79ada9bc933b8ee00b0319e0664 100644 (file)
@@ -1786,7 +1786,7 @@ Thread::migration_helper(Migration_info const *inf)
   if (ipi)
     {
       //LOG_MSG_3VAL(this, "sipi", current_cpu(), cpu(), (Mword)current());
-      Ipi::send(cpu, Ipi::Request);
+      Ipi::cpu(cpu).send(Ipi::Request);
     }
 
   return  Drq::No_answer | Drq::Need_resched;
@@ -1816,7 +1816,7 @@ Thread::migrate_xcpu(unsigned cpu)
     }
 
   if (ipi)
-    Ipi::send(cpu, Ipi::Request);
+    Ipi::cpu(cpu).send(Ipi::Request);
 }
 
 //----------------------------------------------------------------------------
index e5b25b6efd07650218cf6822d60f34343dfca5b1..7bfde285f10fa48613b788472ce882dad1481dbf 100644 (file)
@@ -2,6 +2,9 @@ INTERFACE [mp]:
 
 EXTENSION class Ipi
 {
+private:
+  Unsigned32 _lcpu;
+
 public:
   enum Message { Request = 'r', Global_request = 'g', Debug = 'd' };
 };
@@ -17,11 +20,16 @@ IMPLEMENTATION[mp]:
 #include "cpu.h"
 #include "pic.h"
 
-IMPLEMENT static
+PUBLIC inline
+Ipi::Ipi() : _lcpu(~0)
+{}
+
+IMPLEMENT
 void
-Ipi::init(unsigned lcpu)
+Ipi::init()
 {
-  Pic::setup_ipi(lcpu, Cpu::cpus.cpu(lcpu).phys_id());
+  _lcpu = current_cpu();
+  Pic::setup_ipi(_lcpu, Cpu::cpus.cpu(_lcpu).phys_id());
 }
 
 PUBLIC static inline NEEDS[<cstdio>]
@@ -30,17 +38,19 @@ Ipi::eoi(Message)
 {
 }
 
-PUBLIC static inline NEEDS[<cstdio>, "pic.h"]
+PUBLIC inline NEEDS[<cstdio>, "pic.h"]
 void
-Ipi::send(int lcpu, Message m)
+Ipi::send(Message m)
 {
-  Pic::send_ipi(lcpu, m);
+  printf("Sending IPI:%d to cpu%d\n", m, _lcpu);
+  Pic::send_ipi(_lcpu, m);
 }
 
 PUBLIC static inline NEEDS[<cstdio>, "cpu.h", "pic.h"]
 void
 Ipi::bcast(Message m)
 {
+  printf("Bcast IPI:%d\n", m);
   for (unsigned i = 0; i < Config::Max_num_cpus; ++i)
     if (Cpu::online(i))
       Pic::send_ipi(i, m);
index 12ccc6bbab0bed80550e0aefbc7763b8e3a77a23..cd7ec7bb4c58e47ec3ed479f2ec13d6088f46d10 100644 (file)
@@ -63,7 +63,7 @@ startup_system2()
   Utcb_init::init();
   Pic::init();
   Dirq_pic_pin::init();
-  Ipi::init(0);
+  Ipi::cpu(0).init();
   Idt::init();
   Fpu::init(0);
   Timer::init();
diff --git a/kernel/fiasco/src/kern/vm_factory.cpp b/kernel/fiasco/src/kern/vm_factory.cpp
new file mode 100644 (file)
index 0000000..9ec1655
--- /dev/null
@@ -0,0 +1,10 @@
+INTERFACE:
+
+class Vm;
+class Ram_quota;
+
+class Vm_factory
+{
+public:
+  static Vm *create(Ram_quota *quota);
+};
index 30090e73d0f8242e23a581f42952080a7d18de05..a1054227e5a29b81d2d1387eaa50d90eb49ec75b 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_AMD64=y
 # CONFIG_PPC32 is not set
 CONFIG_PF_PC=y
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,12 +37,18 @@ CONFIG_ABI_VF=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 CONFIG_AMD64_K8=y
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
-# CONFIG_SVM is not set
+# CONFIG_CPU_VIRT is not set
 CONFIG_SCHED_PIT=y
 # CONFIG_SCHED_RTC is not set
 # CONFIG_SCHED_APIC is not set
index 4770b3aa5e94b680a9abccea7349e0c30133f078..ef8d6ca0ba3131b6f017cfa58eee4d98cc76ba9c 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_AMD64=y
 # CONFIG_PPC32 is not set
 CONFIG_PF_PC=y
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,12 +37,18 @@ CONFIG_ABI_VF=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 CONFIG_AMD64_K8=y
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
-# CONFIG_SVM is not set
+CONFIG_CPU_VIRT=y
 CONFIG_SCHED_PIT=y
 # CONFIG_SCHED_RTC is not set
 # CONFIG_SCHED_APIC is not set
index aa5cd037c3560bb0e7ab6e19b9cf17ecd01c2f54..4bb27586a1ad6caed4d6da74c6f8abc9426c4b5f 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_AMD64=y
 # CONFIG_PPC32 is not set
 CONFIG_PF_PC=y
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,12 +37,18 @@ CONFIG_ABI_VF=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 CONFIG_AMD64_K8=y
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
-# CONFIG_SVM is not set
+# CONFIG_CPU_VIRT is not set
 # CONFIG_SCHED_PIT is not set
 # CONFIG_SCHED_RTC is not set
 CONFIG_SCHED_APIC=y
index 649087b8d1c9f4cb3c0f7ea77422b9867b383690..2be21b32a61595e1869c0a922f457d573c67f33a 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_AMD64=y
 # CONFIG_PPC32 is not set
 CONFIG_PF_PC=y
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,12 +37,18 @@ CONFIG_ABI_VF=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 CONFIG_AMD64_K8=y
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
-# CONFIG_SVM is not set
+# CONFIG_CPU_VIRT is not set
 # CONFIG_SCHED_PIT is not set
 # CONFIG_SCHED_RTC is not set
 CONFIG_SCHED_APIC=y
index 1375c588fcf3c3f7cedad0e5d1748d36f1edf483..504890d818b9d1de4c5804dbe06334431c2482b7 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-CONFIG_PF_REALVIEW=y
 # CONFIG_PF_IMX is not set
+CONFIG_PF_REALVIEW=y
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -48,10 +48,16 @@ CONFIG_ARM_CORTEX_A9=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_ARM_TZ is not set
index 582a5e31611112690ab1ab6780b9f70edee2a2a0..336dce4f8a03867b1c67f8e4f7107031337e0904 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-CONFIG_PF_REALVIEW=y
 # CONFIG_PF_IMX is not set
+CONFIG_PF_REALVIEW=y
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -48,10 +48,16 @@ CONFIG_ARM_CORTEX_A9=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 CONFIG_ARM_TZ=y
index 0f88f6b23179230f9a6624b1b9453d6983186b39..9e74c8ed720ba05b36f920b4d41e6c08b31f246d 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 CONFIG_PF_IMX=y
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -42,10 +42,16 @@ CONFIG_ARM_926=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_FPU is not set
index b0f2f1337ac3899dd95ec28cb642ae75bdc2df12..26e3a2e0ecacffe57c2e602fbd7412f652479f62 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 CONFIG_PF_IMX=y
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -42,10 +42,16 @@ CONFIG_ARM_CORTEX_A8=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_FPU is not set
index 4eda081daf06f583017f894f22dff3dfed2be230..bcab2e56942e8bd3b86bb4f75ec4e32fecdaff30 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -40,10 +40,16 @@ CONFIG_ARM_926=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_FPU is not set
index b919864bf050107801a2b74659be2a4689a38c87..2944229f92ff7fb3dcbe74da61d2c9e1f089d91e 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -40,10 +40,16 @@ CONFIG_ARM_1176=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_FPU is not set
index 2dfac05c2feb331a144da0677cdf88aca5abfd51..4ddc4dbf789cc6497acc9660262f51ae4dac0984 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 CONFIG_PF_OMAP3=y
@@ -41,10 +41,16 @@ CONFIG_ARM_CORTEX_A8=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 CONFIG_FPU=y
index fc0d0986c1ff8be117197e5347d9a8c902d021e3..b7c037194b9927917a8e3289a96e842f3d8418cf 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -39,10 +39,16 @@ CONFIG_ARM_PXA=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_FPU is not set
index e5307d26e316d8259fca47209cac64638817b587..2d935def687244f443f95a6092d371fe129042cc 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-CONFIG_PF_REALVIEW=y
 # CONFIG_PF_IMX is not set
+CONFIG_PF_REALVIEW=y
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -47,10 +47,16 @@ CONFIG_ARM_926=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_FPU is not set
index 0f444609e8641b518d8dbedc81ca37592d57dca5..07bcc10b28fadc96c3c7b8d179edbed6444dff7d 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-CONFIG_PF_REALVIEW=y
 # CONFIG_PF_IMX is not set
+CONFIG_PF_REALVIEW=y
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -47,10 +47,16 @@ CONFIG_ARM_1176=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_FPU is not set
index 40b7c617cdf79c609fa0fa61b7764a5065051c2b..6a74306a97efbd45f88223fe5aa5c5c7743eab36 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-CONFIG_PF_REALVIEW=y
 # CONFIG_PF_IMX is not set
+CONFIG_PF_REALVIEW=y
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -49,10 +49,16 @@ CONFIG_ARM_MPCORE=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_FPU is not set
index ba9024ab97b4ddc6144c732e40678998882dd5ca..e047da95eae1f2ad26fa75b7ca2ae4ed1610b670 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-CONFIG_PF_REALVIEW=y
 # CONFIG_PF_IMX is not set
+CONFIG_PF_REALVIEW=y
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -47,10 +47,16 @@ CONFIG_ARM_926=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_FPU is not set
index 082bb08f4b02e1ace7be1f0cf2f2e1ab6bd4cb4b..8ba1a1c52c0d6684e26dcf00aab6beb7fa61f9f5 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -39,10 +39,16 @@ CONFIG_ARM_SA=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_FPU is not set
index aa2a787831f585d67024eac4370de2879e7777fb..273d9778eac959cc094168fba59f4a5d4d978205 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 CONFIG_PF_TEGRA2=y
 # CONFIG_PF_OMAP3 is not set
@@ -40,10 +40,16 @@ CONFIG_ARM_CORTEX_A9=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 CONFIG_ARM_ALIGNMENT_CHECK=y
 CONFIG_ARM_TZ=y
index d23dc8dac22e899fcd84a373fc88cecba96c03fc..3671b43fcf3daad7b0c9923b41a08b59de19bf49 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-CONFIG_PF_REALVIEW=y
 # CONFIG_PF_IMX is not set
+CONFIG_PF_REALVIEW=y
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -47,10 +47,16 @@ CONFIG_ARM_1176=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_FPU is not set
index ef256908a81aef6a0d28f67bed3b4512545348ba..c5e4f6d3dae82c97986f51392975acb62b22302e 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-CONFIG_PF_REALVIEW=y
 # CONFIG_PF_IMX is not set
+CONFIG_PF_REALVIEW=y
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -49,10 +49,16 @@ CONFIG_ARM_MPCORE=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 CONFIG_FPU=y
index b10f21ae1896811a3daec438ab72f96aba689dde..86d90477b217ee2a4844042cf946cbac05a81b9f 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-CONFIG_PF_REALVIEW=y
 # CONFIG_PF_IMX is not set
+CONFIG_PF_REALVIEW=y
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -48,10 +48,16 @@ CONFIG_ARM_MPCORE=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 CONFIG_FPU=y
index c3b39ae2c1aaf498a4d0fca4827293b2236983f3..41f483ca79fd6680dcba55e895dcc04030ef608f 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_ARM=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 # CONFIG_PF_UX is not set
-CONFIG_PF_REALVIEW=y
 # CONFIG_PF_IMX is not set
+CONFIG_PF_REALVIEW=y
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -47,10 +47,16 @@ CONFIG_ARM_CORTEX_A8=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 # CONFIG_ARM_ALIGNMENT_CHECK is not set
 # CONFIG_FPU is not set
index 600c1a9cf606d49f3d96bd505beff1234482b6ab..8737ba4a5613e954405c76211b66e6d0cadcba6b 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_IA32=y
 # CONFIG_PPC32 is not set
 CONFIG_PF_PC=y
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,12 +37,18 @@ CONFIG_IA32_586=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
-# CONFIG_SVM is not set
+# CONFIG_CPU_VIRT is not set
 CONFIG_SCHED_PIT=y
 # CONFIG_SCHED_RTC is not set
 # CONFIG_SCHED_APIC is not set
index 0b772d7b01daf9ce52d457169f4299929a1cd392..e107aae44100c3b1d2902e4a93b5548300bad83a 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_IA32=y
 # CONFIG_PPC32 is not set
 CONFIG_PF_PC=y
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,12 +37,18 @@ CONFIG_IA32_586=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
-# CONFIG_SVM is not set
+# CONFIG_CPU_VIRT is not set
 CONFIG_SCHED_PIT=y
 # CONFIG_SCHED_RTC is not set
 # CONFIG_SCHED_APIC is not set
index 97ee4fed341632b1c292034cc5710aae947020ee..b7c883bbfdea74d7ad7f474f2e04c16916d172d5 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_IA32=y
 # CONFIG_PPC32 is not set
 CONFIG_PF_PC=y
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,12 +37,18 @@ CONFIG_IA32_586=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
-# CONFIG_SVM is not set
+# CONFIG_CPU_VIRT is not set
 CONFIG_SCHED_PIT=y
 # CONFIG_SCHED_RTC is not set
 # CONFIG_SCHED_APIC is not set
index 9e7c62f6d8829396883c0c86ef82faf8f0e4dd28..cc21cab8ca60aae6484e18d4e1fef5c61ad837b2 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_IA32=y
 # CONFIG_PPC32 is not set
 CONFIG_PF_PC=y
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,12 +37,18 @@ CONFIG_IA32_586=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
-# CONFIG_SVM is not set
+CONFIG_CPU_VIRT=y
 CONFIG_SCHED_PIT=y
 # CONFIG_SCHED_RTC is not set
 # CONFIG_SCHED_APIC is not set
index 8e6b7dfb4b32a891f0c0640c0339705290d1e146..905dbf24da448127c2eaf58d9c467998f2a67d63 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_IA32=y
 # CONFIG_PPC32 is not set
 CONFIG_PF_PC=y
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,12 +37,18 @@ CONFIG_IA32_586=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
-# CONFIG_SVM is not set
+# CONFIG_CPU_VIRT is not set
 # CONFIG_SCHED_PIT is not set
 # CONFIG_SCHED_RTC is not set
 CONFIG_SCHED_APIC=y
index dd78f3e71d8d5963fec2fb64198c7b16e146b569..5f942fe6b26913636bb98b69b145d5201964391f 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_IA32=y
 # CONFIG_PPC32 is not set
 CONFIG_PF_PC=y
 # CONFIG_PF_UX is not set
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,12 +37,18 @@ CONFIG_IA32_586=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
-# CONFIG_SVM is not set
+# CONFIG_CPU_VIRT is not set
 CONFIG_SCHED_PIT=y
 # CONFIG_SCHED_RTC is not set
 # CONFIG_SCHED_APIC is not set
index 17e6e61e388af6885fb2844916f54cff2a484de5..84dc80f8ef05da289bb5a33de1d523763af0e16a 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_IA32=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 CONFIG_PF_UX=y
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,10 +37,16 @@ CONFIG_IA32_586=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 CONFIG_SCHED_PIT=y
 # CONFIG_SCHED_RTC is not set
index 8e491280934f0cdddd66cb0a4dfce2c69708a469..fdb7c336f332627747631b638adfde4a0f727462 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_IA32=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 CONFIG_PF_UX=y
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,10 +37,16 @@ CONFIG_IA32_586=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 CONFIG_SCHED_PIT=y
 # CONFIG_SCHED_RTC is not set
index 277dd5622892b50d45a2f476d6d1959a4fc9de6e..89ff6c488d704e0e7cec8fbe3c401bbdb4f0a8f2 100644 (file)
@@ -11,8 +11,8 @@ CONFIG_IA32=y
 # CONFIG_PPC32 is not set
 # CONFIG_PF_PC is not set
 CONFIG_PF_UX=y
-# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_IMX is not set
+# CONFIG_PF_REALVIEW is not set
 # CONFIG_PF_S3C2410 is not set
 # CONFIG_PF_TEGRA2 is not set
 # CONFIG_PF_OMAP3 is not set
@@ -37,10 +37,16 @@ CONFIG_IA32_586=y
 # CONFIG_IA32_P3 is not set
 # CONFIG_IA32_P4 is not set
 # CONFIG_IA32_PM is not set
+# CONFIG_IA32_CORE2 is not set
+# CONFIG_IA32_ATOM is not set
 # CONFIG_IA32_K6 is not set
 # CONFIG_IA32_K7 is not set
 # CONFIG_IA32_K8 is not set
+# CONFIG_IA32_K10 is not set
 # CONFIG_AMD64_K8 is not set
+# CONFIG_AMD64_CORE2 is not set
+# CONFIG_AMD64_ATOM is not set
+# CONFIG_AMD64_K10 is not set
 # CONFIG_PPC32_603e is not set
 CONFIG_SCHED_PIT=y
 # CONFIG_SCHED_RTC is not set
index b07d9dec72a1a555e31cae0ec1a877a5c65454c8..07249831ea935e76a6a8079b5c68ce137cf1bd56 100644 (file)
@@ -141,12 +141,18 @@ all:: $(foreach arch,$(TARGET_SYSTEMS), $(OBJ_DIR)/OBJ-$(arch))
 $(foreach arch,$(TARGET_SYSTEMS), $(OBJ_DIR)/OBJ-$(arch)):%:%/$(BID_OBJ_Makefile) pre-obj
        $(VERBOSE)PWD=$@ $(MAKE) $(PL_j) -C $@ -f $(BID_OBJ_Makefile)
 
+
+foreach_objdir = $(if $(wildcard $(OBJ_DIR)/OBJ-*), $(VERBOSE)set -e ; \
+                    for d in $(wildcard $(OBJ_DIR)/OBJ-*) ; do \
+                      PWD=$$d $(MAKE) -C $$d -f $(BID_OBJ_Makefile) $(1); \
+                    done, @true)
+
 %.i %.s.i:: export DO_SHOW_RESULT_FILE=y
-clean disasm %.i %.s.i::
-       $(if $(wildcard $(OBJ_DIR)/OBJ-*), $(VERBOSE)set -e ; \
-           for d in $(wildcard $(OBJ_DIR)/OBJ-*) ; do \
-               PWD=$$d $(MAKE) -C $$d -f $(BID_OBJ_Makefile) $@; \
-           done, @true)
+%.i %.s.i::
+       $(call foreach_objdir,$@)
+
+clean disasm::
+       $(call foreach_objdir,$@)
 
 cleanall::
        $(VERBOSE)$(RM) -r $(wildcard $(OBJ_DIR))
index b16aa6bd9463517e4907ebd72c70ed9fd96a6d39..13331ef5bd1662df807f67b23bf138356160f1a2 100644 (file)
@@ -104,14 +104,9 @@ PC_FILES     := $(foreach pcfile,$(PC_FILENAMES),$(OBJ_BASE)/pc/$(pcfile).pc)
 # 2: pcfilename
 get_cont = $(if $($(1)_$(2)),$($(1)_$(2)),$($(1)))
 
-# 1: lib list
-convert_lib_list =                                  \
-       $(patsubst lib%.a,-l%,$(filter %.a,$(1)))   \
-       $(patsubst lib%.so,-l%,$(filter %.so,$(1))) \
-       $(filter -l%,$(1))
-
 $(OBJ_BASE)/pc/%.pc: $(GENERAL_D_LOC)
-       $(VERBOSE)$(call generate_pcfile,$*,$@,$(call get_cont,CONTRIB_INCDIR,$*),$(call convert_lib_list,$(call get_cont,PC_LIBS,$*)),$(call get_cont,REQUIRES_LIBS,$*))
+       $(if $(filter-out -l%,$(call get_cont,PC_LIBS,$*)),$(error PC_LIBS contains invalid library list: $(call get_cont,PC_LIBS,$*); Only -l statements allowed.),@true)
+       $(VERBOSE)$(call generate_pcfile,$*,$@,$(call get_cont,CONTRIB_INCDIR,$*),$(call get_cont,PC_LIBS,$*),$(call get_cont,REQUIRES_LIBS,$*))
 
 all:: $(PC_FILES)
 
index e34c8950d7d07e194bc35c307eb17be788b826ff..af1bb88bddb16a96e0206ddb24a752362e3e6ca9 100644 (file)
@@ -4,8 +4,8 @@ TARGET_A        := $(TARGET).a
 TARGET_E_A     := $(TARGET)_e.a
 
 PC_FILENAMES             := $(PC_FILENAME) $(PC_FILENAME)_e
-PC_LIBS_$(PC_FILENAME)   := $(TARGET_A)
-PC_LIBS_$(PC_FILENAME)_e := $(TARGET_E_A)
+PC_LIBS_$(PC_FILENAME)   := -l$(patsubst lib%,%,$(TARGET))
+PC_LIBS_$(PC_FILENAME)_e := -l$(patsubst lib%,%,$(TARGET))_e
 
 CXXFLAGS_amd64-l4f += -mcmodel=medium
 CFLAGS_amd64-l4f += -mcmodel=medium
index 277d9af75057ca01a424f80c33f8aded0ce8e6c1..e5beef49c485f4bee18c85106344a74c8b05da34 100644 (file)
@@ -42,11 +42,11 @@ endif
 
 PC_FILENAME = dde-linux26
 PC_FILENAMES                 := $(PC_FILENAME) $(PC_FILENAME)_net $(PC_FILENAME)_block $(PC_FILENAME)_char
-PC_LIBS_$(PC_FILENAME)       := $(TARGET_DDE)
-PC_LIBS_$(PC_FILENAME)_net   := $(TARGET_DDE_NET)
-PC_LIBS_$(PC_FILENAME)_block := $(TARGET_DDE_BLOCK)
-PC_LIBS_$(PC_FILENAME)_sound := $(TARGET_DDE_SOUND)
-PC_LIBS_$(PC_FILENAME)_char  := $(TARGET_DDE_CHAR)
+PC_LIBS_$(PC_FILENAME)       := $(patsubst lib%.a,-l%,$(TARGET_DDE))
+PC_LIBS_$(PC_FILENAME)_net   := $(patsubst lib%.a,-l%,$(TARGET_DDE_NET))
+PC_LIBS_$(PC_FILENAME)_block := $(patsubst lib%.a,-l%,$(TARGET_DDE_BLOCK))
+PC_LIBS_$(PC_FILENAME)_sound := $(patsubst lib%.a,-l%,$(TARGET_DDE_SOUND))
+PC_LIBS_$(PC_FILENAME)_char  := $(patsubst lib%.a,-l%,$(TARGET_DDE_CHAR))
 
 TARGET     = $(TARGET_DDE) $(TARGET_DDE_NET) $(TARGET_DDE_BLOCK) $(TARGET_DDE_SOUND) $(TARGET_DDE_CHAR)
 LINK_INCR  = $(TARGET_DDE) $(TARGET_DDE_BLOCK)
index c9e633d21d9035b4a91b1da30a04f1ae8d010890..904d26afb450f0a596572805d2f4b2cf2e068bd3 100644 (file)
@@ -68,7 +68,10 @@ static inline int i8042_platform_init(void)
  * bad things. Because of this the region is always reserved on such boxes.
  */
 #if !defined(__sh__) && !defined(__alpha__) && !defined(__mips__) && !defined(CONFIG_PPC64)
-       if (!request_region(I8042_DATA_REG, 16, "i8042"))
+       //l4/if (!request_region(I8042_DATA_REG, 16, "i8042"))
+       if (!request_region(I8042_DATA_REG, 1, "i8042"))
+               return -1;
+       if (!request_region(I8042_COMMAND_REG, 1, "i8042"))
                return -1;
 #endif
 
index e64575e6965f4538aa4d1777dfa34d0c0cb92d72..e80121055a99ebc48d5ff6e316494c16e873d9ac 100644 (file)
@@ -279,6 +279,9 @@ public:
   Addr end() const { return _d.end(); }
   Size size() const { return _d.size(); }
 
+  bool contains(Adr_resource const &o) const
+  { return start() <= o.start() && end() >= o.end(); }
+
   bool valid() const { return flags() && _d.start() <= _d.end(); }
 
   void start(Addr start) { _d.start(start); }
index 58dd6d7a0b6a723d157735f23d2f190d9dd747c1..d8185d67470d70a32bd4086f1aae7d867edd3813 100644 (file)
@@ -166,7 +166,7 @@ System_bus::request_resource(L4::Ipc_iostream &ios)
     }
 #endif
 
-  if (i == _resources.end())
+  if (i == _resources.end() || !(*i)->contains(ires))
     return -L4_ENOENT;
 
 #if 0
index f81f02e458bf71192c05760c5192961e77326291..3c5d6455435349b7c64d912a53d574c98271e5dd 100644 (file)
@@ -14,6 +14,7 @@
 
 #include "boot_fs.h"
 #include "dataspace_static.h"
+#include "page_alloc.h"
 #include "globals.h"
 #include "name_space.h"
 #include "debug.h"
@@ -96,6 +97,10 @@ Moe::Boot_fs::init_stage2()
 
   //dump_mbi(mbi);
 
+  unsigned dirinfo_space = L4_PAGESIZE;
+  char *dirinfo = (char *)Single_page_alloc_base::_alloc(dirinfo_space, L4_PAGESHIFT);
+  unsigned dirinfo_size = 0;
+
   l4util_mb_mod_t const *modules = (l4util_mb_mod_t const *)mbi->mods_addr;
   unsigned num_modules = mbi->mods_count;
   for (unsigned mod = 3; mod < num_modules; ++mod)
@@ -115,10 +120,41 @@ Moe::Boot_fs::init_stage2()
       object = object_pool.cap_alloc()->alloc(rf);
       rom_ns.register_obj(name, Names::Obj(0, rf));
 
+      do
+        {
+          unsigned left = dirinfo_space - dirinfo_size;
+          unsigned written = snprintf(dirinfo + dirinfo_size, left, "%d:%.*s\n",
+                                      name.len(), name.len(), name.start());
+          if (written > left)
+            {
+              char *n = (char *)Single_page_alloc_base::_alloc(dirinfo_space + L4_PAGESIZE,
+                                                               L4_PAGESHIFT);
+              memcpy(n, dirinfo, dirinfo_space);
+              Single_page_alloc_base::_free(dirinfo, dirinfo_space, true);
+              dirinfo = n;
+              dirinfo_space += L4_PAGESIZE;
+            }
+          else
+            {
+              dirinfo_size += written;
+              break;
+            }
+        }
+      while (1);
+
+
       L4::cout << "  BOOTFS: [" << (void*)modules[mod].mod_start << "-"
                << (void*)end << "] " << object << " "
                << name << "\n";
     }
+
+  Moe::Dataspace_static *dirinfods;
+  dirinfods = new Moe::Dataspace_static((void *)dirinfo,
+                                        dirinfo_size,
+                                        Dataspace::Read_only);
+
+  object_pool.cap_alloc()->alloc(dirinfods);
+  rom_ns.register_obj(".dirinfo", Names::Obj(0, dirinfods));
 }
 
 
index 081419bd2cefff060a55ba98f7901024034c303e..8b613ed86f1ccc9e4643220f768b4b272e3adf58 100644 (file)
@@ -101,19 +101,12 @@ App_model::local_detach_ds(l4_addr_t addr, unsigned long /*size*/) const
 App_model::App_model()
 : _task(0)
 {
-  enum
-  {
-    Kip_address            = 0xa0000000,
-    Utcb_area_start        = 0xb3000000,
-    Default_max_threads    = 16,
-  };
   // set default values for utcb area, values may be changed by loader
-  _info.utcbs_start = Utcb_area_start;
+  _info.utcbs_start     = Utcb_area_start;
   _info.utcbs_log2size  = l4util_log2(Default_max_threads * L4_UTCB_OFFSET);
 
   // set default values for the application stack
   _info.kip = Kip_address;
-
 }
 
 
@@ -136,14 +129,6 @@ void
 App_model::init_prog()
 {
 
-  enum
-  {
-    Utcb_area_start        = 0xb3000000,
-    Default_max_threads    = 16,
-    Total_max_threads      = 256,
-  };
-
-
   push_argv_strings();
   push_env_strings();
   Dbg info(Dbg::Info);
index ed3f56e8e4bce530a0f5f8f21b67570c61b82f93..cbdd894da890b4e6631f714f57d372241fc24276 100644 (file)
@@ -45,6 +45,14 @@ struct App_model : public Ldr::Base_app_model<Stack>
     Default_max_prio  = 0xff,
   };
 
+  enum
+  {
+    Utcb_area_start        = 0xb3000000,
+    Default_max_threads    = 16,
+    Total_max_threads      = 256,
+    Kip_address            = 0xa0000000,
+  };
+
   typedef L4Re::Util::Ref_cap<L4Re::Dataspace>::Cap Const_dataspace;
   typedef L4Re::Util::Ref_cap<L4Re::Dataspace>::Cap Dataspace;
   typedef L4Re::Util::Ref_cap<L4Re::Rm>::Cap Rm;
index 00781147006dab74921975b30b3ca0618d4fd73b..973414aa956318c189a17b3adc9caffd97fca339 100644 (file)
@@ -15,7 +15,7 @@ class Err : public L4Re::Util::Err
 {
 public:
   explicit
-  Err(Level l = Normal) : L4Re::Util::Err(l, "Ldr") {}
+  Err(Level l = Normal) : L4Re::Util::Err(l, "Ned") {}
 };
 
 class Dbg : public L4Re::Util::Dbg
@@ -37,7 +37,7 @@ public:
 
   explicit
   Dbg(unsigned long mask, char const *subs = 0)
-  : L4Re::Util::Dbg(mask, "Ldr", subs)
+  : L4Re::Util::Dbg(mask, "Ned", subs)
   {}
 };
 
index 90884100acc9b0e505920b79757617ced041b8dc..3fd924ea214e90e36f08bba6ba48a589198d5b6b 100644 (file)
@@ -14,6 +14,7 @@
 #include <l4/cxx/auto_ptr>
 #include <l4/cxx/ref_ptr>
 #include <l4/libloader/elf>
+#include <l4/util/bitops.h>
 
 #include <lua.h>
 #include <lauxlib.h>
@@ -184,6 +185,16 @@ public:
     prog_info()->ldr_flags = _cfg_integer("ldr_flags", prog_info()->ldr_flags);
     prog_info()->l4re_dbg = _cfg_integer("l4re_dbg", prog_info()->l4re_dbg);
 
+    unsigned max_num_threads = _cfg_integer("max_threads", Default_max_threads);
+    if (max_num_threads > Total_max_threads)
+      {
+        Dbg warn(Dbg::Warn);
+        warn.printf("Warning: Limiting number of thread per task to %d\n", Total_max_threads);
+        max_num_threads = Total_max_threads;
+      }
+    prog_info()->utcbs_log2size
+      = l4util_log2(l4util_next_power2(max_num_threads) * L4_UTCB_OFFSET);
+
     _cfg_cap("log", &prog_info()->log);
     _cfg_cap("mem", &prog_info()->mem_alloc);
     _cfg_cap("factory", &prog_info()->factory);
index 118ab6ce5815c9524506be606e8a5917d98d3c94..5e0b31720aa065556b2c8e4288935ea68af8cd05 100644 (file)
@@ -8,6 +8,7 @@ include $(L4DIR)/mk/Makeconf
 
 SYSTEMS                = x86 arm amd64 ppc32
 TARGET         = libuc_c.a libuc_c.so
+PC_LIBS         = -luc_c
 LDFLAGS         = -z combreloc -z relro --sort-common \
                   --sort-section alignment --warn-common \
                  --warn-once
@@ -69,14 +70,17 @@ SRC_CC_libuc_c.so := $(BOTH_SRC_CC)
 SRC_S_libuc_c.a   := $(BOTH_SRC_S)
 SRC_S_libuc_c.so  := $(BOTH_SRC_S)
 
-IDL_PATH       =
-PRIVATE_INCDIR = $(SRC_DIR)/ARCH-$(ARCH)/include $(SRC_DIR)/ARCH-all/include \
+private_incdirs = $(SRC_DIR)/ARCH-$(ARCH)/include $(SRC_DIR)/ARCH-all/include \
                  $(OBJ_DIR)/ARCH-$(ARCH)/include $(OBJ_DIR)/ARCH-all/include \
                  $(OBJ_DIR)/ARCH-all/libc/string \
                  $(SRC_DIR)/../contrib/uclibc/libc/misc/internals \
-                 $(OBJ_BASE)/include/$(ARCH) $(OBJ_BASE)/include \
+                 $(if $(1),$(OBJ_BASE)/include/$(ARCH)/$(L4API)) \
+                 $(OBJ_BASE)/include/$(ARCH) \
+                 $(OBJ_BASE)/include \
                  $(OBJ_BASE)/include/uclibc \
                  $(SRC_DIR)/../contrib/uclibc/libcrypt
+
+PRIVATE_INCDIR  = $(call private_incdirs)
 LIBCINCDIR     = $(addprefix -I,$(GCCINCDIR))
 CPPFLAGS       += -nostdinc -include \
                  $(OBJ_DIR)/ARCH-all/include/libc-symbols.h
@@ -92,9 +96,15 @@ CPPFLAGS_dl-core.c         += -I$(SRC_DIR)/../contrib/uclibc/ldso/ldso/$(UCLIBC_
                               -I$(SRC_DIR)/../contrib/uclibc/ldso/include
 CPPFLAGS_$(OBJ_DIR)/ARCH-all/libc/inet += -DRESOLVER="\"resolv.c\""
 
+PRIVATE_INCDIR_ARCH-all/libc/string/wcslen.o    = $(SRC_DIR)/../contrib/uclibc/libc/string
+PRIVATE_INCDIR_ARCH-all/libc/string/wcslen.s.o  = $(SRC_DIR)/../contrib/uclibc/libc/string
+PRIVATE_INCDIR_ARCH-all/libc/string/wcsnlen.o   = $(SRC_DIR)/../contrib/uclibc/libc/string
+PRIVATE_INCDIR_ARCH-all/libc/string/wcsnlen.s.o = $(SRC_DIR)/../contrib/uclibc/libc/string
+PRIVATE_INCDIR_ARCH-all/libc/string/wmemcpy.o   = $(SRC_DIR)/../contrib/uclibc/libc/string
+PRIVATE_INCDIR_ARCH-all/libc/string/wmemcpy.s.o = $(SRC_DIR)/../contrib/uclibc/libc/string
+
 ifneq ($(L4API),)
 DEFINES                    += -DL4_THREAD_SAFE
-TARGET              = r/libuc_c.a r/libuc_c.so
 LDFLAGS_r/libuc_c.so := $(LDFLAGS_libuc_c.so)
 SRC_C_r/libuc_c.a   := $(SRC_C_libuc_c.a)
 SRC_C_r/libuc_c.so  := $(SRC_C_libuc_c.so) libpthread/src/forward.c
@@ -102,15 +112,7 @@ SRC_CC_r/libuc_c.a  := $(SRC_CC_libuc_c.a)
 SRC_CC_r/libuc_c.so := $(SRC_CC_libuc_c.so)
 SRC_S_r/libuc_c.a   := $(SRC_S_libuc_c.a)
 SRC_S_r/libuc_c.so  := $(SRC_S_libuc_c.so)
-PRIVATE_INCDIR      = $(SRC_DIR)/ARCH-$(ARCH)/include $(SRC_DIR)/ARCH-all/include \
-                      $(OBJ_DIR)/ARCH-$(ARCH)/include $(OBJ_DIR)/ARCH-all/include \
-                      $(SRC_DIR)/../contrib/uclibc/libc/misc/internals \
-                      $(OBJ_DIR)/ARCH-all/libc/string \
-                      $(OBJ_BASE)/include/$(ARCH)/$(L4API) \
-                      $(OBJ_BASE)/include/$(ARCH) $(OBJ_BASE)/include \
-                      $(OBJ_BASE)/include/uclibc_pthreads \
-                      $(OBJ_BASE)/include/uclibc \
-                      $(SRC_DIR)/../contrib/uclibc/libcrypt
+PRIVATE_INCDIR       = $(call private_incdirs,1)
 vpath libpthread/src/forward.c $(PTHLIB_DIR)/..
 PRIVATE_INCDIR_libpthread/src/forward.s.o += $(PTHLIB_DIR)/src/sysdeps/$(UCLIBC_ARCH_$(ARCH)) \
                                              $(PTHLIB_DIR)/src
index f8028d23c1481fad613b2319cd714cb0e9f7f515..b39acd9892b6edc0c5ef6e0cb747219e6f8088e2 100644 (file)
@@ -272,6 +272,7 @@ libc/stdio/_trans2r.c
 libc/stdio/_trans2w.c
 libc/stdio/_uintmaxtostr.c
 libc/stdio/_wcommit.c
+libc/stdio/_wfwrite.c
 libc/stdio/asprintf.c
 libc/stdio/clearerr.c
 libc/stdio/clearerr.c                          clearerr__DO_UNLOCKED
@@ -302,6 +303,8 @@ libc/stdio/fputs.c
 libc/stdio/fputs.c                             fputs__DO_UNLOCKED
 libc/stdio/fputc.c
 libc/stdio/fputc.c                             fputc__DO_UNLOCKED
+libc/stdio/fputws.c
+libc/stdio/fputws.c                            fputws__DO_UNLOCKED
 libc/stdio/fprintf.c
 libc/stdio/fread.c
 libc/stdio/fread.c                             fread__DO_UNLOCKED
@@ -312,6 +315,7 @@ libc/stdio/fsetpos64.c
 libc/stdio/ftello.c
 libc/stdio/ftello64.c
 libc/stdio/funlockfile.c
+libc/stdio/fwprintf.c
 libc/stdio/fwrite.c
 libc/stdio/fwrite.c                            fwrite__DO_UNLOCKED
 libc/stdio/getdelim.c
@@ -339,19 +343,25 @@ libc/stdio/setbuffer.c
 libc/stdio/setlinebuf.c
 libc/stdio/snprintf.c
 libc/stdio/sprintf.c
+libc/stdio/swprintf.c
 libc/stdio/ungetc.c
 libc/stdio/vasprintf.c
 libc/stdio/vdprintf.c
 libc/stdio/_vfprintf.c
 libc/stdio/_vfprintf_internal.c
+libc/stdio/_vfwprintf_internal.c
 libc/stdio/vfprintf.c
+libc/stdio/vfwprintf.c
 libc/stdio/_ppfs_init.c
 libc/stdio/_ppfs_prepargs.c
 libc/stdio/_ppfs_setargs.c
 libc/stdio/_ppfs_parsespec.c
 libc/stdio/vsnprintf.c
 libc/stdio/vsprintf.c
+libc/stdio/vswprintf.c
 libc/stdio/vprintf.c
+libc/stdio/vwprintf.c
+libc/stdio/wprintf.c
 libc/string/_string.h
 libc/string/_syserrmsg.h
 libc/string/basename.c
@@ -378,6 +388,9 @@ libc/string/sys_errlist.c
 libc/string/strndup.c
 libc/string/strncasecmp.c
 libc/string/strtok.c
+libc/string/wcsnlen.c
+libc/string/wcslen.c
+libc/string/wmemcpy.c
 libc/misc/assert/__assert.c
 libc/misc/ctype/ctype.c
 libc/misc/ctype/isalnum.c
index ed3ee4732a4572fa8666aab888a4b102272ae594..43f6b9f6ed0fce56f4c6c936940c40927303560a 100644 (file)
@@ -20,7 +20,11 @@ headers:: $(OBJ_DIR)/itab.h $(OBJ_DIR)/itab.c
        $(VERBOSE)cp $(SRC_DIR)/../contrib/libudis86/types.h $(OBJ_DIR)/libudis86
        $(VERBOSE)cp $(OBJ_DIR)/itab.h $(OBJ_DIR)/libudis86
 
+# PYTHONPATH=$(CONTRIB_PATH)/scripts python -B would be enough instead of
+# linking the contrib files but the -B option is only available from python
+# 2.6 onwards
 $(OBJ_DIR)/itab.h $(OBJ_DIR)/itab.c:
-       cd $(OBJ_DIR) && PYTHONPATH=$(CONTRIB_PATH)/scripts python \
+       for p in $(CONTRIB_PATH)/scripts/*.py; do ln -sf $$p $(OBJ_DIR); done
+       cd $(OBJ_DIR) && PYTHONPATH=$(OBJ_DIR) python \
          $(CONTRIB_PATH)/libudis86/itab.py \
          $(CONTRIB_PATH)/docs/x86/optable.xml