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