From owner-p4-projects@FreeBSD.ORG Fri Feb 24 17:37:43 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AB35316A42C; Fri, 24 Feb 2006 17:37:42 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5808116A422 for ; Fri, 24 Feb 2006 17:37:42 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AC3843D94 for ; Fri, 24 Feb 2006 17:36:21 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k1OHaJul012130 for ; Fri, 24 Feb 2006 17:36:19 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1OHaJXo012127 for perforce@freebsd.org; Fri, 24 Feb 2006 17:36:19 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 24 Feb 2006 17:36:19 GMT Message-Id: <200602241736.k1OHaJXo012127@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 92345 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2006 17:37:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=92345 Change 92345 by kmacy@kmacy_storage:sun4v_work on 2006/02/24 17:35:56 OF_translate_virt never worked - remove it and other code in openfirm_mmu.c Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/conf/files.sun4v#6 edit .. //depot/projects/kmacy_sun4v/src/sys/dev/ofw/openfirm.c#3 edit .. //depot/projects/kmacy_sun4v/src/sys/dev/ofw/openfirm.h#3 edit .. //depot/projects/kmacy_sun4v/src/sys/dev/ofw/openfirm_mmu.c#2 delete Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/conf/files.sun4v#6 (text+ko) ==== @@ -25,7 +25,6 @@ dev/ofw/ofw_bus_subr.c standard dev/ofw/ofw_console.c optional ofw_console dev/ofw/openfirm.c standard -dev/ofw/openfirm_mmu.c standard dev/ofw/openfirmio.c standard dev/ofw/openpromio.c standard dev/uart/uart_cpu_sparc64.c optional uart ==== //depot/projects/kmacy_sun4v/src/sys/dev/ofw/openfirm.c#3 (text+ko) ==== @@ -858,8 +858,8 @@ 0, }; - args.tba_addr = (cell_t)tba_addr; - args.mmfsa_ra = (cell_t)mmfsa_ra; + args.tba_addr = p1275_ptr2cell(tba_addr); + args.mmfsa_ra = p1275_ptr2cell(mmfsa_ra); openfirmware(&args); } ==== //depot/projects/kmacy_sun4v/src/sys/dev/ofw/openfirm.h#3 (text+ko) ==== @@ -76,6 +76,29 @@ MALLOC_DECLARE(M_OFWPROP); +#define p1275_ptr2cell(p) ((cell_t)((uintptr_t)((void *)(p)))) +#define p1275_int2cell(i) ((cell_t)((int)(i))) +#define p1275_uint2cell(u) ((cell_t)((unsigned int)(u))) +#define p1275_size2cell(u) ((cell_t)((size_t)(u))) +#define p1275_phandle2cell(ph) ((cell_t)((unsigned int)((phandle_t)(ph)))) +#define p1275_dnode2cell(d) ((cell_t)((unsigned int)((pnode_t)(d)))) +#define p1275_ihandle2cell(ih) ((cell_t)((unsigned int)((ihandle_t)(ih)))) +#define p1275_ull2cell_high(ll) (0LL) +#define p1275_ull2cell_low(ll) ((cell_t)(ll)) +#define p1275_uintptr2cell(i) ((cell_t)((uintptr_t)(i))) + +#define p1275_cell2ptr(p) ((void *)((cell_t)(p))) +#define p1275_cell2int(i) ((int)((cell_t)(i))) +#define p1275_cell2uint(u) ((unsigned int)((cell_t)(u))) +#define p1275_cell2size(u) ((size_t)((cell_t)(u))) +#define p1275_cell2phandle(ph) ((phandle_t)((cell_t)(ph))) +#define p1275_cell2dnode(d) ((pnode_t)((cell_t)(d))) +#define p1275_cell2ihandle(ih) ((ihandle_t)((cell_t)(ih))) +#define p1275_cells2ull(h, l) ((unsigned long long)(cell_t)(l)) +#define p1275_cell2uintptr(i) ((uintptr_t)((cell_t)(i))) + + + /* * Stuff that is used by the Open Firmware code. */