1 | case LINUX_REBOOT_CMD_RESTART: |
1 | case LINUX_REBOOT_CMD_POWER_OFF: |
1 2 3 4 5 6 7 | ret = exec_usermodehelper(poweroff_helper_path, argv, envp); if (ret) { printk(KERN_ERR "apm.c: failed to exec %s , errno = %d\\n", poweroff_helper_path, errno); } break; |
1 2 3 4 5 6 7 8 | // For fast reboot support static unsigned char fast_reboot_switch [] = { 0x66, 0x0f, 0x20, 0xc0, /* movl %cr0,%eax */ 0x66, 0x25, 0x10, 0x11, 0x11, 0x11, /* andl $0x11111110,%eax */ 0x66, 0x0f, 0x22, 0xc0, /* movl %eax,%cr0 */ 0xea, 0x00, 0x00, 0x00, 0x70 /* ljmp $0x7000,$0x0000 */ }; |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |