]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/x86_64/loose_ends.c
xnu-2782.20.48.tar.gz
[apple/xnu.git] / osfmk / x86_64 / loose_ends.c
index cd61326f3b54893ab1f886977004e85ba1bc3ec1..486d5c7262ea17a8f658dc18598601ed1ab1e597 100644 (file)
@@ -251,13 +251,13 @@ static inline unsigned int
 ml_phys_read_data(pmap_paddr_t paddr, int size)
 {
        unsigned int result = 0;
+       unsigned char s1;
+       unsigned short s2;
 
        if (!physmap_enclosed(paddr))
                panic("%s: 0x%llx out of bounds\n", __FUNCTION__, paddr);
 
         switch (size) {
-               unsigned char s1;
-               unsigned short s2;
         case 1:
                s1 = *(volatile unsigned char *)PHYSMAP_PTOV(paddr);
                result = s1;
@@ -491,6 +491,13 @@ memcmp(const void *s1, const void *s2, size_t n)
        return (0);
 }
 
+void *
+memmove(void *dst, const void *src, size_t ulen)
+{
+       bcopy(src, dst, ulen);
+       return dst;
+}
+
 /*
  * Abstract:
  * strlen returns the number of characters in "string" preceeding
@@ -646,20 +653,6 @@ kdp_register_callout(kdp_callout_fn_t fn, void *arg)
 }
 #endif
 
-/*
- * Return a uniformly distributed 64-bit random number.
- *
- * This interface should have minimal dependencies on kernel
- * services, and thus be available very early in the life
- * of the kernel.  But as a result, it may not be very random
- * on all platforms.
- */
-uint64_t
-early_random(void)
-{
-       return (ml_early_random());
-}
-
 #if !CONFIG_VMX
 int host_vmxon(boolean_t exclusive __unused)
 {