Changeset a5f94c8 in umon


Ignore:
Timestamp:
Jul 3, 2015, 5:54:49 PM (4 years ago)
Author:
Jarielle Catbagan <jcatbagan93@…>
Branches:
master
Children:
d77ed25
Parents:
37e453e
git-author:
Jarielle Catbagan <jcatbagan93@…> (07/03/15 17:54:49)
git-committer:
Ed Sutter <edsutterjr@…> (07/05/15 01:12:17)
Message:

BBB: Migrate custom exception handler mapping from rom_reset.S to ram_vector_install() in cpuio.c

Location:
ports/beagleboneblack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ports/beagleboneblack/cpuio.c

    r37e453e ra5f94c8  
    110110}
    111111
     112/* Override the default exception handlers provided by the AM335x
     113 * internal ROM code with uMon's custom exception handlers
     114 */
     115void
     116ram_vector_install(void)
     117{
     118        extern unsigned long abort_data;
     119        extern unsigned long abort_prefetch;
     120        extern unsigned long undefined_instruction;
     121        extern unsigned long software_interrupt;
     122        extern unsigned long interrupt_request;
     123        extern unsigned long fast_interrupt_request;
     124        extern unsigned long not_assigned;
     125
     126        *(ulong **)0x4030ce24 = &undefined_instruction;
     127        *(ulong **)0x4030ce28 = &software_interrupt;
     128        *(ulong **)0x4030ce2c = &abort_prefetch;
     129        *(ulong **)0x4030ce30 = &abort_data;
     130        *(ulong **)0x4030ce34 = &not_assigned;
     131        *(ulong **)0x4030ce38 = &interrupt_request;
     132        *(ulong **)0x4030ce3c = &fast_interrupt_request;
     133}
     134
    112135/* If any CPU IO wasn't initialized in reset.S, do it here...
    113136 * This just provides a "C-level" IO init opportunity.
     
    116139initCPUio(void)
    117140{
    118         /* ADD_CODE_HERE */
     141        ram_vector_install();
    119142}
  • ports/beagleboneblack/rom_reset.S

    r37e453e ra5f94c8  
    9494        msr     cpsr,r0
    9595
    96         /* store the address of the custom exception handlers in the exception vector space
    97            of the AM335x Public RAM */
    98         ldr r1, =undefined_instruction
    99         movw r2, #0xce24
    100         movt r2, #0x4030
    101         str r1, [r2]
    102 
    103         ldr r1, =software_interrupt
    104         movw r2, #0xce28
    105         movt r2, #0x4030
    106         str r1, [r2]
    107 
    108         ldr r1, =abort_prefetch
    109         movw r2, #0xce2c
    110         movt r2, #0x4030
    111         str r1, [r2]
    112 
    113         ldr r1, =abort_data
    114         movw r2, #0xce30
    115         movt r2, #0x4030
    116         str r1, [r2]
    117 
    118         ldr r1, =not_assigned
    119         movw r2, #0xce34
    120         movt r2, #0x4030
    121         str r1, [r2]
    122 
    123         ldr r1, =interrupt_request
    124         movw r2, #0xce38
    125         movt r2, #0x4030
    126         str r1, [r2]
    127 
    128         ldr r1, =fast_interrupt_request
    129         movw r2, #0xce3c
    130         movt r2, #0x4030
    131         str r1, [r2]
    132 
    13396//      bl cache_init
    13497
Note: See TracChangeset for help on using the changeset viewer.