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 209495 2010-06-24 05:47:00Z marcel $");
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/bootinfo.h>
81#include <machine/cpu.h>
82#include <machine/pcb.h>
83#include <machine/platform.h>
84
85#include <machine/tlb.h>
86#include <machine/spr.h>
87#include <machine/vmparam.h>
88#include <machine/md_var.h>
--- 2413 unchanged lines hidden (view full) ---
2502 /* Minidumps are based on virtual memory addresses. */
2503 /* Nothing to do... */
2504}
2505
2506struct pmap_md *
2507mmu_booke_scan_md(mmu_t mmu, struct pmap_md *prev)
2508{
2509 static struct pmap_md md;
2510 struct bi_mem_region *mr;
2511 pte_t *pte;
2512 vm_offset_t va;
2513
2514 if (dumpsys_minidump) {
2515 md.md_paddr = ~0UL; /* Minidumps use virtual addresses. */
2516 if (prev == NULL) {
2517 /* 1st: kernel .data and .bss. */
2518 md.md_index = 1;
--- 41 unchanged lines hidden (view full) ---
2560 break;
2561 }
2562 md.md_index = 3;
2563 /* FALLTHROUGH */
2564 default:
2565 return (NULL);
2566 }
2567 } else { /* minidumps */
2568 mr = bootinfo_mr();
2569 if (prev == NULL) {
2570 /* first physical chunk. */
2571 md.md_paddr = mr->mem_base;
2572 md.md_size = mr->mem_size;
2573 md.md_vaddr = ~0UL;
2574 md.md_index = 1;
2575 } else if (md.md_index < bootinfo->bi_mem_reg_no) {
2576 md.md_paddr = mr[md.md_index].mem_base;
2577 md.md_size = mr[md.md_index].mem_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 ---
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 209495 2010-06-24 05:47:00Z marcel $");
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/bootinfo.h>
81#include <machine/cpu.h>
82#include <machine/pcb.h>
83#include <machine/platform.h>
84
85#include <machine/tlb.h>
86#include <machine/spr.h>
87#include <machine/vmparam.h>
88#include <machine/md_var.h>
--- 2413 unchanged lines hidden (view full) ---
2502 /* Minidumps are based on virtual memory addresses. */
2503 /* Nothing to do... */
2504}
2505
2506struct pmap_md *
2507mmu_booke_scan_md(mmu_t mmu, struct pmap_md *prev)
2508{
2509 static struct pmap_md md;
2510 struct bi_mem_region *mr;
2511 pte_t *pte;
2512 vm_offset_t va;
2513
2514 if (dumpsys_minidump) {
2515 md.md_paddr = ~0UL; /* Minidumps use virtual addresses. */
2516 if (prev == NULL) {
2517 /* 1st: kernel .data and .bss. */
2518 md.md_index = 1;
--- 41 unchanged lines hidden (view full) ---
2560 break;
2561 }
2562 md.md_index = 3;
2563 /* FALLTHROUGH */
2564 default:
2565 return (NULL);
2566 }
2567 } else { /* minidumps */
2568 mr = bootinfo_mr();
2569 if (prev == NULL) {
2570 /* first physical chunk. */
2571 md.md_paddr = mr->mem_base;
2572 md.md_size = mr->mem_size;
2573 md.md_vaddr = ~0UL;
2574 md.md_index = 1;
2575 } else if (md.md_index < bootinfo->bi_mem_reg_no) {
2576 md.md_paddr = mr[md.md_index].mem_base;
2577 md.md_size = mr[md.md_index].mem_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 ---