diff --git a/libgloss/arm/cpu-init/rdimon-aem.S b/libgloss/arm/cpu-init/rdimon-aem.S
index c960924d4..c8640632a 100644
--- a/libgloss/arm/cpu-init/rdimon-aem.S
+++ b/libgloss/arm/cpu-init/rdimon-aem.S
@@ -25,9 +25,10 @@
 
 /* This file gives a basic initialisation of a Cortex-A series core.  It is
    the bare minimum required to get Cortex-A core running with a semihosting
-   interface.  For M-profile we only define a hardfault handler, required to
-   prevent the simulator from entering into an infinite loop.  The comments
-   below apply to A-profile only.
+   interface.  For M-profile we define a hardfault handler, required to
+   prevent the simulator from entering into an infinite loop and we enable
+   the FPU when __ARM_FP is set.
+   The comments below apply to A-profile only.
 
    It sets up a basic 1:1 phsyical address to virtual address mapping;
    turns the MMU on; enables branch prediction; activates any integrated
@@ -542,6 +543,27 @@ page_tables:
      PT7(0x1c0e)
 
 #elif  (__ARM_ARCH_PROFILE == 'M')
+    .syntax	unified
+    .thumb
+
+    @ CPU Initialisation
+    .globl	_rdimon_hw_init_hook
+    .type	_rdimon_hw_init_hook, %function
+
+_rdimon_hw_init_hook:
+    /* Enable FPU for M-profile only .  */
+#if __ARM_FP
+    /* Read CPACR */
+    ldr	r0, =0xE000ED88
+    ldr	r1, [R0]
+    /* Enable full access to CP10 and CP11.  */
+    orr	r1, r1, #(0xFF << 20)
+    str	r1, [R0]
+    dsb
+    isb
+#endif
+    bx	lr
+
     /* On M-profile, call abort in case of hardfault: this causes the simulator to
        abort execution instead of going into an infinite loop.  */
     .section .hardfault_handler_addr, "a"
