summaryrefslogtreecommitdiff
path: root/UnixPkg
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-16 05:28:50 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-07-16 05:28:50 +0000
commit73aa7f049bcc615f1a09dae29ec9a89cacd27420 (patch)
treea9ce2d363c2d51598f6c323d1113bc38d54e5acd /UnixPkg
parent19efd9ec947b56397e24195144bddd8a89a16fd1 (diff)
downloadedk2-platforms-73aa7f049bcc615f1a09dae29ec9a89cacd27420.tar.xz
merge the generation of SecMain into the whole build process.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5491 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UnixPkg')
-rw-r--r--UnixPkg/Sec/SecMain.c12
-rw-r--r--UnixPkg/Sec/SecMain.inf8
-rw-r--r--UnixPkg/Sec/UnixThunk.c8
-rw-r--r--UnixPkg/UnixPkg.dsc4
4 files changed, 17 insertions, 15 deletions
diff --git a/UnixPkg/Sec/SecMain.c b/UnixPkg/Sec/SecMain.c
index bfa44e7a17..2f2a1d26a2 100644
--- a/UnixPkg/Sec/SecMain.c
+++ b/UnixPkg/Sec/SecMain.c
@@ -53,17 +53,17 @@ EFI_PEI_PE_COFF_LOADER_PROTOCOL_INSTANCE mPeiEfiPeiPeCoffLoaderInstance = {
-EFI_PEI_PE_COFF_LOADER_PROTOCOL *gPeiEfiPeiPeCoffLoader = &mPeiEfiPeiPeCoffLoaderInstance.PeCoff;
+EFI_PEI_PE_COFF_LOADER_PROTOCOL *gPeiEfiPeiPeCoffLoader = &mPeiEfiPeiPeCoffLoaderInstance.PeCoff;
-UNIX_PEI_LOAD_FILE_PPI mSecNtLoadFilePpi = { SecWinNtPeiLoadFile };
+UNIX_PEI_LOAD_FILE_PPI mSecNtLoadFilePpi = { SecWinNtPeiLoadFile };
-PEI_UNIX_AUTOSCAN_PPI mSecNtAutoScanPpi = { SecWinNtPeiAutoScan };
+PEI_UNIX_AUTOSCAN_PPI mSecNtAutoScanPpi = { SecWinNtPeiAutoScan };
-PEI_UNIX_THUNK_PPI mSecWinNtThunkPpi = { SecWinNtWinNtThunkAddress };
+PEI_UNIX_THUNK_PPI mSecWinNtThunkPpi = { SecWinNtWinNtThunkAddress };
-EFI_PEI_PROGRESS_CODE_PPI mSecStatusCodePpi = { SecPeiReportStatusCode };
+EFI_PEI_PROGRESS_CODE_PPI mSecStatusCodePpi = { SecPeiReportStatusCode };
-UNIX_FWH_PPI mSecFwhInformationPpi = { SecWinNtFdAddress };
+UNIX_FWH_PPI mSecFwhInformationPpi = { SecWinNtFdAddress };
TEMPORARY_RAM_SUPPORT_PPI mSecTemporaryRamSupportPpi = {SecTemporaryRamSupport};
diff --git a/UnixPkg/Sec/SecMain.inf b/UnixPkg/Sec/SecMain.inf
index 37152b08e7..f3c00e8b06 100644
--- a/UnixPkg/Sec/SecMain.inf
+++ b/UnixPkg/Sec/SecMain.inf
@@ -18,7 +18,7 @@
INF_VERSION = 0x00010005
BASE_NAME = SecMain
FILE_GUID = f43be88c-8985-11db-8f78-0040d02b1835
- MODULE_TYPE = SEC
+ MODULE_TYPE = USER_DEFINED
VERSION_STRING = 1.0
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
@@ -73,4 +73,8 @@
gEfiUnixPkgTokenSpaceGuid.PcdUnixFirmwareFdSize
[BuildOptions.common]
- GCC:*_*_IA32_DLINK_FLAGS =
+ GCC:*_*_IA32_DLINK_FLAGS = -o $(BIN_DIR)/SecMain.exe -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o -L/usr/X11R6/lib -lXext -lX11 /usr/lib/crtn.o
+ GCC:*_*_*_DLINK2_FLAGS = -lc
+ GCC:*_*_IA32_CC_FLAGS = -m32 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -idirafter/usr/include -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
+ GCC:*_*_IA32_PP_FLAGS = -m32 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
+ GCC:*_*_IA32_ASM_FLAGS = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
diff --git a/UnixPkg/Sec/UnixThunk.c b/UnixPkg/Sec/UnixThunk.c
index 500568ad52..44dfb1682f 100644
--- a/UnixPkg/Sec/UnixThunk.c
+++ b/UnixPkg/Sec/UnixThunk.c
@@ -58,6 +58,7 @@ VOID
SetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs))
{
struct itimerval timerval;
+ UINT32 remainder;
if (!settimer_initialized) {
struct sigaction act;
@@ -73,9 +74,10 @@ SetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs))
printf ("SetTimer: gettimeofday error %s\n", strerror (errno));
}
}
- timerval.it_value.tv_sec = PeriodMs / 1000;
- timerval.it_value.tv_usec = (PeriodMs % 1000) * 1000;
- timerval.it_value.tv_sec = PeriodMs / 1000;
+ timerval.it_value.tv_sec = DivU64x32(PeriodMs, 1000);
+ DivU64x32Remainder(PeriodMs, 1000, &remainder);
+ timerval.it_value.tv_usec = remainder * 1000;
+ timerval.it_value.tv_sec = DivU64x32(PeriodMs, 1000);
timerval.it_interval = timerval.it_value;
if (setitimer (ITIMER_REAL, &timerval, NULL) != 0) {
diff --git a/UnixPkg/UnixPkg.dsc b/UnixPkg/UnixPkg.dsc
index 7db8d82fc1..77fa2ebb1a 100644
--- a/UnixPkg/UnixPkg.dsc
+++ b/UnixPkg/UnixPkg.dsc
@@ -490,7 +490,3 @@
<LibraryClasses>
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
}
-
-[BuildOptions]
- DEBUG_*_IA32_DLINK_FLAGS = --shared
- *_*_IA32_CC_FLAGS = -idirafter/usr/include