debuggers.hg

view tools/libxc/xc_core_powerpc.c @ 16715:c5deb251b9dc

Update version to 3.2.0-rc4
author Keir Fraser <keir.fraser@citrix.com>
date Sat Dec 29 17:57:37 2007 +0000 (2007-12-29)
parents 263fc122f62b
children
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, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 *
16 * Copyright (c) 2007 Isaku Yamahata <yamahata at valinux co jp>
17 * VA Linux Systems Japan K.K.
18 * Copyright IBM Corp. 2007
19 *
20 * Authors: Isaku Yamahata <yamahata at valinux co jp>
21 * Hollis Blanchard <hollisb@us.ibm.com>
22 *
23 */
25 #include "xg_private.h"
26 #include "xc_core.h"
28 int
29 xc_core_arch_auto_translated_physmap(const xc_dominfo_t *info)
30 {
31 /* All PowerPC domU are autotranslated. */
32 return 1;
33 }
35 int
36 xc_core_arch_map_p2m(int xc_handle, xc_dominfo_t *info,
37 shared_info_t *live_shinfo, xen_pfn_t **live_p2m,
38 unsigned long *pfnp)
39 {
40 /* All PowerPC domU are autotranslated. */
41 errno = ENOSYS;
42 return -1;
43 }
45 int
46 xc_core_arch_memory_map_get(int xc_handle, struct xc_core_arch_context *unused,
47 xc_dominfo_t *info, shared_info_t *live_shinfo,
48 xc_core_memory_map_t **mapp,
49 unsigned int *nr_entries)
50 {
51 xc_core_memory_map_t *map = NULL;
53 map = malloc(sizeof(*map));
54 if (!map) {
55 PERROR("Could not allocate memory");
56 goto out;
57 }
59 map->addr = 0;
60 map->size = info->max_memkb * 1024;
62 *mapp = map;
63 *nr_entries = 1;
64 return 0;
66 out:
67 free(map);
68 return -1;
69 }
71 /*
72 * Local variables:
73 * mode: C
74 * c-set-style: "BSD"
75 * c-basic-offset: 4
76 * tab-width: 4
77 * indent-tabs-mode: nil
78 * End:
79 */