serial: serial_xen: Add Xen PV serial driver

Add support for Xen para-virtualized serial driver. This
driver fully supports serial console for the virtual machine.

Please note that as the driver is initialized late, so no banner
nor memory size is visible.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Peng Fan
2020-08-06 12:42:50 +03:00
committed by Tom Rini
parent 673fd82c50
commit 384d5cfe5d
7 changed files with 220 additions and 8 deletions

View File

@@ -23,6 +23,8 @@
#include <xen/events.h>
#include <xen/hvm.h>
extern u32 console_evtchn;
#define NR_EVS 1024
/**
@@ -49,6 +51,8 @@ void unbind_all_ports(void)
struct vcpu_info *vcpu_info = &s->vcpu_info[cpu];
for (i = 0; i < NR_EVS; i++) {
if (i == console_evtchn)
continue;
if (test_and_clear_bit(i, bound_ports)) {
printf("port %d still bound!\n", i);
unbind_evtchn(i);