From owner-freebsd-current@FreeBSD.ORG Tue Sep 21 19:05:26 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C742616A4CE for ; Tue, 21 Sep 2004 19:05:26 +0000 (GMT) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F37C43D5D for ; Tue, 21 Sep 2004 19:05:26 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 3782 invoked from network); 21 Sep 2004 19:05:25 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 21 Sep 2004 19:05:25 -0000 Received: from [10.50.40.210] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i8LJ5L4C033500; Tue, 21 Sep 2004 15:05:22 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Roman Kurakin Date: Tue, 21 Sep 2004 15:05:59 -0400 User-Agent: KMail/1.6.2 References: <41421D6A.8070805@cronyx.ru> <200409201652.24457.jhb@FreeBSD.org> <41505663.40407@cronyx.ru> In-Reply-To: <41505663.40407@cronyx.ru> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200409211505.59361.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Roman Kurakin cc: FreeBSD Current cc: Ian Freislich cc: Nate Lawson Subject: Re: mp_machdep.c (was Re: [Fwd: Re: Bug reports requested - acpi]) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Sep 2004 19:05:26 -0000 On Tuesday 21 September 2004 12:27 pm, Roman Kurakin wrote: > My solution works for current so I am going to commit it and MFC after > a while. To be sure that I am not on the wrong way I need some > reviewed/approved signs ;-) I also hope to get one (or more) tested signs. > > Patch I plan to commit following patch: > > Index: mp_machdep.c > =================================================================== > RCS file: /home/ncvs/src/sys/i386/i386/mp_machdep.c,v > retrieving revision 1.238 > diff -u -r1.238 mp_machdep.c > --- mp_machdep.c 1 Sep 2004 06:42:01 -0000 1.238 > +++ mp_machdep.c 21 Sep 2004 15:54:41 -0000 > @@ -743,10 +743,11 @@ > u_int8_t *dst8; > u_int16_t *dst16; > u_int32_t *dst32; > + vm_offset_t va = (vm_offset_t) dst; > > POSTCODE(INSTALL_AP_TRAMP_POST); > > - pmap_kenter(boot_address + KERNBASE, boot_address); > + pmap_map(&va, boot_address, boot_address + size, 0); > for (x = 0; x < size; ++x) > *dst++ = *src++; > > Any signs for(or against)? > > Thanks! > > PS. John: I am against of pmap_kenter/pmap_invalidate_XXX since we could > get > the same problem if we would use atomic functions instead of composite > functions, > which, I hope, will track all changes in the future. > > rik Actually, another alternative might be this: --- mp_machdep.c 1 Sep 2004 06:42:01 -0000 1.238 +++ mp_machdep.c 21 Sep 2004 19:05:12 -0000 @@ -738,7 +738,7 @@ int x; int size = *(int *) ((u_long) & bootMP_size); u_char *src = (u_char *) ((u_long) bootMP); - u_char *dst = (u_char *) boot_address + KERNBASE; + u_char *dst; u_int boot_base = (u_int) bootMP; u_int8_t *dst8; u_int16_t *dst16; @@ -746,7 +746,7 @@ POSTCODE(INSTALL_AP_TRAMP_POST); - pmap_kenter(boot_address + KERNBASE, boot_address); + dst = pmap_mapdev(boot_address, size); for (x = 0; x < size; ++x) *dst++ = *src++; Though it's not really a device. :-P -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org