Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2027 → Rev 2028

/trunk/kernel/test/mm/mapping1.c
25,6 → 25,7
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
#include <print.h>
#include <test.h>
#include <mm/page.h>
34,10 → 35,6
#include <arch/types.h>
#include <debug.h>
 
#ifdef CONFIG_BENCH
#include <arch/cycle.h>
#endif
 
#define PAGE0 0x10000000
#define PAGE1 (PAGE0+PAGE_SIZE)
 
44,16 → 41,11
#define VALUE0 0x01234567
#define VALUE1 0x89abcdef
 
void test_mapping1(void)
char * test_mapping1(void)
{
#ifdef CONFIG_BENCH
uint64_t t0 = get_cycle();
#endif
uintptr_t frame0, frame1;
uint32_t v0, v1;
 
printf("Memory management test mapping #1\n");
 
frame0 = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_KA);
frame1 = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_KA);
 
87,9 → 79,5
ASSERT(v0 == 0);
ASSERT(v1 == 0);
printf("Test passed.\n");
#ifdef CONFIG_BENCH
uint64_t dt = get_cycle() - t0;
printf("Time: %.*d cycles\n", sizeof(dt) * 2, dt);
#endif
return NULL;
}