Changeset 7e956eb in mainline


Ignore:
Timestamp:
2007-11-17T19:49:31Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6c383b0
Parents:
9cc0d7c
Message:

Cleanup.

Location:
kernel/arch
Files:
4 edited

Legend:

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

    r9cc0d7c r7e956eb  
    4242#define IVT_FIRST               0
    4343
    44 #define EXC_COUNT       32
    45 #define IRQ_COUNT       16
     44#define EXC_COUNT               32
     45#define IRQ_COUNT               16
    4646
    4747#define IVT_EXCBASE             0
    4848#define IVT_IRQBASE             (IVT_EXCBASE + EXC_COUNT)
    49 #define IVT_FREEBASE    (IVT_IRQBASE + IRQ_COUNT)
     49#define IVT_FREEBASE            (IVT_IRQBASE + IRQ_COUNT)
    5050
    5151#define IRQ_CLK                 0
    5252#define IRQ_KBD                 1
    5353#define IRQ_PIC1                2
    54 #define IRQ_PIC_SPUR    7
     54#define IRQ_PIC_SPUR            7
    5555#define IRQ_MOUSE               12
    5656
     
    6262#endif
    6363
    64 #define VECTOR_DEBUG                            1
    65 #define VECTOR_CLK                                      (IVT_IRQBASE + IRQ_CLK)
    66 #define VECTOR_PIC_SPUR                         (IVT_IRQBASE + IRQ_PIC_SPUR)
    67 #define VECTOR_SYSCALL                          IVT_FREEBASE
     64#define VECTOR_DEBUG                    1
     65#define VECTOR_CLK                      (IVT_IRQBASE + IRQ_CLK)
     66#define VECTOR_PIC_SPUR                 (IVT_IRQBASE + IRQ_PIC_SPUR)
     67#define VECTOR_SYSCALL                  IVT_FREEBASE
    6868#define VECTOR_TLB_SHOOTDOWN_IPI        (IVT_FREEBASE + 1)
    69 #define VECTOR_DEBUG_IPI                        (IVT_FREEBASE + 2)
     69#define VECTOR_DEBUG_IPI                (IVT_FREEBASE + 2)
    7070
    7171/** This is passed to interrupt handlers */
  • kernel/arch/ia32/include/interrupt.h

    r9cc0d7c r7e956eb  
    3939#include <arch/pm.h>
    4040
    41 #define IVT_ITEMS               IDT_ITEMS
    42 #define IVT_FIRST               0
     41#define IVT_ITEMS       IDT_ITEMS
     42#define IVT_FIRST       0
    4343
    4444#define EXC_COUNT       32
    4545#define IRQ_COUNT       16
    4646
    47 #define IVT_EXCBASE             0
    48 #define IVT_IRQBASE             (IVT_EXCBASE + EXC_COUNT)
     47#define IVT_EXCBASE     0
     48#define IVT_IRQBASE     (IVT_EXCBASE + EXC_COUNT)
    4949#define IVT_FREEBASE    (IVT_IRQBASE + IRQ_COUNT)
    5050
    51 #define IRQ_CLK                 0
    52 #define IRQ_KBD                 1
    53 #define IRQ_PIC1                2
     51#define IRQ_CLK         0
     52#define IRQ_KBD         1
     53#define IRQ_PIC1        2
    5454#define IRQ_PIC_SPUR    7
    55 #define IRQ_MOUSE               12
     55#define IRQ_MOUSE       12
    5656
    5757/* this one must have four least significant bits set to ones */
     
    6262#endif
    6363
    64 #define VECTOR_DEBUG                            1
    65 #define VECTOR_CLK                                      (IVT_IRQBASE + IRQ_CLK)
    66 #define VECTOR_PIC_SPUR                         (IVT_IRQBASE + IRQ_PIC_SPUR)
    67 #define VECTOR_SYSCALL                          IVT_FREEBASE
     64#define VECTOR_DEBUG                    1
     65#define VECTOR_CLK                      (IVT_IRQBASE + IRQ_CLK)
     66#define VECTOR_PIC_SPUR                 (IVT_IRQBASE + IRQ_PIC_SPUR)
     67#define VECTOR_SYSCALL                  IVT_FREEBASE
    6868#define VECTOR_TLB_SHOOTDOWN_IPI        (IVT_FREEBASE + 1)
    69 #define VECTOR_DEBUG_IPI                        (IVT_FREEBASE + 2)
     69#define VECTOR_DEBUG_IPI                (IVT_FREEBASE + 2)
    7070
    7171typedef struct {
  • kernel/arch/ia32/include/pm.h

    r9cc0d7c r7e956eb  
    3636#define KERN_ia32_PM_H_
    3737
    38 #define IDT_ITEMS 64
    39 #define GDT_ITEMS 7
     38#define IDT_ITEMS       64     
     39#define GDT_ITEMS       7
    4040
    4141#define VESA_INIT_SEGMENT 0x8000
     
    6464#define PL_USER         3
    6565
    66 #define AR_PRESENT      (1<<7)
    67 #define AR_DATA         (2<<3)
    68 #define AR_CODE         (3<<3)
    69 #define AR_WRITABLE     (1<<1)
     66#define AR_PRESENT      (1 << 7)
     67#define AR_DATA         (2 << 3)
     68#define AR_CODE         (3 << 3)
     69#define AR_WRITABLE     (1 << 1)
    7070#define AR_INTERRUPT    (0xe)
    7171#define AR_TSS          (0x9)
    7272
    73 #define DPL_KERNEL      (PL_KERNEL<<5)
    74 #define DPL_USER        (PL_USER<<5)
     73#define DPL_KERNEL      (PL_KERNEL << 5)
     74#define DPL_USER        (PL_USER << 5)
    7575
    7676#define TSS_BASIC_SIZE  104
    77 #define TSS_IOMAP_SIZE  (16*1024+1)     /* 16K for bitmap + 1 terminating byte for convenience */
     77#define TSS_IOMAP_SIZE  (16 * 1024 + 1) /* 16K for bitmap + 1 terminating byte for convenience */
    7878
    79 #define IO_PORTS        (64*1024)
     79#define IO_PORTS        (64 * 1024)
    8080
    8181#ifndef __ASM__
  • kernel/arch/ia32/src/pm.c

    r9cc0d7c r7e956eb  
    134134                if (i == VECTOR_SYSCALL) {
    135135                        /*
    136                          * The syscall interrupt gate must be calleable from userland.
     136                         * The syscall interrupt gate must be calleable from
     137                         * userland.
    137138                         */
    138139                        d->access |= DPL_USER;
    139140                }
    140141               
    141                 idt_setoffset(d, ((uintptr_t) interrupt_handlers) + i * interrupt_handler_size);
     142                idt_setoffset(d, ((uintptr_t) interrupt_handlers) +
     143                    i * interrupt_handler_size);
    142144        }
    143145}
Note: See TracChangeset for help on using the changeset viewer.