Skip to content

Commit 44b63c0

Browse files
committed
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 8b33298 commit 44b63c0

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
@@ -942,6 +942,10 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
942942
char *command_line;
943943
char *after_dashes;
944944

945+
#ifdef CONFIG_X86
946+
outb(0x40, 0x80);
947+
#endif
948+
945949
set_task_stack_end_magic(&init_task);
946950
smp_setup_processor_id();
947951
debug_objects_early_init();
@@ -1544,6 +1548,10 @@ static int __ref kernel_init(void *unused)
15441548

15451549
do_sysctl_args();
15461550

1551+
#ifdef CONFIG_X86
1552+
outb(0x41, 0x80);
1553+
#endif
1554+
15471555
if (ramdisk_execute_command) {
15481556
ret = run_init_process(ramdisk_execute_command);
15491557
if (!ret)

0 commit comments

Comments
 (0)