summaryrefslogtreecommitdiff
path: root/phys.h
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2011-06-29 23:24:35 +0200
committerRichard Braun <rbraun@sceen.net>2011-06-29 23:25:23 +0200
commit60ed9ca70c1dea0a9263faf511bef726d8f89e7d (patch)
treec4f4f6b15000b3b1594693623548de19cef9369e /phys.h
parent55ae0e4212300d2cfdc712d363271654181f6954 (diff)
phys: replace page frame numbers with addresses
Diffstat (limited to 'phys.h')
-rw-r--r--phys.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/phys.h b/phys.h
index 5b06521..b031e31 100644
--- a/phys.h
+++ b/phys.h
@@ -32,29 +32,34 @@
#include "list.h"
/*
- * Page frame number.
+ * Physical address.
*/
-typedef unsigned long phys_pfn_t;
+typedef unsigned long phys_paddr_t;
+
+/*
+ * Memory range size.
+ */
+typedef unsigned long phys_size_t;
/*
* Page descriptor.
*/
struct phys_page {
struct phys_seg *seg;
- phys_pfn_t pfn;
+ phys_paddr_t phys_addr;
unsigned int level;
struct list node;
};
void phys_init(void);
-struct phys_page * phys_alloc_pages(phys_pfn_t size);
+struct phys_page * phys_alloc_pages(phys_size_t size);
-void phys_free_pages(struct phys_page *page, phys_pfn_t size);
+void phys_free_pages(struct phys_page *page, phys_size_t size);
-phys_pfn_t phys_alloc(phys_pfn_t size);
+phys_paddr_t phys_alloc(phys_size_t size);
-void phys_free(phys_pfn_t pfn, phys_pfn_t size);
+void phys_free(phys_paddr_t pa, phys_size_t size);
void phys_info(void);