You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

basemem.h 594B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _BASEMEM_H
  2. #define _BASEMEM_H
  3. /** @file
  4. *
  5. * Base memory allocation
  6. *
  7. */
  8. #include <stdint.h>
  9. #include <realmode.h>
  10. #include <bios.h>
  11. /**
  12. * Read the BIOS free base memory counter
  13. *
  14. * @ret fbms Free base memory counter (in kB)
  15. */
  16. static inline unsigned int get_fbms ( void ) {
  17. uint16_t fbms;
  18. get_real ( fbms, BDA_SEG, BDA_FBMS );
  19. return fbms;
  20. }
  21. extern void set_fbms ( unsigned int new_fbms );
  22. /* Actually in hidemem.c, but putting it here avoids polluting the
  23. * architecture-independent include/hidemem.h.
  24. */
  25. extern void hide_basemem ( void );
  26. #endif /* _BASEMEM_H */