mirror of
https://github.com/lemonade-sdk/mac_linuxgpu.git
synced 2026-11-22 23:57:31 -10:00
Runs the unmodified upstream Linux amdgpu and amdkfd drivers on Apple Silicon Macs inside a DriverKit system extension, for AMD GPUs attached over Thunderbolt. The Linux sources come from a pinned submodule and are compiled against linuxu, a userspace implementation of the Linux kernel APIs they use. Includes the HSA runtime, the host installer app, the setup and firmware fetch scripts, and the offline test suite.
21 lines
885 B
C
21 lines
885 B
C
/* Descriptors of a linuxu process as a Linux runtime uses them
|
|
* (linuxu/src/amdgpu-rt/process_file.c). The caller is inside the process
|
|
* (linuxu_process_enter). */
|
|
#ifndef LINUXU_RT_PROCESS_FILE_H
|
|
#define LINUXU_RT_PROCESS_FILE_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
/* open(2) of character device @dev into the current process's descriptor
|
|
* table: the descriptor, or a negative errno. */
|
|
int rt_process_open_chrdev(dev_t dev, int flags);
|
|
|
|
/* ioctl(2) on @fd with its argument block, @bytes at @buf, placed in a user
|
|
* VMA at @va that exists for this call only: the file's unlocked_ioctl
|
|
* copies it in and out with copy_{from,to}_user, and pointers inside the
|
|
* block may address the rest of it from @va. The block is copied back to
|
|
* @buf afterwards. Returns the ioctl's result. */
|
|
long rt_process_ioctl(int fd, unsigned int cmd, unsigned long va, void *buf, size_t bytes);
|
|
|
|
#endif
|