简体   繁体   中英

Macos M1 low-level port i/o

I have a student task to read PCI info via 0xCF8 and 0xCFC ports using outl(), inl() functions. It assumes I use Linux x86, but can I do such things on macos with M1 chip? I found <sys/uio.h> header but it does not define functions prototypes.

outl and inl are platform-specific functions for Linux. If you need to submit a code as an exercise, then I suggest installing some kind of virtual machine (VirtualBox or maybe Docker Desktop) and write a program for Linux, otherwise you'll have to figure out completely different low-level API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM