Skip to content

Commit 1802b70

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 109e2b9 commit 1802b70

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
@@ -900,6 +900,10 @@ void start_kernel(void)
900900
char *command_line;
901901
char *after_dashes;
902902

903+
#ifdef CONFIG_X86
904+
outb(0x40, 0x80);
905+
#endif
906+
903907
set_task_stack_end_magic(&init_task);
904908
smp_setup_processor_id();
905909
debug_objects_early_init();
@@ -1496,6 +1500,10 @@ static int __ref kernel_init(void *unused)
14961500

14971501
do_sysctl_args();
14981502

1503+
#ifdef CONFIG_X86
1504+
outb(0x41, 0x80);
1505+
#endif
1506+
14991507
if (ramdisk_execute_command) {
15001508
ret = run_init_process(ramdisk_execute_command);
15011509
if (!ret)

0 commit comments

Comments
 (0)