[coreboot] [PATCH] misc coreboot utility patches

Peter Stuge peter at stuge.se
Mon Aug 31 21:27:11 CEST 2009


Stefan Reinauer wrote:
> port msrtool to darwin.
> 
> Signed-off-by: Stefan Reinauer <stepan at coresystems.de>

With comments addressed, go for it!

Acked-by: Peter Stuge <peter at stuge.se>


> +int darwin_probe(const struct sysdef *system)
> +{
> +	return iopl(3) == 0;
> +}

Ideally this would check that system is really Darwin.


>  struct cpuid_t *cpuid(void) {
>  	uint32_t outeax;
> +
> +#ifdef __DARWIN__
> +        asm volatile (
> +                "pushl %%ebx    \n"
> +                "cpuid          \n"
> +                "popl %%ebx     \n"
> +                : "=a" (outeax) : "a" (1) : "%ecx", "%edx"
> +        );
> +#else
>  	asm ("cpuid" : "=a" (outeax) : "a" (1) : "%ebx", "%ecx", "%edx");
> +#endif
> +

I have no problem with this, but can you explain why the manual
push/pop is needed? Maybe the new variant is the only one we need?


> -LDFLAGS=`trylink "libpci (from pciutils)" "${pc_LDFLAGS}" "-lpci -lz" "-L/usr/local/lib -lpci -lz" "-framework IOKit -L/usr/local/lib -lpci -lz"` || {
> +LDFLAGS=`trylink "libpci (from pciutils)" "${pc_LDFLAGS}" "-lpci -lz" "-lpci -lz" "-framework IOKit -framework DirectIO -lpci -lz"` || {

Why remove /usr/local/lib ? I'd like to have that still in there.


//Peter




More information about the coreboot mailing list