Add one file cpu_ppc_data.h to define CPU data for PPC

CPU version can be got by PVR on PowerPC. So this PVR is defined in
the CPU data in cpuData structure.

Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com>
Acked-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Li Zhang 2012-10-15 17:07:49 +08:00 committed by Michal Privoznik
parent d37a3a1d6c
commit 309f03db40
4 changed files with 38 additions and 0 deletions

View File

@ -34,6 +34,7 @@
<gerd@egidy.de> <lists@egidy.de>
<gerd@egidy.de> <gerd.von.egidy@intra2net.com>
<benoar@dolka.fr> <benjamin.cama@telecom-bretagne.eu>
<zhlcindy@linux.vnet.ibm.com> <zhlcindy@gmail.com>
# Name consolidation:
# Preferred author spelling <preferred email>

View File

@ -268,6 +268,7 @@ Patches have also been contributed by:
liguang <lig.fnst@cn.fujitsu.com>
Chuck Short <zulcss@gmail.com>
Alexander Larsson <alexl@redhat.com>
Li Zhang <zhlcindy@linux.vnet.ibm.com>
[....send patches to get your name here....]

View File

@ -28,11 +28,14 @@
# include "datatypes.h"
# include "conf/cpu_conf.h"
# include "cpu_x86_data.h"
# include "cpu_ppc_data.h"
union cpuData {
struct cpuX86Data x86;
/* generic driver needs no data */
/* PowerPC driver need data*/
struct cpuPPCData ppc;
};

33
src/cpu/cpu_ppc_data.h Normal file
View File

@ -0,0 +1,33 @@
/*
* cpu_ppc_data.h: PowerPC specific CPU data
*
* Copyright (C) 2012 IBM Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; If not, see
* <http://www.gnu.org/licenses/>.
*
* Authors:
* Li Zhang <zhlcindy@linux.vnet.ibm.com>
*/
#ifndef __VIR_CPU_PPC_DATA_H__
# define __VIR_CPU_PPC_DATA_H__
# include <stdint.h>
struct cpuPPCData {
uint32_t pvr;
};
#endif /* __VIR_CPU_PPC_DATA_H__ */