Skip to content

Commit 35f589d

Browse files
likebreathrbradford
authored andcommitted
init/main: Add trace points for logging boot time on x86
Use debug I/O port `0x80` to log boot time for Cloud Hypervisor. Details: https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/docs/debug-port.md Signed-off-by: Bo Chen <chen.bo@intel.com>
1 parent e2c3b96 commit 35f589d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

init/main.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,10 @@ void start_kernel(void)
905905
char *command_line;
906906
char *after_dashes;
907907

908+
#ifdef CONFIG_X86
909+
outb(0x40, 0x80);
910+
#endif
911+
908912
set_task_stack_end_magic(&init_task);
909913
smp_setup_processor_id();
910914
debug_objects_early_init();
@@ -1491,6 +1495,10 @@ static int __ref kernel_init(void *unused)
14911495

14921496
do_sysctl_args();
14931497

1498+
#ifdef CONFIG_X86
1499+
outb(0x41, 0x80);
1500+
#endif
1501+
14941502
if (ramdisk_execute_command) {
14951503
ret = run_init_process(ramdisk_execute_command);
14961504
if (!ret)

0 commit comments

Comments
 (0)