xenvm: arm64: add Xen Enlighten and event channel support
This commit adds support of Xen Enlighten page and initial support for Xen event channels. It is needed for future Xen PV drivers implementation. Now enlighten page is mapped to the prepared memory area on PRE_KERNEL_1 stage. In case of success event channel logic gets inited and can be used ASAP after Zephyr start. Current implementation allows to use only pre-defined event channels (PV console/XenBus) and works only in single CPU mode (without VCPUOP_register_vcpu_info). Event channel allocation will be implemented in future versions. Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
This commit is contained in:
parent
43d1d15da8
commit
01a9b117fe
4 changed files with 251 additions and 5 deletions
|
@ -8,6 +8,21 @@
|
|||
|
||||
#include <xen/public/event_channel.h>
|
||||
|
||||
#include <kernel.h>
|
||||
|
||||
typedef void (*evtchn_cb_t)(void *priv);
|
||||
|
||||
struct event_channel_handle {
|
||||
evtchn_cb_t cb;
|
||||
void *priv;
|
||||
};
|
||||
|
||||
typedef struct event_channel_handle evtchn_handle_t;
|
||||
|
||||
void notify_evtchn(evtchn_port_t port);
|
||||
int bind_event_channel(evtchn_port_t port, evtchn_cb_t cb, void *data);
|
||||
int unbind_event_channel(evtchn_port_t port);
|
||||
|
||||
int xen_events_init(void);
|
||||
|
||||
#endif /* __XEN_EVENTS_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue