1
0

archsup.S 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*++
  2. Copyright (c) 2014 Minoca Corp. All Rights Reserved
  3. Module Name:
  4. archsup.S
  5. Abstract:
  6. This module architecture specific support routines.
  7. Author:
  8. Evan Green 7-Apr-2014
  9. Environment:
  10. Firmware
  11. --*/
  12. ##
  13. ## ------------------------------------------------------------------ Includes
  14. ##
  15. #include <minoca/kernel/x86.inc>
  16. ##
  17. ## ---------------------------------------------------------------------- Code
  18. ##
  19. ##
  20. ## .text specifies that this code belongs in the executable section.
  21. ##
  22. ## .code32 specifies that this is 32-bit protected mode code.
  23. ##
  24. .text
  25. .code32
  26. ##
  27. ## VOID
  28. ## EfiMemoryBarrier (
  29. ## VOID
  30. ## )
  31. ##
  32. /*++
  33. Routine Description:
  34. This routine provides a full memory barrier, ensuring that all memory
  35. accesses occurring before this function complete before any memory accesses
  36. after this function start.
  37. Arguments:
  38. None.
  39. Return Value:
  40. None.
  41. --*/
  42. FUNCTION(EfiMemoryBarrier)
  43. sub $4, %esp
  44. lock add $1, (%esp)
  45. add $4, %esp
  46. ret
  47. END_FUNCTION(EfiMemoryBarrier)
  48. ##
  49. ## --------------------------------------------------------- Internal Functions
  50. ##