summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authorbenno <benno@FreeBSD.org>2002-05-28 07:38:55 +0000
committerbenno <benno@FreeBSD.org>2002-05-28 07:38:55 +0000
commitebe993f5ea293f29ce02fa0c4571a1e46bf4a556 (patch)
tree9b6f21e75efcce0d010d585a42b5d80830db2df3 /sys/powerpc
parent56b6a77a908eea1194bbcb970e212bbb2eab2671 (diff)
downloadFreeBSD-src-ebe993f5ea293f29ce02fa0c4571a1e46bf4a556.zip
FreeBSD-src-ebe993f5ea293f29ce02fa0c4571a1e46bf4a556.tar.gz
Implement pmap_copy and pmap_copy_page.
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/aim/mmu_oea.c16
-rw-r--r--sys/powerpc/powerpc/mmu_oea.c16
-rw-r--r--sys/powerpc/powerpc/pmap.c16
3 files changed, 39 insertions, 9 deletions
diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c
index d955ff0..e934309 100644
--- a/sys/powerpc/aim/mmu_oea.c
+++ b/sys/powerpc/aim/mmu_oea.c
@@ -816,13 +816,23 @@ void
pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr,
vm_size_t len, vm_offset_t src_addr)
{
- TODO;
+
+ /*
+ * This is not needed as it's mainly an optimisation.
+ * It may want to be implemented later though.
+ */
}
void
-pmap_copy_page(vm_page_t src, vm_page_t dst)
+pmap_copy_page(vm_page_t msrc, vm_page_t mdst)
{
- TODO;
+ vm_offset_t dst;
+ vm_offset_t src;
+
+ dst = VM_PAGE_TO_PHYS(mdst);
+ src = VM_PAGE_TO_PHYS(msrc);
+
+ kcopy((void *)src, (void *)dst, PAGE_SIZE);
}
/*
diff --git a/sys/powerpc/powerpc/mmu_oea.c b/sys/powerpc/powerpc/mmu_oea.c
index d955ff0..e934309 100644
--- a/sys/powerpc/powerpc/mmu_oea.c
+++ b/sys/powerpc/powerpc/mmu_oea.c
@@ -816,13 +816,23 @@ void
pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr,
vm_size_t len, vm_offset_t src_addr)
{
- TODO;
+
+ /*
+ * This is not needed as it's mainly an optimisation.
+ * It may want to be implemented later though.
+ */
}
void
-pmap_copy_page(vm_page_t src, vm_page_t dst)
+pmap_copy_page(vm_page_t msrc, vm_page_t mdst)
{
- TODO;
+ vm_offset_t dst;
+ vm_offset_t src;
+
+ dst = VM_PAGE_TO_PHYS(mdst);
+ src = VM_PAGE_TO_PHYS(msrc);
+
+ kcopy((void *)src, (void *)dst, PAGE_SIZE);
}
/*
diff --git a/sys/powerpc/powerpc/pmap.c b/sys/powerpc/powerpc/pmap.c
index d955ff0..e934309 100644
--- a/sys/powerpc/powerpc/pmap.c
+++ b/sys/powerpc/powerpc/pmap.c
@@ -816,13 +816,23 @@ void
pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr,
vm_size_t len, vm_offset_t src_addr)
{
- TODO;
+
+ /*
+ * This is not needed as it's mainly an optimisation.
+ * It may want to be implemented later though.
+ */
}
void
-pmap_copy_page(vm_page_t src, vm_page_t dst)
+pmap_copy_page(vm_page_t msrc, vm_page_t mdst)
{
- TODO;
+ vm_offset_t dst;
+ vm_offset_t src;
+
+ dst = VM_PAGE_TO_PHYS(mdst);
+ src = VM_PAGE_TO_PHYS(msrc);
+
+ kcopy((void *)src, (void *)dst, PAGE_SIZE);
}
/*
OpenPOWER on IntegriCloud