summaryrefslogtreecommitdiffstats
path: root/tools.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-02-13 15:33:26 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-02-13 15:33:26 +0100
commit813c7abf04ab9f7f9c30059b258612e18dec5ce7 (patch)
tree8d12e3b27b5b8237d6c5a3744ffb26ba43339421 /tools.c
parentde7eafc05f1a830af3f722671d02a31bfc1b1f9c (diff)
downloadpcitool-813c7abf04ab9f7f9c30059b258612e18dec5ce7.tar.gz
pcitool-813c7abf04ab9f7f9c30059b258612e18dec5ce7.tar.bz2
pcitool-813c7abf04ab9f7f9c30059b258612e18dec5ce7.tar.xz
pcitool-813c7abf04ab9f7f9c30059b258612e18dec5ce7.zip
Print a bit more details
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tools.c b/tools.c
index 608a4ec..7766c6a 100644
--- a/tools.c
+++ b/tools.c
@@ -29,6 +29,25 @@ void *memcpy32(void * dst, void const * src, size_t len) {
return (dst);
}
+void *memcpy64(void * dst, void const * src, size_t len) {
+ uint64_t * plDst = (uint64_t *) dst;
+ uint64_t const * plSrc = (uint64_t const *) src;
+
+ while (len >= 8) {
+ *plDst++ = *plSrc++;
+ len -= 4;
+ }
+
+ char * pcDst = (char *) plDst;
+ char const * pcSrc = (char const *) plSrc;
+
+ while (len--) {
+ *pcDst++ = *pcSrc++;
+ }
+
+ return (dst);
+}
+
int get_page_mask() {
int pagesize,pagemask,temp;