kmessage.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (c) 2024 Agustina Arzille.
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. *
  17. * Definitions for kernel messages.
  18. */
  19. #ifndef KERN_KMSG_H
  20. #define KERN_KMSG_H 1
  21. #include <stdint.h>
  22. enum
  23. {
  24. KMSG_TYPE_PAGE_REQ = 1,
  25. KMSG_TYPE_MMAP_REQ,
  26. };
  27. struct kmessage
  28. {
  29. int type;
  30. int msg_flags;
  31. union
  32. {
  33. struct
  34. {
  35. uint64_t start;
  36. uint64_t end;
  37. } page_req;
  38. struct
  39. {
  40. uintptr_t tag;
  41. uint64_t offset;
  42. int prot;
  43. int flags;
  44. } mmap_req;
  45. };
  46. };
  47. #endif