Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ump/ump_kernel_interface_ref_drv.h>
- #define GET_UMP_SECURE_ID_BUF1 _IOWR('m', 310, unsigned int)
- #define GET_UMP_SECURE_ID_BUF2 _IOWR('m', 311, unsigned int)
- case GET_UMP_SECURE_ID_BUF1:
- {
- u32 __user *psecureid = (u32 __user *) arg;
- ump_secure_id secure_id;
- if (!g_fbi.ump_wrapped_buffer[0]) {
- ump_dd_physical_block ump_memory_description;
- ump_memory_description.addr = info->fix.smem_start;
- ump_memory_description.size = info->fix.smem_len;
- g_fbi.ump_wrapped_buffer[0] = ump_dd_handle_create_from_phys_blocks( &ump_memory_description, 1);
- }
- //Get secure id for top-half of framebuffer
- secure_id = ump_dd_secure_id_get(g_fbi.ump_wrapped_buffer[0]);
- return put_user((unsigned int)secure_id, psecureid);
- break;
- }
- case GET_UMP_SECURE_ID_BUF2:
- {
- u32 __user *psecureid = (u32 __user *) arg;
- ump_secure_id secure_id;
- if (!g_fbi.ump_wrapped_buffer[1]) {
- ump_dd_physical_block ump_memory_description;
- ump_memory_description.addr = info->fix.smem_start;
- ump_memory_description.size = info->fix.smem_len;
- g_fbi.ump_wrapped_buffer[1] = ump_dd_handle_create_from_phys_blocks( &ump_memory_description, 1);
- }
- //Get secure id for bottom-half of framebuffer
- secure_id = ump_dd_secure_id_get(g_fbi.ump_wrapped_buffer[1]);
- return put_user((unsigned int)secure_id, psecureid);
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement