| 13 | MODULE_AUTHOR("Wojciech Ozga <woz@zurich.ibm.com>"); |
| 14 | |
| 15 | static int ace_init(void){ |
| 16 | volatile u8 *secret; |
| 17 | struct sbiret ret; |
| 18 | int i; |
| 19 | |
| 20 | printk(KERN_ALERT "Requesting secret from the security monitor\n"); |
| 21 | secret = kmalloc(1024*sizeof(u8), GFP_KERNEL); |
| 22 | ret = sbi_ecall(0x434F5647, 9, virt_to_phys((void *) secret), 1024, 0, 0, 0, 0); |
| 23 | if (!ret.error) { |
| 24 | printk(KERN_ALERT "Secret=0x"); |
| 25 | for (i=0; i<ret.value; i++) { |
| 26 | printk(KERN_CONT "%02x", secret[i]); |
| 27 | } |
| 28 | printk(KERN_CONT "\n"); |
| 29 | } else { |
| 30 | printk(KERN_ALERT "Error: %lx %lx", ret.error, ret.value); |
| 31 | } |
| 32 | return 0; |
| 33 | } |
| 34 | |
| 35 | static void ace_exit(void){ |
| 36 | } |
nothing calls this directly
no outgoing calls
no test coverage detected