mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 12:16:31 +00:00
ata_disk_handler
This commit is contained in:
@ -279,6 +279,20 @@ void io_out32(unsigned short port, unsigned int value)
|
||||
: "memory");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 从端口读入n个word到buffer
|
||||
*
|
||||
*/
|
||||
#define io_insw(port,buffer,nr) \
|
||||
__asm__ __volatile__("cld;rep;insw;mfence;"::"d"(port),"D"(buffer),"c"(nr):"memory")
|
||||
|
||||
/**
|
||||
* @brief 从输出buffer中的n个word到端口
|
||||
*
|
||||
*/
|
||||
#define io_outsw(port,buffer,nr) \
|
||||
__asm__ __volatile__("cld;rep;outsw;mfence;"::"d"(port),"S"(buffer),"c"(nr):"memory")
|
||||
|
||||
/**
|
||||
* @brief 读取rsp寄存器的值(存储了页目录的基地址)
|
||||
*
|
||||
|
Reference in New Issue
Block a user