mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 08:06:32 +00:00
🆕 增加重启命令reboot
This commit is contained in:
@ -442,6 +442,19 @@ uint64_t sys_sbrk(struct pt_regs *regs)
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 重启计算机
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
uint64_t sys_reboot(struct pt_regs *regs)
|
||||
{
|
||||
// 重启计算机
|
||||
io_out8(0x64, 0xfe);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
ul sys_ahci_end_req(struct pt_regs *regs)
|
||||
{
|
||||
ahci_end_request();
|
||||
@ -469,5 +482,6 @@ system_call_t system_call_table[MAX_SYSTEM_CALL_NUM] =
|
||||
[8] = sys_vfork,
|
||||
[9] = sys_brk,
|
||||
[10] = sys_sbrk,
|
||||
[11 ... 254] = system_call_not_exists,
|
||||
[11] = sys_reboot,
|
||||
[12 ... 254] = system_call_not_exists,
|
||||
[255] = sys_ahci_end_req};
|
||||
|
@ -20,5 +20,6 @@
|
||||
#define SYS_VFORK 8
|
||||
#define SYS_BRK 9
|
||||
#define SYS_SBRK 10
|
||||
#define SYS_REBOOT 11 // 重启
|
||||
|
||||
#define SYS_AHCI_END_REQ 255 // AHCI DMA请求结束end_request的系统调用
|
Reference in New Issue
Block a user