提交 d17f6698 编写于 作者: O Oleksandr Andrushchenko 提交者: Tom Rini

board: xen: De-initialize before jumping to Linux

Free resources used by Xen board before jumping to Linux kernel.
Signed-off-by: NOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: NAnastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 53d725c7
......@@ -12,6 +12,7 @@
#include <dm.h>
#include <errno.h>
#include <malloc.h>
#include <xen.h>
#include <asm/io.h>
#include <asm/armv8/mmu.h>
......@@ -194,3 +195,8 @@ int print_cpuinfo(void)
return 0;
}
void board_cleanup_before_linux(void)
{
xen_fini();
}
......@@ -242,3 +242,11 @@ void xen_init(void)
init_gnttab();
}
void xen_fini(void)
{
debug("%s\n", __func__);
fini_gnttab();
fini_xenbus();
fini_events();
}
......@@ -13,4 +13,12 @@
*/
void xen_init(void);
/**
* xen_fini() - Board cleanup before Linux kernel start
*
* Unmap Xen memory pages the specified guest's pseudophysical
* address space and unbind all event channels.
*/
void xen_fini(void);
#endif /* __XEN_H__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册