qcow2: Don't open images with header.refcount_table_clusters == 0
[qemu/ar7.git] / include / hw / core / generic-loader.h
blobdd27c42ab03abe2ae12c066dc8c87419c1c4fe86
1 /*
2 * Generic Loader
4 * Copyright (C) 2014 Li Guang
5 * Written by Li Guang <lig.fnst@cn.fujitsu.com>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 * for more details.
18 #ifndef GENERIC_LOADER_H
19 #define GENERIC_LOADER_H
21 #include "elf.h"
23 typedef struct GenericLoaderState {
24 /* <private> */
25 DeviceState parent_obj;
27 /* <public> */
28 CPUState *cpu;
30 uint64_t addr;
31 uint64_t data;
32 uint8_t data_len;
33 uint32_t cpu_num;
35 char *file;
37 bool force_raw;
38 bool data_be;
39 bool set_pc;
40 } GenericLoaderState;
42 #define TYPE_GENERIC_LOADER "loader"
43 #define GENERIC_LOADER(obj) OBJECT_CHECK(GenericLoaderState, (obj), \
44 TYPE_GENERIC_LOADER)
46 #endif