raiden00pl commented on code in PR #19559:
URL: https://github.com/apache/nuttx/pull/19559#discussion_r3659581698
##########
arch/x86_64/src/common/x86_64_addrenv.c:
##########
@@ -192,10 +194,30 @@ static int create_spgtables(arch_addrenv_t *addrenv)
static void copy_kernel_mappings(arch_addrenv_t *addrenv)
{
uintptr_t *pdpt = (uintptr_t *)x86_64_pgvaddr(addrenv->spgtables[1]);
+ int i;
/* Kernel mapping - lower 1GB maps to 4GB-5GB */
pdpt[4] = X86_PDPT_KERNEL_MAP;
+
+ /* Inherit the boot identity mapping of the low 4GB as well. The kernel
+ * goes on running under whichever address environment was selected last --
+ * a kernel thread never gets one of its own, and addrenv_switch() leaves
+ * the previous one in place for it -- so without these entries every MMIO
+ * register the kernel touches faults as soon as any process address
+ * environment is current. The HPET at 0xfed00000 is what finds this: its
Review Comment:
the same applies to other docstrings in this patch
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]