- // FIXME use valloc to allocate console buffer.
- // In doing this, the console buffer can only be accessed from kernel mode
- // any direct write to this buffer from user land should be purged!
-
- // 分配控制台缓存
- for (size_t i = 0; i < PG_ALIGN(lx_console.output.size); i += PG_SIZE) {
- uintptr_t pa = pmm_alloc_page(KERNEL_PID, 0);
- vmm_set_mapping(PD_REFERENCED,
- (uintptr_t)lx_console.output.data + i,
- pa,
- PG_PREM_URW,
- 0);
- }
-