Changeset e60293d in mainline


Ignore:
Timestamp:
2006-10-17T15:50:37Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8513ad7
Parents:
79f30e4f
Message:

ppc64: make it compile again

Location:
kernel/arch/ppc64
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc64/Makefile.inc

    r79f30e4f re60293d  
    7070        arch/$(ARCH)/src/mm/memory_init.c \
    7171        arch/$(ARCH)/src/mm/page.c \
    72         arch/$(ARCH)/src/mm/tlb.c
     72        arch/$(ARCH)/src/mm/tlb.c \
     73        arch/$(ARCH)/src/drivers/pic.c
  • kernel/arch/ppc64/include/interrupt.h

    r79f30e4f re60293d  
    3838#include <arch/exception.h>
    3939
    40 #define IRQ_COUNT       1
    41 #define IVT_ITEMS   15
    42 #define INT_OFFSET  0
     40#define IVT_ITEMS 16
     41#define IVT_FIRST 0
    4342
    44 #define VECTOR_DECREMENTER 10
     43#define VECTOR_DATA_STORAGE 2
     44#define VECTOR_INSTRUCTION_STORAGE 3
     45#define VECTOR_EXTERNAL 4
     46#define VECTOR_DECREMENTER 8
    4547
    4648extern void start_decrementer(void);
    4749extern void interrupt_init(void);
     50extern void extint_handler(int n, istate_t *istate);
    4851
    4952#endif
  • kernel/arch/ppc64/src/interrupt.c

    r79f30e4f re60293d  
    3333 */
    3434
     35#include <ddi/irq.h>
    3536#include <interrupt.h>
    3637#include <arch/interrupt.h>
     
    3940#include <time/clock.h>
    4041#include <ipc/sysipc.h>
     42#include <arch/drivers/pic.h>
     43#include <arch/mm/tlb.h>
     44#include <print.h>
    4145
    4246
     
    4852                : "r" (1000)
    4953        );
     54}
     55
     56
     57/** Handler of external interrupts */
     58static void exception_external(int n, istate_t *istate)
     59{
     60        int inum;
     61       
     62        while ((inum = pic_get_pending()) != -1) {
     63                irq_t *irq = irq_dispatch_and_lock(inum);
     64                if (irq) {
     65                        /*
     66                         * The IRQ handler was found.
     67                         */
     68                        irq->handler(irq, irq->arg);
     69                        spinlock_unlock(&irq->lock);
     70                } else {
     71                        /*
     72                         * Spurious interrupt.
     73                         */
     74#ifdef CONFIG_DEBUG
     75                        printf("cpu%d: spurious interrupt (inum=%d)\n", CPU->id, inum);
     76#endif
     77                }
     78                pic_ack_interrupt(inum);
     79        }
    5080}
    5181
     
    6191void interrupt_init(void)
    6292{
     93        exc_register(VECTOR_EXTERNAL, "external", exception_external);
    6394        exc_register(VECTOR_DECREMENTER, "timer", exception_decrementer);
    64 }
    65 
    66 
    67 /* Reregister irq to be IPC-ready */
    68 void irq_ipc_bind_arch(unative_t irq)
    69 {
    70         panic("not implemented\n");
    71         /* TODO */
    7295}
    7396
Note: See TracChangeset for help on using the changeset viewer.