summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-11 01:32:17 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-11 01:32:17 +0000
commit8d579453d36a1711a4ace1e6937c6c7d40fb6176 (patch)
tree2ba4f3b5267edc75488c6a829f1ccc97953a37a6
parent6ed623e4035d87e7db43677729b23844ef0e9a0d (diff)
downloadedk2-8d579453d36a1711a4ace1e6937c6c7d40fb6176.tar.gz
edk2-8d579453d36a1711a4ace1e6937c6c7d40fb6176.tar.bz2
edk2-8d579453d36a1711a4ace1e6937c6c7d40fb6176.zip
add the extra comments into BasePeCoffRelocateImage, BasePeCoffLoadImage and BasePeCoffRelocateImageForRuntime to help user to know the usage model of these APIs.
The comments mainly used to clarify it's caller's responsibility to to perform cache maintenance operations git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8283 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdePkg/Include/Library/PeCoffLib.h12
-rw-r--r--MdePkg/Library/BasePeCoffLib/BasePeCoff.c12
2 files changed, 24 insertions, 0 deletions
diff --git a/MdePkg/Include/Library/PeCoffLib.h b/MdePkg/Include/Library/PeCoffLib.h
index 9dab2e453a..ef4a3a4a2f 100644
--- a/MdePkg/Include/Library/PeCoffLib.h
+++ b/MdePkg/Include/Library/PeCoffLib.h
@@ -237,6 +237,10 @@ PeCoffLoaderGetImageInfo (
If ImageContext is NULL, then ASSERT().
+ Note that if the platform does not maintain coherency between the instruction cache(s) and the data
+ cache(s) in hardware, then the caller is responsible for performing cache maintenance operations
+ prior to transferring control to a PE/COFF image that is loaded using this library.
+
@param ImageContext Pointer to the image context structure that describes the PE/COFF
image that is being relocated.
@@ -267,6 +271,10 @@ PeCoffLoaderRelocateImage (
If ImageContext is NULL, then ASSERT().
+ Note that if the platform does not maintain coherency between the instruction cache(s) and the data
+ cache(s) in hardware, then the caller is responsible for performing cache maintenance operations
+ prior to transferring control to a PE/COFF image that is loaded using this library.
+
@param ImageContext Pointer to the image context structure that describes the PE/COFF
image that is being loaded.
@@ -331,6 +339,10 @@ PeCoffLoaderImageReadFromMemory (
to the FiuxupData buffer from the PE_COFF_LOADER_IMAGE_CONTEXT structure
after this PE/COFF image was relocated with PeCoffLoaderRelocateImage().
+ Note that if the platform does not maintain coherency between the instruction cache(s) and the data
+ cache(s) in hardware, then the caller is responsible for performing cache maintenance operations
+ prior to transferring control to a PE/COFF image that is loaded using this library.
+
@param ImageBase Base address of a PE/COFF image that has been loaded
and relocated into system memory.
@param VirtImageBase The request virtual address that the PE/COFF image is to
diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
index fcdf0c6647..d9359e9892 100644
--- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
+++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
@@ -495,6 +495,10 @@ PeCoffLoaderImageAddress (
If ImageContext is NULL, then ASSERT().
+ Note that if the platform does not maintain coherency between the instruction cache(s) and the data
+ cache(s) in hardware, then the caller is responsible for performing cache maintenance operations
+ prior to transferring control to a PE/COFF image that is loaded using this library.
+
@param ImageContext Pointer to the image context structure that describes the PE/COFF
image that is being relocated.
@@ -761,6 +765,10 @@ PeCoffLoaderRelocateImage (
If ImageContext is NULL, then ASSERT().
+ Note that if the platform does not maintain coherency between the instruction cache(s) and the data
+ cache(s) in hardware, then the caller is responsible for performing cache maintenance operations
+ prior to transferring control to a PE/COFF image that is loaded using this library.
+
@param ImageContext Pointer to the image context structure that describes the PE/COFF
image that is being loaded.
@@ -1231,6 +1239,10 @@ PeCoffLoaderLoadImage (
to the FiuxupData buffer from the PE_COFF_LOADER_IMAGE_CONTEXT structure
after this PE/COFF image was relocated with PeCoffLoaderRelocateImage().
+ Note that if the platform does not maintain coherency between the instruction cache(s) and the data
+ cache(s) in hardware, then the caller is responsible for performing cache maintenance operations
+ prior to transferring control to a PE/COFF image that is loaded using this library.
+
@param ImageBase Base address of a PE/COFF image that has been loaded
and relocated into system memory.
@param VirtImageBase The request virtual address that the PE/COFF image is to