Commit e76e9985 authored by Henrik Nordstrom's avatar Henrik Nordstrom
Browse files

fel: Decode known SoC IDs

parent 6339a8fe
......@@ -138,7 +138,7 @@ void aw_fel_get_version(libusb_device_handle *usb)
{
struct aw_fel_version {
char signature[8];
uint32_t unknown_08; /* 0x00162300 */
uint32_t soc_id; /* 0x00162300 */
uint32_t unknown_0a; /* 1 */
uint16_t protocol; /* 1 */
uint8_t unknown_12; /* 0x44 */
......@@ -151,14 +151,21 @@ void aw_fel_get_version(libusb_device_handle *usb)
aw_usb_read(usb, &buf, sizeof(buf));
aw_read_fel_status(usb);
buf.unknown_08 = le32toh(buf.unknown_08);
buf.soc_id = le32toh(buf.soc_id);
buf.unknown_0a = le32toh(buf.unknown_0a);
buf.protocol = le32toh(buf.protocol);
buf.scratchpad = le16toh(buf.scratchpad);
buf.pad[0] = le32toh(buf.pad[0]);
buf.pad[1] = le32toh(buf.pad[1]);
printf("%.8s %08x %08x ver=%04x %02x %02x scratchpad=%08x %08x %08x\n", buf.signature, buf.unknown_08, buf.unknown_0a, buf.protocol, buf.unknown_12, buf.unknown_13, buf.scratchpad, buf.pad[0], buf.pad[1]);
const char *soc_name="unknown";
switch ((buf.soc_id >> 8) & 0xFFFF) {
case 0x1623: soc_name="A10";break;
case 0x1625: soc_name="A13";break;
case 0x1633: soc_name="A31";break;
}
printf("%.8s soc=%08x(%s) %08x ver=%04x %02x %02x scratchpad=%08x %08x %08x\n", buf.signature, buf.soc_id, soc_name, buf.unknown_0a, buf.protocol, buf.unknown_12, buf.unknown_13, buf.scratchpad, buf.pad[0], buf.pad[1]);
}
void aw_fel_read(libusb_device_handle *usb, uint32_t offset, void *buf, size_t len)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment