fs/ioctl:add FIOC_XIPBASE to get file xip address

in tmpfs/romfs, we can get file real xip address to execute program

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao
2024-04-24 12:07:48 +08:00
committed by Xiang Xiao
parent 1ec3623b6b
commit ee07a269af
3 changed files with 25 additions and 0 deletions
+7
View File
@@ -1825,6 +1825,13 @@ static int tmpfs_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
return ret;
}
}
else if (cmd == FIOC_XIPBASE)
{
FAR uintptr_t *ptr = (FAR uintptr_t *)arg;
*ptr = (uintptr_t)tfo->tfo_data;
return OK;
}
return ret;
}