From owner-freebsd-questions@FreeBSD.ORG Thu Feb 3 11:15:44 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D85A816A4CE for ; Thu, 3 Feb 2005 11:15:44 +0000 (GMT) Received: from smtp.pspl.co.in (smtp.persistent.co.in [202.54.11.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6936743D31 for ; Thu, 3 Feb 2005 11:15:42 +0000 (GMT) (envelope-from romil_shah@persistent.co.in) Received: from ps2204 ([10.33.50.29]) (authenticated bits=0) by smtp.pspl.co.in (8.12.9/8.12.9) with ESMTP id j13BOJBc013562 for ; Thu, 3 Feb 2005 16:54:20 +0530 From: "Romil Shah" To: "Freebsd" Date: Thu, 3 Feb 2005 16:47:40 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAQ= X-White-List-Member: TRUE Subject: Whats is the majopr difference between pmap_enter and pmap_kenter_temporary? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Feb 2005 11:15:45 -0000 Hi, Can any give me the detail role played by pmap_enter and pmap_kenter_temporary? Many of the latest device driver uses pmap_kenter_temporary for dumping the kernel core on kernel panic. Few older api uses pamp_enter in the kernel core dump procedure. I am using an older version of FreeBSD kernel and cannnot upgrade it to latest freebsd due to client requirement, so i have backported the Adaptec aac driver from FreeBSD 4.10 to 4.1 where the major change is in the aac/aac_disk.c where in the ac_disk_dump() i am using pmap_enter instead of pmap_kenter_temporary. I cannot take the kernel core dump on kernel getting panic :(. if (is_physical_memory(addr)) pmap_enter(kernel_pmap, (vm_offset_t)CADDR1, trunc_page(addr), VM_PROT_READ, TRUE); else pmap_enter(kernel_pmap, (vm_offset_t)CADDR1, trunc_page(0), VM_PROT_READ, TRUE); /* * Queue a page full of blocks to the controller. * If the queue is full, EBUSY will be returned. */ retry: error = aac_dump_enqueue(ad, blkno,CADDR1,1); ----> The above logic is used by many old driver so i followed in this too. Where as FreeBSD 4.10 driver uses for (i = 0; i < dumppages; ++i) { vm_offset_t a = addr + (i * PAGE_SIZE); if (is_physical_memory(a)) { va = pmap_kenter_temporary(trunc_page(a), i); } else { va = pmap_kenter_temporary(trunc_page(0), i); } } retry: /* * Queue the block to the controller. If the queue is full, * EBUSY will be returned. */ error = aac_dump_enqueue(ad, blkno, va, dumppages); Can any one guide me as to is this the problem of pmap_enter vs pmap_kenter_temporary or any thing else. Any suggestion will be of great help to me.... Thanks, Romil Shah