Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[i386] Remove obsolete functions from virtaddr.h
The copy_{to,from}_phys() functions were obsoleted long ago by
copy_{to,from}_user().

relocate_to() also disappeared some time ago.
  • Loading branch information
Michael Brown committed Oct 12, 2008
1 parent 8e38669 commit 992bbf3
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions src/arch/i386/include/virtaddr.h
Expand Up @@ -19,9 +19,6 @@

#ifndef ASSEMBLY

#include "stdint.h"
#include "string.h"

#ifndef KEEP_IT_REAL

/*
Expand All @@ -32,10 +29,6 @@
*
*/

/* C-callable function prototypes */

extern void relocate_to ( uint32_t new_phys_addr );

/* Variables in virtaddr.S */
extern unsigned long virt_offset;

Expand All @@ -51,22 +44,10 @@ static inline void * phys_to_virt ( unsigned long phys_addr ) {
return ( void * ) ( phys_addr - virt_offset );
}

static inline void copy_to_phys ( physaddr_t dest, const void *src,
size_t len ) {
memcpy ( phys_to_virt ( dest ), src, len );
}

static inline void copy_from_phys ( void *dest, physaddr_t src, size_t len ) {
memcpy ( dest, phys_to_virt ( src ), len );
}

static inline void copy_phys_to_phys ( physaddr_t dest, physaddr_t src,
size_t len ) {
memcpy ( phys_to_virt ( dest ), phys_to_virt ( src ), len );
}

#else /* KEEP_IT_REAL */

#include <stdint.h>

/*
* With -DKEEP_IT_REAL, we are in 16-bit real mode with fixed link
* addresses and a segmented memory model. We have separate code and
Expand Down

0 comments on commit 992bbf3

Please sign in to comment.