KMI patch for devel branch on bahadir's repo.

Important points:
----------------
1. Works fine for pb926 + qemu.

2. Scan code logic for kryboard is not complete.
We just have generic keys and shift working.

3. Mouse scancodes are collected but not decoded.

4. Right now we are doing enable_irq(), just before we go for waiting
again for new irqs. This is not correct but we had latency issues.
This needs to be fixed immediately.

5. Also it seems like the notify_clot count should be an atomic
variable. Needs to be discussed.
This commit is contained in:
Amit Mahajan
2010-03-30 10:54:04 +05:30
parent 17c2336613
commit 92645be6ff
28 changed files with 1898 additions and 32 deletions

View File

@@ -137,7 +137,8 @@ default CONT%(cn)d_OPT_NAME from
((CONT%(cn)d_BAREMETAL_PROJ_THREADS_DEMO==y) ? "thread_demo%(cn)d" :
((CONT%(cn)d_BAREMETAL_PROJ_TEST_SUITE==y) ? "test_suite%(cn)d" :
((CONT%(cn)d_BAREMETAL_PROJ_UART_SERVICE==y) ? "uart_service%(cn)d" :
((CONT%(cn)d_BAREMETAL_PROJ_TIMER_SERVICE==y) ? "timer_service%(cn)d" : "empty%(cn)d"))))))
((CONT%(cn)d_BAREMETAL_PROJ_KMI_SERVICE==y) ? "kmi_service%(cn)d" :
((CONT%(cn)d_BAREMETAL_PROJ_TIMER_SERVICE==y) ? "timer_service%(cn)d" : "empty%(cn)d")))))))
when CONT%(cn)d_TYPE_LINUX==y suppress cont%(cn)d_default_pager_params
unless CONT%(cn)d_TYPE_POSIX==y suppress cont%(cn)d_posix_pager_params
@@ -168,6 +169,7 @@ CONT%(cn)d_BAREMETAL_PROJ_THREADS_DEMO 'Thread Library Demo'
CONT%(cn)d_BAREMETAL_PROJ_TEST_SUITE 'Microkernel Tests'
CONT%(cn)d_BAREMETAL_PROJ_UART_SERVICE 'UART Service'
CONT%(cn)d_BAREMETAL_PROJ_TIMER_SERVICE 'Timer Service'
CONT%(cn)d_BAREMETAL_PROJ_KMI_SERVICE 'Keyboard Mouse Service'
choices cont%(cn)d_baremetal_params
CONT%(cn)d_BAREMETAL_PROJ_EMPTY
@@ -176,6 +178,7 @@ choices cont%(cn)d_baremetal_params
CONT%(cn)d_BAREMETAL_PROJ_TEST_SUITE
CONT%(cn)d_BAREMETAL_PROJ_UART_SERVICE
CONT%(cn)d_BAREMETAL_PROJ_TIMER_SERVICE
CONT%(cn)d_BAREMETAL_PROJ_KMI_SERVICE
default CONT%(cn)d_BAREMETAL_PROJ_EMPTY
menu cont%(cn)d_default_pager_params
@@ -232,16 +235,22 @@ cont%(cn)d_cap_device_uart1 'Container %(cn)d UART1 Menu'
cont%(cn)d_cap_device_uart2 'Container %(cn)d UART2 Menu'
cont%(cn)d_cap_device_uart3 'Container %(cn)d UART3 Menu'
cont%(cn)d_cap_device_timer1 'Container %(cn)d TIMER23 Menu'
cont%(cn)d_cap_device_keyboard0 'Container %(cn)d KEYBOARD0 Menu'
cont%(cn)d_cap_device_mouse0 'Container %(cn)d MOUSE0 Menu'
CONT%(cn)d_CAP_DEVICE_UART1_USE 'Container %(cn)d UART1 Enable'
CONT%(cn)d_CAP_DEVICE_UART2_USE 'Container %(cn)d UART2 Enable'
CONT%(cn)d_CAP_DEVICE_UART3_USE 'Container %(cn)d UART3 Enable'
CONT%(cn)d_CAP_DEVICE_TIMER1_USE 'Container %(cn)d TIMER23 Enable'
CONT%(cn)d_CAP_DEVICE_KEYBOARD0_USE 'Container %(cn)d KEYBOARD0 Enable'
CONT%(cn)d_CAP_DEVICE_MOUSE0_USE 'Container %(cn)d MOUSE0 Enable'
default CONT%(cn)d_CAP_DEVICE_UART1_USE from n
default CONT%(cn)d_CAP_DEVICE_UART2_USE from n
default CONT%(cn)d_CAP_DEVICE_UART3_USE from n
default CONT%(cn)d_CAP_DEVICE_TIMER1_USE from n
default CONT%(cn)d_CAP_DEVICE_KEYBOARD0_USE from n
default CONT%(cn)d_CAP_DEVICE_MOUSE0_USE from n
menu cont%(cn)d_cap_device_uart1
CONT%(cn)d_CAP_DEVICE_UART1_USE
@@ -255,11 +264,19 @@ menu cont%(cn)d_cap_device_uart3
menu cont%(cn)d_cap_device_timer1
CONT%(cn)d_CAP_DEVICE_TIMER1_USE
menu cont%(cn)d_cap_device_keyboard0
CONT%(cn)d_CAP_DEVICE_KEYBOARD0_USE
menu cont%(cn)d_cap_device_mouse0
CONT%(cn)d_CAP_DEVICE_MOUSE0_USE
menu cont%(cn)d_device_list
cont%(cn)d_cap_device_uart1
cont%(cn)d_cap_device_uart2
cont%(cn)d_cap_device_uart3
cont%(cn)d_cap_device_timer1
cont%(cn)d_cap_device_keyboard0
cont%(cn)d_cap_device_mouse0
#
# Settings for Custom Capabilities

View File

@@ -0,0 +1,316 @@
#
# Automatically generated, don't edit
#
# Generated on: amit-laptop-ubuntu
# At: Mon, 29 Mar 2010 17:55:04 +0000
# Linux version 2.6.28-11-generic (buildd@palmer) (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ) #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009
#
# Codezero Microkernel Configurator
#
#
# Main architecture
#
CONFIG_ARCH_ARM=y
#
# ARM Architecture Configuration
#
#
# ARM Platform Type
#
#
# ARM Platform Type
#
CONFIG_PLATFORM_EB=n
CONFIG_PLATFORM_PBA8=n
CONFIG_PLATFORM_PB926=y
CONFIG_PLATFORM_PB11MPCORE=n
CONFIG_PLATFORM_BEAGLE=n
CONFIG_PLATFORM_PBA9=n
#
# ARM CPU type
#
#
# ARM Processor Type
#
CONFIG_CPU_ARM926=y
#
# Generic Processor Properties
#
CONFIG_ICACHE_DISABLE=n
CONFIG_DCACHE_DISABLE=n
#
# Generic Kernel Properties
#
CONFIG_PREEMPT_DISABLE=n
CONFIG_DEBUG_ACCOUNTING=n
CONFIG_DEBUG_SPINLOCKS=n
CONFIG_SCHED_TICKS=1000
#
# Toolchain Prefix
#
CONFIG_TOOLCHAIN="arm-none-eabi-"
#
# Container Setup
#
CONFIG_CAPABILITIES=y
CONFIG_CONTAINERS=1
#
# Container 0 Parameters
#
#
# Container 0 Type
#
CONFIG_CONT0_TYPE_BAREMETAL=y
CONFIG_CONT0_TYPE_POSIX=n
CONFIG_CONT0_TYPE_LINUX=n
#
# Container 0 Options
#
CONFIG_CONT0_OPT_NAME="kmi_service0"
#
# Baremetal Project
#
CONFIG_CONT0_BAREMETAL_PROJ_EMPTY=n
CONFIG_CONT0_BAREMETAL_PROJ_HELLO_WORLD=n
CONFIG_CONT0_BAREMETAL_PROJ_THREADS_DEMO=n
CONFIG_CONT0_BAREMETAL_PROJ_TEST_SUITE=n
CONFIG_CONT0_BAREMETAL_PROJ_UART_SERVICE=n
CONFIG_CONT0_BAREMETAL_PROJ_TIMER_SERVICE=n
CONFIG_CONT0_BAREMETAL_PROJ_KMI_SERVICE=y
#
# Container 0 Default Pager Parameters
#
CONFIG_CONT0_PAGER_LMA=0x100000
CONFIG_CONT0_PAGER_VMA=0xa0000000
#
# Container 0 Physical Memory Regions (Capabilities)
#
CONFIG_CONT0_PHYSMEM_REGIONS=1
CONFIG_CONT0_PHYS0_START=0x100000
CONFIG_CONT0_PHYS0_END=0xe00000
#
# Container 0 Virtual Memory Regions (Capabilities)
#
CONFIG_CONT0_VIRTMEM_REGIONS=1
CONFIG_CONT0_VIRT0_START=0xa0000000
CONFIG_CONT0_VIRT0_END=0xb0000000
#
# Container 0 Capability List
#
#
# Container 0 Thread Pool Capability
#
CONFIG_CONT0_CAP_THREADPOOL_USE=y
CONFIG_CONT0_CAP_THREADPOOL_SIZE=64
#
# Container 0 Space Pool Capability
#
CONFIG_CONT0_CAP_SPACEPOOL_USE=y
CONFIG_CONT0_CAP_SPACEPOOL_SIZE=64
#
# Container 0 Mutex Pool Capability
#
CONFIG_CONT0_CAP_MUTEXPOOL_USE=y
CONFIG_CONT0_CAP_MUTEXPOOL_SIZE=100
#
# Container 0 Map Pool Capability
#
CONFIG_CONT0_CAP_MAPPOOL_USE=y
CONFIG_CONT0_CAP_MAPPOOL_SIZE=800
#
# Container 0 Capability Pool Capability
#
CONFIG_CONT0_CAP_CAPPOOL_USE=y
CONFIG_CONT0_CAP_CAPPOOL_SIZE=32
#
# Container 0 Thread Control Capability
#
CONFIG_CONT0_CAP_TCTRL_USE=y
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_CONTAINER=y
CONFIG_CONT0_CAP_TCTRL_TARGET_CURRENT_PAGER_SPACE=n
#
# Container 0 Exchange Registers Capability
#
CONFIG_CONT0_CAP_EXREGS_USE=y
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_CONTAINER=y
CONFIG_CONT0_CAP_EXREGS_TARGET_CURRENT_PAGER_SPACE=n
#
# Container 0 IPC Capability
#
CONFIG_CONT0_CAP_IPC_USE=y
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_CONTAINER=y
CONFIG_CONT0_CAP_IPC_TARGET_CURRENT_PAGER_SPACE=n
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_CONTAINER=n
CONFIG_CONT0_CAP_IPC_TARGET_ANOTHER_PAGER=n
#
# Container 0 Capability Control Capability
#
CONFIG_CONT0_CAP_CAPCTRL_USE=y
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_CONTAINER=y
CONFIG_CONT0_CAP_CAPCTRL_TARGET_CURRENT_PAGER_SPACE=n
#
# Container 0 Userspace Mutex Control Capability
#
CONFIG_CONT0_CAP_UMUTEX_USE=y
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_CONTAINER=y
CONFIG_CONT0_CAP_UMUTEX_TARGET_CURRENT_PAGER_SPACE=n
#
# Container 0 IRQ Control Capability
#
CONFIG_CONT0_CAP_IRQCTRL_USE=y
CONFIG_CONT0_CAP_IRQCTRL_TARGET_CURRENT_CONTAINER=y
CONFIG_CONT0_CAP_IRQCTRL_TARGET_CURRENT_PAGER_SPACE=n
#
# Container 0 Custom Capability 0 Parameters
#
CONFIG_CONT0_CAP_CUSTOM0_USE=n
#
# Container 0 Custom Capability 1 Parameters
#
CONFIG_CONT0_CAP_CUSTOM1_USE=n
#
# Container 0 Custom Capability 2 Parameters
#
CONFIG_CONT0_CAP_CUSTOM2_USE=n
#
# Container 0 Custom Capability 3 Parameters
#
CONFIG_CONT0_CAP_CUSTOM3_USE=n
#
# Container 0 Devices (Capabilities)
#
#
# Container 0 UART1 Menu
#
CONFIG_CONT0_CAP_DEVICE_UART1_USE=n
#
# Container 0 UART2 Menu
#
CONFIG_CONT0_CAP_DEVICE_UART2_USE=n
#
# Container 0 UART3 Menu
#
CONFIG_CONT0_CAP_DEVICE_UART3_USE=n
#
# Container 0 TIMER23 Menu
#
CONFIG_CONT0_CAP_DEVICE_TIMER1_USE=n
#
# Container 0 KEYBOARD0 Menu
#
CONFIG_CONT0_CAP_DEVICE_KEYBOARD0_USE=y
#
# Container 0 MOUSE0 Menu
#
CONFIG_CONT0_CAP_DEVICE_MOUSE0_USE=y
#
# Derived symbols
#
CONFIG_CONT3_START_PC_ADDR=0xd0000000
CONFIG_DEBUG_PERFMON_KERNEL=n
CONFIG_SUBARCH_V5=y
CONFIG_CONT1_PAGER_LOAD_ADDR=0x1100000
CONFIG_DRIVER_IRQ_PL190=y
CONFIG_DRIVER_TIMER_SP804=y
CONFIG_CONT2_START_PC_ADDR=0xc0000000
CONFIG_DRIVER_IRQ_GIC=n
CONFIG_CONT2_PAGER_VIRT_ADDR=0xc0000000
CONFIG_RAM_BASE_PLAT=0
CONFIG_DRIVER_INTC_OMAP=n
CONFIG_CONT2_PAGER_LOAD_ADDR=0x2100000
CONFIG_CONT1_PAGER_VIRT_ADDR=0xb0000000
CONFIG_CONT3_PAGER_LOAD_ADDR=0x3100000
CONFIG_SUBARCH_V7=n
CONFIG_SUBARCH_V6=n
CONFIG_DRIVER_TIMER_OMAP=n
CONFIG_CONT0_PAGER_LOAD_ADDR=0x100000
CONFIG_CONT0_PAGER_VIRT_ADDR=0xa0000000
CONFIG_DRIVER_UART_OMAP=n
CONFIG_DRIVER_UART_PL011=y
CONFIG_CONT3_PAGER_VIRT_ADDR=0xd0000000
CONFIG_CONT0_START_PC_ADDR=0xa0000000
CONFIG_CONT1_START_PC_ADDR=0xb0000000
#
# That's all, folks!