Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/amd64/efirt_machdep.c
| Show All 40 Lines | |||||
| #include <sys/rwlock.h> | #include <sys/rwlock.h> | ||||
| #include <sys/sched.h> | #include <sys/sched.h> | ||||
| #include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
| #include <sys/systm.h> | #include <sys/systm.h> | ||||
| #include <sys/vmmeter.h> | #include <sys/vmmeter.h> | ||||
| #include <isa/rtc.h> | #include <isa/rtc.h> | ||||
| #include <machine/efi.h> | #include <machine/efi.h> | ||||
| #include <machine/md_var.h> | #include <machine/md_var.h> | ||||
| #include <machine/stdarg.h> | |||||
| #include <machine/vmparam.h> | #include <machine/vmparam.h> | ||||
| #include <vm/vm.h> | #include <vm/vm.h> | ||||
| #include <vm/pmap.h> | #include <vm/pmap.h> | ||||
| #include <vm/vm_extern.h> | #include <vm/vm_extern.h> | ||||
| #include <vm/vm_map.h> | #include <vm/vm_map.h> | ||||
| #include <vm/vm_object.h> | #include <vm/vm_object.h> | ||||
| #include <vm/vm_page.h> | #include <vm/vm_page.h> | ||||
| #include <vm/vm_pager.h> | #include <vm/vm_pager.h> | ||||
| ▲ Show 20 Lines • Show All 330 Lines • ▼ Show 20 Lines | if (error != 0 || req->newptr == NULL) | ||||
| return (error); | return (error); | ||||
| error = efi_get_time(&tm); | error = efi_get_time(&tm); | ||||
| if (error == 0) { | if (error == 0) { | ||||
| uprintf("EFI reports: Year %d Month %d Day %d Hour %d Min %d " | uprintf("EFI reports: Year %d Month %d Day %d Hour %d Min %d " | ||||
| "Sec %d\n", tm.tm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour, | "Sec %d\n", tm.tm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour, | ||||
| tm.tm_min, tm.tm_sec); | tm.tm_min, tm.tm_sec); | ||||
| } | } | ||||
| return (error); | return (error); | ||||
| } | |||||
| void | |||||
| efi_panic(const char *fmt, ...) | |||||
| { | |||||
| va_list ap; | |||||
| va_start(ap, fmt); | |||||
| panic(fmt, ap); | |||||
| } | } | ||||
| SYSCTL_PROC(_debug, OID_AUTO, efi_time, | SYSCTL_PROC(_debug, OID_AUTO, efi_time, | ||||
| CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, | ||||
| efi_time_sysctl_handler, "I", | efi_time_sysctl_handler, "I", | ||||
| ""); | ""); | ||||