summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2014-10-28 15:30:59 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-10-29 03:29:22 +0000
commita25b9fa1ab68d7b37dd5bd5ed727607e3315f4a0 (patch)
tree115d46617eb27753d3de86e67055ba157aeaf8e9
parentb5bd5ed20d576c9a4cdd64b20698aa8f3c28f6a2 (diff)
downloadchrome-ec-foo-test.tar.gz
usb: fix undefined USB endpointsstabilize-6415.Bfoo-test
When calling the ep_undefined function, the linker was not considering it as a Thumb function and not setting the LSB in the address pointer. This was causing an exception at runtime. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=all BUG=none TEST=inspect assembly Change-Id: I8f4d1e351081032e138f593f0b61294031fc09b1 Reviewed-on: https://chromium-review.googlesource.com/226093 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--chip/stm32/usb_endpoints.S12
1 files changed, 8 insertions, 4 deletions
diff --git a/chip/stm32/usb_endpoints.S b/chip/stm32/usb_endpoints.S
index 831b4a8dee..0c950ccbe1 100644
--- a/chip/stm32/usb_endpoints.S
+++ b/chip/stm32/usb_endpoints.S
@@ -25,10 +25,6 @@
.endif
.endm
-ep_undefined:
-iface_undefined:
- bx lr
-
/* align function pointers on a 32-bit boundary */
.align 2
/* Endpoint callbacks */
@@ -99,3 +95,11 @@ interface 4
interface 5
interface 6
interface 7
+
+.text
+.code 16
+
+.thumb_func
+ep_undefined:
+iface_undefined:
+ bx lr