重新定位ARM异常向量? [英] Relocate the ARM exception vectors?

查看:343
本文介绍了重新定位ARM异常向量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将如何重新定位的 ARM异常向量?

How would I relocate the ARM exception vectors?

基本上,我需要能够重新映射的方式,所以,当ARM内核尝试执行载体,应该执行存储在内核的RAM位,而不是在 ROM中的自定义异常向量这是为0x0 。那可能吗?还是我的意思路由中断内核的 ROM

Basically, I need to be able to remap them in a way, so when the ARM core tries to execute the vector, it should execute the custom exception vector that is stored in kernel's RAM bit and not in the ROM that is at 0x0. Is that possible? Or am I meant to route the interrupts to the kernel from the ROM?

所以基本上,有没有告诉ARM内核的一种方式,这里是您的量表新地址的?我知道,你可以启动CPU在高矢量模式,但是这不是我要找的。我需要能够在向量基动态设置为自定义地址。

So essentially, is there a way of telling the ARM core, "here is the new address for your vector table"? I know that you can start the CPU in the high vector mode, but that's not what I'm looking for. I need to be able to set the vector base to a custom address dynamically.

推荐答案

这是高度依赖于你正在使用的核心。

This is highly dependent on the core you're working with.

的Cortex-M3芯片可以使用量表偏移量在系统控制模块寄存器(VTOR)改变的基址。有些实现可能会限制可能的地址。

Cortex-M3 chips can change the base address using the Vector Table Offset Register (VTOR) in the System Control Block. Some implementations might restrict possible addresses.

传统芯片(ARM7 / 9的Cortex-A / R)中,我想没有让你指定一个任意的基础,但大都能00000000和FFFF0000之间切换,和一些允许使用内存启动地址。

Of the "traditional" chips (ARM7/9, Cortex-A/R), I think none allow you to specify an arbitrary base, although most of them can switch between 00000000 and FFFF0000, and a few allow to use the "start of RAM" address.

然而,如果该芯片具有MMU,通常可以在映射一个FFFF0000 RAM页面,并复制你的处理程序有。我相信这是Linux的做了什么。

However, if the chip has MMU, you can usually map a RAM page at FFFF0000 and copy your handlers there. I believe that's what Linux does.

这篇关于重新定位ARM异常向量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆