Changeset 6b781c0 in mainline for kernel/arch/arm32/src/mm/frame.c
- Timestamp:
- 2007-06-08T15:02:49Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c03ee1c
- Parents:
- 3ee8a075
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/mm/frame.c
r3ee8a075 r6b781c0 1 1 /* 2 * Copyright (c) 200 5 Jakub Jermar2 * Copyright (c) 2007 Pavel Jancik, Michal Kebrt 3 3 * All rights reserved. 4 4 * … … 31 31 */ 32 32 /** @file 33 * @brief Frame related functions. 33 34 */ 34 35 35 36 #include <mm/frame.h> 37 #include <arch/mm/frame.h> 38 #include <config.h> 39 #include <arch/debug/print.h> 36 40 37 /** Create memory zones. */ 41 /** Address of the last frame in the memory. */ 42 uintptr_t last_frame = 0; 43 44 /** Creates memory zones. */ 38 45 void frame_arch_init(void) 39 46 { 40 /* TODO */ 47 /* all memory as one zone */ 48 zone_create(0, ADDR2PFN(config.memory_size), 49 BOOT_PAGE_TABLE_START_FRAME + BOOT_PAGE_TABLE_SIZE_IN_FRAMES, 0); 50 last_frame = config.memory_size; 51 52 /* blacklist boot page table */ 53 frame_mark_unavailable(BOOT_PAGE_TABLE_START_FRAME, 54 BOOT_PAGE_TABLE_SIZE_IN_FRAMES); 55 } 56 57 /** Frees the boot page table. */ 58 void boot_page_table_free(void) 59 { 60 int i; 61 for (i = 0; i < BOOT_PAGE_TABLE_SIZE_IN_FRAMES; i++) { 62 frame_free(i * FRAME_SIZE + BOOT_PAGE_TABLE_ADDRESS); 63 } 41 64 } 42 65
Note:
See TracChangeset
for help on using the changeset viewer.