Author: myles Date: 2009-08-24 17:25:11 +0200 (Mon, 24 Aug 2009) New Revision: 4563
Modified: trunk/payloads/coreinfo/coreboot_module.c trunk/payloads/coreinfo/ramdump_module.c Log: Update Coreinfo to use TAG_FORWARD in tables. Update the ramdump function cursor functions and make the address hex instead of decimal
Signed-off-by: Myles Watson mylesgw@gmail.com Acked-by: Ronald G. Minnich rminnich@gmail.com Acked-by: Uwe Hermann uwe@hermann-uwe.de Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: trunk/payloads/coreinfo/coreboot_module.c =================================================================== --- trunk/payloads/coreinfo/coreboot_module.c 2009-08-24 06:30:37 UTC (rev 4562) +++ trunk/payloads/coreinfo/coreboot_module.c 2009-08-24 15:25:11 UTC (rev 4563) @@ -203,6 +203,9 @@ struct cb_record *rec = (struct cb_record *)ptr;
switch (rec->tag) { + case CB_TAG_FORWARD: + return parse_header((void *)(unsigned long)((struct cb_forward *)rec)->forward, 1); + break; case CB_TAG_MEMORY: parse_memory(ptr); break;
Modified: trunk/payloads/coreinfo/ramdump_module.c =================================================================== --- trunk/payloads/coreinfo/ramdump_module.c 2009-08-24 06:30:37 UTC (rev 4562) +++ trunk/payloads/coreinfo/ramdump_module.c 2009-08-24 15:25:11 UTC (rev 4563) @@ -34,7 +34,7 @@ int i, x = 0, y = 0, count = 0; volatile uint8_t *ptr = (void *)(addr);
- mvwprintw(win, 0, col + 54, "RAM address: %10d", addr); + mvwprintw(win, 0, col + 54, "RAM address: %10x", addr);
/* Dump 256 bytes of RAM. */ for (i = 1; i < 257; i++) { @@ -68,23 +68,21 @@ { switch (key) { case KEY_DOWN: - if (cursor == cursor_max) - return 0; cursor++; break; case KEY_UP: - if (cursor == 0) - return 0; cursor--; break; - case KEY_NPAGE: - if (cursor == cursor_max) - return 0; - cursor += 4096; /* Jump in 1MB steps. */ + case KEY_RIGHT: + cursor += 256; break; + case KEY_LEFT: + cursor -= 256; + break; case KEY_PPAGE: - if (cursor == 0) - return 0; + cursor += 4096; /* Jump in 1MB steps. */ + break; + case KEY_NPAGE: cursor -= 4096; /* Jump in 1MB steps. */ break; }