diff options
author | Simon Glass <sjg@chromium.org> | 2013-07-16 16:47:27 -0600 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-07-17 14:09:54 -0700 |
commit | 7189a9762e1ec8a35dd27e6efc19cd54275eb855 (patch) | |
tree | d8cd5fba1d0e8496879cd46fb70f7b5c7861c40d /LICENSE | |
parent | df79191f84c0de882263c5862c9ec687be77d50c (diff) | |
download | chrome-ec-7189a9762e1ec8a35dd27e6efc19cd54275eb855.tar.gz |
stm32l: Disable interrupts while running from flash
The curent code ends up creating a veneer for interrupt_enable/disable()
which isn't really needed (see below). By calling the interrupt code while
still running from flash we can avoid this.
I cannot see any problem with the current implementation, but it seems that
with this patch I also avoid an exception.
BUG=chrome-os-partner:20976
BRANCH=none
TEST=manual
Build EC and see code generated like this:
200029ec <iram_flash_write>:
200029ec: b538 push {r3, r4, r5, lr}
200029ee: 460d mov r5, r1
200029f0: 4604 mov r4, r0
200029f2: f000 f83d bl 20002a70 <__interrupt_disable_veneer>
...
20002a4a: f000 b809 b.w 20002a60 <__interrupt_enable_veneer>
20002a4e: bf00 nop
20002a60 <__interrupt_enable_veneer>:
20002a60: b401 push {r0}
20002a62: 4802 ldr r0, [pc, #8] ; (20002a6c <__interrupt_enable_veneer+0xc>)
20002a64: 4684 mov ip, r0
20002a66: bc01 pop {r0}
20002a68: 4760 bx ip
20002a6a: bf00 nop
20002a6c: 080007f5 .word 0x080007f5
20002a70 <__interrupt_disable_veneer>:
20002a70: b401 push {r0}
20002a72: 4802 ldr r0, [pc, #8] ; (20002a7c <__interrupt_disable_veneer+0xc>)
20002a74: 4684 mov ip, r0
20002a76: bc01 pop {r0}
20002a78: 4760 bx ip
20002a7a: bf00 nop
20002a7c: 080007f1 .word 0x080007f1
With this patch the veneers go away.
Change-Id: Idfe173b4c8d45a142914b2388bcff8ba708c657c
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/62243
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions