1/*- 2 * Copyright (C) 2007-2009 Semihalf, Rafal Jaworowski <raj@semihalf.com> 3 * Copyright (C) 2006 Semihalf, Marian Balakowicz <m8@semihalf.com> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 35 unchanged lines hidden (view full) --- 44 * 0xc100_0000 - 0xc100_3fff : reserved for page zero/copy 45 * 0xc100_4000 - 0xc200_3fff : reserved for ptbl bufs 46 * 0xc200_4000 - 0xc200_8fff : guard page + kstack0 47 * 0xc200_9000 - 0xfeef_ffff : actual free KVA space 48 * 0xfef0_0000 - 0xffff_ffff : I/O devices region 49 */ 50 51#include <sys/cdefs.h> |
52__FBSDID("$FreeBSD: head/sys/powerpc/booke/pmap.c 209908 2010-07-11 21:08:29Z raj $"); |
53 54#include <sys/types.h> 55#include <sys/param.h> 56#include <sys/malloc.h> 57#include <sys/ktr.h> 58#include <sys/proc.h> 59#include <sys/user.h> 60#include <sys/queue.h> --- 11 unchanged lines hidden (view full) --- 72#include <vm/vm_pageout.h> 73#include <vm/vm_extern.h> 74#include <vm/vm_object.h> 75#include <vm/vm_param.h> 76#include <vm/vm_map.h> 77#include <vm/vm_pager.h> 78#include <vm/uma.h> 79 |
80#include <machine/cpu.h> 81#include <machine/pcb.h> 82#include <machine/platform.h> 83 84#include <machine/tlb.h> 85#include <machine/spr.h> 86#include <machine/vmparam.h> 87#include <machine/md_var.h> --- 2413 unchanged lines hidden (view full) --- 2501 /* Minidumps are based on virtual memory addresses. */ 2502 /* Nothing to do... */ 2503} 2504 2505struct pmap_md * 2506mmu_booke_scan_md(mmu_t mmu, struct pmap_md *prev) 2507{ 2508 static struct pmap_md md; |
2509 pte_t *pte; 2510 vm_offset_t va; 2511 2512 if (dumpsys_minidump) { 2513 md.md_paddr = ~0UL; /* Minidumps use virtual addresses. */ 2514 if (prev == NULL) { 2515 /* 1st: kernel .data and .bss. */ 2516 md.md_index = 1; --- 41 unchanged lines hidden (view full) --- 2558 break; 2559 } 2560 md.md_index = 3; 2561 /* FALLTHROUGH */ 2562 default: 2563 return (NULL); 2564 } 2565 } else { /* minidumps */ |
2566 mem_regions(&physmem_regions, &physmem_regions_sz, 2567 &availmem_regions, &availmem_regions_sz); 2568 |
2569 if (prev == NULL) { 2570 /* first physical chunk. */ |
2571 md.md_paddr = physmem_regions[0].mr_start; 2572 md.md_size = physmem_regions[0].mr_size; |
2573 md.md_vaddr = ~0UL; 2574 md.md_index = 1; |
2575 } else if (md.md_index < physmem_regions_sz) { 2576 md.md_paddr = physmem_regions[md.md_index].mr_start; 2577 md.md_size = physmem_regions[md.md_index].mr_size; |
2578 md.md_vaddr = ~0UL; 2579 md.md_index++; 2580 } else { 2581 /* There's no next physical chunk. */ 2582 return (NULL); 2583 } 2584 } 2585 --- 570 unchanged lines hidden --- |