Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset c15b374 in mainline


Ignore:
Timestamp:
2010-07-12T14:42:46Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
44c69b66
Parents:
d5a1c73
Message:

Introduce PF_ACCESS_UNKNOWN to be used by the debuging/panicking code in
situations in which the trap handler does not know the exact access type.

Do not pass context-specific messages of only minimal information value to
panic_memtrap().

Location:
kernel
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/mm/page.c

    rd5a1c73 rc15b374  
    9090        if (as_page_fault(page, access, istate) == AS_PF_FAULT) {
    9191                fault_if_from_uspace(istate, "Page fault: %#x.", page);
    92                 panic_memtrap(istate, access, page, "Page fault.");
     92                panic_memtrap(istate, access, page, NULL);
    9393        }
    9494}
  • kernel/arch/arm32/src/mm/page_fault.c

    rd5a1c73 rc15b374  
    183183        if (ret == AS_PF_FAULT) {
    184184                fault_if_from_uspace(istate, "Page fault: %#x.", badvaddr);
    185                 panic_memtrap(istate, access, badvaddr, "Page fault.");
     185                panic_memtrap(istate, access, badvaddr, NULL);
    186186        }
    187187}
     
    200200                fault_if_from_uspace(istate,
    201201                    "Page fault - prefetch_abort: %#x.", istate->pc);
    202                 panic_memtrap(istate, PF_ACCESS_EXEC, istate->pc,
    203                     "Page fault - prefetch_abort.");
     202                panic_memtrap(istate, PF_ACCESS_EXEC, istate->pc, NULL);
    204203        }
    205204}
  • kernel/arch/ia32/src/mm/page.c

    rd5a1c73 rc15b374  
    115115        if (as_page_fault(page, access, istate) == AS_PF_FAULT) {
    116116                fault_if_from_uspace(istate, "Page fault: %#x.", page);
    117                 panic_memtrap(istate, access, page, "Page fault.");
     117                panic_memtrap(istate, access, page, NULL);
    118118        }
    119119}
  • kernel/arch/ia64/src/mm/tlb.c

    rd5a1c73 rc15b374  
    500500                if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) {
    501501                        fault_if_from_uspace(istate, "Page fault at %p.", va);
    502                         panic_memtrap(istate, PF_ACCESS_EXEC, va,
    503                             "Page fault.");
     502                        panic_memtrap(istate, PF_ACCESS_EXEC, va, NULL);
    504503                }
    505504        }
     
    622621                if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
    623622                        fault_if_from_uspace(istate, "Page fault at %p.", va);
    624                         panic_memtrap(istate, PF_ACCESS_READ, va,
    625                             "Page fault.");
     623                        panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, NULL);
    626624                }
    627625        }
     
    671669                if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) {
    672670                        fault_if_from_uspace(istate, "Page fault at %p.", va);
    673                         panic_memtrap(istate, PF_ACCESS_WRITE, va,
    674                             "Page fault.");
     671                        panic_memtrap(istate, PF_ACCESS_WRITE, va, NULL);
    675672                }
    676673        }
     
    708705                if (as_page_fault(va, PF_ACCESS_EXEC, istate) == AS_PF_FAULT) {
    709706                        fault_if_from_uspace(istate, "Page fault at %p.", va);
    710                         panic_memtrap(istate, PF_ACCESS_EXEC, va,
    711                             "Page fault.");
     707                        panic_memtrap(istate, PF_ACCESS_EXEC, va, NULL);
    712708                }
    713709        }
     
    745741                if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
    746742                        fault_if_from_uspace(istate, "Page fault at %p.", va);
    747                         panic_memtrap(istate, PF_ACCESS_READ, va,
    748                             "Page fault.");
     743                        panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, NULL);
    749744                }
    750745        }
     
    778773        if (as_page_fault(va, PF_ACCESS_WRITE, istate) == AS_PF_FAULT) {
    779774                fault_if_from_uspace(istate, "Page fault at %p.", va);
    780                 panic_memtrap(istate, PF_ACCESS_WRITE, va, "Page fault.");
     775                panic_memtrap(istate, PF_ACCESS_WRITE, va, NULL);
    781776        }
    782777        page_table_unlock(AS, true);
     
    818813                if (as_page_fault(va, PF_ACCESS_READ, istate) == AS_PF_FAULT) {
    819814                        fault_if_from_uspace(istate, "Page fault at %p.", va);
    820                         panic_memtrap(istate, PF_ACCESS_READ, va,
    821                             "Page fault.");
     815                        panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, NULL);
    822816                }
    823817        }
  • kernel/arch/mips32/src/mm/tlb.c

    rd5a1c73 rc15b374  
    324324       
    325325        fault_if_from_uspace(istate, "TLB Refill Exception on %p.", va);
    326         panic_memtrap(istate, PF_ACCESS_READ, va, "TLB Refill Exception.");
     326        panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, "TLB Refill Exception.");
    327327}
    328328
     
    333333       
    334334        fault_if_from_uspace(istate, "TLB Invalid Exception on %p.", va);
    335         panic_memtrap(istate, PF_ACCESS_READ, va, "TLB Invalid Exception.");
     335        panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, "TLB Invalid Exception.");
    336336}
    337337
  • kernel/arch/ppc32/src/mm/tlb.c

    rd5a1c73 rc15b374  
    112112{
    113113        fault_if_from_uspace(istate, "PHT Refill Exception on %p.", badvaddr);
    114         panic_memtrap(istate, PF_ACCESS_READ, badvaddr,
     114        panic_memtrap(istate, PF_ACCESS_UNKNOWN, badvaddr,
    115115            "PHT Refill Exception.");
    116116}
  • kernel/arch/sparc64/src/mm/sun4u/tlb.c

    rd5a1c73 rc15b374  
    259259                        /* NULL access in kernel */
    260260                        do_fast_data_access_mmu_miss_fault(istate, tag,
    261                             "Dereferencing NULL pointer");
     261                            "Dereferencing NULL pointer.");
    262262                } else if (page_8k >= end_of_identity) {
    263263                        /*
     
    442442{
    443443        fault_if_from_uspace(istate, "%s, Address=%p.", str, va);
    444         panic_memtrap(istate, PF_ACCESS_EXEC, va, "%s.", str);
     444        panic_memtrap(istate, PF_ACCESS_EXEC, va, str);
    445445}
    446446
     
    453453        fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d).", str, va,
    454454            tag.context);
    455         panic_memtrap(istate, PF_ACCESS_READ, va, "%s.", str);
     455        panic_memtrap(istate, PF_ACCESS_UNKNOWN, va, str);
    456456}
    457457
     
    464464        fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d).", str, va,
    465465            tag.context);
    466         panic_memtrap(istate, PF_ACCESS_WRITE, va, "%s.", str);
     466        panic_memtrap(istate, PF_ACCESS_WRITE, va, str);
    467467}
    468468
  • kernel/arch/sparc64/src/mm/sun4v/tlb.c

    rd5a1c73 rc15b374  
    359359{
    360360        fault_if_from_uspace(istate, "%s, Address=%p.", str, va);
    361         panic_memtrap(istate, PF_ACCESS_EXEC, va, "%s.", str);
     361        panic_memtrap(istate, PF_ACCESS_EXEC, va, str);
    362362}
    363363
     
    367367        fault_if_from_uspace(istate, "%s, Page=%p (ASID=%d).", str,
    368368            DMISS_ADDRESS(page_and_ctx), DMISS_CONTEXT(page_and_ctx));
    369         panic_memtrap(istate, PF_ACCESS_READ, DMISS_ADDRESS(page_and_ctx),
    370             "%s.");
     369        panic_memtrap(istate, PF_ACCESS_UNKNOWN, DMISS_ADDRESS(page_and_ctx),
     370            str);
    371371}
    372372
     
    377377            DMISS_ADDRESS(page_and_ctx), DMISS_CONTEXT(page_and_ctx));
    378378        panic_memtrap(istate, PF_ACCESS_WRITE, DMISS_ADDRESS(page_and_ctx),
    379             "%s.");
     379            str);
    380380}
    381381
  • kernel/generic/include/mm/as.h

    rd5a1c73 rc15b374  
    171171        PF_ACCESS_READ,
    172172        PF_ACCESS_WRITE,
    173         PF_ACCESS_EXEC
     173        PF_ACCESS_EXEC,
     174        PF_ACCESS_UNKNOWN
    174175} pf_access_t;
    175176
Note: See TracChangeset for help on using the changeset viewer.