 +        regs.eraseuicr.write(EraseUicr::ERASEUICR::ERASE);
          while !self.is_ready() {}
      }
-
+ 
 @@ -326,7 +338,7 @@ impl Nvmc {
          // Put the NVMC in write mode.
          regs.config.write(Configuration::WEN::Wen);
-
+ 
 -        for i in (0..data.len()).step_by(4) {
 +        for i in (0..data.len()).step_by(WORD_SIZE) {
              let word: u32 = (data[i + 0] as u32) << 0

+
 // Static reference to chip for panic dumps
 static mut CHIP: Option<&'static nrf52840::chip::Chip> = None;

@@ -90,6 +95,7 @@ pub struct Platform {
         'static,
         capsules::virtual_alarm::VirtualMuxAlarm<'static, nrf52840::rtc::Rtc<'static>>,
     >,
+    nvmc: &'static nrf52840::nvmc::SyscallDriver,
 }

 impl kernel::Platform for Platform {
@@ -108,19 +114,42 @@ impl kernel::Platform for Platform {
             capsules::ieee802154::DRIVER_NUM => f(Some(self.ieee802154_radio)),
             capsules::temperature::DRIVER_NUM => f(Some(self.temp)),
             capsules::analog_comparator::DRIVER_NUM => f(Some(self.analog_comparator)),

 pub use crate::sched::round_robin::{RoundRobinProcessNode, RoundRobinSched};
-pub use crate::sched::{Kernel, Scheduler};
+pub use crate::sched::{Kernel, Scheduler, StorageLocation};
 
 // Export only select items from the process module. To remove the name conflict
 // this cannot be called `process`, so we use a shortened version. These
diff --git a/kernel/src/memop.rs b/kernel/src/memop.rs
index 348c746a5..5465c95f4 100644
--- a/kernel/src/memop.rs
+++ b/kernel/src/memop.rs
@@ -108,6 +108,25 @@ pub(crate) fn memop(process: &dyn ProcessType, op_type: usize, r1: usize) -> Ret
             ReturnCode::SUCCESS
         }
 
+        // Op Type 12: Number of storage locations.
+        12 => ReturnCode::SuccessWithValue { value: process.number_storage_locations() },
+
