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 635B

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