Changeset b9e97fb in mainline for arch/amd64/include/interrupt.h


Ignore:
Timestamp:
2005-08-31T10:53:34Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8f91729
Parents:
9756131
Message:

Better types for ia32 drivers, so that they can be reused in amd64.
Build script cleanup amd64.
New code / not working yet / in amd64.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/include/interrupt.h

    r9756131 rb9e97fb  
    11/*
    2  * Copyright (C) 2005 Martin Decky
     2 * Copyright (C) 2001-2004 Jakub Jermar
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 #ifndef __amd64_INTERRUPT_H__
    30 #define __amd64_INTERRUPT_H__
     29#ifndef __INTERRUPT_H__
     30#define __INTERRUPT_H__
    3131
    32 extern void interrupt(void);
     32#include <arch/types.h>
     33#include <arch/pm.h>
     34
     35#define IVT_ITEMS               IDT_ITEMS
     36
     37#define IVT_EXCBASE             0
     38#define EXCLAST                 31
     39
     40#define IVT_IRQBASE             (IVT_EXCBASE+EXCLAST+1)
     41#define IRQLAST                 15
     42
     43#define IVT_FREEBASE            (IVT_IRQBASE+IRQLAST+1)
     44
     45#define IRQ_CLK         0
     46#define IRQ_KBD         1
     47#define IRQ_PIC1        2
     48#define IRQ_PIC_SPUR    7
     49
     50/* this one must have four least significant bits set to ones */
     51#define VECTOR_APIC_SPUR        (IVT_ITEMS-1)
     52
     53#if (((VECTOR_APIC_SPUR + 1)%16) || VECTOR_APIC_SPUR >= IVT_ITEMS)
     54#error Wrong definition of VECTOR_APIC_SPUR
     55#endif
     56
     57#define VECTOR_PIC_SPUR         (IVT_IRQBASE+IRQ_PIC_SPUR)
     58#define VECTOR_CLK              (IVT_IRQBASE+IRQ_CLK)
     59#define VECTOR_KBD              (IVT_IRQBASE+IRQ_KBD)
     60
     61#define VECTOR_SYSCALL                  (IVT_FREEBASE+0)
     62#define VECTOR_TLB_SHOOTDOWN_IPI        (IVT_FREEBASE+1)
     63#define VECTOR_WAKEUP_IPI               (IVT_FREEBASE+2)
     64
     65typedef void (* iroutine)(__u8 n, __native stack[]);
     66
     67extern void (* disable_irqs_function)(__u16 irqmask);
     68extern void (* enable_irqs_function)(__u16 irqmask);
     69extern void (* eoi_function)(void);
     70
     71extern iroutine trap_register(__u8 n, iroutine f);
     72
     73extern void trap_dispatcher(__u8 n, __native stack[]);
     74
     75extern void null_interrupt(__u8 n, __native stack[]);
     76extern void gp_fault(__u8 n, __native stack[]);
     77extern void nm_fault(__u8 n, __native stack[]);
     78extern void ss_fault(__u8 n, __native stack[]);
     79extern void page_fault(__u8 n, __native stack[]);
     80extern void syscall(__u8 n, __native stack[]);
     81extern void tlb_shootdown_ipi(__u8 n, __native stack[]);
     82extern void wakeup_ipi(__u8 n, __native stack[]);
     83
     84extern void trap_virtual_enable_irqs(__u16 irqmask);
     85extern void trap_virtual_disable_irqs(__u16 irqmask);
     86extern void trap_virtual_eoi(void);
    3387
    3488#endif
Note: See TracChangeset for help on using the changeset viewer.