| /u-boot/tools/ |
| A D | sunxi_egon.c | 47 const struct boot_file_head *header = (void *)ptr; in egon_verify_header() local 67 if (memcmp(header->magic, BOOT0_MAGIC, sizeof(header->magic))) in egon_verify_header() 70 length = le32_to_cpu(header->length); in egon_verify_header() 87 const struct boot_file_head *header = buf; in egon_print_header() local 90 le32_to_cpu(header->length)); in egon_print_header() 109 struct boot_file_head *header = buf; in egon_set_header() local 122 header->b_instruction = cpu_to_le32(value); in egon_set_header() 140 header->b_instruction = cpu_to_le32(value); in egon_set_header() 144 memcpy(header->magic, BOOT0_MAGIC, sizeof(header->magic)); in egon_set_header() 158 header->dt_name_offset = cpu_to_le32(value); in egon_set_header() [all …]
|
| A D | mksunxiboot.c | 59 struct boot_file_head header; member 74 if ((sizeof(img.header) % 32) != 0) { in main() 138 img.header.b_instruction = /* b instruction */ in main() 143 img.header.length = in main() 145 img.header.b_instruction = cpu_to_le32(img.header.b_instruction); in main() 146 img.header.length = cpu_to_le32(img.header.length); in main() 149 img.header.spl_signature[3] = SPL_HEADER_VERSION; in main() 153 strcpy((char *)img.header.string_pool, default_dt); in main() 154 img.header.dt_name_offset = in main() 163 gen_check_sum(&img.header); in main() [all …]
|
| A D | update_octeon_header.c | 154 struct bootloader_header header; in main() local 349 memcpy(&header, buf, hdr_size); in main() 382 header.dlen = htonl(data_len); in main() 383 header.dcrc = htonl(data_crc); in main() 384 header.board_type = htons(board_type); in main() 385 header.address = address; in main() 404 switch (ntohs(header.image_type)) { in main() 437 header.hlen = htons(hdr_size); in main() 440 header.hcrc = crc32(0, (void *)&header, 12); in main() 441 header.hcrc = htonl(crc32(header.hcrc, ((void *)&(header)) + 16, in main() [all …]
|
| /u-boot/board/vscom/baltos/ |
| A D | board.c | 99 header->Magic); in read_eeprom() 102 header->SystemId = 211; in read_eeprom() 103 header->MAC1[0] = 0x00; in read_eeprom() 104 header->MAC1[1] = 0x00; in read_eeprom() 105 header->MAC1[2] = 0x00; in read_eeprom() 106 header->MAC1[3] = 0x00; in read_eeprom() 107 header->MAC1[4] = 0x00; in read_eeprom() 108 header->MAC1[5] = 0x01; in read_eeprom() 110 header->MAC2[0] = 0x00; in read_eeprom() 111 header->MAC2[1] = 0x00; in read_eeprom() [all …]
|
| /u-boot/lib/acpi/ |
| A D | acpi_table.c | 38 struct acpi_table_header *header = &dmar->header; in acpi_create_dmar() local 118 memcpy(header->oem_id, OEM_ID, 6); in acpi_fill_header() 120 header->oem_revision = OEM_REVISION; in acpi_fill_header() 179 rsdt->header.checksum = 0; in acpi_add_table() 181 rsdt->header.length); in acpi_add_table() 197 xsdt->header.checksum = 0; in acpi_add_table() 199 xsdt->header.length); in acpi_add_table() 212 struct acpi_table_header *header; in acpi_create_dbg2() local 220 header = &dbg2->header; in acpi_create_dbg2() 223 acpi_fill_header(header, "DBG2"); in acpi_create_dbg2() [all …]
|
| A D | csrt.c | 23 struct acpi_table_header *header; in acpi_write_csrt() local 28 header = &csrt->header; in acpi_write_csrt() 33 acpi_fill_header(header, "CSRT"); in acpi_write_csrt() 34 header->revision = 0; in acpi_write_csrt() 35 acpi_inc(ctx, sizeof(*header)); in acpi_write_csrt() 42 header->length = (ulong)ctx->current - (ulong)csrt; in acpi_write_csrt() 43 header->checksum = table_compute_checksum(csrt, header->length); in acpi_write_csrt()
|
| A D | base.c | 38 struct acpi_table_header *header = &rsdt->header; in acpi_write_rsdt() local 41 acpi_fill_header(header, "RSDT"); in acpi_write_rsdt() 42 header->length = sizeof(struct acpi_rsdt); in acpi_write_rsdt() 43 header->revision = 1; in acpi_write_rsdt() 48 header->checksum = table_compute_checksum(rsdt, in acpi_write_rsdt() 54 struct acpi_table_header *header = &xsdt->header; in acpi_write_xsdt() local 57 acpi_fill_header(header, "XSDT"); in acpi_write_xsdt() 58 header->length = sizeof(struct acpi_xsdt); in acpi_write_xsdt() 59 header->revision = 1; in acpi_write_xsdt() 64 header->checksum = table_compute_checksum(xsdt, in acpi_write_xsdt()
|
| A D | mcfg.c | 37 struct acpi_table_header *header; in acpi_write_mcfg() local 42 header = &mcfg->header; in acpi_write_mcfg() 47 acpi_fill_header(header, "MCFG"); in acpi_write_mcfg() 48 header->length = sizeof(struct acpi_mcfg); in acpi_write_mcfg() 49 header->revision = 1; in acpi_write_mcfg() 57 header->length = (ulong)ctx->current - (ulong)mcfg; in acpi_write_mcfg() 58 header->checksum = table_compute_checksum(mcfg, header->length); in acpi_write_mcfg()
|
| /u-boot/net/ |
| A D | dns.c | 51 struct header *header; in dns_send() local 63 header = (struct header *)pkt; in dns_send() 64 header->tid = 1; in dns_send() 67 header->nanswers = 0; in dns_send() 68 header->nauth = 0; in dns_send() 69 header->nother = 0; in dns_send() 118 struct header *header; in dns_handler() local 135 header = (struct header *)pkt; in dns_handler() 136 if (ntohs(header->nqueries) != 1) in dns_handler() 140 if (header->nanswers == 0) { in dns_handler() [all …]
|
| A D | fastboot_udp.c | 147 switch (header.id) { in fastboot_send() 187 if (header.seq != sequence_number) { in fastboot_send() 229 struct fastboot_header header; in fastboot_handler() local 241 memcpy(&header, packet, sizeof(header)); in fastboot_handler() 242 header.flags = 0; in fastboot_handler() 243 header.seq = ntohs(header.seq); in fastboot_handler() 244 packet += sizeof(header); in fastboot_handler() 245 len -= sizeof(header); in fastboot_handler() 247 switch (header.id) { in fastboot_handler() 256 if (header.seq == sequence_number) { in fastboot_handler() [all …]
|
| A D | pcap.c | 101 struct pcap_packet_header header; in pcap_post() local 110 if ((pos + len + sizeof(header)) >= max_size) { in pcap_post() 116 header.ts_sec = cur_time / 1000000; in pcap_post() 117 header.ts_usec = cur_time % 1000000; in pcap_post() 118 header.incl_len = len; in pcap_post() 119 header.orig_len = len; in pcap_post() 121 memcpy(buf + pos, &header, sizeof(header)); in pcap_post() 122 pos += sizeof(header); in pcap_post()
|
| /u-boot/common/spl/ |
| A D | spl_spi.c | 29 struct legacy_img_hdr *header) in spi_load_image_os() argument 35 (void *)header); in spi_load_image_os() 37 if (image_get_magic(header) != IH_MAGIC) in spi_load_image_os() 40 err = spl_parse_image_header(spl_image, bootdev, header); in spi_load_image_os() 95 struct legacy_img_hdr *header; in spl_spi_load_image() local 114 header = spl_get_load_buffer(-sizeof(*header), sizeof(*header)); in spl_spi_load_image() 127 (void *)header); in spl_spi_load_image() 135 image_get_magic(header) == FDT_MAGIC) { in spl_spi_load_image() 137 roundup(fdt_totalsize(header), 4), in spl_spi_load_image() 144 image_get_magic(header) == FDT_MAGIC) { in spl_spi_load_image() [all …]
|
| A D | spl_nand.c | 81 int offset, struct legacy_img_hdr *header) in spl_nand_load_element() argument 87 err = nand_spl_load_image(offset, sizeof(*header), (void *)header); in spl_nand_load_element() 92 image_get_magic(header) == FDT_MAGIC) { in spl_nand_load_element() 112 image_get_magic(header) == IH_MAGIC) { in spl_nand_load_element() 124 err = spl_parse_image_header(spl_image, bootdev, header); in spl_nand_load_element() 136 struct legacy_img_hdr *header; in spl_nand_load_image() local 147 header = spl_get_load_buffer(0, sizeof(*header)); in spl_nand_load_image() 172 sizeof(*header), (void *)header); in spl_nand_load_image() 176 if (header->ih_os == IH_OS_LINUX) { in spl_nand_load_image() 200 header); in spl_nand_load_image() [all …]
|
| A D | spl_ram.c | 40 struct legacy_img_hdr *header; in spl_ram_load_image() local 43 header = (struct legacy_img_hdr *)CONFIG_SPL_LOAD_FIT_ADDRESS; in spl_ram_load_image() 46 unsigned long addr = (unsigned long)header; in spl_ram_load_image() 53 header = (struct legacy_img_hdr *)addr; in spl_ram_load_image() 62 image_get_magic(header) == FDT_MAGIC) { in spl_ram_load_image() 68 ret = spl_load_simple_fit(spl_image, &load, 0, header); in spl_ram_load_image() 84 u_boot_pos = (ulong)spl_get_load_buffer(-sizeof(*header), in spl_ram_load_image() 85 sizeof(*header)); in spl_ram_load_image() 87 header = (struct legacy_img_hdr *)map_sysmem(u_boot_pos, 0); in spl_ram_load_image() 89 ret = spl_parse_image_header(spl_image, bootdev, header); in spl_ram_load_image()
|
| A D | spl_legacy.c | 36 const struct legacy_img_hdr *header) in spl_parse_legacy_header() argument 42 !image_check_hcrc(header)) { in spl_parse_legacy_header() 53 spl_image->load_addr = image_get_load(header); in spl_parse_legacy_header() 54 spl_image->entry_point = image_get_ep(header); in spl_parse_legacy_header() 55 spl_image->size = image_get_data_size(header); in spl_parse_legacy_header() 57 spl_image->entry_point = image_get_ep(header); in spl_parse_legacy_header() 59 spl_image->load_addr = image_get_load(header) - in spl_parse_legacy_header() 67 spl_image->dcrc_data = image_get_load(header); in spl_parse_legacy_header() 69 spl_image->dcrc = image_get_dcrc(header); in spl_parse_legacy_header() 72 spl_image->os = image_get_os(header); in spl_parse_legacy_header() [all …]
|
| A D | spl_nor.c | 29 __maybe_unused const struct legacy_img_hdr *header; in spl_nor_load_image() local 44 header = (const struct legacy_img_hdr *)CONFIG_SYS_OS_BASE; in spl_nor_load_image() 46 if (image_get_magic(header) == FDT_MAGIC) { in spl_nor_load_image() 55 (void *)header); in spl_nor_load_image() 65 if (image_get_os(header) == IH_OS_LINUX) { in spl_nor_load_image() 69 ret = spl_parse_image_header(spl_image, bootdev, header); in spl_nor_load_image() 95 header = (const struct legacy_img_hdr *)spl_nor_get_uboot_base(); in spl_nor_load_image() 96 if (image_get_magic(header) == FDT_MAGIC) { in spl_nor_load_image() 102 (void *)header); in spl_nor_load_image()
|
| A D | spl_ubi.c | 18 struct legacy_img_hdr *header; in spl_ubi_load_image() local 57 header = (struct legacy_img_hdr *)volumes[0].load_addr; in spl_ubi_load_image() 58 spl_parse_image_header(spl_image, bootdev, header); in spl_ubi_load_image() 65 header = spl_get_load_buffer(-sizeof(*header), sizeof(header)); in spl_ubi_load_image() 74 volumes[0].load_addr = (void *)header; in spl_ubi_load_image() 78 spl_parse_image_header(spl_image, bootdev, header); in spl_ubi_load_image()
|
| /u-boot/arch/x86/lib/ |
| A D | acpi_table.c | 140 header = &madt->header; in acpi_write_madt() 156 header->checksum = table_compute_checksum((void *)madt, header->length); in acpi_write_madt() 186 header = &tcpa->header; in acpi_write_tcpa() 192 header->revision = 1; in acpi_write_tcpa() 205 header->checksum = table_compute_checksum(tcpa, header->length); in acpi_write_tcpa() 243 header = &tpm2->header; in acpi_write_tpm2() 274 header->checksum = table_compute_checksum(tpm2, header->length); in acpi_write_tpm2() 297 header = &spcr->header; in acpi_write_spcr() 408 header->checksum = table_compute_checksum((void *)spcr, header->length); in acpi_write_spcr() 485 struct acpi_table_header *header = &hpet->header; in acpi_create_hpet() local [all …]
|
| /u-boot/lib/ |
| A D | smbios-parser.c | 74 if (header->type == type) in smbios_header() 75 return header; in smbios_header() 77 header = next_header(header); in smbios_header() 89 if (!header) in string_from_smbios_table() 92 pos = ((u8 *)header) + header->length; in string_from_smbios_table() 106 if (!header) in smbios_string() 231 str = smbios_string(header, string_id); in clear_smbios_table() 249 struct smbios_header *header; in smbios_prepare_measurement() local 252 header = smbios_copy; in smbios_prepare_measurement() 257 header = get_next_header(header); in smbios_prepare_measurement() [all …]
|
| /u-boot/board/ti/common/ |
| A D | board_detect.c | 119 if (*((u32 *)ep) != header) in ti_i2c_eeprom_get() 148 if (*((u32 *)ep) != header) in ti_i2c_eeprom_get() 171 if (*((u32 *)ep) != header) in ti_i2c_eeprom_get() 197 if (*((u32 *)ep) != header) in ti_i2c_eeprom_get() 262 ep->header = brdid.header; in ti_emmc_boardid_get() 324 ep->header = am_ep.header; in ti_i2c_eeprom_am_get() 372 ep->header = dra7_ep.header; in ti_i2c_eeprom_dra7_get() 449 record->header.id); in ti_i2c_eeprom_am6_parse_record() 506 sizeof(record.header)); in ti_i2c_eeprom_am6_get() 521 record.header.len); in ti_i2c_eeprom_am6_get() [all …]
|
| /u-boot/fs/cbfs/ |
| A D | cbfs.c | 30 struct cbfs_header header; member 101 node->type = header->type; in fill_node() 103 node->data_length = header->len; in fill_node() 152 struct cbfs_fileheader header; in file_cbfs_next_file() local 170 if (header.offset >= size) in file_cbfs_next_file() 241 struct cbfs_header *header = &priv->header; in load_header() local 248 if (header->magic != good_magic || header->offset > in load_header() 249 header->rom_size - header->boot_block_size) { in load_header() 305 priv->header.align); in cbfs_init() 340 priv->header.align); in cbfs_init_mem() [all …]
|
| /u-boot/common/ |
| A D | bmp.c | 72 if (!((bmp->header.signature[0] == 'B') && in gunzip_bmp() 73 (bmp->header.signature[1] == 'M'))) { in gunzip_bmp() 97 if (!((bmp->header.signature[0] == 'B') && in bmp_info() 98 (bmp->header.signature[1] == 'M'))) in bmp_info() 106 printf("Image size : %d x %d\n", le32_to_cpu(bmp->header.width), in bmp_info() 107 le32_to_cpu(bmp->header.height)); in bmp_info() 108 printf("Bits per pixel: %d\n", le16_to_cpu(bmp->header.bit_count)); in bmp_info() 109 printf("Compression : %d\n", le32_to_cpu(bmp->header.compression)); in bmp_info() 125 if (!((bmp->header.signature[0] == 'B') && in bmp_display() 126 (bmp->header.signature[1] == 'M'))) in bmp_display()
|
| /u-boot/drivers/net/fsl-mc/ |
| A D | dpni.c | 40 cmd.header = mc_encode_cmd_header(DPNI_CMDID_OPEN, in dpni_open() 51 *token = MC_CMD_HDR_READ_TOKEN(cmd.header); in dpni_open() 63 cmd.header = mc_encode_cmd_header(DPNI_CMDID_CLOSE, in dpni_close() 81 cmd.header = mc_encode_cmd_header(DPNI_CMDID_CREATE, in dpni_create() 105 cmd.header = mc_encode_cmd_header(DPNI_CMDID_DESTROY, in dpni_destroy() 124 cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_POOLS, in dpni_set_pools() 140 cmd.header = mc_encode_cmd_header(DPNI_CMDID_ENABLE, in dpni_enable() 155 cmd.header = mc_encode_cmd_header(DPNI_CMDID_DISABLE, in dpni_disable() 170 cmd.header = mc_encode_cmd_header(DPNI_CMDID_RESET, in dpni_reset() 187 cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_ATTR, in dpni_get_attributes() [all …]
|
| A D | dpbp.c | 21 cmd.header = mc_encode_cmd_header(DPBP_CMDID_OPEN, in dpbp_open() 32 *token = MC_CMD_HDR_READ_TOKEN(cmd.header); in dpbp_open() 44 cmd.header = mc_encode_cmd_header(DPBP_CMDID_CLOSE, cmd_flags, in dpbp_close() 63 cmd.header = mc_encode_cmd_header(DPBP_CMDID_CREATE, in dpbp_create() 86 cmd.header = mc_encode_cmd_header(DPBP_CMDID_DESTROY, in dpbp_destroy() 104 cmd.header = mc_encode_cmd_header(DPBP_CMDID_ENABLE, cmd_flags, in dpbp_enable() 118 cmd.header = mc_encode_cmd_header(DPBP_CMDID_DISABLE, in dpbp_disable() 133 cmd.header = mc_encode_cmd_header(DPBP_CMDID_RESET, in dpbp_reset() 150 cmd.header = mc_encode_cmd_header(DPBP_CMDID_GET_ATTR, in dpbp_get_attributes() 174 cmd.header = mc_encode_cmd_header(DPBP_CMDID_GET_API_VERSION, in dpbp_get_api_version()
|
| /u-boot/cmd/ |
| A D | cbfs.c | 206 const struct cbfs_header *header = file_cbfs_get_header(); in do_cbfs_fsinfo() local 208 if (!header) { in do_cbfs_fsinfo() 214 printf("CBFS version: %#x\n", header->version); in do_cbfs_fsinfo() 215 printf("ROM size: %#x\n", header->rom_size); in do_cbfs_fsinfo() 216 printf("Boot block size: %#x\n", header->boot_block_size); in do_cbfs_fsinfo() 218 header->rom_size - header->boot_block_size - header->offset); in do_cbfs_fsinfo() 219 printf("Alignment: %d\n", header->align); in do_cbfs_fsinfo() 220 printf("Offset: %#x\n", header->offset); in do_cbfs_fsinfo()
|