Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 May 2011 15:07:36 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r222059 - projects/pseries/powerpc/ofw
Message-ID:  <201105181507.p4IF7ahr096774@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105181507.p4IF7ahr096774>