Changeset 8cee705 in mainline


Ignore:
Timestamp:
2006-10-19T22:58:53Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
deb14fb
Parents:
f0450658
Message:

sparc64 work.

  • Improve panic screen on data_access_exception by dumping contents of DSFSR and DSFAR.
  • Change the FHC enable interrupt code to only set the IMAP_V bit.
Location:
kernel/arch/sparc64
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/mm/tlb.h

    rf0450658 r8cee705  
    430430extern void dtlb_insert_mapping(uintptr_t page, uintptr_t frame, int pagesize, bool locked, bool cacheable);
    431431
     432extern void dump_sfsr_and_sfar(void);
     433
    432434#endif /* !def __ASM__ */
    433435
  • kernel/arch/sparc64/src/drivers/fhc.c

    rf0450658 r8cee705  
    4141
    4242#include <arch/drivers/fhc.h>
     43#include <arch/trap/interrupt.h>
    4344#include <arch/mm/page.h>
    4445#include <mm/slab.h>
     
    4647#include <typedefs.h>
    4748#include <genarch/ofw/ofw_tree.h>
    48 #include <genarch/kbd/z8530.h>
    4949
    5050fhc_t *central_fhc = NULL;
     
    9595        switch (inr) {
    9696        case FHC_UART_INR:
    97                 fhc->uart_imap[FHC_UART_ICLR] = 0x0;
    98                 fhc->uart_imap[FHC_UART_IMAP] = 0x80000000;
     97                fhc->uart_imap[FHC_UART_IMAP] |= IMAP_V_MASK;
    9998                break;
    10099        default:
  • kernel/arch/sparc64/src/drivers/pci.c

    rf0450658 r8cee705  
    9898void pci_sabre_enable_interrupt(pci_t *pci, int inr)
    9999{
    100         pci->reg[PCI_SABRE_ICLR_BASE + (inr & INO_MASK)] = 0;
    101100        pci->reg[PCI_SABRE_IMAP_BASE + (inr & INO_MASK)] |= IMAP_V_MASK;
    102101}
  • kernel/arch/sparc64/src/mm/tlb.c

    rf0450658 r8cee705  
    7575         */
    7676        tlb_invalidate_all();
     77
     78        /*
     79         * Clear both SFSRs.
     80         */
     81        dtlb_sfsr_write(0);
     82        itlb_sfsr_write(0);
    7783}
    7884
     
    354360}
    355361
     362void dump_sfsr_and_sfar(void)
     363{
     364        tlb_sfsr_reg_t sfsr;
     365        uintptr_t sfar;
     366
     367        sfsr.value = dtlb_sfsr_read();
     368        sfar = dtlb_sfar_read();
     369       
     370        printf("DTLB SFSR: asi=%#x, ft=%#x, e=%d, ct=%d, pr=%d, w=%d, ow=%d, fv=%d\n",
     371                sfsr.asi, sfsr.ft, sfsr.e, sfsr.ct, sfsr.pr, sfsr.w, sfsr.ow, sfsr.fv);
     372        printf("DTLB SFAR: address=%p\n", sfar);
     373       
     374        dtlb_sfsr_write(0);
     375}
     376
    356377/** Invalidate all unlocked ITLB and DTLB entries. */
    357378void tlb_invalidate_all(void)
  • kernel/arch/sparc64/src/trap/exception.c

    rf0450658 r8cee705  
    3535
    3636#include <arch/trap/exception.h>
     37#include <arch/mm/tlb.h>
    3738#include <arch/interrupt.h>
    3839#include <interrupt.h>
     
    157158        fault_if_from_uspace(istate, "%s\n", __FUNCTION__);
    158159        dump_istate(istate);
     160        dump_sfsr_and_sfar();
    159161        panic("%s\n", __FUNCTION__);
    160162}
Note: See TracChangeset for help on using the changeset viewer.