Rev 2128 | Rev 2725 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2128 | Rev 2465 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | /* |
1 | /* |
| 2 | * Copyright (c) 2005 Jakub Jermar |
2 | * Copyright (c) 2007 Pavel Jancik, Michal Kebrt |
| 3 | * All rights reserved. |
3 | * All rights reserved. |
| 4 | * |
4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions |
6 | * modification, are permitted provided that the following conditions |
| 7 | * are met: |
7 | * are met: |
| Line 28... | Line 28... | ||
| 28 | 28 | ||
| 29 | /** @addtogroup arm32mm |
29 | /** @addtogroup arm32mm |
| 30 | * @{ |
30 | * @{ |
| 31 | */ |
31 | */ |
| 32 | /** @file |
32 | /** @file |
| - | 33 | * @brief Frame related functions. |
|
| 33 | */ |
34 | */ |
| 34 | 35 | ||
| 35 | #include <mm/frame.h> |
36 | #include <mm/frame.h> |
| - | 37 | #include <arch/mm/frame.h> |
|
| - | 38 | #include <config.h> |
|
| - | 39 | #include <arch/debug/print.h> |
|
| 36 | 40 | ||
| - | 41 | /** Address of the last frame in the memory. */ |
|
| - | 42 | uintptr_t last_frame = 0; |
|
| - | 43 | ||
| 37 | /** Create memory zones. */ |
44 | /** Creates memory zones. */ |
| 38 | void frame_arch_init(void) |
45 | void frame_arch_init(void) |
| 39 | { |
46 | { |
| - | 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 | { |
|
| 40 | /* TODO */ |
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 | ||
| 43 | /** @} |
66 | /** @} |
| 44 | */ |
67 | */ |