svn commit: r222059 - projects/pseries/powerpc/ofw
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Wed May 18 15:07:36 UTC 2011
Author: nwhitehorn
Date: Wed May 18 15:07:36 2011
New Revision: 222059
URL: http://svn.freebsd.org/changeset/base/222059
Log:
Make sure the OF argument bounce page is not until below 4 GB but also
below the real-mode boundary that that real-mode firmware can see it.
Modified:
projects/pseries/powerpc/ofw/ofw_real.c
Modified: projects/pseries/powerpc/ofw/ofw_real.c
==============================================================================
--- projects/pseries/powerpc/ofw/ofw_real.c Wed May 18 14:59:53 2011 (r222058)
+++ projects/pseries/powerpc/ofw/ofw_real.c Wed May 18 15:07:36 2011 (r222059)
@@ -205,13 +205,14 @@ ofw_real_bounce_alloc(void *junk)
/*
* Allocate a page of contiguous, wired physical memory that can
- * fit into a 32-bit address space.
+ * fit into a 32-bit address space and accessed from real mode.
*/
mtx_lock(&of_bounce_mtx);
- of_bounce_virt = contigmalloc(PAGE_SIZE, M_OFWREAL, 0,
- 0, BUS_SPACE_MAXADDR_32BIT, PAGE_SIZE, PAGE_SIZE);
+ of_bounce_virt = contigmalloc(PAGE_SIZE, M_OFWREAL, 0, 0,
+ ulmin(platform_real_maxaddr(), BUS_SPACE_MAXADDR_32BIT), PAGE_SIZE,
+ PAGE_SIZE);
of_bounce_phys = vtophys(of_bounce_virt);
of_bounce_size = PAGE_SIZE;
More information about the svn-src-projects
mailing list