Changeset 50b3d30 in mainline for kernel


Ignore:
Timestamp:
2008-11-30T21:35:13Z (17 years ago)
Author:
Jakub Vana <jakub.vana@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c716d94
Parents:
1baec4b
Message:

IA64: repair similators support

Location:
kernel
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/include/bootinfo.h

    r1baec4b r50b3d30  
    6868        unsigned long freq_scale;
    6969        unsigned int wakeup_intno;
     70        int hello_configured;
    7071
    7172} bootinfo_t;
  • kernel/arch/ia64/include/drivers/kbd.h

    r1baec4b r50b3d30  
    3737
    3838
    39 typedef enum {
    40         KBD_UNKNOWN,
    41         KBD_SKI,
    42         KBD_LEGACY,
    43         KBD_NS16550
    44 } kbd_type_t;
     39#define KBD_UNKNOWN 0
     40#define KBD_SKI 1
     41#define KBD_LEGACY 2
     42#define KBD_NS16550 3
     43
    4544
    4645#endif
  • kernel/arch/ia64/include/interrupt.h

    r1baec4b r50b3d30  
    5454#define VECTOR_TLB_SHOOTDOWN_IPI 0xf0
    5555#define INTERRUPT_TIMER         255
    56 #define IRQ_KBD                 241
    57 #define IRQ_MOUSE               252
     56#define IRQ_KBD                 (0x01+LAGACY_INTERRUPT_BASE)
     57#define IRQ_MOUSE               (0x0c+LAGACY_INTERRUPT_BASE)
    5858#define INTERRUPT_SPURIOUS      15
    5959#define LAGACY_INTERRUPT_BASE   0x20
  • kernel/arch/ia64/src/ia64.c

    r1baec4b r50b3d30  
    120120        int i;
    121121       
    122        
     122        int myid,myeid;
     123       
     124        myid=ia64_get_cpu_id();
     125        myeid=ia64_get_cpu_eid();
     126
    123127        for(i=0;i<16;i++)
    124128        {
     
    131135                ((uint32_t*)(IOSAPIC+0x00))[0]=0x10+2*i+1;
    132136                srlz_d();
    133                 ((uint32_t*)(IOSAPIC+0x10))[0]=1<<(56-32);
     137                ((uint32_t*)(IOSAPIC+0x10))[0]=myid<<(56-32) | myeid<<(48-32);
    134138                srlz_d();
    135139        }
     
    170174{
    171175        while (1) {
    172                 i8042_poll();
    173176#ifdef CONFIG_NS16550
    174177        #ifndef CONFIG_NS16550_INTERRUPT_DRIVEN
    175178                ns16550_poll();
    176179        #endif 
     180#else
     181        #ifndef CONFIG_I8042_INTERRUPT_DRIVEN
     182                i8042_poll();
     183        #endif 
    177184#endif
    178185                thread_usleep(POLL_INTERVAL);
     
    182189
    183190
    184 static void end_of_irq_void(void *cir_arg __attribute__((unused)),inr_t inr __attribute__((unused)))
     191void end_of_irq_void(void *cir_arg __attribute__((unused)),inr_t inr __attribute__((unused)));
     192void end_of_irq_void(void *cir_arg __attribute__((unused)),inr_t inr __attribute__((unused)))
    185193{
    186194        return;
     
    205213#ifdef I460GX
    206214                devno_t kbd = device_assign_devno();
    207                 devno_t mouse = device_assign_devno();
    208215                /* keyboard controller */
    209                 i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE);
    210216
    211217#ifdef CONFIG_NS16550
    212218                ns16550_init(kbd, NS16550_PORT, NS16550_IRQ,end_of_irq_void,NULL); // as a COM 1
    213219#else
     220                devno_t mouse = device_assign_devno();
     221                i8042_init(kbd, IRQ_KBD, mouse, IRQ_MOUSE);
    214222#endif
    215223                thread_t *t;
     
    281289        ski_kbd_grab();
    282290#else
    283         i8042_grab();
    284291        #ifdef CONFIG_NS16550
    285292                ns16550_grab();
     293        #else
     294                i8042_grab();
    286295        #endif 
    287                
    288296#endif 
    289297}
     
    295303#ifdef SKI
    296304        ski_kbd_release();
    297         i8042_release();
    298305#else   
    299306        #ifdef CONFIG_NS16550
    300307                ns16550_release();
     308        #else   
     309                i8042_release();
    301310        #endif 
    302311
  • kernel/arch/ia64/src/interrupt.c

    r1baec4b r50b3d30  
    263263#endif
    264264
    265 
     265                case INTERRUPT_TIMER:
     266                        {
     267
     268                                irq_t *irq = irq_dispatch_and_lock(ivr.vector);
     269                                if (irq) {
     270                                        irq->handler(irq, irq->arg);
     271                                        spinlock_unlock(&irq->lock);
     272                                } else {
     273                                        panic("\nUnhandled Internal Timer Interrupt (%d)\n",ivr.vector);
     274                                }
     275                        }       
     276                        break;
     277                               
    266278                default:
    267279                        {
  • kernel/arch/ia64/src/ski/ski.c

    r1baec4b r50b3d30  
    4545#include <synch/spinlock.h>
    4646#include <arch/asm.h>
    47 #include <drivers/kbd.h>
     47#include <arch/drivers/kbd.h>
    4848
    4949#define SKI_KBD_INR     0
  • kernel/arch/ia64/src/smp/smp.c

    r1baec4b r50b3d30  
    115115void smp_init(void)
    116116{
     117        if(!bootinfo->hello_configured) return;
     118        //If we have not system prepared by hello, we are not able to start AP's
     119        //this means we are running on simulator
     120       
    117121        sapic_init();
    118122        ipi_broadcast_arch_all(bootinfo->wakeup_intno);
  • kernel/genarch/src/kbd/i8042.c

    r1baec4b r50b3d30  
    3838
    3939#include <genarch/kbd/i8042.h>
     40#ifdef ia64
     41#include <arch/drivers/kbd.h>
     42#endif
    4043#include <genarch/kbd/key.h>
    4144#include <genarch/kbd/scanc.h>
     
    185188        sysinfo_set_item_val("kbd.devno", NULL, kbd_devno);
    186189        sysinfo_set_item_val("kbd.inr", NULL, kbd_inr);
    187        
     190#ifdef KBD_LEGACY
     191        sysinfo_set_item_val("kbd.type", NULL, KBD_LEGACY);
     192#endif 
    188193        sysinfo_set_item_val("mouse", NULL, true);
    189194        sysinfo_set_item_val("mouse.devno", NULL, mouse_devno);
  • kernel/kernel.config

    r1baec4b r50b3d30  
    139139! [ARCH=sparc64] CONFIG_Z8530 (y/n)
    140140
    141 # Support for NS16550 serial port
    142 ! [ARCH=sparc64|ARCH=ia64] CONFIG_NS16550 (y/n)
     141# Support for NS16550 serial port (On IA64 as a console instead legacy keyboard)
     142! [ARCH=sparc64] CONFIG_NS16550 (y/n)
     143
     144# Support for NS16550 serial port (On IA64 as a console instead legacy keyboard)
     145! [ARCH=ia64&MACHINE!=ski] CONFIG_NS16550 (n/y)
    143146
    144147# IOSapic on default address support (including legacy IRQ)
    145 ! [ARCH=ia64] CONFIG_IOSAPIC (y/n)
     148! [ARCH=ia64&MACHINE!=ski] CONFIG_IOSAPIC (y/n)
    146149
    147150# Interrupt-driven driver for Legacy Keyboard?
    148 ! [CONFIG_IOSAPIC=y] CONFIG_I8042_INTERRUPT_DRIVEN (y/n)
     151! [CONFIG_NS16550=n&CONFIG_IOSAPIC=y&MACHINE!=ski] CONFIG_I8042_INTERRUPT_DRIVEN (y/n)
    149152
    150153# Interrupt-driven driver for NS16550?
    151 ! [CONFIG_NS16550=y&((ARCH!=ia64)|CONFIG_IOSAPIC=y)] CONFIG_NS16550_INTERRUPT_DRIVEN (y/n)
     154! [CONFIG_NS16550=y&((ARCH!=ia64)|CONFIG_IOSAPIC=y)&MACHINE!=ski] CONFIG_NS16550_INTERRUPT_DRIVEN (y/n)
    152155
    153156# Virtually indexed D-cache support
Note: See TracChangeset for help on using the changeset viewer.