Changes in kernel/generic/src/proc/thread.c [38ff925:c0699467] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
r38ff925 rc0699467 173 173 #endif /* CONFIG_FPU */ 174 174 175 /*176 * Allocate the kernel stack from the low-memory to prevent an infinite177 * nesting of TLB-misses when accessing the stack from the part of the178 * TLB-miss handler written in C.179 *180 * Note that low-memory is safe to be used for the stack as it will be181 * covered by the kernel identity mapping, which guarantees not to182 * nest TLB-misses infinitely (either via some hardware mechanism or183 * by the construciton of the assembly-language part of the TLB-miss184 * handler).185 *186 * This restriction can be lifted once each architecture provides187 * a similar guarantee, for example by locking the kernel stack188 * in the TLB whenever it is allocated from the high-memory and the189 * thread is being scheduled to run.190 */191 kmflags |= FRAME_LOWMEM;192 kmflags &= ~FRAME_HIGHMEM;193 194 175 thread->kstack = (uint8_t *) frame_alloc(STACK_FRAMES, FRAME_KA | kmflags); 195 176 if (!thread->kstack) {
Note:
See TracChangeset
for help on using the changeset viewer.