[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rtl] ??? RTLinux on Linux v2.4.2 available for PPC
> > memcpy( (ulong *)KERNELBASE, &block, sizeof(ulong)*7 );
> >
> > ^^^ it craches here (memcpy is not allowed to kernel code)
>
> Yes, it is allowed. It's in linux/arch/i386/lib/memcpy.c.
In PPC by default KERNELBASE page is protected. You have to enable KGDB or XMON
to get RW permisions.
from arch/ppc/mm/init.c:
v = KERNELBASE;
p = ram_phys_base;
for (s = 0; s < total_lowmem; s += PAGE_SIZE) {
/* On the MPC8xx, we want the page shared so we
* don't get ASID compares on kernel space.
*/
f = _PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_SHARED;
#if defined(CONFIG_KGDB) || defined(CONFIG_XMON)
/* Allows stub to set breakpoints everywhere */
f |= _PAGE_RW | _PAGE_DIRTY | _PAGE_HWWRITE;
#else
--
* * * * * * * * * * * *
* per pedes ad astra! *
* * * * * * * * * * * * mailto:krom@dgt-lab.com.pl