hv:cleanup console.h

--move several uart API declarations from console.h to uart16550.h
 --move several shell API declarations from console.h to shell.h
 --add dbg_cmd.h, move 'handle_dbg_cmd' declaration from console.h
   to dbg_cmd.h
 --move debug/uart16550.h to include/debug/uart16550.h since some
   uart APIs will be called by external files

Tracked-On: #1842
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>

	modified:   arch/x86/guest/vm.c
	modified:   arch/x86/init.c
	modified:   bsp/uefi/cmdline.c
	modified:   debug/console.c
	modified:   debug/dbg_cmd.c
	modified:   debug/uart16550.c
	modified:   debug/vuart.c
	modified:   hw/pci.c
	modified:   include/arch/x86/multiboot.h
	modified:   include/debug/console.h
	new file:   include/debug/dbg_cmd.h
	new file:   include/debug/shell.h
	renamed:    debug/uart16550.h -> include/debug/uart16550.h
This commit is contained in:
Mingqiang Chi 2019-02-19 15:22:39 +08:00 committed by wenlingz
parent cca87579f9
commit 511d4c158b
13 changed files with 42 additions and 11 deletions

View File

@ -9,6 +9,7 @@
#include <sprintf.h>
#include <vm.h>
#include <bits.h>
#include <uart16550.h>
#include <e820.h>
#include <multiboot.h>
#include <vtd.h>

View File

@ -10,6 +10,7 @@
#include <per_cpu.h>
#include <profiling.h>
#include <vtd.h>
#include <shell.h>
#include <vmx.h>
#include <vm.h>
#include <logmsg.h>

View File

@ -4,8 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <hypervisor.h>
#include <types.h>
#include <errno.h>
#include <multiboot.h>
#include <pgtable.h>
#include <dbg_cmd.h>
#include <logmsg.h>
#define ACRN_DBG_PARSE 6

View File

@ -5,7 +5,8 @@
*/
#include <hypervisor.h>
#include "uart16550.h"
#include <shell.h>
#include <uart16550.h>
struct hv_timer console_timer;

View File

@ -5,6 +5,7 @@
*/
#include <hypervisor.h>
#include <uart16550.h>
#define MAX_PORT 0x10000 /* port 0 - 64K */
#define DEFAULT_UART_PORT 0x3F8

View File

@ -5,7 +5,7 @@
*/
#include <hypervisor.h>
#include "uart16550.h"
#include <uart16550.h>
#define MAX_BDF_LEN 8

View File

@ -31,7 +31,7 @@
#include <hypervisor.h>
#include <ioapic.h>
#include "uart16550.h"
#include <uart16550.h>
static uint32_t vuart_com_irq = CONFIG_COM_IRQ;
static uint16_t vuart_com_base = CONFIG_COM_BASE;

View File

@ -30,6 +30,7 @@
*/
#include <hypervisor.h>
#include <uart16550.h>
#include <pci.h>
static spinlock_t pci_device_lock;

View File

@ -13,6 +13,7 @@
#define MULTIBOOT_INFO_HAS_MMAP 0x00000040U
#define MULTIBOOT_INFO_HAS_DRIVES 0x00000080U
struct acrn_vm;
struct multiboot_info {
uint32_t mi_flags;

View File

@ -38,15 +38,8 @@ void console_putc(const char *ch);
char console_getc(void);
void console_setup_timer(void);
void uart16550_set_property(bool enabled, bool port_mapped, uint64_t base_addr);
bool is_pci_dbg_uart(union pci_bdf bdf_value);
bool is_dbg_uart_enabled(void);
void shell_init(void);
void shell_kick(void);
void suspend_console(void);
void resume_console(void);
bool handle_dbg_cmd(const char *cmd, int32_t len);
#endif /* CONSOLE_H */

View File

@ -0,0 +1,12 @@
/*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef DBG_CMD_H
#define DBG_CMD_H
bool handle_dbg_cmd(const char *cmd, int32_t len);
#endif /* DBG_CMD_H */

View File

@ -0,0 +1,13 @@
/*
* Copyright (C) 2018 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef SHELL_H
#define SHELL_H
void shell_init(void);
void shell_kick(void);
#endif /* SHELL_H */

View File

@ -109,5 +109,8 @@
void uart16550_init(void);
char uart16550_getc(void);
size_t uart16550_puts(const char *buf, uint32_t len);
void uart16550_set_property(bool enabled, bool port_mapped, uint64_t base_addr);
bool is_pci_dbg_uart(union pci_bdf bdf_value);
bool is_dbg_uart_enabled(void);
#endif /* !UART16550_H */