MAINTAINERS: Make section QOM cover hw/core/*bus.c as well
[qemu/armbru.git] / include / hw / core / generic-loader.h
blob9ffce1c5a30c464083f01d4e185a87cee113693b
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"
22 #include "hw/qdev-core.h"
24 typedef struct GenericLoaderState {
25 /* <private> */
26 DeviceState parent_obj;
28 /* <public> */
29 CPUState *cpu;
31 uint64_t addr;
32 uint64_t data;
33 uint8_t data_len;
34 uint32_t cpu_num;
36 char *file;
38 bool force_raw;
39 bool data_be;
40 bool set_pc;
41 } GenericLoaderState;
43 #define TYPE_GENERIC_LOADER "loader"
44 #define GENERIC_LOADER(obj) OBJECT_CHECK(GenericLoaderState, (obj), \
45 TYPE_GENERIC_LOADER)
47 #endif