Advertisement
rz2k

Untitled

Sep 18th, 2012
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.42 KB | None | 0 0
  1. #include <ump/ump_kernel_interface_ref_drv.h>
  2. #define GET_UMP_SECURE_ID_BUF1   _IOWR('m', 310, unsigned int)
  3. #define GET_UMP_SECURE_ID_BUF2   _IOWR('m', 311, unsigned int)
  4.  
  5. case GET_UMP_SECURE_ID_BUF1:
  6.     {
  7.             u32 __user *psecureid = (u32 __user *) arg;
  8.             ump_secure_id secure_id;
  9.         if (!g_fbi.ump_wrapped_buffer[0]) {
  10.             ump_dd_physical_block ump_memory_description;
  11.             ump_memory_description.addr = info->fix.smem_start;
  12.             ump_memory_description.size = info->fix.smem_len;
  13.             g_fbi.ump_wrapped_buffer[0] = ump_dd_handle_create_from_phys_blocks( &ump_memory_description, 1);
  14.         }
  15.        
  16.             //Get secure id for top-half of framebuffer
  17.             secure_id = ump_dd_secure_id_get(g_fbi.ump_wrapped_buffer[0]);
  18.             return put_user((unsigned int)secure_id, psecureid);
  19.         break;
  20.     }
  21.     case GET_UMP_SECURE_ID_BUF2:
  22.     {
  23.         u32 __user *psecureid = (u32 __user *) arg;
  24.             ump_secure_id secure_id;
  25.         if (!g_fbi.ump_wrapped_buffer[1]) {
  26.             ump_dd_physical_block ump_memory_description;
  27.             ump_memory_description.addr = info->fix.smem_start;
  28.             ump_memory_description.size = info->fix.smem_len;
  29.             g_fbi.ump_wrapped_buffer[1] = ump_dd_handle_create_from_phys_blocks( &ump_memory_description, 1);
  30.         }
  31.        
  32.             //Get secure id for bottom-half of framebuffer
  33.             secure_id = ump_dd_secure_id_get(g_fbi.ump_wrapped_buffer[1]);
  34.             return put_user((unsigned int)secure_id, psecureid);
  35.         break;
  36.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement