ia64/xen-unstable

view tools/libxc/powerpc64/utils.h @ 12953:1a3c1168db6a

[TOOLS][POWERPC] Use a smaller page array and place common code in utils.c
Since all the bits must be loaded into the RMA there is no need to get
the entire page array, just those pages in the RMA.
We also place common functions in utils.c
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Wed Oct 18 09:01:37 2006 -0400 (2006-10-18)
parents
children 09b3fd488726
line source
1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15 *
16 * Copyright (C) IBM Corporation 2006
17 *
18 * Authors: Hollis Blanchard <hollisb@us.ibm.com>
19 * Jimi Xenidis <jimix@watson.ibm.com>
20 */
22 extern unsigned long get_rma_pages(void *devtree);
23 extern int get_rma_page_array(int xc_handle, int domid, xen_pfn_t **page_array,
24 unsigned long nr_pages);
25 extern int install_image(int xc_handle, int domid, xen_pfn_t *page_array,
26 void *image, unsigned long paddr, unsigned long size);
27 extern void *load_file(const char *path, unsigned long *filesize);
28 extern int load_elf_kernel(int xc_handle, int domid, const char *kernel_path,
29 struct domain_setup_info *dsi,
30 xen_pfn_t *page_array);
32 #define ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1)))
34 #define max(x,y) ({ \
35 const typeof(x) _x = (x); \
36 const typeof(y) _y = (y); \
37 (void) (&_x == &_y); \
38 _x > _y ? _x : _y; })