Changeset 02a99d2 in mainline for arch/ia32/src


Ignore:
Timestamp:
2005-05-11T19:51:55Z (20 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
69515260
Parents:
45671f48
Message:

NDEBUG debug symbol, ASSERT debug macro, fancier panic() in debug mode
indentation fixes, ASSERTs

Location:
arch/ia32/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/debug/panic.s

    r45671f48 r02a99d2  
    2828
    2929.text
    30 .global panic
     30.global panic_printf
    3131
    32 panic:
     32panic_printf:
    3333        movl $halt,(%esp)       # fake stack to make printf return to halt
    3434        jmp printf
  • arch/ia32/src/interrupt.c

    r45671f48 r02a99d2  
    2929#include <arch/interrupt.h>
    3030#include <print.h>
     31#include <debug.h>
    3132#include <panic.h>
    3233#include <arch/i8259.h>
     
    4950iroutine trap_register(__u8 n, iroutine f)
    5051{
     52        ASSERT(n < IVT_ITEMS);
     53       
    5154        iroutine old;
    52    
     55       
    5356        old = ivt[n];
    5457        ivt[n] = f;
    55    
    56         return old;
     58       
     59        return old;
    5760}
    5861
     
    6366void trap_dispatcher(__u8 n, __u32 stack[])
    6467{
    65         ivt[n](n,stack);
     68        ASSERT(n < IVT_ITEMS);
     69       
     70        ivt[n](n, stack);
    6671}
    6772
     
    113118                enable_irqs_function(irqmask);
    114119        else
    115                 panic(PANIC "no enable_irqs_function\n");
     120                panic("no enable_irqs_function\n");
    116121}
    117122
     
    121126                disable_irqs_function(irqmask);
    122127        else
    123                 panic(PANIC "no disable_irqs_function\n");
     128                panic("no disable_irqs_function\n");
    124129}
    125130
     
    129134                eoi_function();
    130135        else
    131                 panic(PANIC "no eoi_function\n");
     136                panic("no eoi_function\n");
    132137
    133138}
  • arch/ia32/src/pm.c

    r45671f48 r02a99d2  
    144144                tss_p = (struct tss *) malloc(sizeof(struct tss));
    145145                if (!tss_p)
    146                         panic(PANIC "could not allocate TSS\n");
     146                        panic("could not allocate TSS\n");
    147147        }
    148148
  • arch/ia32/src/smp/mps.c

    r45671f48 r02a99d2  
    470470                 */
    471471                if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor))))
    472                         panic(PANIC "couldn't allocate memory for GDT\n");
     472                        panic("couldn't allocate memory for GDT\n");
    473473
    474474                memcopy(gdt, gdt_new, GDT_ITEMS*sizeof(struct descriptor));
Note: See TracChangeset for help on using the changeset viewer.