Skip to contentSkip to conversation

ARM: CONFIG_MTD_XIP vs. __aeabi_idiv

PATCH/RFC Johannes Stezenbach 1 participant 1 message Sep 9, 2010 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

For testing purposes I needed to build a kernel which executes in-place in NOR flash. It crashes when probing physmap flash because the MTD code which runs from RAM with CONFIG_MTD_XIP calls __aeabi_idiv.

arch/arm/lib/lib1funcs.S +4 -0
index 6dc0648..b2c0105 100644
@@ -204,6 +204,10 @@ Boston, MA 02111-1307, USA.  */
 5:
 .endm
 
+#ifdef CONFIG_MTD_XIP
+	@ MTD code need to have these functions in RAM
+	.section ".data"
+#endif
 
 ENTRY(__udivsi3)
 ENTRY(__aeabi_uidiv)