Hi all,
has someone experience with the READ_CPU/WRITE_CPU command on Geode GX1 CPUs? My system bases on LinuxBIOS, so the scratch pad ram will not be setup. Now I'm trying to write an xorg driver with acceleration for this system. But for some operations I need the scratch pad ram *and* the so called BB0 and BB1 pointer. Scratch pad ram works now. But I cannot setup the BB0/BB1 pointer.
In my Geode GX1 manual page 97 says: Opcodes "0f 3c" is CPU_WRITE Opcodes "0f 3d" is CPU_READ
In the same manual page 207 says: Opcodes "0f 3c" is CPU_READ Opcodes "0f 3d" is CPU_WRITE
Has someone experience in gcc inline assembler? I try to set a new value and read back to check this setting. It fails, so maybe my code is wrong.
/* this runs in linux kernel space */ static void geode_gx1_set_blitbase_0(unsigned long value) { __asm__ __volatile__ ( "movl $0xFFFFFF0C, %%ebx" : : : "ebx"); __asm__ __volatile__ ( "movl %0, %%eax": : "r" (value) );
__asm__ __volatile__ ( ".byte 0x0f" ); /* CPU_WRITE */ __asm__ __volatile__ ( ".byte 0x3c" );
__asm__ __volatile__ ( ".byte 0x0f" ); /* BB0_RESET */ __asm__ __volatile__ ( ".byte 0x3a" ); }
/* this runs in my xorg driver */ static unsigned long read_bb0_base(void) { unsigned long rc;
__asm__ __volatile__ ( "pushl %ebx" ); __asm__ __volatile__ ( "movl $0xFFFFFF0C, %ebx"); __asm__ __volatile__ ( ".byte 0x0f" ); /* CPU_READ */ __asm__ __volatile__ ( ".byte 0x3d" : : : "eax"); __asm__ __volatile__ ( "popl %ebx" ); __asm__ __volatile__ ( "movl %%eax, %0" : "=a" (rc):);
return rc; }
Maybe the opcodes are wrong or my code. Can anyone help?
Regards Juergen