ia64/xen-unstable

view xen/arch/powerpc/platform.c @ 14237:eceb9ccd84a8

[POWERPC][XEN] Introduce "platform" abstraction to describe the IO hole.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Hollis Blanchard <hollisb@us.ibm.com>
date Fri Mar 02 17:06:50 2007 -0600 (2007-03-02)
parents
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 IBM Corp. 2007
17 *
18 * Authors: Ryan Harper <ryanh@us.ibm.com>
19 * Hollis Blanchard <hollisb@us.ibm.com>
20 */
22 #include <asm/page.h>
23 #include <asm/platform.h>
25 #define IO_RANGE_START (2UL << 30)
26 #define IO_RANGE_END (4UL << 30)
27 #define IO_SIZE (IO_RANGE_END - IO_RANGE_START)
29 unsigned long platform_iohole_base(void)
30 {
31 return IO_RANGE_START;
32 }
34 unsigned long platform_iohole_size(void)
35 {
36 return IO_SIZE;
37 }
39 int platform_io_mfn(unsigned long mfn)
40 {
41 unsigned long maddr = mfn << PAGE_SHIFT;
42 return maddr > IO_RANGE_START && maddr < IO_RANGE_END;
43 }