sandbox_fuzzing_engine.c 794 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (c) 2022 Google, Inc.
  4. * Written by Andrew Scull <ascull@google.com>
  5. */
  6. #include <common.h>
  7. #include <dm.h>
  8. #include <fuzzing_engine.h>
  9. #include <asm/fuzzing_engine.h>
  10. static int get_input(struct udevice *dev,
  11. const uint8_t **data,
  12. size_t *size)
  13. {
  14. return sandbox_fuzzing_engine_get_input(data, size);
  15. }
  16. static const struct dm_fuzzing_engine_ops sandbox_fuzzing_engine_ops = {
  17. .get_input = get_input,
  18. };
  19. static const struct udevice_id sandbox_fuzzing_engine_match[] = {
  20. {
  21. .compatible = "sandbox,fuzzing-engine",
  22. },
  23. {},
  24. };
  25. U_BOOT_DRIVER(sandbox_fuzzing_engine) = {
  26. .name = "sandbox-fuzzing-engine",
  27. .id = UCLASS_FUZZING_ENGINE,
  28. .of_match = sandbox_fuzzing_engine_match,
  29. .ops = &sandbox_fuzzing_engine_ops,
  30. };