diff options
author | Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> | 2020-08-06 12:42:54 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-14 22:18:30 +0300 |
commit | c850674ff74b1625c17a77a454acec0e9cc6ec36 (patch) | |
tree | 20c947ce82954b9d7f1e619e21e193c6e19a9ff1 /include | |
parent | 60e49ff1f8a0b8d48b0d12bad94d0dfb8fdbeec8 (diff) | |
download | u-boot-c850674ff74b1625c17a77a454acec0e9cc6ec36.tar.xz |
xen: Port Xen grant table driver from mini-os
Make required updates to run on u-boot.
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/xen.h | 3 | ||||
-rw-r--r-- | include/xen/gnttab.h | 24 |
2 files changed, 26 insertions, 1 deletions
diff --git a/include/xen.h b/include/xen.h index 6fe30b83a2..686b7148b5 100644 --- a/include/xen.h +++ b/include/xen.h @@ -8,7 +8,8 @@ /** * xen_init() - Xen initialization * - * Map Xen memory pages, initialize event handler and xenbus. + * Map Xen memory pages, initialize event handler and xenbus, + * setup the grant table. */ void xen_init(void); diff --git a/include/xen/gnttab.h b/include/xen/gnttab.h new file mode 100644 index 0000000000..db1d5361fe --- /dev/null +++ b/include/xen/gnttab.h @@ -0,0 +1,24 @@ +/* + * SPDX-License-Identifier: GPL-2.0 + * + * (C) 2006, Steven Smith <sos22@cam.ac.uk> + * (C) 2006, Grzegorz Milos <gm281@cam.ac.uk> + * (C) 2020, EPAM Systems Inc. + */ +#ifndef __GNTTAB_H__ +#define __GNTTAB_H__ + +#include <xen/interface/grant_table.h> + +void init_gnttab(void); +void fini_gnttab(void); + +grant_ref_t gnttab_alloc_and_grant(void **map); +grant_ref_t gnttab_grant_access(domid_t domid, unsigned long frame, + int readonly); +int gnttab_end_access(grant_ref_t ref); +const char *gnttabop_error(int16_t status); + +void get_gnttab_base(phys_addr_t *gnttab_base, phys_size_t *gnttab_sz); + +#endif /* !__GNTTAB_H__ */ |