Skip to content

Commit 3ef2721

Browse files
authored
Merge pull request #2 from FrameworkComputer/reading-back
Allow reading back and dumping EEPROM binary
2 parents 7cf2709 + 36f8cce commit 3ef2721

4 files changed

Lines changed: 574 additions & 70 deletions

File tree

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Generated EEPROM binaries
2+
*.bin
3+
4+
# Executables
5+
*.exe
6+
gpu_cfg_gen
7+
8+
# Generated by cosmopolitan
9+
*.aarch64.elf
10+
*.com.dbg

config_definition.h

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525

2626
#define __packed __attribute__((packed))
2727

28+
/**
29+
* The main struct (header)
30+
* Contained in either either
31+
* - default_gpu_cfg
32+
* - default_ssd_cfg
33+
*/
2834
struct gpu_cfg_descriptor {
2935
/* Expansion bay card magic value that is unique */
3036
char magic[4];
@@ -49,12 +55,13 @@ struct gpu_cfg_descriptor {
4955
uint32_t crc32;
5056
} __packed;
5157

52-
struct gpu_config_header {
53-
union {
54-
struct gpu_cfg_descriptor header;
55-
uint8_t bytes[0x2B];
56-
};
57-
} __packed;
58+
// Unused structure
59+
//struct gpu_config_header {
60+
// union {
61+
// struct gpu_cfg_descriptor header;
62+
// uint8_t bytes[0x2B];
63+
// };
64+
//} __packed;
5865

5966
struct gpu_block_header {
6067
uint8_t block_type;
@@ -227,4 +234,4 @@ struct gpu_subsys_pd {
227234
uint8_t power_domain;
228235
uint8_t gpio_hpd;
229236
uint8_t gpio_interrupt;
230-
} __packed;
237+
} __packed;

0 commit comments

Comments
 (0)