|
|
1.1 ! root 1: #ifndef HW_XTENSA_BOOTPARAM ! 2: #define HW_XTENSA_BOOTPARAM ! 3: ! 4: typedef struct BpTag { ! 5: uint16_t tag; ! 6: uint16_t size; ! 7: } BpTag; ! 8: ! 9: static inline ram_addr_t put_tag(ram_addr_t addr, uint16_t tag, ! 10: size_t size, const void *data) ! 11: { ! 12: BpTag bp_tag = { ! 13: .tag = tswap16(tag), ! 14: .size = tswap16((size + 3) & ~3), ! 15: }; ! 16: ! 17: cpu_physical_memory_write(addr, &bp_tag, sizeof(bp_tag)); ! 18: addr += sizeof(bp_tag); ! 19: cpu_physical_memory_write(addr, data, size); ! 20: addr += (size + 3) & ~3; ! 21: ! 22: return addr; ! 23: } ! 24: ! 25: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.