Hello,
      While going through sys/arch/amd64/pmap.h, I came across KERN_BASE[1]
and confused it for KERNBASE[2]. Looking deeper into the same I think
someone made the same mistake in dtrace_isa.c{3](I might be wrong).
    I compared how the same variable was used in amd64[4] and i386[5].
There seems to be a mismatch. I computed the values for KERN_BASE and
KERNBASE for amd64 and

   - KERN_BASE = 0x800000000000
   - KERNBASE = 0xffffffff80000000

I think this may be an error. However, the names are definitely a
bit confusing and there is no documentation to suggest what they are for.

[1] https://nxr.netbsd.org/xref/src/sys/arch/amd64/include/pmap.h#161
[2] https://nxr.netbsd.org/xref/src/sys/arch/amd64/include/param.h#41
[3]
https://nxr.netbsd.org/xref/src/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c
[4]
https://nxr.netbsd.org/xref/src/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c#48
[5]
https://nxr.netbsd.org/xref/src/external/cddl/osnet/dev/dtrace/i386/dtrace_isa.c#41
-- 
Regards,
  Siddharth M
  Third Year B.Tech (CSE) Student,
  Amrita School of Engineering, Kollam
*  Blog <http://r3xnation.wordpress.com> *
*---------------------------------------*
*“Most people get ahead during the time that others waste.**"*

Reply via email to