[coreboot] patch: init gx cache earlier.

Stefan Reinauer stepan at coresystems.de
Mon Feb 4 10:24:47 CET 2008


Carl-Daniel Hailfinger wrote:

> Sorry, I can't find such an option in v2 and the svn log also didn't
> turn up any hits. Could you point me to a specific file and/or revision?
> I have a (wrong due to varargs for vtxprintf) prototype patch for v3:
>
> Index: lib/console.c
> ===================================================================
> --- lib/console.c	(Revision 571)
> +++ lib/console.c	(Arbeitskopie)
> @@ -7,6 +7,8 @@
>  int vtxprintf(void (*)(unsigned char, void *arg), 
>  		void *arg, const char *, va_list);
>  
> +#define rdtscl(low) __asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx")
> +
>  static int console_loglevel(void)
>  {
>  	return CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
> @@ -34,11 +36,15 @@
>  {
>  	va_list args;
>  	int i;
> +	u32 tstamp;
>  
>  	if (msg_level > console_loglevel()) {
>  		return 0;
>  	}
>  
> +	rdtscl(tstamp);
> +	vtxprintf(console_tx_byte, (void *)0, "[tsc %d] ", tstamp);
> +
>  	va_start(args, fmt);
>  	i = vtxprintf(console_tx_byte, (void *)0, fmt, args);
>  	va_end(args);
>
>
>   

NACK! x86 Assembler code (that only works on x86 cpus with a TSC) in 
generic C code is an absolute no-go! If this is supposed to go in at any 
later time please change it.

Stefan

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080204/0809bc40/attachment.sig>


More information about the coreboot mailing list