Skip to content

Commit 501b3f7

Browse files
mingqiangchiwenlingz
authored andcommitted
hv:cleanup header files for debug folder
cleanup debug folder, only include some necessary header files,doesn't include hypervisor.h Tracked-On: #1842 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com> modified: debug/console.c modified: debug/dbg_cmd.c modified: debug/dump.c modified: debug/hypercall.c modified: debug/logmsg.c modified: debug/npk_log.c modified: debug/printf.c modified: debug/profiling.c modified: debug/sbuf.c modified: debug/shell.c modified: debug/string.c modified: debug/trace.c modified: debug/uart16550.c modified: debug/vuart.c modified: include/debug/console.h modified: include/debug/vuart.h
1 parent 511d4c1 commit 501b3f7

File tree

16 files changed

+91
-24
lines changed

16 files changed

+91
-24
lines changed

hypervisor/debug/console.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
66

7-
#include <hypervisor.h>
8-
#include <shell.h>
7+
#include <types.h>
8+
#include <pci.h>
99
#include <uart16550.h>
10+
#include <shell.h>
11+
#include <timer.h>
12+
#include <vuart.h>
13+
#include <logmsg.h>
1014

1115
struct hv_timer console_timer;
1216

hypervisor/debug/dbg_cmd.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
66

7-
#include <hypervisor.h>
7+
#include <types.h>
8+
#include <rtl.h>
9+
#include <pci.h>
810
#include <uart16550.h>
11+
#include <vuart.h>
912

1013
#define MAX_PORT 0x10000 /* port 0 - 64K */
1114
#define DEFAULT_UART_PORT 0x3F8

hypervisor/debug/dump.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
66

7-
#include <hypervisor.h>
7+
#include <types.h>
8+
#include <per_cpu.h>
9+
#include <mmu.h>
10+
#include <vcpu.h>
11+
#include <vmx.h>
12+
#include <vm.h>
813
#include <init.h>
14+
#include <logmsg.h>
915

1016
#define CALL_TRACE_HIERARCHY_MAX 20U
1117
#define DUMP_STACK_SIZE 0x200U

hypervisor/debug/hypercall.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
66

7-
#include <hypervisor.h>
8-
#include <schedule.h>
9-
#include <hypercall.h>
10-
#include <version.h>
11-
#include <reloc.h>
7+
#include <types.h>
8+
#include <errno.h>
9+
#include <profiling.h>
10+
#include <sbuf.h>
11+
#include <npk_log.h>
12+
#include <vm.h>
13+
#include <logmsg.h>
1214

1315
#ifdef PROFILING_ON
1416
/**

hypervisor/debug/logmsg.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
66

7-
#include <hypervisor.h>
7+
#include <types.h>
8+
#include <atomic.h>
9+
#include <sprintf.h>
10+
#include <spinlock.h>
811
#include <per_cpu.h>
12+
#include <npk_log.h>
13+
#include <logmsg.h>
14+
915
/* buf size should be identical to the size in hvlog option, which is
1016
* transfered to SOS:
1117
* bsp/uefi/clearlinux/acrn.conf: hvlog=2M@0x1FE00000

hypervisor/debug/npk_log.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
* SPDX-License-Identifier: BSD-3-Clause
44
*/
55

6-
#include <hypervisor.h>
6+
#include <types.h>
7+
#include <atomic.h>
8+
#include <acrn_hv_defs.h>
9+
#include <io.h>
10+
#include <per_cpu.h>
11+
#include <mmu.h>
12+
#include <logmsg.h>
713

814
static int32_t npk_log_setup_ref;
915
static bool npk_log_enabled;

hypervisor/debug/printf.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
66

7-
#include <hypervisor.h>
7+
#include <types.h>
8+
#include <rtl.h>
9+
#include <util.h>
10+
#include <sprintf.h>
11+
#include <console.h>
812

913
static void
1014
charout(size_t cmd, const char *s_arg, uint32_t sz_arg, struct snprint_param *param)

hypervisor/debug/profiling.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@
55
*/
66
#ifdef PROFILING_ON
77

8-
#include <hypervisor.h>
8+
#include <types.h>
9+
#include <errno.h>
10+
#include <irq.h>
11+
#include <per_cpu.h>
12+
#include <pgtable.h>
13+
#include <vmx.h>
14+
#include <cpuid.h>
15+
#include <vm.h>
16+
#include <sprintf.h>
17+
#include <logmsg.h>
918

1019
#define ACRN_DBG_PROFILING 5U
1120
#define ACRN_ERR_PROFILING 3U

hypervisor/debug/sbuf.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
*
1010
*/
1111

12-
#include <hypervisor.h>
12+
#include <types.h>
13+
#include <rtl.h>
14+
#include <errno.h>
15+
#include <sbuf.h>
16+
#include <cpu.h>
17+
#include <per_cpu.h>
1318

1419
static inline bool sbuf_is_empty(const struct shared_buf *sbuf)
1520
{

hypervisor/debug/shell.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,21 @@
44
* SPDX-License-Identifier: BSD-3-Clause
55
*/
66

7-
#include <hypervisor.h>
8-
#include <ioapic.h>
7+
#include <types.h>
8+
#include <errno.h>
9+
#include <bits.h>
10+
#include <page.h>
911
#include "shell_priv.h"
12+
#include <irq.h>
13+
#include <console.h>
14+
#include <per_cpu.h>
15+
#include <vmx.h>
16+
#include <cpuid.h>
17+
#include <ioapic.h>
18+
#include <ptdev.h>
19+
#include <vm.h>
20+
#include <sprintf.h>
21+
#include <logmsg.h>
1022

1123
#define TEMP_STR_SIZE 60U
1224
#define MAX_STR_SIZE 256U

0 commit comments

Comments
 (0)