summaryrefslogtreecommitdiff
path: root/payloads/coreinfo/ramdump_module.c
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2009-08-24 15:25:11 +0000
committerMyles Watson <mylesgw@gmail.com>2009-08-24 15:25:11 +0000
commit44163f7f7198b53735820aaa84e232547fec73d8 (patch)
tree8125291f618d386ca64bd27a8e756ade7887d0a4 /payloads/coreinfo/ramdump_module.c
parentbab2bef484f2a6279bb3e7445f72d0c35c7c40fa (diff)
downloadcoreboot-44163f7f7198b53735820aaa84e232547fec73d8.tar.xz
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> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4563 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/coreinfo/ramdump_module.c')
-rw-r--r--payloads/coreinfo/ramdump_module.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/payloads/coreinfo/ramdump_module.c b/payloads/coreinfo/ramdump_module.c
index 04a9f0955d..a0479eb135 100644
--- a/payloads/coreinfo/ramdump_module.c
+++ b/payloads/coreinfo/ramdump_module.c
@@ -34,7 +34,7 @@ static void dump_ram(WINDOW *win, uint32_t addr, int row, int col)
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 @@ static int ramdump_module_handle(int key)
{
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;
}