Skip to content

Commit cc2434f

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 <[email protected]>
1 parent a737c00 commit cc2434f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

init/main.c

+8
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,10 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
930930
char *command_line;
931931
char *after_dashes;
932932

933+
#ifdef CONFIG_X86
934+
outb(0x40, 0x80);
935+
#endif
936+
933937
set_task_stack_end_magic(&init_task);
934938
smp_setup_processor_id();
935939
debug_objects_early_init();
@@ -1521,6 +1525,10 @@ static int __ref kernel_init(void *unused)
15211525

15221526
do_sysctl_args();
15231527

1528+
#ifdef CONFIG_X86
1529+
outb(0x41, 0x80);
1530+
#endif
1531+
15241532
if (ramdisk_execute_command) {
15251533
ret = run_init_process(ramdisk_execute_command);
15261534
if (!ret)

0 commit comments

Comments
 (0)