ia64/xen-unstable

changeset 14505:58e796d053ca

[POWERPC][XEN] Fix "xc_core" build break. Untested but might work.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Hollis Blanchard <hollisb@us.ibm.com>
date Wed Mar 21 17:02:59 2007 -0500 (2007-03-21)
parents 09a3bd14a4fa
children 2734b64255b3
files tools/libxc/Makefile tools/libxc/xc_core.h tools/libxc/xc_core_powerpc.c tools/libxc/xc_core_powerpc.h
line diff
     1.1 --- a/tools/libxc/Makefile	Wed Mar 21 17:02:59 2007 -0500
     1.2 +++ b/tools/libxc/Makefile	Wed Mar 21 17:02:59 2007 -0500
     1.3 @@ -8,6 +8,7 @@ CTRL_SRCS-y       :=
     1.4  CTRL_SRCS-y       += xc_core.c
     1.5  CTRL_SRCS-$(CONFIG_X86) += xc_core_x86.c
     1.6  CTRL_SRCS-$(CONFIG_IA64) += xc_core_ia64.c
     1.7 +CTRL_SRCS-$(CONFIG_POWERPC) += xc_core_powerpc.c
     1.8  CTRL_SRCS-y       += xc_domain.c
     1.9  CTRL_SRCS-y       += xc_evtchn.c
    1.10  CTRL_SRCS-y       += xc_misc.c
     2.1 --- a/tools/libxc/xc_core.h	Wed Mar 21 17:02:59 2007 -0500
     2.2 +++ b/tools/libxc/xc_core.h	Wed Mar 21 17:02:59 2007 -0500
     2.3 @@ -144,6 +144,8 @@ int xc_core_arch_map_p2m(int xc_handle, 
     2.4  # include "xc_core_x86.h"
     2.5  #elif defined (__ia64__)
     2.6  # include "xc_core_ia64.h"
     2.7 +#elif defined (__powerpc__)
     2.8 +# include "xc_core_powerpc.h"
     2.9  #else
    2.10  # error "unsupported architecture"
    2.11  #endif
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/tools/libxc/xc_core_powerpc.c	Wed Mar 21 17:02:59 2007 -0500
     3.3 @@ -0,0 +1,79 @@
     3.4 +/*
     3.5 + * This program is free software; you can redistribute it and/or modify
     3.6 + * it under the terms of the GNU General Public License as published by
     3.7 + * the Free Software Foundation; either version 2 of the License, or
     3.8 + * (at your option) any later version.
     3.9 + *
    3.10 + * This program is distributed in the hope that it will be useful,
    3.11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    3.13 + * GNU General Public License for more details.
    3.14 + *
    3.15 + * You should have received a copy of the GNU General Public License
    3.16 + * along with this program; if not, write to the Free Software
    3.17 + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    3.18 + *
    3.19 + * Copyright (c) 2007 Isaku Yamahata <yamahata at valinux co jp>
    3.20 + *                    VA Linux Systems Japan K.K.
    3.21 + * Copyright IBM Corp. 2007
    3.22 + *
    3.23 + * Authors: Isaku Yamahata <yamahata at valinux co jp>
    3.24 + *          Hollis Blanchard <hollisb@us.ibm.com>
    3.25 + *
    3.26 + */
    3.27 +
    3.28 +#include "xg_private.h"
    3.29 +#include "xc_core.h"
    3.30 +
    3.31 +int
    3.32 +xc_core_arch_auto_translated_physmap(const xc_dominfo_t *info)
    3.33 +{
    3.34 +	/* All PowerPC domU are autotranslated. */
    3.35 +	return 1;
    3.36 +}
    3.37 +
    3.38 +int
    3.39 +xc_core_arch_map_p2m(int xc_handle, xc_dominfo_t *info,
    3.40 +                     shared_info_t *live_shinfo, xen_pfn_t **live_p2m,
    3.41 +                     unsigned long *pfnp)
    3.42 +{
    3.43 +	/* All PowerPC domU are autotranslated. */
    3.44 +    errno = ENOSYS;
    3.45 +    return -1;
    3.46 +}
    3.47 +
    3.48 +int
    3.49 +xc_core_arch_memory_map_get(int xc_handle, xc_dominfo_t *info,
    3.50 +                            shared_info_t *live_shinfo,
    3.51 +                            xc_core_memory_map_t **mapp,
    3.52 +                            unsigned int *nr_entries)
    3.53 +{
    3.54 +    xc_core_memory_map_t *map = NULL;
    3.55 +
    3.56 +    map = malloc(sizeof(*map));
    3.57 +    if (!map) {
    3.58 +        PERROR("Could not allocate memory");
    3.59 +        goto out;
    3.60 +    }
    3.61 +
    3.62 +    map->addr = 0;
    3.63 +    map->size = info->max_memkb * 1024;
    3.64 +
    3.65 +    *mapp = map;
    3.66 +    *nr_entries = 1;
    3.67 +    return 0;
    3.68 +
    3.69 +out:
    3.70 +    free(map);
    3.71 +    return -1;
    3.72 +}
    3.73 +
    3.74 +/*
    3.75 + * Local variables:
    3.76 + * mode: C
    3.77 + * c-set-style: "BSD"
    3.78 + * c-basic-offset: 4
    3.79 + * tab-width: 4
    3.80 + * indent-tabs-mode: nil
    3.81 + * End:
    3.82 + */
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/tools/libxc/xc_core_powerpc.h	Wed Mar 21 17:02:59 2007 -0500
     4.3 @@ -0,0 +1,57 @@
     4.4 +/*
     4.5 + * This program is free software; you can redistribute it and/or modify
     4.6 + * it under the terms of the GNU General Public License as published by
     4.7 + * the Free Software Foundation; either version 2 of the License, or
     4.8 + * (at your option) any later version.
     4.9 + *
    4.10 + * This program is distributed in the hope that it will be useful,
    4.11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    4.13 + * GNU General Public License for more details.
    4.14 + *
    4.15 + * You should have received a copy of the GNU General Public License
    4.16 + * along with this program; if not, write to the Free Software
    4.17 + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    4.18 + *
    4.19 + * Copyright (c) 2007 Isaku Yamahata <yamahata at valinux co jp>
    4.20 + *                    VA Linux Systems Japan K.K.
    4.21 + *
    4.22 + */
    4.23 +
    4.24 +#ifndef XC_CORE_POWERPC_H
    4.25 +#define XC_CORE_POWERPC_H
    4.26 +
    4.27 +#define ELF_ARCH_DATA           ELFDATA2MSB
    4.28 +#define ELF_ARCH_MACHINE        EM_PPC64
    4.29 +
    4.30 +struct xc_core_arch_context {
    4.31 +    /* nothing */
    4.32 +};
    4.33 +
    4.34 +#define xc_core_arch_context_init(arch_ctxt)            do {} while (0)
    4.35 +#define xc_core_arch_context_free(arch_ctxt)            do {} while (0)
    4.36 +#define xc_core_arch_context_get(arch_ctxt, ctxt, xc_handle, domid) \
    4.37 +                                                                (0)
    4.38 +#define xc_core_arch_context_dump(arch_ctxt, args, dump_rtn)    (0)
    4.39 +
    4.40 +static inline int
    4.41 +xc_core_arch_context_get_shdr(struct xc_core_arch_context *arch_ctxt, 
    4.42 +                              struct xc_core_section_headers *sheaders,
    4.43 +                              struct xc_core_strtab *strtab,
    4.44 +                              uint64_t *filesz, uint64_t offset)
    4.45 +{
    4.46 +    *filesz = 0;
    4.47 +    return 0;
    4.48 +}
    4.49 +
    4.50 +#endif /* XC_CORE_POWERPC_H */
    4.51 +
    4.52 +/*
    4.53 + * Local variables:
    4.54 + * mode: C
    4.55 + * c-set-style: "BSD"
    4.56 + * c-basic-offset: 4
    4.57 + * tab-width: 4
    4.58 + * indent-tabs-mode: nil
    4.59 + * End:
    4.60 + */