1# Xen hypervisor console via UART setup
2#
3# Copyright (c) 2021-2023 EPAM Systems
4# SPDX-License-Identifier: Apache-2.0
5#
6
7config UART_XEN_HVC
8	bool "Xen hypervisor DomU console UART driver"
9	default y
10	depends on DT_HAS_XEN_HVC_UART_ENABLED
11	select SERIAL_HAS_DRIVER
12	select SERIAL_SUPPORT_INTERRUPT
13	depends on XEN && !XEN_DOM0 && !XEN_DOM0LESS
14	help
15	  Enable Xen ring buffer based hypervisor console driver. Used
16	  for Zephyr as unprivileged domain.
17
18config UART_XEN_HVC_CONSOLEIO
19	bool "Xen hypervisor consoleio UART driver"
20	select SERIAL_HAS_DRIVER
21	depends on DT_HAS_XEN_HVC_CONSOLEIO_ENABLED && (XEN_DOM0 || XEN_DOM0LESS)
22	default y
23	help
24	  Enable Xen hypervisor console driver. Used for Zephyr as
25	  privileged domain (Dom0) or for Zephyr DomU in Dom0less
26	  configuration. Dom0less configuration does not have
27	  privileged domain. Thus, there is no console daemon and Xen
28	  manages all domain outputs through the consoleio interface.
29
30config XEN_HVC_INIT_PRIORITY
31	int "Xen hypervisor console init priority"
32	depends on UART_XEN_HVC || UART_XEN_HVC_CONSOLEIO
33	default 55
34	help
35	  Set init priority for Xen HVC, should be inited before UART
36	  console driver (HVC gets inited on PRE_KERNEL_1 stage).
37
38config XEN_EARLY_CONSOLEIO
39	bool "Early printk/stdout through console_io Xen interface"
40	depends on UART_XEN_HVC
41	help
42	  Enable setting of console_io symbol hook for stdout and printk.
43	  Log output will become available on PRE_KERNEL_1 stage. Requires
44	  Xen, compiled with CONFIG_DEBUG flag.
45