OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [libmem/] [tests/] [debug.c] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
#include "debug.h"
2
#include <stdio.h>
3
 
4
void print_page_area_list(struct page_allocator *p)
5
{
6
        struct page_area *area;
7
 
8
        list_foreach_struct (area, &p->page_area_list, list) {
9
                printf("%-20s\n%-20s\n", "Page area:","-------------------------");
10
                printf("%-20s %u\n", "Pfn:", area->pfn);
11
                printf("%-20s %d\n", "Used:", area->used);
12
                printf("%-20s %d\n\n", "Number of pages:", area->numpages);
13
        }
14
}
15
 
16
void print_km_area(struct km_area *s)
17
{
18
        printf("%-20s\n%-20s\n", "Subpage area:","-------------------------");
19
        printf("%-20s 0x%lu\n", "Addr:", s->vaddr);
20
        printf("%-20s 0x%lu\n", "Size:", s->size);
21
        printf("%-20s %d\n", "Used:", s->used);
22
        printf("%-20s %d\n\n", "Head_of_pages:", s->pg_alloc_pages);
23
 
24
}
25
 
26
void print_km_area_list(struct link *km_areas)
27
{
28
        struct km_area *area;
29
 
30
        list_foreach_struct (area, km_areas, list)
31
                print_km_area(area);
32
}
33
 

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.