Rev 2199 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2199 | Rev 2238 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | /* |
1 | /* |
2 | * Copyright (c) 2003-2004 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 39... | Line 39... | ||
39 | #include <config.h> |
39 | #include <config.h> |
40 | #include "../aux_print/printf.h" |
40 | #include "../aux_print/printf.h" |
41 | 41 | ||
42 | void page_arch_init(void) |
42 | void page_arch_init(void) |
43 | { |
43 | { |
44 | - | ||
45 | uintptr_t cur; |
44 | uintptr_t cur; |
46 | int flags; |
45 | int flags; |
47 | 46 | ||
48 | page_mapping_operations = &pt_mapping_operations; |
47 | page_mapping_operations = &pt_mapping_operations; |
49 | 48 | ||
50 | flags = PAGE_CACHEABLE; |
49 | flags = PAGE_CACHEABLE; |
51 | const unsigned maxmem = ALIGN_DOWN(config.memory_size, FRAME_SIZE); |
50 | const unsigned maxmem = ALIGN_DOWN(config.memory_size, FRAME_SIZE); |
52 | 51 | ||
53 | for (cur = 0; cur < maxmem; cur += FRAME_SIZE) { |
52 | for (cur = 0; cur < maxmem; cur += FRAME_SIZE) { |
54 | // page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); |
53 | //page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, flags); |
55 | } |
54 | } |
56 | //TODO set page fault routines |
55 | //TODO set page fault routines |
57 | // no problem no ... kernel doesn't do page faults |
56 | // no problem no ... kernel doesn't do page faults |
58 | - | ||
59 | } |
57 | } |
60 | 58 | ||
61 | /** Map device into kernel space. */ |
59 | /** Map device into kernel space. */ |
62 | uintptr_t hw_map(uintptr_t physaddr, size_t size) |
60 | uintptr_t hw_map(uintptr_t physaddr, size_t size) |
63 | { |
61 | { |