[Openmcl-devel] CCL on BeagleBone (Angstrom)

Gary Byers gb at clozure.com
Sat May 4 21:45:29 UTC 2013


Thanks.

I don't know of an official way of determining CPU features besides
parsing /proc/cpuinfo, which isn't attractive if it changes whenever
someone feels like changing it.  (Android has a library function that
determines CPU features; AFAIK, it just parses /proc/cpuinfo.)

The other approach is to just set up a handler for illegal instruction
exceptions, and then try to execute a few instructions that involve features
that CCL needs (hardware floating-point, a store-conditional primitives.)

There are likely ways to lose that way too, but there may wind up being
fewer ways.

(I think that some ARM system register contains model info that may be useful,
but I don't think that that register can be read from user mode and I don't
think that Linux offers a way of accessing it.)

On Fri, 3 May 2013, Kelly McDonald wrote:

> Hello,
>
> If I can put in a ticket, please let me know, otherwise please see the following patch
>
> I got a new beaglebone black today - and of course I was disappointed when CCL wouldn't work - I got an error message :
>
> CPU doesn't support required features
>
> After digging a little I found that the /proc/cpuinfo was different than what was expected:
>
> root at beaglebone:~/ccl/lisp-kernel# cat /proc/cpuinfo
> processor	: 0
> model name	: ARMv7 Processor rev 2 (v7l)
> BogoMIPS	: 297.40
> Features	: swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
> CPU implementer	: 0x41
> CPU architecture: 7
> CPU variant	: 0x3
> CPU part	: 0xc08
> CPU revision	: 2
>
> Hardware	: Generic AM33XX (Flattened Device Tree)
> Revision	: 0000
> Serial		: 0000000000000000
>
>
>
> So, I patched the source with the following:
>
> --- pmcl-kernel.c	(revision 15801)
> +++ pmcl-kernel.c	(working copy)
> @@ -1604,7 +1604,7 @@
>         break;
>       }
>       n = strlen(line);
> -      if (strncmp(line,"Processor",sizeof("Processor")-1) == 0) {
> +      if ((strncmp(line,"Processor",sizeof("Processor")-1) == 0) || (strncmp(line,"model name",sizeof("model name")-1)) == 0) {
>         procline = malloc(n+1);
>         strcpy(procline,line);
>
> - it looks as if this took care of the problem -
>
> Thanks!
>
> Kelly
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list