sgx: first pass... lots of testing to go...

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>