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: [EMAIL PROTECTED]  • http://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866


Attachment: signature.asc
Description: OpenPGP digital signature

-- 
coreboot mailing list
[email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to