Changeset 5b1ced0 in mainline


Ignore:
Timestamp:
2005-12-25T12:11:23Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
39494010
Parents:
7ae4443
Message:

sparc64 work.
Initial interrupt_vector_trap handler and fixes needed to make it do the right thing (i.e. panic()).

Location:
arch/sparc64
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • arch/sparc64/Makefile.inc

    r7ae4443 r5b1ced0  
    6060        arch/$(ARCH)/src/start.S \
    6161        arch/$(ARCH)/src/trap/trap_table.S \
    62         arch/$(ARCH)/src/trap/trap.c
     62        arch/$(ARCH)/src/trap/trap.c \
     63        arch/$(ARCH)/src/trap/interrupt.c
  • arch/sparc64/src/dummy.s

    r7ae4443 r5b1ced0  
    3030
    3131.global asm_delay_loop
    32 .global cpu_halt
    3332.global cpu_sleep
    3433.global fmath_dpow
     
    4645
    4746asm_delay_loop:
    48 cpu_halt:
    4947cpu_sleep:
    5048fmath_dpow:
     
    6260        retl
    6361        nop
     62
     63.global cpu_halt
     64cpu_halt:
     65        b cpu_halt
     66        nop
  • arch/sparc64/src/panic.S

    r7ae4443 r5b1ced0  
    3535        call halt
    3636        nop
     37        /* Not reached. */
  • arch/sparc64/src/sparc64.c

    r7ae4443 r5b1ced0  
    3434void arch_pre_mm_init(void)
    3535{
     36        interrupts_disable();
    3637        ofw_sparc64_console_init();
    3738        trap_init();
  • arch/sparc64/src/trap/trap.c

    r7ae4443 r5b1ced0  
    3030#include <arch/trap/trap_table.h>
    3131#include <arch/trap/regwin.h>
     32#include <arch/trap/interrupt.h>
    3233#include <arch/asm.h>
    3334#include <memstr.h>
     
    5556        trap_install_handler(TT_SPILL_0_NORMAL, SPILL_HANDLER_SIZE, false);
    5657        trap_install_handler(TT_FILL_0_NORMAL, FILL_HANDLER_SIZE, false);
     58        trap_install_handler(TT_CLEAN_WINDOW, CLEAN_WINDOW_HANDLER_SIZE, true);
     59        trap_install_handler(TT_SPILL_0_NORMAL, SPILL_HANDLER_SIZE, true);
     60        trap_install_handler(TT_FILL_0_NORMAL, FILL_HANDLER_SIZE, true);
     61       
     62        trap_install_handler(TT_INTERRUPT_VECTOR_TRAP, INTERRUPT_VECTOR_TRAP_HANDLER_SIZE, false);
    5763}
    5864
  • arch/sparc64/src/trap/trap_table.S

    r7ae4443 r5b1ced0  
    4343#include <arch/trap/trap_table.h>
    4444#include <arch/trap/regwin.h>
     45#include <arch/trap/interrupt.h>
    4546
    4647#define TABLE_SIZE      TRAP_TABLE_SIZE
     
    5455trap_table:
    5556
    56 /* TT = 0x24, TL = 0 *, clean_window handler */
     57/* TT = 0x24, TL = 0, clean_window handler */
    5758.org trap_table + TT_CLEAN_WINDOW*ENTRY_SIZE
    5859.global clean_window_handler
     
    6061        CLEAN_WINDOW_HANDLER
    6162
    62 /* TT = 0x80, TL = 0 *, spill_0_normal handler */
     63/* TT = 0x60, TL = 0, interrupt_vector_trap handler */
     64.org trap_table + TT_INTERRUPT_VECTOR_TRAP*ENTRY_SIZE
     65.global interrupt_vector_trap_handler
     66interrupt_vector_trap_handler:
     67        INTERRUPT_VECTOR_TRAP_HANDLER
     68
     69/* TT = 0x80, TL = 0, spill_0_normal handler */
    6370.org trap_table + TT_SPILL_0_NORMAL*ENTRY_SIZE
    6471.global spill_0_normal
     
    6673        SPILL_NORMAL_HANDLER
    6774
    68 /* TT = 0xc0, TL = 0 *, fill_0_normal handler */
     75/* TT = 0xc0, TL = 0, fill_0_normal handler */
    6976.org trap_table + TT_FILL_0_NORMAL*ENTRY_SIZE
     77.global fill_0_normal
    7078fill_0_normal:
    7179        FILL_NORMAL_HANDLER
    7280
    7381/*
    74  * Software traps for TL=0.
     82 * Handlers for TL>0.
    7583 */
    76 .org trap_table + 256*ENTRY_SIZE
    77 tl_0_software_traps:
    7884
    79 /* Reserved area. */
    80 .org trap_table + 384*ENTRY_SIZE
    81 .space 128*ENTRY_SIZE, 0
     85/* TT = 0x24, TL > 0, clean_window handler */
     86.org trap_table + (TT_CLEAN_WINDOW+512)*ENTRY_SIZE
     87.global clean_window_handler_high
     88clean_window_handler_high:
     89        CLEAN_WINDOW_HANDLER
    8290
    83 /*
    84  * Hardware interrupts for TL>0.
    85  */
    86 .org trap_table + 512*ENTRY_SIZE
    87 tl_non_0_hardware_traps:
    8891
    89 /*
    90  * Register window spill/fill traps for TL>0.
    91  */
    92 .org trap_table + 640*ENTRY_SIZE
    93 tl_non_0_regwin_traps:
     92/* TT = 0x80, TL > 0, spill_0_normal handler */
    9493
    95 /*
    96  * Software traps for TL>0.
    97  */
    98 .org trap_table + 768*ENTRY_SIZE
    99 tl_non_0_software_traps:
     94.org trap_table + (TT_SPILL_0_NORMAL+512)*ENTRY_SIZE
     95.global spill_0_normal_high
     96spill_0_normal_high:
     97        SPILL_NORMAL_HANDLER
    10098
    101 /* Reserved area. */
    102 .org trap_table + 896*ENTRY_SIZE
    103 .space 128*ENTRY_SIZE, 0
     99
     100/* TT = 0xc0, TL > 0, fill_0_normal handler */
     101.org trap_table + (TT_FILL_0_NORMAL+512)*ENTRY_SIZE
     102.global fill_0_normal_high
     103fill_0_normal_high:
     104        FILL_NORMAL_HANDLER
     105
    104106
    105107
     
    107109 * Save trap table.
    108110 */
     111.align TABLE_SIZE
    109112.global trap_table_save
    110113trap_table_save:
Note: See TracChangeset for help on using the changeset viewer.