generic-loader.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Generic Loader
  3. *
  4. * Copyright (C) 2014 Li Guang
  5. * Written by Li Guang <lig.fnst@cn.fujitsu.com>
  6. *
  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.
  11. *
  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.
  16. */
  17. #ifndef GENERIC_LOADER_H
  18. #define GENERIC_LOADER_H
  19. #include "elf.h"
  20. #include "hw/qdev-core.h"
  21. #include "qom/object.h"
  22. struct GenericLoaderState {
  23. /* <private> */
  24. DeviceState parent_obj;
  25. /* <public> */
  26. CPUState *cpu;
  27. uint64_t addr;
  28. uint64_t data;
  29. uint8_t data_len;
  30. uint32_t cpu_num;
  31. char *file;
  32. bool force_raw;
  33. bool data_be;
  34. bool set_pc;
  35. };
  36. #define TYPE_GENERIC_LOADER "loader"
  37. OBJECT_DECLARE_SIMPLE_TYPE(GenericLoaderState, GENERIC_LOADER)
  38. #endif