mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-15 20:47:42 +00:00
Not add mmio vuart support now. Tracked-On: #8805 Signed-off-by: Fei Li <fei1.li@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
39 lines
871 B
C
39 lines
871 B
C
/*
|
|
* Copyright (C) 2025-2025 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef VUART_CONFIG_H_
|
|
#define VUART_CONFIG_H_
|
|
|
|
#include <types.h>
|
|
|
|
struct target_vuart {
|
|
uint8_t vm_id; /* target VM id */
|
|
uint8_t vuart_id; /* target vuart index in a VM */
|
|
};
|
|
|
|
enum vuart_type {
|
|
VUART_LEGACY_PIO = 0, /* legacy PIO vuart */
|
|
VUART_PCI, /* PCI vuart, may removed */
|
|
};
|
|
|
|
union vuart_addr {
|
|
uint16_t port_base; /* addr for legacy type */
|
|
struct { /* addr for pci type */
|
|
uint8_t f : 3; /* BITs 0-2 */
|
|
uint8_t d : 5; /* BITs 3-7 */
|
|
uint8_t b; /* BITs 8-15 */
|
|
} bdf;
|
|
};
|
|
|
|
struct vuart_config {
|
|
enum vuart_type type; /* legacy PIO or PCI */
|
|
union vuart_addr addr; /* port addr if in legacy type, or bdf addr if in pci type */
|
|
uint16_t irq;
|
|
struct target_vuart t_vuart; /* target vuart */
|
|
} __aligned(8);
|
|
|
|
#endif /* VUART_CONFIG_H_ */
|