Rev 2015 | Rev 2071 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2015 | Rev 2048 | ||
---|---|---|---|
Line 43... | Line 43... | ||
43 | #include <config.h> |
43 | #include <config.h> |
44 | 44 | ||
45 | #ifdef CONFIG_SMP |
45 | #ifdef CONFIG_SMP |
46 | /** Entries locked in DTLB of BSP. |
46 | /** Entries locked in DTLB of BSP. |
47 | * |
47 | * |
48 | * Application processors need to have the same locked entries |
48 | * Application processors need to have the same locked entries in their DTLBs as |
49 | * in their DTLBs as the bootstrap processor. |
49 | * the bootstrap processor. |
50 | */ |
50 | */ |
51 | static struct { |
51 | static struct { |
52 | uintptr_t virt_page; |
52 | uintptr_t virt_page; |
53 | uintptr_t phys_page; |
53 | uintptr_t phys_page; |
54 | int pagesize_code; |
54 | int pagesize_code; |
Line 82... | Line 82... | ||
82 | } |
82 | } |
83 | } |
83 | } |
84 | 84 | ||
85 | /** Map memory-mapped device into virtual memory. |
85 | /** Map memory-mapped device into virtual memory. |
86 | * |
86 | * |
87 | * So far, only DTLB is used to map devices into memory. |
87 | * So far, only DTLB is used to map devices into memory. Chances are that there |
88 | * Chances are that there will be only a limited amount of |
88 | * will be only a limited amount of devices that the kernel itself needs to |
89 | * devices that the kernel itself needs to lock in DTLB. |
89 | * lock in DTLB. |
90 | * |
90 | * |
91 | * @param physaddr Physical address of the page where the |
91 | * @param physaddr Physical address of the page where the device is located. |
92 | * device is located. Must be at least |
- | |
93 | * page-aligned. |
92 | * Must be at least page-aligned. |
94 | * @param size Size of the device's registers. Must not |
93 | * @param size Size of the device's registers. Must not exceed 4M and must |
95 | * exceed 4M and must include extra space |
- | |
96 | * caused by the alignment. |
94 | * include extra space caused by the alignment. |
97 | * |
95 | * |
98 | * @return Virtual address of the page where the device is |
96 | * @return Virtual address of the page where the device is mapped. |
99 | * mapped. |
- | |
100 | */ |
97 | */ |
101 | uintptr_t hw_map(uintptr_t physaddr, size_t size) |
98 | uintptr_t hw_map(uintptr_t physaddr, size_t size) |
102 | { |
99 | { |
103 | unsigned int order; |
100 | unsigned int order; |
104 | int i; |
101 | int i; |