Skip to content

Commit 3bd447e

Browse files
likebreathrbradford
authored andcommitted
init/main: Add trace points for logging boot time
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 ba77d94 commit 3bd447e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Contains patches for:
55
* virtio-iommu from https://jpbrucker.net/git/linux/log/?h=virtio-iommu/acpi (7616abe11cd1e0224bbd150626564db70bb07c31)
66
* Support for virtio-watchdog
77
* Bug fix: to support using ACPI reboot rather than EFI reboot
8-
8+
* Log boot time via debug port `0x80` (details: https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/docs/debug-port.md)

init/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,8 @@ asmlinkage __visible void __init __no_sanitize_address start_kernel(void)
935935
char *command_line;
936936
char *after_dashes;
937937

938+
outb(0x40, 0x80);
939+
938940
set_task_stack_end_magic(&init_task);
939941
smp_setup_processor_id();
940942
debug_objects_early_init();
@@ -1528,6 +1530,8 @@ static int __ref kernel_init(void *unused)
15281530

15291531
do_sysctl_args();
15301532

1533+
outb(0x41, 0x80);
1534+
15311535
if (ramdisk_execute_command) {
15321536
ret = run_init_process(ramdisk_execute_command);
15331537
if (!ret)

0 commit comments

Comments
 (0)