mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-18 19:57:31 +00:00
HV: remove 'vuart' from debug command list
Remove debug command 'vuart' which is used to change VM's console's base and irq before bringing up with uefi. But after vuart's resuffle, the gloable variables vuart_com_irq and vuart_com_base is not used anymore, vuart gets the base and irq from its configuration. So the command can not work. Tracked-On: #2987 Signed-off-by: Conghui Chen <conghui.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
a4b5e39fab
commit
4efc9e3ef9
@ -8,7 +8,6 @@
|
||||
#include <rtl.h>
|
||||
#include <pci.h>
|
||||
#include <uart16550.h>
|
||||
#include <vuart.h>
|
||||
|
||||
#define MAX_PORT 0x10000 /* port 0 - 64K */
|
||||
#define DEFAULT_UART_PORT 0x3F8
|
||||
@ -19,19 +18,12 @@ static const char * const cmd_list[] = {
|
||||
"uart=disabled", /* to disable uart */
|
||||
"uart=port@", /* like uart=port@0x3F8 */
|
||||
"uart=bdf@", /*like: uart=bdf@0:18.2, it is for ttyS2 */
|
||||
|
||||
/* format: vuart=ttySx@irqN, like vuart=ttyS1@irq6; better to unify
|
||||
* uart & vuart & SOS console the same one, and irq same with the native.
|
||||
* ttySx range (0-3), irqN (0-255)
|
||||
*/
|
||||
"vuart=ttyS",
|
||||
};
|
||||
|
||||
enum IDX_CMD_DBG {
|
||||
IDX_DISABLE_UART,
|
||||
IDX_PORT_UART,
|
||||
IDX_PCI_UART,
|
||||
IDX_SET_VUART,
|
||||
|
||||
IDX_MAX_CMD,
|
||||
};
|
||||
@ -65,8 +57,6 @@ bool handle_dbg_cmd(const char *cmd, int32_t len)
|
||||
|
||||
} else if (i == IDX_PCI_UART) {
|
||||
uart16550_set_property(true, false, (uint64_t)(cmd+tmp));
|
||||
} else if (i == IDX_SET_VUART) {
|
||||
vuart_set_property(cmd+tmp);
|
||||
} else {
|
||||
/* No other state currently, do nothing */
|
||||
}
|
||||
|
@ -36,9 +36,6 @@
|
||||
#include <vm.h>
|
||||
#include <logmsg.h>
|
||||
|
||||
static uint32_t vuart_com_irq = CONFIG_COM_IRQ;
|
||||
static uint16_t vuart_com_base = CONFIG_COM_BASE;
|
||||
|
||||
#define vuart_lock_init(vu) spinlock_init(&((vu)->lock))
|
||||
#define vuart_lock(vu) spinlock_obtain(&((vu)->lock))
|
||||
#define vuart_unlock(vu) spinlock_release(&((vu)->lock))
|
||||
@ -494,19 +491,3 @@ void vuart_deinit(struct acrn_vm *vm)
|
||||
vuart_deinit_connect(&vm->vuart[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/* vuart=ttySx@irqN, like vuart=ttyS1@irq6 head "vuart=ttyS" is parsed */
|
||||
void vuart_set_property(const char *vuart_info)
|
||||
{
|
||||
const uint16_t com_map[4] = {0x3f8, 0x2F8, 0x3E8, 0x2E8}; /* map to ttyS0-ttyS3 */
|
||||
uint8_t com_idx;
|
||||
|
||||
com_idx = (uint8_t)(vuart_info[0] - '0');
|
||||
if (com_idx < 4) {
|
||||
vuart_com_base = com_map[com_idx];
|
||||
}
|
||||
|
||||
if (strncmp(vuart_info + 1, "@irq", 4) == 0) {
|
||||
vuart_com_irq = (uint8_t)strtol_deci(vuart_info + 5);
|
||||
}
|
||||
}
|
||||
|
@ -68,8 +68,8 @@ struct acrn_vuart {
|
||||
uint8_t dll; /* Baudrate divisor latch LSB */
|
||||
uint8_t dlh; /* Baudrate divisor latch MSB */
|
||||
|
||||
struct fifo rxfifo;
|
||||
struct fifo txfifo;
|
||||
struct vuart_fifo rxfifo;
|
||||
struct vuart_fifo txfifo;
|
||||
uint16_t port_base;
|
||||
uint32_t irq;
|
||||
char vuart_rx_buf[RX_BUF_SIZE];
|
||||
@ -89,5 +89,4 @@ char vuart_getchar(struct acrn_vuart *vu);
|
||||
void vuart_toggle_intr(const struct acrn_vuart *vu);
|
||||
|
||||
bool is_vuart_intx(struct acrn_vm *vm, uint32_t intx_pin);
|
||||
void vuart_set_property(const char *vuart_info);
|
||||
#endif /* VUART_H */
|
||||
|
Loading…
Reference in New Issue
Block a user