Added back NMI code - untested...

Change-Id: I72914d07d2b16136fc4192dbad889462b518c833
Settled on Jens's core, which seem to be working

Change-Id: I2d0203afec7500e7b7d1f49f0b5315f1c6558002