Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Feb 2005 16:47:40 +0530
From:      "Romil Shah" <romil_shah@persistent.co.in>
To:        "Freebsd" <freebsd-questions@freebsd.org>
Subject:   Whats is the majopr difference between pmap_enter and pmap_kenter_temporary?
Message-ID:  <PKEGLDHOACNEEHFFOBJKAEIJCAAA.romil_shah@persistent.co.in>

next in thread | raw e-mail | index | archive | help

  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



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