From 3b99a3ca2f973f14a947ebef08d483af28568344 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 19 Nov 2010 10:50:35 +1000 Subject: add combios ram reset table --- radeontool.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/radeontool.c b/radeontool.c index e5ba933..aab1bca 100644 --- a/radeontool.c +++ b/radeontool.c @@ -1937,7 +1937,12 @@ static void radeon_rom_legacy_list_tables_present(unsigned char *bios, int hdr) } offset = BIOS16(hdr + 0x48); if (offset) { + int check_offset = offset; printf("mem config info table\n"); + while (BIOS8(check_offset++)); + check_offset += 2; + if (check_offset) + printf("mem ram reset table %d %x %x\n", check_offset, BIOS8(check_offset -2), BIOS8(check_offset - 1)); } offset = BIOS16(hdr + 0x4a); if (offset) { @@ -2133,6 +2138,32 @@ static void radeon_rom_legacy_miscinfotable(unsigned char *bios, int hdr) } } +static void radeon_rom_legacy_ram_reset_table(unsigned char *bios, int hdr) +{ + int offset = BIOS16(hdr + 0x48); + uint32_t val; + + if (!offset) + return; + + while (BIOS8(offset++)); + offset += 2; + + printf("ram reset table %d rev %d and mask %x\n", offset, BIOS8(offset - 1), BIOS8(offset - 2)); + val = BIOS8(offset); + while(val != 0xff) { + offset++; + if (val == 0x0f) { + printf("pwup complete test\n"); + } else { + uint32_t or_mask = BIOS16(offset); + offset+=2; + printf("rmw SDRAM mask %x %x\n", or_mask, val); + } + val = BIOS8(offset); + } +} + static void radeon_rom_legacy_mmio_table(unsigned char *bios, int offset) { if (!offset) @@ -2802,6 +2833,8 @@ void radeon_rom_tables(const char * file) printf("-------------\n"); radeon_rom_legacy_pllinittable(bios, hdr); printf("-------------\n"); + radeon_rom_legacy_ram_reset_table(bios, hdr); + printf("-------------\n"); radeon_rom_legacy_clocks(bios, hdr); printf("-------------\n"); radeon_rom_legacy_connectors(bios, hdr); -- cgit v1.2.3