Rev 3141 | Rev 3143 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3141 | Rev 3142 | ||
---|---|---|---|
Line 150... | Line 150... | ||
150 | */ |
150 | */ |
151 | if (entry->p_flags & PF_W) { |
151 | if (entry->p_flags & PF_W) { |
152 | frame = (uintptr_t)frame_alloc(ONE_FRAME, 0); |
152 | frame = (uintptr_t)frame_alloc(ONE_FRAME, 0); |
153 | memcpy((void *) PA2KA(frame), |
153 | memcpy((void *) PA2KA(frame), |
154 | (void *) (base + i * FRAME_SIZE), FRAME_SIZE); |
154 | (void *) (base + i * FRAME_SIZE), FRAME_SIZE); |
155 | if (entry->p_flags & PF_X) |
155 | if (entry->p_flags & PF_X) { |
156 | smc_coherence_block(PA2KA(frame), FRAME_SIZE); |
156 | smc_coherence_block(PA2KA(frame), FRAME_SIZE); |
- | 157 | } |
|
157 | dirty = true; |
158 | dirty = true; |
158 | } else { |
159 | } else { |
159 | frame = KA2PA(base + i * FRAME_SIZE); |
160 | frame = KA2PA(base + i * FRAME_SIZE); |
160 | } |
161 | } |
161 | } else if (page >= start_anon) { |
162 | } else if (page >= start_anon) { |
Line 189... | Line 190... | ||
189 | 190 | ||
190 | frame = (uintptr_t)frame_alloc(ONE_FRAME, 0); |
191 | frame = (uintptr_t)frame_alloc(ONE_FRAME, 0); |
191 | memcpy((void *) (PA2KA(frame) + pad_lo), |
192 | memcpy((void *) (PA2KA(frame) + pad_lo), |
192 | (void *) (base + i * FRAME_SIZE + pad_lo), |
193 | (void *) (base + i * FRAME_SIZE + pad_lo), |
193 | FRAME_SIZE - pad_lo - pad_hi); |
194 | FRAME_SIZE - pad_lo - pad_hi); |
194 | if (entry->p_flags & PF_X) |
195 | if (entry->p_flags & PF_X) { |
195 | smc_coherence_block(PA2KA(frame) + pad_lo, FRAME_SIZE - |
196 | smc_coherence_block(PA2KA(frame) + pad_lo, FRAME_SIZE - |
196 | pad_lo - pad_hi); |
197 | pad_lo - pad_hi); |
- | 198 | } |
|
197 | memsetb((void *) PA2KA(frame), pad_lo, 0); |
199 | memsetb((void *) PA2KA(frame), pad_lo, 0); |
198 | memsetb((void *) (PA2KA(frame) + FRAME_SIZE - pad_hi), pad_hi, |
200 | memsetb((void *) (PA2KA(frame) + FRAME_SIZE - pad_hi), pad_hi, |
199 | 0); |
201 | 0); |
200 | dirty = true; |
202 | dirty = true; |
201 | } |
203 | } |