]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EADK (StdLib, AppPkg, StdLibPrivateInternalFiles): Python Beta Release.
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 24 Mar 2012 01:19:06 +0000 (01:19 +0000)
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 24 Mar 2012 01:19:06 +0000 (01:19 +0000)
Clean up and clearly differentiate required and optional items in configuration files.
Enable the system command and synchronize configuration options between all CPU architectures.
Replace the UEFI_ENV macro with UEFI_C_SOURCE to align with Linux and Posix conventions.
Update copyrights and versions and make minor cosmetic enhancements to files.
Fix compiler-specific build errors.
Add Python-specific ReadMe file.

Signed-off-by: darylm503
Reviewed-by: geekboy15a
Reviewed-by: jljusten
Reviewed-by: leegrosenbaum
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13119 6f19259b-4bc3-4df7-8a09-765794883524

21 files changed:
AppPkg/AppPkg.dsc
AppPkg/Applications/Python/Efi/config.c
AppPkg/Applications/Python/Efi/edk2module.c
AppPkg/Applications/Python/Ia32/pyconfig.h
AppPkg/Applications/Python/Ipf/pyconfig.h
AppPkg/Applications/Python/PyMod-2.7.2/Include/osdefs.h
AppPkg/Applications/Python/PyMod-2.7.2/Modules/selectmodule.c
AppPkg/Applications/Python/PyMod-2.7.2/Modules/socketmodule.h
AppPkg/Applications/Python/PyMod-2.7.2/Modules/zlib/zutil.h
AppPkg/Applications/Python/PythonCore.inf
AppPkg/Applications/Python/PythonReadMe.txt [new file with mode: 0644]
AppPkg/Applications/Python/X64/pyconfig.h
StdLib/Include/Ia32/machine/param.h
StdLib/Include/Ipf/machine/param.h
StdLib/Include/X64/machine/param.h
StdLib/Include/sys/EfiCdefs.h
StdLib/LibC/Main/Main.c
StdLib/LibC/gdtoa/strtod.c
StdLib/LibC/gdtoa/strtodg.c
StdLib/StdLib.inc
StdLibPrivateInternalFiles/Include/extern.h

index 60ff05fa4169f0e7268f25cbab65f021c1f9e66a..23ebf4773391aa954cefde561949f189adc48cd0 100644 (file)
@@ -7,7 +7,7 @@
 #   for important information about configuring this package for your\r
 #   environment.\r
 #\r
 #   for important information about configuring this package for your\r
 #   environment.\r
 #\r
-#   Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+#   Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
 #   This program and the accompanying materials\r
 #   are licensed and made available under the terms and conditions of the BSD License\r
 #   which accompanies this distribution. The full text of the license may be found at\r
 #   This program and the accompanying materials\r
 #   are licensed and made available under the terms and conditions of the BSD License\r
 #   which accompanies this distribution. The full text of the license may be found at\r
@@ -30,8 +30,8 @@
 [PcdsFeatureFlag]\r
 \r
 [PcdsFixedAtBuild]\r
 [PcdsFeatureFlag]\r
 \r
 [PcdsFixedAtBuild]\r
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0f\r
-  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000000\r
+  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x00\r
+  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000040\r
 \r
 [PcdsFixedAtBuild.IPF]\r
 \r
 \r
 [PcdsFixedAtBuild.IPF]\r
 \r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf\r
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf\r
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf\r
+  #\r
+  # To enable debugging:\r
+  #   Enable ONE of the following DebugLib instances, as appropriate for your platform.\r
+  #\r
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
   DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf\r
+#  DebugLib|MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf\r
+\r
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf\r
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf\r
   PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf\r
   IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r
 #### Sample Applications.\r
   AppPkg/Applications/Hello/Hello.inf        # No LibC includes or functions.\r
   AppPkg/Applications/Main/Main.inf          # Simple invocation. No other LibC functions.\r
 #### Sample Applications.\r
   AppPkg/Applications/Hello/Hello.inf        # No LibC includes or functions.\r
   AppPkg/Applications/Main/Main.inf          # Simple invocation. No other LibC functions.\r
-  AppPkg/Applications/Enquire/Enquire.inf\r
+  AppPkg/Applications/Enquire/Enquire.inf    #\r
 \r
 #### After extracting the Python distribution, un-comment the following line to build Python.\r
 #  AppPkg/Applications/Python/PythonCore.inf\r
 \r
 #### After extracting the Python distribution, un-comment the following line to build Python.\r
 #  AppPkg/Applications/Python/PythonCore.inf\r
index 4d7ae06c018566507b432d289dc532dcfad8615d..2fd6019abd73e11c8dc5a717076c7b4f74277436 100644 (file)
@@ -75,43 +75,31 @@ extern void initselect(void);
 \r
 extern void PyMarshal_Init(void);\r
 extern void initimp(void);\r
 \r
 extern void PyMarshal_Init(void);\r
 extern void initimp(void);\r
+extern void initunicodedata(void);\r
+extern void init_ctypes(void);\r
 \r
 struct _inittab _PyImport_Inittab[] = {\r
 \r
     //{"_ast", init_ast},\r
 \r
 struct _inittab _PyImport_Inittab[] = {\r
 \r
     //{"_ast", init_ast},\r
-    //{"_bisect", init_bisect},\r
-    //{"_codecs", init_codecs},\r
-    //{"_collections", init_collections},\r
-    //{"_functools", init_functools},\r
-    //{"_heapq", init_heapq},\r
+    //{"_bisect", init_bisect},                   /* A fast version of bisect.py */\r
+    //{"_heapq", init_heapq},                     /* A fast version of heapq.py */\r
     //{"_io", init_io},\r
     //{"_json", init_json},\r
     //{"_md5", init_md5},\r
     //{"_io", init_io},\r
     //{"_json", init_json},\r
     //{"_md5", init_md5},\r
-    //{"_random", init_random},\r
     //{"_sha", init_sha},\r
     //{"_sha256", init_sha256},\r
     //{"_sha512", init_sha512},\r
     //{"_socket", init_socket},\r
     //{"_sha", init_sha},\r
     //{"_sha256", init_sha256},\r
     //{"_sha512", init_sha512},\r
     //{"_socket", init_socket},\r
-    //{"_sre", init_sre},\r
-    //{"_struct", init_struct},\r
-    //{"_weakref", init_weakref},\r
 \r
     //{"array", initarray},\r
 \r
     //{"array", initarray},\r
-    //{"binascii", initbinascii},\r
     //{"cmath", initcmath},\r
     //{"cPickle", initcPickle},\r
     //{"cmath", initcmath},\r
     //{"cPickle", initcPickle},\r
-    //{"cStringIO", initcStringIO},\r
     //{"datetime", initdatetime},\r
     //{"future_builtins", initfuture_builtins},\r
     //{"datetime", initdatetime},\r
     //{"future_builtins", initfuture_builtins},\r
-    //{"gc", initgc},\r
-    //{"itertools", inititertools},\r
-    //{"math", initmath},\r
-    //{"operator", initoperator},\r
     //{"parser", initparser},\r
     //{"select", initselect},\r
     //{"signal", initsignal},\r
     //{"parser", initparser},\r
     //{"select", initselect},\r
     //{"signal", initsignal},\r
-    //{"strop", initstrop},\r
-    //{"time", inittime},\r
+    //{"strop", initstrop},                       /* redefines some string operations that are 100-1000 times faster */\r
     //{"xxsubtype", initxxsubtype},\r
     //{"zipimport", initzipimport},\r
     //{"zlib", initzlib},\r
     //{"xxsubtype", initxxsubtype},\r
     //{"zipimport", initzipimport},\r
     //{"zlib", initzlib},\r
@@ -129,10 +117,24 @@ struct _inittab _PyImport_Inittab[] = {
     {"thread", initthread},\r
 #endif\r
 \r
     {"thread", initthread},\r
 #endif\r
 \r
-#if 0\r
-    {"_symtable", init_symtable},\r
-    {"_csv", init_csv},\r
-#endif\r
+    //{"_symtable", init_symtable},\r
+    //{"_csv", init_csv},\r
+\r
+    /* These modules are required for the full built-in help() facility provided by pydoc. */\r
+    {"_codecs", init_codecs},\r
+    {"_collections", init_collections},\r
+    {"_functools", init_functools},\r
+    {"_random", init_random},\r
+    {"_sre", init_sre},\r
+    {"_struct", init_struct},                   /* Required by the logging package. */\r
+    {"_weakref", init_weakref},\r
+    {"binascii", initbinascii},\r
+    {"cStringIO", initcStringIO},               /* Required by several modules, such as logging. */\r
+    {"gc", initgc},\r
+    {"itertools", inititertools},\r
+    {"math", initmath},\r
+    {"operator", initoperator},\r
+    {"time", inittime},\r
 \r
     /* These four modules should always be built in. */\r
     {"edk2", initedk2},\r
 \r
     /* These four modules should always be built in. */\r
     {"edk2", initedk2},\r
index 451bf473beb4ca3e85e0bafff0e48784027ecbfd..edc9c867f11a541b478f81a5858b03ef65562e20 100644 (file)
@@ -2,7 +2,7 @@
     OS-specific module implementation for EDK II and UEFI.\r
     Derived from posixmodule.c in Python 2.7.2.\r
 \r
     OS-specific module implementation for EDK II and UEFI.\r
     Derived from posixmodule.c in Python 2.7.2.\r
 \r
-    Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+    Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
@@ -155,7 +155,7 @@ corresponding Unix manual entries for more information on calls.");
 /* dummy version. _PyVerify_fd() is already defined in fileobject.h */\r
 #define _PyVerify_fd_dup2(A, B) (1)\r
 \r
 /* dummy version. _PyVerify_fd() is already defined in fileobject.h */\r
 #define _PyVerify_fd_dup2(A, B) (1)\r
 \r
-#ifndef UEFI_ENV\r
+#ifndef UEFI_C_SOURCE\r
 /* Return a dictionary corresponding to the POSIX environment table */\r
 extern char **environ;\r
 \r
 /* Return a dictionary corresponding to the POSIX environment table */\r
 extern char **environ;\r
 \r
@@ -196,7 +196,7 @@ convertenviron(void)
     }\r
     return d;\r
 }\r
     }\r
     return d;\r
 }\r
-#endif  /* UEFI_ENV */\r
+#endif  /* UEFI_C_SOURCE */\r
 \r
 /* Set a POSIX-specific error from errno, and return NULL */\r
 \r
 \r
 /* Set a POSIX-specific error from errno, and return NULL */\r
 \r
@@ -372,7 +372,7 @@ static PyStructSequence_Desc stat_result_desc = {
     10\r
 };\r
 \r
     10\r
 };\r
 \r
-#ifndef UEFI_ENV   /* Not in UEFI */\r
+#ifndef UEFI_C_SOURCE   /* Not in UEFI */\r
 PyDoc_STRVAR(statvfs_result__doc__,\r
 "statvfs_result: Result from statvfs or fstatvfs.\n\n\\r
 This object may be accessed either as a tuple of\n\\r
 PyDoc_STRVAR(statvfs_result__doc__,\r
 "statvfs_result: Result from statvfs or fstatvfs.\n\n\\r
 This object may be accessed either as a tuple of\n\\r
@@ -433,7 +433,7 @@ statresult_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 \r
 \r
 /* If true, st_?time is float. */\r
 \r
 \r
 /* If true, st_?time is float. */\r
-#if defined(UEFI_ENV)\r
+#if defined(UEFI_C_SOURCE)\r
   static int _stat_float_times = 0;\r
 #else\r
   static int _stat_float_times = 1;\r
   static int _stat_float_times = 0;\r
 #else\r
   static int _stat_float_times = 1;\r
@@ -7349,14 +7349,14 @@ INITFUNC(void)
     if (m == NULL)\r
         return;\r
 \r
     if (m == NULL)\r
         return;\r
 \r
-#ifndef UEFI_ENV\r
+#ifndef UEFI_C_SOURCE\r
     /* Initialize environ dictionary */\r
     v = convertenviron();\r
     Py_XINCREF(v);\r
     if (v == NULL || PyModule_AddObject(m, "environ", v) != 0)\r
         return;\r
     Py_DECREF(v);\r
     /* Initialize environ dictionary */\r
     v = convertenviron();\r
     Py_XINCREF(v);\r
     if (v == NULL || PyModule_AddObject(m, "environ", v) != 0)\r
         return;\r
     Py_DECREF(v);\r
-#endif  /* UEFI_ENV */\r
+#endif  /* UEFI_C_SOURCE */\r
 \r
     if (all_ins(m))\r
         return;\r
 \r
     if (all_ins(m))\r
         return;\r
index 6b05e4e161d51c0a24aeda481b14a9f078945bf2..67f9d33f351edcc40135da78e691042e6baacc18 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
     Manually generated Python Configuration file for EDK II.\r
 \r
 /** @file\r
     Manually generated Python Configuration file for EDK II.\r
 \r
-    Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+    Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
 \r
 #include  <Uefi.h>\r
 \r
 \r
 #include  <Uefi.h>\r
 \r
-/* Define to indicate that code is being built to run in the UEFI Environment. */\r
-#define UEFI_ENV    EFI_SYSTEM_TABLE_REVISION\r
-\r
-#define PLATFORM    "UEFI"\r
+#define PLATFORM    "uefi"\r
 \r
 /* Define if building universal (internal helper macro) */\r
 #undef AC_APPLE_UNIVERSAL_BUILD\r
 \r
 /* Define if building universal (internal helper macro) */\r
 #undef AC_APPLE_UNIVERSAL_BUILD\r
 /* Define to 1 if you have the <sys/wait.h> header file. */\r
 #undef HAVE_SYS_WAIT_H\r
 \r
 /* Define to 1 if you have the <sys/wait.h> header file. */\r
 #undef HAVE_SYS_WAIT_H\r
 \r
+/* Define to 1 if you have the system() command. */\r
+#define HAVE_SYSTEM       1\r
+\r
 /* Define to 1 if you have the `tcgetpgrp' function. */\r
 #undef HAVE_TCGETPGRP\r
 \r
 /* Define to 1 if you have the `tcgetpgrp' function. */\r
 #undef HAVE_TCGETPGRP\r
 \r
 #define PACKAGE_NAME    "EDK II Python Package"\r
 \r
 /* Define to the full name and version of this package. */\r
 #define PACKAGE_NAME    "EDK II Python Package"\r
 \r
 /* Define to the full name and version of this package. */\r
-#define PACKAGE_STRING  "EDK II Python Package V0.2"\r
+#define PACKAGE_STRING  "EDK II Python Package V0.8"\r
 \r
 /* Define to the one symbol short name of this package. */\r
 #define PACKAGE_TARNAME   "EADK_Python"\r
 \r
 /* Define to the one symbol short name of this package. */\r
 #define PACKAGE_TARNAME   "EADK_Python"\r
 #define PACKAGE_URL   "http://edk2.tianocore.org/toolkit/python"\r
 \r
 /* Define to the version of this package. */\r
 #define PACKAGE_URL   "http://edk2.tianocore.org/toolkit/python"\r
 \r
 /* Define to the version of this package. */\r
-#define PACKAGE_VERSION  "V0.2"\r
+#define PACKAGE_VERSION  "V0.8"\r
 \r
 /* Define if POSIX semaphores aren't enabled on your system */\r
 #define POSIX_SEMAPHORES_NOT_ENABLED    1\r
 \r
 /* Define if POSIX semaphores aren't enabled on your system */\r
 #define POSIX_SEMAPHORES_NOT_ENABLED    1\r
 \r
 /* Define if you want wctype.h functions to be used instead of the one\r
    supplied by Python itself. (see Include/unicodectype.h). */\r
 \r
 /* Define if you want wctype.h functions to be used instead of the one\r
    supplied by Python itself. (see Include/unicodectype.h). */\r
-#undef WANT_WCTYPE_FUNCTIONS\r
+#define WANT_WCTYPE_FUNCTIONS   1\r
 \r
 /* Define if WINDOW in curses.h offers a field _flags. */\r
 #undef WINDOW_HAS_FLAGS\r
 \r
 /* Define if WINDOW in curses.h offers a field _flags. */\r
 #undef WINDOW_HAS_FLAGS\r
 #undef _MINIX\r
 \r
 /* Define on NetBSD to activate all library features */\r
 #undef _MINIX\r
 \r
 /* Define on NetBSD to activate all library features */\r
-#define _NETBSD_SOURCE\r
+#ifndef _NETBSD_SOURCE\r
+  #define _NETBSD_SOURCE  1\r
+#endif\r
 \r
 /* Define _OSF_SOURCE to get the makedev macro. */\r
 #undef _OSF_SOURCE\r
 \r
 /* Define _OSF_SOURCE to get the makedev macro. */\r
 #undef _OSF_SOURCE\r
index 3d8d03bd22dd33425ca3c3e2bf84df55b6314ef6..5b0602405bf004494f38be2e4a699c48fa2ce40b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
     Manually generated Python Configuration file for EDK II.\r
 \r
 /** @file\r
     Manually generated Python Configuration file for EDK II.\r
 \r
-    Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+    Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
 \r
 #include  <Uefi.h>\r
 \r
 \r
 #include  <Uefi.h>\r
 \r
-/* Define to indicate that code is being built to run in the UEFI Environment. */\r
-#define UEFI_ENV    EFI_SYSTEM_TABLE_REVISION\r
-\r
-#define PLATFORM    "UEFI"\r
+#define PLATFORM    "uefi"\r
 \r
 /* Define if building universal (internal helper macro) */\r
 #undef AC_APPLE_UNIVERSAL_BUILD\r
 \r
 /* Define if building universal (internal helper macro) */\r
 #undef AC_APPLE_UNIVERSAL_BUILD\r
 /* Define to 1 if you have the <sys/wait.h> header file. */\r
 #undef HAVE_SYS_WAIT_H\r
 \r
 /* Define to 1 if you have the <sys/wait.h> header file. */\r
 #undef HAVE_SYS_WAIT_H\r
 \r
+/* Define to 1 if you have the system() command. */\r
+#define HAVE_SYSTEM       1\r
+\r
 /* Define to 1 if you have the `tcgetpgrp' function. */\r
 #undef HAVE_TCGETPGRP\r
 \r
 /* Define to 1 if you have the `tcgetpgrp' function. */\r
 #undef HAVE_TCGETPGRP\r
 \r
 #define PACKAGE_NAME    "EDK II Python Package"\r
 \r
 /* Define to the full name and version of this package. */\r
 #define PACKAGE_NAME    "EDK II Python Package"\r
 \r
 /* Define to the full name and version of this package. */\r
-#define PACKAGE_STRING  "EDK II Python Package V0.2"\r
+#define PACKAGE_STRING  "EDK II Python Package V0.8"\r
 \r
 /* Define to the one symbol short name of this package. */\r
 #define PACKAGE_TARNAME   "EADK_Python"\r
 \r
 /* Define to the one symbol short name of this package. */\r
 #define PACKAGE_TARNAME   "EADK_Python"\r
 #define PACKAGE_URL   "http://edk2.tianocore.org/toolkit/python"\r
 \r
 /* Define to the version of this package. */\r
 #define PACKAGE_URL   "http://edk2.tianocore.org/toolkit/python"\r
 \r
 /* Define to the version of this package. */\r
-#define PACKAGE_VERSION  "V0.2"\r
+#define PACKAGE_VERSION  "V0.8"\r
 \r
 /* Define if POSIX semaphores aren't enabled on your system */\r
 #define POSIX_SEMAPHORES_NOT_ENABLED    1\r
 \r
 /* Define if POSIX semaphores aren't enabled on your system */\r
 #define POSIX_SEMAPHORES_NOT_ENABLED    1\r
 \r
 /* Define if you want wctype.h functions to be used instead of the one\r
    supplied by Python itself. (see Include/unicodectype.h). */\r
 \r
 /* Define if you want wctype.h functions to be used instead of the one\r
    supplied by Python itself. (see Include/unicodectype.h). */\r
-#undef WANT_WCTYPE_FUNCTIONS\r
+#define WANT_WCTYPE_FUNCTIONS   1\r
 \r
 /* Define if WINDOW in curses.h offers a field _flags. */\r
 #undef WINDOW_HAS_FLAGS\r
 \r
 /* Define if WINDOW in curses.h offers a field _flags. */\r
 #undef WINDOW_HAS_FLAGS\r
 #undef _MINIX\r
 \r
 /* Define on NetBSD to activate all library features */\r
 #undef _MINIX\r
 \r
 /* Define on NetBSD to activate all library features */\r
-#define _NETBSD_SOURCE\r
+#ifndef _NETBSD_SOURCE\r
+  #define _NETBSD_SOURCE  1\r
+#endif\r
 \r
 /* Define _OSF_SOURCE to get the makedev macro. */\r
 #undef _OSF_SOURCE\r
 \r
 /* Define _OSF_SOURCE to get the makedev macro. */\r
 #undef _OSF_SOURCE\r
index f6bfdb01cca74571f4b76b1f3649a8d6ef9f84f1..bf6ec1100e04bcb30e1924eea9bd0ac9d6b01d9f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
     Operating system dependencies.\r
 \r
 /** @file\r
     Operating system dependencies.\r
 \r
-    Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+    Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
@@ -18,7 +18,7 @@ extern "C" {
 \r
 \r
 /* Mod by chrish: QNX has WATCOM, but isn't DOS */\r
 \r
 \r
 /* Mod by chrish: QNX has WATCOM, but isn't DOS */\r
-#if !defined(__QNX__) && !defined(UEFI_ENV)\r
+#if !defined(__QNX__) && !defined(UEFI_C_SOURCE)\r
 #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2)\r
 #if defined(PYOS_OS2) && defined(PYCC_GCC)\r
 #define MAXPATHLEN 260\r
 #if defined(MS_WINDOWS) || defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__DJGPP__) || defined(PYOS_OS2)\r
 #if defined(PYOS_OS2) && defined(PYCC_GCC)\r
 #define MAXPATHLEN 260\r
@@ -57,7 +57,7 @@ extern "C" {
 \r
 /* Search path entry delimiter */\r
 #ifndef DELIM\r
 \r
 /* Search path entry delimiter */\r
 #ifndef DELIM\r
-  #ifdef  UEFI_ENV\r
+  #ifdef  UEFI_C_SOURCE\r
     #define DELIM   ';'\r
     #define DELIM_STR   ";"\r
   #else\r
     #define DELIM   ';'\r
     #define DELIM_STR   ";"\r
   #else\r
index d1fe57c1458e79d34fdf4b234dfeb0fb04cd5de3..81e5af88a72086a048a9155417378ca79b5eafd5 100644 (file)
@@ -111,7 +111,7 @@ seq2set(PyObject *seq, fd_set *set, pylist fd2obj[FD_SETSIZE + 1])
         v = PyObject_AsFileDescriptor( o );\r
         if (v == -1) goto finally;\r
 \r
         v = PyObject_AsFileDescriptor( o );\r
         if (v == -1) goto finally;\r
 \r
-#if defined(_MSC_VER) && !defined(UEFI_ENV)\r
+#if defined(_MSC_VER) && !defined(UEFI_C_SOURCE)\r
         max = 0;                             /* not used for Win32 */\r
 #else  /* !_MSC_VER */\r
         if (v < 0 || v >= FD_SETSIZE) {\r
         max = 0;                             /* not used for Win32 */\r
 #else  /* !_MSC_VER */\r
         if (v < 0 || v >= FD_SETSIZE) {\r
@@ -164,7 +164,7 @@ set2list(fd_set *set, pylist fd2obj[FD_SETSIZE + 1])
     for (j = 0; fd2obj[j].sentinel >= 0; j++) {\r
         fd = fd2obj[j].fd;\r
         if (FD_ISSET(fd, set)) {\r
     for (j = 0; fd2obj[j].sentinel >= 0; j++) {\r
         fd = fd2obj[j].fd;\r
         if (FD_ISSET(fd, set)) {\r
-#if !defined(_MSC_VER) || defined(UEFI_ENV)\r
+#if !defined(_MSC_VER) || defined(UEFI_C_SOURCE)\r
             if (fd > FD_SETSIZE) {\r
                 PyErr_SetString(PyExc_SystemError,\r
                "filedescriptor out of range returned in select()");\r
             if (fd > FD_SETSIZE) {\r
                 PyErr_SetString(PyExc_SystemError,\r
                "filedescriptor out of range returned in select()");\r
index 56ee42222e98a3ed708cb1ffe87b049c5ba949cd..1190bfd9d18c4dc0051cef8ec3a2c6c559d69b30 100644 (file)
@@ -8,7 +8,7 @@
 #   include <sys/socket.h>\r
 # endif\r
 # include <netinet/in.h>\r
 #   include <sys/socket.h>\r
 # endif\r
 # include <netinet/in.h>\r
-# if !(defined(UEFI_ENV) || defined(__BEOS__) || defined(__CYGWIN__) || (defined(PYOS_OS2) && defined(PYCC_VACPP)))\r
+# if !(defined(UEFI_C_SOURCE) || defined(__BEOS__) || defined(__CYGWIN__) || (defined(PYOS_OS2) && defined(PYCC_VACPP)))\r
 #  include <netinet/tcp.h>\r
 # endif\r
 \r
 #  include <netinet/tcp.h>\r
 # endif\r
 \r
index 9f4d1a6f9e35a93555056aa648f5ce2a57369f66..a202cdfa90f3691cdf052f6aff20109a1b5d12e3 100644 (file)
@@ -1,6 +1,6 @@
 /* zutil.h -- internal interface and configuration of the compression library\r
 \r
 /* zutil.h -- internal interface and configuration of the compression library\r
 \r
-    Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+    Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
@@ -161,7 +161,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
 #  define fdopen(fd,mode) NULL /* No fdopen() */\r
 #endif\r
 \r
 #  define fdopen(fd,mode) NULL /* No fdopen() */\r
 #endif\r
 \r
-#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined(UEFI_ENV)\r
+#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined(UEFI_C_SOURCE)\r
 #  if defined(_WIN32_WCE)\r
 #    define fdopen(fd,mode) NULL /* No fdopen() */\r
 #    ifndef _PTRDIFF_T_DEFINED\r
 #  if defined(_WIN32_WCE)\r
 #    define fdopen(fd,mode) NULL /* No fdopen() */\r
 #    ifndef _PTRDIFF_T_DEFINED\r
index 2b101e9003cf4cc9ca5063c454726df1f7790dd8..bb6dacc520e1de6b470a2706010aa4a9621bb75e 100644 (file)
 ##\r
 \r
 [Defines]\r
 ##\r
 \r
 [Defines]\r
-  INF_VERSION                 = 0x00010006\r
+  INF_VERSION                 = 0x00010016\r
   BASE_NAME                   = Python\r
   FILE_GUID                   = ca5627c4-51ba-4dcb-ac62-c076ebd37ddb\r
   MODULE_TYPE                 = UEFI_APPLICATION\r
   BASE_NAME                   = Python\r
   FILE_GUID                   = ca5627c4-51ba-4dcb-ac62-c076ebd37ddb\r
   MODULE_TYPE                 = UEFI_APPLICATION\r
-  VERSION_STRING              = 0.1\r
+  VERSION_STRING              = 0.8\r
   ENTRY_POINT                 = ShellCEntryLib\r
 \r
   ENTRY_POINT                 = ShellCEntryLib\r
 \r
+  DEFINE PYTHON_VERSION       = 2.7.2\r
+\r
 #\r
 #  VALID_ARCHITECTURES        = IA32 X64 IPF\r
 #\r
 #\r
 #  VALID_ARCHITECTURES        = IA32 X64 IPF\r
 #\r
@@ -30,6 +32,7 @@
 \r
 [LibraryClasses]\r
   UefiLib\r
 \r
 [LibraryClasses]\r
   UefiLib\r
+  DebugLib\r
   LibC\r
   LibString\r
   LibStdio\r
   LibC\r
   LibString\r
   LibStdio\r
   EfiSocketLib\r
   DevShell\r
 \r
   EfiSocketLib\r
   DevShell\r
 \r
+[FixedPcd]\r
+  gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x0F\r
+  gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000040\r
+\r
 [Sources]\r
 #EFI -- EFI specific code\r
   Efi/config.c\r
 [Sources]\r
 #EFI -- EFI specific code\r
   Efi/config.c\r
   Efi/getpath.c\r
 \r
 #Parser\r
   Efi/getpath.c\r
 \r
 #Parser\r
-  Python-2.7.2/Parser/acceler.c\r
-  Python-2.7.2/Parser/bitset.c\r
-  Python-2.7.2/Parser/firstsets.c\r
-  Python-2.7.2/Parser/grammar.c\r
-  Python-2.7.2/Parser/grammar1.c\r
-  Python-2.7.2/Parser/listnode.c\r
-  Python-2.7.2/Parser/metagrammar.c\r
-  Python-2.7.2/Parser/myreadline.c\r
-  Python-2.7.2/Parser/node.c\r
-  Python-2.7.2/Parser/parser.c\r
-  Python-2.7.2/Parser/parsetok.c\r
-  Python-2.7.2/Parser/tokenizer.c\r
+  Python-$(PYTHON_VERSION)/Parser/acceler.c\r
+  Python-$(PYTHON_VERSION)/Parser/bitset.c\r
+  Python-$(PYTHON_VERSION)/Parser/firstsets.c\r
+  Python-$(PYTHON_VERSION)/Parser/grammar.c\r
+  Python-$(PYTHON_VERSION)/Parser/grammar1.c\r
+  Python-$(PYTHON_VERSION)/Parser/listnode.c\r
+  Python-$(PYTHON_VERSION)/Parser/metagrammar.c\r
+  Python-$(PYTHON_VERSION)/Parser/myreadline.c\r
+  Python-$(PYTHON_VERSION)/Parser/node.c\r
+  Python-$(PYTHON_VERSION)/Parser/parser.c\r
+  Python-$(PYTHON_VERSION)/Parser/parsetok.c\r
+  Python-$(PYTHON_VERSION)/Parser/tokenizer.c\r
 \r
 #Python\r
 \r
 #Python\r
-  PyMod-2.7.2/Python/getcopyright.c\r
-  PyMod-2.7.2/Python/marshal.c\r
-\r
-  Python-2.7.2/Python/_warnings.c\r
-  Python-2.7.2/Python/asdl.c\r
-  Python-2.7.2/Python/ast.c\r
-  Python-2.7.2/Python/bltinmodule.c\r
-  Python-2.7.2/Python/ceval.c\r
-  Python-2.7.2/Python/codecs.c\r
-  Python-2.7.2/Python/compile.c\r
-  Python-2.7.2/Python/dtoa.c\r
-  Python-2.7.2/Python/dynload_stub.c\r
-  Python-2.7.2/Python/errors.c\r
-  Python-2.7.2/Python/formatter_string.c\r
-  Python-2.7.2/Python/formatter_unicode.c\r
-  Python-2.7.2/Python/frozen.c\r
-  Python-2.7.2/Python/future.c\r
-  Python-2.7.2/Python/getargs.c\r
-  Python-2.7.2/Python/getcompiler.c\r
-  Python-2.7.2/Python/getopt.c\r
-  Python-2.7.2/Python/getplatform.c\r
-  Python-2.7.2/Python/getversion.c\r
-  Python-2.7.2/Python/graminit.c\r
-  Python-2.7.2/Python/import.c\r
-  Python-2.7.2/Python/importdl.c\r
-  Python-2.7.2/Python/modsupport.c\r
-  Python-2.7.2/Python/mysnprintf.c\r
-  Python-2.7.2/Python/mystrtoul.c\r
-  Python-2.7.2/Python/peephole.c\r
-  Python-2.7.2/Python/pyarena.c\r
-  Python-2.7.2/Python/pyctype.c\r
-  Python-2.7.2/Python/pyfpe.c\r
-  Python-2.7.2/Python/pymath.c\r
-  Python-2.7.2/Python/pystate.c\r
-  Python-2.7.2/Python/pystrcmp.c\r
-  Python-2.7.2/Python/pystrtod.c\r
-  Python-2.7.2/Python/Python-ast.c\r
-  Python-2.7.2/Python/pythonrun.c\r
-  Python-2.7.2/Python/structmember.c\r
-  Python-2.7.2/Python/symtable.c\r
-  Python-2.7.2/Python/sysmodule.c\r
-  Python-2.7.2/Python/traceback.c\r
-#  Python-$(PYTHON_VERSION)/Python/thread.c\r
+  PyMod-$(PYTHON_VERSION)/Python/getcopyright.c\r
+  PyMod-$(PYTHON_VERSION)/Python/marshal.c\r
+\r
+  Python-$(PYTHON_VERSION)/Python/_warnings.c\r
+  Python-$(PYTHON_VERSION)/Python/asdl.c\r
+  Python-$(PYTHON_VERSION)/Python/ast.c\r
+  Python-$(PYTHON_VERSION)/Python/bltinmodule.c\r
+  Python-$(PYTHON_VERSION)/Python/ceval.c\r
+  Python-$(PYTHON_VERSION)/Python/codecs.c\r
+  Python-$(PYTHON_VERSION)/Python/compile.c\r
+  Python-$(PYTHON_VERSION)/Python/dtoa.c\r
+  Python-$(PYTHON_VERSION)/Python/dynload_stub.c\r
+  Python-$(PYTHON_VERSION)/Python/errors.c\r
+  Python-$(PYTHON_VERSION)/Python/formatter_string.c\r
+  Python-$(PYTHON_VERSION)/Python/formatter_unicode.c\r
+  Python-$(PYTHON_VERSION)/Python/frozen.c\r
+  Python-$(PYTHON_VERSION)/Python/future.c\r
+  Python-$(PYTHON_VERSION)/Python/getargs.c\r
+  Python-$(PYTHON_VERSION)/Python/getcompiler.c\r
+  Python-$(PYTHON_VERSION)/Python/getopt.c\r
+  Python-$(PYTHON_VERSION)/Python/getplatform.c\r
+  Python-$(PYTHON_VERSION)/Python/getversion.c\r
+  Python-$(PYTHON_VERSION)/Python/graminit.c\r
+  Python-$(PYTHON_VERSION)/Python/import.c\r
+  Python-$(PYTHON_VERSION)/Python/importdl.c\r
+  Python-$(PYTHON_VERSION)/Python/modsupport.c\r
+  Python-$(PYTHON_VERSION)/Python/mysnprintf.c\r
+  Python-$(PYTHON_VERSION)/Python/mystrtoul.c\r
+  Python-$(PYTHON_VERSION)/Python/peephole.c\r
+  Python-$(PYTHON_VERSION)/Python/pyarena.c\r
+  Python-$(PYTHON_VERSION)/Python/pyctype.c\r
+  Python-$(PYTHON_VERSION)/Python/pyfpe.c\r
+  Python-$(PYTHON_VERSION)/Python/pymath.c\r
+  Python-$(PYTHON_VERSION)/Python/pystate.c\r
+  Python-$(PYTHON_VERSION)/Python/pystrcmp.c\r
+  Python-$(PYTHON_VERSION)/Python/pystrtod.c\r
+  Python-$(PYTHON_VERSION)/Python/Python-ast.c\r
+  Python-$(PYTHON_VERSION)/Python/pythonrun.c\r
+  Python-$(PYTHON_VERSION)/Python/structmember.c\r
+  Python-$(PYTHON_VERSION)/Python/symtable.c\r
+  Python-$(PYTHON_VERSION)/Python/sysmodule.c\r
+  Python-$(PYTHON_VERSION)/Python/traceback.c\r
+\r
+#Objects\r
+  Python-$(PYTHON_VERSION)/Objects/abstract.c\r
+  Python-$(PYTHON_VERSION)/Objects/boolobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/bufferobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/bytearrayobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/bytes_methods.c\r
+  Python-$(PYTHON_VERSION)/Objects/capsule.c\r
+  Python-$(PYTHON_VERSION)/Objects/cellobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/classobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/cobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/codeobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/complexobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/descrobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/dictobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/enumobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/exceptions.c\r
+  Python-$(PYTHON_VERSION)/Objects/fileobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/floatobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/frameobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/funcobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/genobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/intobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/iterobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/listobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/longobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/memoryobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/methodobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/moduleobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/object.c\r
+  Python-$(PYTHON_VERSION)/Objects/obmalloc.c\r
+  Python-$(PYTHON_VERSION)/Objects/rangeobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/setobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/sliceobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/stringobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/structseq.c\r
+  Python-$(PYTHON_VERSION)/Objects/tupleobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/typeobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/unicodectype.c\r
+  Python-$(PYTHON_VERSION)/Objects/unicodeobject.c\r
+  Python-$(PYTHON_VERSION)/Objects/weakrefobject.c\r
 \r
 #Modules -- See Efi/config.c\r
 \r
 #Modules -- See Efi/config.c\r
-  PyMod-2.7.2/Modules/_sre.c\r
-  PyMod-2.7.2/Modules/errnomodule.c\r
-  PyMod-2.7.2/Modules/selectmodule.c\r
-\r
-  Python-2.7.2/Modules/getbuildinfo.c\r
-  Python-2.7.2/Modules/main.c\r
-  Python-2.7.2/Modules/python.c\r
-\r
-  Python-2.7.2/Modules/_bisectmodule.c\r
-  Python-2.7.2/Modules/_codecsmodule.c\r
-  Python-2.7.2/Modules/_collectionsmodule.c\r
-  Python-2.7.2/Modules/_functoolsmodule.c\r
-  Python-2.7.2/Modules/_heapqmodule.c\r
-  Python-2.7.2/Modules/_json.c\r
-  Python-2.7.2/Modules/_math.c\r
-  Python-2.7.2/Modules/_randommodule.c\r
-  Python-2.7.2/Modules/_struct.c\r
-  Python-2.7.2/Modules/_weakref.c\r
-  Python-2.7.2/Modules/arraymodule.c\r
-  Python-2.7.2/Modules/binascii.c\r
-  Python-2.7.2/Modules/cmathmodule.c\r
-  Python-2.7.2/Modules/cPickle.c\r
-  Python-2.7.2/Modules/cStringIO.c\r
-  Python-2.7.2/Modules/datetimemodule.c\r
-  Python-2.7.2/Modules/future_builtins.c\r
-  Python-2.7.2/Modules/gcmodule.c\r
-  Python-2.7.2/Modules/itertoolsmodule.c\r
-  Python-2.7.2/Modules/mathmodule.c\r
-  Python-2.7.2/Modules/md5.c\r
-  Python-2.7.2/Modules/md5module.c\r
-  Python-2.7.2/Modules/operator.c\r
-  Python-2.7.2/Modules/parsermodule.c\r
-  Python-2.7.2/Modules/shamodule.c\r
-  Python-2.7.2/Modules/sha256module.c\r
-  Python-2.7.2/Modules/sha512module.c\r
-  Python-2.7.2/Modules/signalmodule.c\r
-  Python-2.7.2/Modules/socketmodule.c\r
-  Python-2.7.2/Modules/stropmodule.c\r
-  Python-2.7.2/Modules/timemodule.c\r
-  Python-2.7.2/Modules/xxsubtype.c\r
-\r
-#  Python-$(PYTHON_VERSION)/Modules/_csv.c\r
-#  Python-$(PYTHON_VERSION)/Modules/symtablemodule.c\r
-#  Python-$(PYTHON_VERSION)/Modules/_localemodule.c\r
-#  Python-$(PYTHON_VERSION)/Modules/rotatingtree.c\r
-#  Python-$(PYTHON_VERSION)/Modules/threadmodule.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zipimport.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zlibmodule.c\r
+  # Mandatory Modules -- These must always be built in.\r
+  PyMod-$(PYTHON_VERSION)/Modules/errnomodule.c\r
+  Python-$(PYTHON_VERSION)/Modules/_functoolsmodule.c\r
+  Python-$(PYTHON_VERSION)/Modules/gcmodule.c\r
+  Python-$(PYTHON_VERSION)/Modules/getbuildinfo.c\r
+  Python-$(PYTHON_VERSION)/Modules/main.c\r
+  Python-$(PYTHON_VERSION)/Modules/python.c\r
+\r
+  # Optional Modules -- See Python/Efi/config.c\r
+  PyMod-$(PYTHON_VERSION)/Modules/_sre.c                        #\r
+  PyMod-$(PYTHON_VERSION)/Modules/selectmodule.c                #\r
+  #\r
+  Python-$(PYTHON_VERSION)/Modules/_bisectmodule.c              #\r
+  Python-$(PYTHON_VERSION)/Modules/_codecsmodule.c              #\r
+  Python-$(PYTHON_VERSION)/Modules/_collectionsmodule.c         #\r
+  Python-$(PYTHON_VERSION)/Modules/_heapqmodule.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/_json.c                      #\r
+  Python-$(PYTHON_VERSION)/Modules/_localemodule.c              #\r
+  Python-$(PYTHON_VERSION)/Modules/_math.c                      #\r
+  Python-$(PYTHON_VERSION)/Modules/_randommodule.c              #\r
+  Python-$(PYTHON_VERSION)/Modules/_struct.c                    #\r
+  Python-$(PYTHON_VERSION)/Modules/_weakref.c                   #\r
+  Python-$(PYTHON_VERSION)/Modules/arraymodule.c                #\r
+  Python-$(PYTHON_VERSION)/Modules/binascii.c                   #\r
+  Python-$(PYTHON_VERSION)/Modules/cmathmodule.c                #\r
+  Python-$(PYTHON_VERSION)/Modules/cPickle.c                    #\r
+  Python-$(PYTHON_VERSION)/Modules/cStringIO.c                  #\r
+  Python-$(PYTHON_VERSION)/Modules/datetimemodule.c             #\r
+  Python-$(PYTHON_VERSION)/Modules/future_builtins.c            #\r
+  Python-$(PYTHON_VERSION)/Modules/itertoolsmodule.c            #\r
+  Python-$(PYTHON_VERSION)/Modules/mathmodule.c                 #\r
+  Python-$(PYTHON_VERSION)/Modules/md5.c                        #\r
+  Python-$(PYTHON_VERSION)/Modules/md5module.c                  #\r
+  Python-$(PYTHON_VERSION)/Modules/operator.c                   #\r
+  Python-$(PYTHON_VERSION)/Modules/parsermodule.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/shamodule.c                  #\r
+  Python-$(PYTHON_VERSION)/Modules/sha256module.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/sha512module.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/signalmodule.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/socketmodule.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/stropmodule.c                #\r
+  Python-$(PYTHON_VERSION)/Modules/timemodule.c                 #\r
+  Python-$(PYTHON_VERSION)/Modules/xxsubtype.c                  #\r
+  Python-$(PYTHON_VERSION)/Modules/zipimport.c                  #\r
+  Python-$(PYTHON_VERSION)/Modules/zlibmodule.c                 #\r
+\r
+#  Python-$(PYTHON_VERSION)/Modules/_csv.c                      #\r
+#  Python-$(PYTHON_VERSION)/Modules/symtablemodule.c            #\r
 \r
 #Modules/cjkcodecs\r
 \r
 #Modules/cjkcodecs\r
-  Python-2.7.2/Modules/cjkcodecs/multibytecodec.c\r
-  Python-2.7.2/Modules/cjkcodecs/_codecs_cn.c\r
-  Python-2.7.2/Modules/cjkcodecs/_codecs_hk.c\r
-  Python-2.7.2/Modules/cjkcodecs/_codecs_iso2022.c\r
-  Python-2.7.2/Modules/cjkcodecs/_codecs_jp.c\r
-  Python-2.7.2/Modules/cjkcodecs/_codecs_kr.c\r
-  Python-2.7.2/Modules/cjkcodecs/_codecs_tw.c\r
-\r
+  Python-$(PYTHON_VERSION)/Modules/cjkcodecs/multibytecodec.c   #\r
+  Python-$(PYTHON_VERSION)/Modules/cjkcodecs/_codecs_cn.c       #\r
+  Python-$(PYTHON_VERSION)/Modules/cjkcodecs/_codecs_hk.c       #\r
+  Python-$(PYTHON_VERSION)/Modules/cjkcodecs/_codecs_iso2022.c  #\r
+  Python-$(PYTHON_VERSION)/Modules/cjkcodecs/_codecs_jp.c       #\r
+  Python-$(PYTHON_VERSION)/Modules/cjkcodecs/_codecs_kr.c       #\r
+  Python-$(PYTHON_VERSION)/Modules/cjkcodecs/_codecs_tw.c       #\r
 \r
 #Modules/_io\r
 \r
 #Modules/_io\r
-  Python-2.7.2/Modules/_io/_iomodule.c\r
-  Python-2.7.2/Modules/_io/bufferedio.c\r
-  Python-2.7.2/Modules/_io/bytesio.c\r
-  Python-2.7.2/Modules/_io/fileio.c\r
-  Python-2.7.2/Modules/_io/iobase.c\r
-  Python-2.7.2/Modules/_io/stringio.c\r
-  Python-2.7.2/Modules/_io/textio.c\r
+  Python-$(PYTHON_VERSION)/Modules/_io/_iomodule.c              #\r
+  Python-$(PYTHON_VERSION)/Modules/_io/bufferedio.c             #\r
+  Python-$(PYTHON_VERSION)/Modules/_io/bytesio.c                #\r
+  Python-$(PYTHON_VERSION)/Modules/_io/fileio.c                 #\r
+  Python-$(PYTHON_VERSION)/Modules/_io/iobase.c                 #\r
+  Python-$(PYTHON_VERSION)/Modules/_io/stringio.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/_io/textio.c                 #\r
 \r
 #Modules/zlib\r
 \r
 #Modules/zlib\r
-#  Python-$(PYTHON_VERSION)/Modules/zlib/adler32.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zlib/compress.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zlib/crc32.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zlib/deflate.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zlib/gzio.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zlib/infback.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zlib/inffast.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zlib/inflate.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zlib/inftrees.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zlib/trees.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zlib/uncompr.c\r
-#  Python-$(PYTHON_VERSION)/Modules/zlib/zutil.c\r
-\r
-#Objects\r
-  Python-2.7.2/Objects/abstract.c\r
-  Python-2.7.2/Objects/boolobject.c\r
-  Python-2.7.2/Objects/bufferobject.c\r
-  Python-2.7.2/Objects/bytearrayobject.c\r
-  Python-2.7.2/Objects/bytes_methods.c\r
-  Python-2.7.2/Objects/capsule.c\r
-  Python-2.7.2/Objects/cellobject.c\r
-  Python-2.7.2/Objects/classobject.c\r
-  Python-2.7.2/Objects/cobject.c\r
-  Python-2.7.2/Objects/codeobject.c\r
-  Python-2.7.2/Objects/complexobject.c\r
-  Python-2.7.2/Objects/descrobject.c\r
-  Python-2.7.2/Objects/dictobject.c\r
-  Python-2.7.2/Objects/enumobject.c\r
-  Python-2.7.2/Objects/exceptions.c\r
-  Python-2.7.2/Objects/fileobject.c\r
-  Python-2.7.2/Objects/floatobject.c\r
-  Python-2.7.2/Objects/frameobject.c\r
-  Python-2.7.2/Objects/funcobject.c\r
-  Python-2.7.2/Objects/genobject.c\r
-  Python-2.7.2/Objects/intobject.c\r
-  Python-2.7.2/Objects/iterobject.c\r
-  Python-2.7.2/Objects/listobject.c\r
-  Python-2.7.2/Objects/longobject.c\r
-  Python-2.7.2/Objects/memoryobject.c\r
-  Python-2.7.2/Objects/methodobject.c\r
-  Python-2.7.2/Objects/moduleobject.c\r
-  Python-2.7.2/Objects/object.c\r
-  Python-2.7.2/Objects/obmalloc.c\r
-  Python-2.7.2/Objects/rangeobject.c\r
-  Python-2.7.2/Objects/setobject.c\r
-  Python-2.7.2/Objects/sliceobject.c\r
-  Python-2.7.2/Objects/stringobject.c\r
-  Python-2.7.2/Objects/structseq.c\r
-  Python-2.7.2/Objects/tupleobject.c\r
-  Python-2.7.2/Objects/typeobject.c\r
-  Python-2.7.2/Objects/unicodectype.c\r
-  Python-2.7.2/Objects/unicodeobject.c\r
-  Python-2.7.2/Objects/weakrefobject.c\r
+  Python-$(PYTHON_VERSION)/Modules/zlib/adler32.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/zlib/compress.c              #\r
+  Python-$(PYTHON_VERSION)/Modules/zlib/crc32.c                 #\r
+  Python-$(PYTHON_VERSION)/Modules/zlib/deflate.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/zlib/gzio.c                  #\r
+  Python-$(PYTHON_VERSION)/Modules/zlib/infback.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/zlib/inffast.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/zlib/inflate.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/zlib/inftrees.c              #\r
+  Python-$(PYTHON_VERSION)/Modules/zlib/trees.c                 #\r
+  Python-$(PYTHON_VERSION)/Modules/zlib/uncompr.c               #\r
+  Python-$(PYTHON_VERSION)/Modules/zlib/zutil.c                 #\r
 \r
 [BuildOptions]\r
 \r
 [BuildOptions]\r
-   MSFT:*_*_IA32_CC_FLAGS         = /Oi- /wd4018 /wd4054 /wd4055 /wd4101 /wd4131 /wd4152 /wd4204 /wd4210 /wd4244 /wd4267 /wd4305 /wd4310 /wd4389 /wd4701 /wd4702 /wd4706 /I$(WORKSPACE)\AppPkg\Applications\Python\Ia32 /I$(WORKSPACE)\AppPkg\Applications\Python\Efi /I$(WORKSPACE)\AppPkg\Applications\Python\Python-2.7.2\Include\r
-   MSFT:*_*_X64_CC_FLAGS          = /Oi- /wd4018 /wd4054 /wd4055 /wd4101 /wd4131 /wd4152 /wd4204 /wd4210 /wd4244 /wd4267 /wd4305 /wd4310 /wd4389 /wd4701 /wd4702 /wd4706 /I$(WORKSPACE)\AppPkg\Applications\Python\X64 /I$(WORKSPACE)\AppPkg\Applications\Python\Efi /I$(WORKSPACE)\AppPkg\Applications\Python\Python-2.7.2\Include\r
+   MSFT:*_*_IA32_CC_FLAGS         = /Oi- /wd4018 /wd4054 /wd4055 /wd4101 /wd4131 /wd4152 /wd4204 /wd4210 /wd4244 /wd4267 /wd4305 /wd4310 /wd4389 /wd4701 /wd4702 /wd4706 /I$(WORKSPACE)\AppPkg\Applications\Python\Ia32 /I$(WORKSPACE)\AppPkg\Applications\Python\Efi /I$(WORKSPACE)\AppPkg\Applications\Python\Python-$(PYTHON_VERSION)\Include\r
+   MSFT:*_*_X64_CC_FLAGS          = /Oi- /wd4018 /wd4054 /wd4055 /wd4101 /wd4131 /wd4152 /wd4204 /wd4210 /wd4244 /wd4267 /wd4305 /wd4310 /wd4389 /wd4701 /wd4702 /wd4706 /I$(WORKSPACE)\AppPkg\Applications\Python\X64 /I$(WORKSPACE)\AppPkg\Applications\Python\Efi /I$(WORKSPACE)\AppPkg\Applications\Python\Python-$(PYTHON_VERSION)\Include\r
     GCC:*_*_IPF_SYMRENAME_FLAGS   = --redefine-syms=$(WORKSPACE)/StdLib/GccSymRename.txt\r
     GCC:*_*_IPF_SYMRENAME_FLAGS   = --redefine-syms=$(WORKSPACE)/StdLib/GccSymRename.txt\r
diff --git a/AppPkg/Applications/Python/PythonReadMe.txt b/AppPkg/Applications/Python/PythonReadMe.txt
new file mode 100644 (file)
index 0000000..d16a9a2
--- /dev/null
@@ -0,0 +1,194 @@
+                                EDK II Python\r
+                                    ReadMe\r
+                                 Beta Release\r
+                                 23 Mar. 2012\r
+\r
+\r
+1. OVERVIEW\r
+===========\r
+This document is devoted to general information on building and setup of the\r
+Python environment for UEFI 2.3, the invocation of the interpreter, and things\r
+that make working with Python easier.\r
+\r
+It is assumed that you already have either UDK2010 or a current snapshot of\r
+the EDK II sources from www.tianocore.org, and that you can successfully build\r
+packages within that distribution.\r
+\r
+2. Release Notes\r
+================\r
+  1)  There is no input line editing.  Backspace, ^C, etc. do not work.\r
+  2)  All C extension modules must be statically linked (built in)\r
+  3)  The site and os modules must exist as discrete files in ...\lib\python.27\r
+\r
+3. Getting and Building the latest version of Python\r
+======================================================\r
+  3.1 Getting Python\r
+  ==================\r
+  Currently only version 2.7.2 of the CPython distribution is supported.  The\r
+  source code can be downloaded from http://www.python.org/download/source/.\r
+\r
+  A.  Within your EDK II development tree, extract the Python distribution into\r
+    AppPkg/Applications/Python.  This should create the\r
+    AppPkg/Applications/Python/Python-2.7.2 directory.\r
+\r
+  B.  Copy the files from PyMod-2.7.2 into the corresponding directories within\r
+    the Python-2.7.2 tree.  This will overwrite existing files with files\r
+    modified for UEFI usage.\r
+\r
+  3.2 Building Python\r
+  ===================\r
+  A.  Edit Efi/config.c to enable the built-in modules you need.\r
+        Mandatory Built-in Modules:\r
+        edk2      errno       imp         marshal\r
+\r
+      Additional built-in modules which are required to use the help()\r
+      functionality provided by PyDoc, are:\r
+        _codecs     _collections    _functools    _random\r
+        _sre        _struct         _weakref      binascii\r
+        cStringIO   gc              itertools     math\r
+        operator    time\r
+\r
+  B.  Edit AppPkg/AppPkg.dsc to enable (uncomment) the PythonCore.inf line\r
+    within the [Components] section.\r
+\r
+  C.  Build AppPkg, which includes Python, using the standard "build" command:\r
+    For example, to build Python for an X64 CPU architecture:\r
+                    build -a X64 -p AppPkg\AppPkg.dsc\r
+\r
+4. Python-related paths and files\r
+=================================\r
+Python depends upon the existence of several directories and files on the\r
+target system.\r
+\r
+  \EFI                              Root of the UEFI system area.\r
+   |- \Tools                        Location of the Python.efi executable.\r
+   |- \Boot                         UEFI specified Boot directory.\r
+   |- \StdLib                       Root of the Standard Libraries sub-tree.\r
+       |- \etc                      Configuration files used by libraries.\r
+       |- \tmp                      Temporary files created by tmpfile(), etc.\r
+       |- \lib                      Root of the libraries tree.\r
+           |- \python.27            Directory containing the Python library modules.\r
+               |- \lib-dynload      Dynamically loadable Python extensions.\r
+               |- \site-packages    Site-specific packages and modules.\r
+\r
+\r
+5. Installing Python\r
+====================\r
+These directories, on the target system, are populated from the development\r
+system as follows:\r
+\r
+  * \Efi\Tools receives a copy of Build/AppPkg/DEBUG_VS2005/X64/Python.efi.\r
+                                               ^^^^^ ^^^^^^\r
+    Modify the host path to match the your build type and compiler.\r
+\r
+  * The \Efi\StdLib\etc directory is populated from the StdLib/Efi/StdLib/etc\r
+    source directory.\r
+\r
+  * Directory \Efi\StdLib\lib\python.27 is populated with packages and modules\r
+    from the AppPkg/Applications/Python/Python-2.7.2/Lib directory.\r
+    The recommended minimum set of modules (.py, .pyc, and/or .pyo):\r
+        os      stat      ntpath      warnings      traceback\r
+        site    types     copy_reg    linecache     genericpath\r
+\r
+  * Python C Extension Modules built as dynamically loadable extensions go into\r
+    the \Efi\StdLib\lib\python.27\lib-dynload directory.\r
+\r
+\r
+6. Example: Enabling socket support\r
+===================================\r
+  1.  enable {"_socket", init_socket}, in Efi\config.c\r
+  2.  enable Python-2.7.2/Modules/socketmodule.c in PythonCore.inf.\r
+  3.  copy socket.py over to /Efi/StdLib/lib/python.27 on your target system.\r
+  4.  Make sure dependent modules are present(.py) or built in(.c):\r
+        functools, types, os, sys, warnings, cStringIO, StringIO, errno\r
+\r
+  5.  build -a X64 -p AppPkg\AppPkg.dsc\r
+  6.  copy Build\AppPkg\DEBUG_VS2005\X64\Python.efi to \Efi\Tools on your target system.\r
+                                ^^^^ Modify as needed\r
+\r
+\r
+7. Supported C Modules\r
+======================\r
+    Module Name               C File(s)\r
+  ===============       =============================================\r
+  _ast                  Python/Python-ast.c\r
+  _bisect               Modules/_bisectmodule.c\r
+  _codecs               Modules/_codecsmodule.c\r
+  _codecs_cn            Modules/cjkcodecs/_codecs_cn.c\r
+  _codecs_hk            Modules/cjkcodecs/_codecs_hk.c\r
+  _codecs_iso2022       Modules/cjkcodecs/_codecs_iso2022.c\r
+  _codecs_jp            Modules/cjkcodecs/_codecs_jp\r
+  _codecs_kr            Modules/cjkcodecs/_codecs_kr\r
+  _codecs_tw            Modules/cjkcodecs/_codecs_tw\r
+  _collections          Modules/_collectionsmodule.c\r
+  _csv                  Modules/_csv.c\r
+  _functools            Modules/_functoolsmodule.c\r
+  _heapq                Modules/_heapqmodule.c\r
+  _io                   Modules/_io/_iomodule.c       Modules/_io/*\r
+  _json                 Modules/_json.c\r
+  _md5                  Modules/md5module.c           Modules/md5.c\r
+  _multibytecodec       Modules/cjkcodecs/_multibytecodec.c\r
+  _random               Modules/_randommodule.c\r
+  _sha                  Modules/shamodule.c\r
+  _sha256               Modules/sha256module.c\r
+  _sha512               Modules/sha512module.c\r
+  _socket               Modules/socketmodule.c\r
+  _sre                  Modules/_sre.c\r
+  _struct               Modules/_struct.c\r
+  _symtable             Modules/symtablemodule.c\r
+  _weakref              Modules/_weakref.c\r
+  array                 Modules/arraymodule.c\r
+  binascii              Modules/binascii.c\r
+  cmath                 Modules/cmathmodule.c\r
+  cPickle               Modules/cPickle.c\r
+  cStringIO             Modules/cStringIO.c\r
+  datetime              Modules/datetimemodule.c\r
+  edk2                  Modules/Efi/edk2module.c\r
+  errno                 Modules/errnomodule.c\r
+  future_builtins       Modules/future_builtins.c\r
+  gc                    Modules/gcmodule.c\r
+  imp                   Python/import.c\r
+  itertools             Modules/itertoolsmodule.c\r
+  marshal               Python/marshal.c\r
+  math                  Modules/mathmodule.c          Modules/_math.c\r
+  operator              Modules/operator.c\r
+  parser                Modules/parsermodule.c\r
+  select                Modules/selectmodule.c\r
+  signal                Modules/signalmodule.c\r
+  strop                 Modules/stropmodule.c\r
+  time                  Modules/timemodule.c\r
+  xxsubtype             Modules/xxsubtype.c\r
+  zipimport             Modules/zipimport.c\r
+  zlib                  Modules/zlibmodule.c          Modules/zlib/*\r
+\r
+\r
+8. Tested Python Library Modules\r
+================================\r
+This is a partial list of the packages and modules of the Python Standard\r
+Library that have been tested or used in some manner.\r
+\r
+  encodings               genericpath.py            sha.py\r
+  importlib               getopt.py                 SimpleHTTPServer.py\r
+  json                    hashlib.py                site.py\r
+  pydoc_data              heapq.py                  socket.py\r
+  xml                     HTMLParser.py             SocketServer.py\r
+  abc.py                  inspect.py                sre.py\r
+  argparse.py             io.py                     sre_compile.py\r
+  ast.py                  keyword.py                sre_constants.py\r
+  atexit.py               linecache.py              sre_parse.py\r
+  BaseHTTPServer.py       locale.py                 stat.py\r
+  binhex.py               md5.py                    string.py\r
+  bisect.py               modulefinder.py           StringIO.py\r
+  calendar.py             ntpath.py                 struct.py\r
+  cmd.py                  numbers.py                textwrap.py\r
+  codecs.py               optparse.py               token.py\r
+  collections.py          os.py                     tokenize.py\r
+  copy.py                 platform.py               traceback.py\r
+  copy_reg.py             posixpath.py              types.py\r
+  csv.py                  pydoc.py                  warnings.py\r
+  dummy_thread.py         random.py                 weakref.py\r
+  fileinput.py            re.py                     xmllib.py\r
+  formatter.py            repr.py                   zipfile.py\r
+  functools.py            runpy.py\r
+\r
+# # #\r
index ef95d1be62712ebe4f6ca5036d4fe97417fc9225..ddb00c6f4a1c073485aeccd55ee821a52d4d7aac 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
     Manually generated Python Configuration file for EDK II.\r
 \r
 /** @file\r
     Manually generated Python Configuration file for EDK II.\r
 \r
-    Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+    Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
 \r
 #include  <Uefi.h>\r
 \r
 \r
 #include  <Uefi.h>\r
 \r
-/* Define to indicate that code is being built to run in the UEFI Environment. */\r
-#define UEFI_ENV    EFI_SYSTEM_TABLE_REVISION\r
-\r
-#define PLATFORM    "UEFI"\r
+#define PLATFORM    "uefi"\r
 \r
 /* Define if building universal (internal helper macro) */\r
 #undef AC_APPLE_UNIVERSAL_BUILD\r
 \r
 /* Define if building universal (internal helper macro) */\r
 #undef AC_APPLE_UNIVERSAL_BUILD\r
 /* Define to 1 if you have the <sys/wait.h> header file. */\r
 #undef HAVE_SYS_WAIT_H\r
 \r
 /* Define to 1 if you have the <sys/wait.h> header file. */\r
 #undef HAVE_SYS_WAIT_H\r
 \r
+/* Define to 1 if you have the system() command. */\r
+#define HAVE_SYSTEM       1\r
+\r
 /* Define to 1 if you have the `tcgetpgrp' function. */\r
 #undef HAVE_TCGETPGRP\r
 \r
 /* Define to 1 if you have the `tcgetpgrp' function. */\r
 #undef HAVE_TCGETPGRP\r
 \r
 #define PACKAGE_NAME    "EDK II Python Package"\r
 \r
 /* Define to the full name and version of this package. */\r
 #define PACKAGE_NAME    "EDK II Python Package"\r
 \r
 /* Define to the full name and version of this package. */\r
-#define PACKAGE_STRING  "EDK II Python Package V0.2"\r
+#define PACKAGE_STRING  "EDK II Python Package V0.8"\r
 \r
 /* Define to the one symbol short name of this package. */\r
 #define PACKAGE_TARNAME   "EADK_Python"\r
 \r
 /* Define to the one symbol short name of this package. */\r
 #define PACKAGE_TARNAME   "EADK_Python"\r
 #define PACKAGE_URL   "http://edk2.tianocore.org/toolkit/python"\r
 \r
 /* Define to the version of this package. */\r
 #define PACKAGE_URL   "http://edk2.tianocore.org/toolkit/python"\r
 \r
 /* Define to the version of this package. */\r
-#define PACKAGE_VERSION  "V0.2"\r
+#define PACKAGE_VERSION  "V0.8"\r
 \r
 /* Define if POSIX semaphores aren't enabled on your system */\r
 #define POSIX_SEMAPHORES_NOT_ENABLED    1\r
 \r
 /* Define if POSIX semaphores aren't enabled on your system */\r
 #define POSIX_SEMAPHORES_NOT_ENABLED    1\r
 \r
 /* Define if you want wctype.h functions to be used instead of the one\r
    supplied by Python itself. (see Include/unicodectype.h). */\r
 \r
 /* Define if you want wctype.h functions to be used instead of the one\r
    supplied by Python itself. (see Include/unicodectype.h). */\r
-#undef WANT_WCTYPE_FUNCTIONS\r
+#define WANT_WCTYPE_FUNCTIONS   1\r
 \r
 /* Define if WINDOW in curses.h offers a field _flags. */\r
 #undef WINDOW_HAS_FLAGS\r
 \r
 /* Define if WINDOW in curses.h offers a field _flags. */\r
 #undef WINDOW_HAS_FLAGS\r
 #undef _MINIX\r
 \r
 /* Define on NetBSD to activate all library features */\r
 #undef _MINIX\r
 \r
 /* Define on NetBSD to activate all library features */\r
-#define _NETBSD_SOURCE\r
+#ifndef _NETBSD_SOURCE\r
+  #define _NETBSD_SOURCE  1\r
+#endif\r
 \r
 /* Define _OSF_SOURCE to get the makedev macro. */\r
 #undef _OSF_SOURCE\r
 \r
 /* Define _OSF_SOURCE to get the makedev macro. */\r
 #undef _OSF_SOURCE\r
index 72da83f4881336a9832fe96904bf20fd41c5b746..9b57a32afd0bc7aef798dbd3f853486f7b0407fa 100644 (file)
@@ -1,6 +1,15 @@
-/*     $NetBSD: param.h,v 1.61 2006/08/28 13:43:35 yamt Exp $  */\r
+/** @file\r
+    Machine dependent constants for Intel IA32 Architecture.\r
+\r
+    Copyright (c) 2010-2012, Intel Corporation. All rights reserved.<BR>\r
+    This program and the accompanying materials are licensed and made available under\r
+    the terms and conditions of the BSD License that accompanies this distribution.\r
+    The full text of the license may be found at\r
+    http://opensource.org/licenses/bsd-license.\r
+\r
+    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 \r
-/*-\r
  * Copyright (c) 1990 The Regents of the University of California.\r
  * All rights reserved.\r
  *\r
  * Copyright (c) 1990 The Regents of the University of California.\r
  * All rights reserved.\r
  *\r
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
  * SUCH DAMAGE.\r
  *\r
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
  * SUCH DAMAGE.\r
  *\r
- *     @(#)param.h     5.8 (Berkeley) 6/28/91\r
+ *  @(#)param.h 5.8 (Berkeley) 6/28/91\r
+ *  $NetBSD: param.h,v 1.61 2006/08/28 13:43:35 yamt Exp\r
  */\r
  */\r
-\r
 #ifndef _I386_PARAM_H_\r
 #define _I386_PARAM_H_\r
 \r
 #ifndef _I386_PARAM_H_\r
 #define _I386_PARAM_H_\r
 \r
-/*\r
- * Machine dependent constants for Intel 386.\r
- */\r
-\r
-#ifdef _KERNEL\r
-#ifdef _LOCORE\r
-#include <machine/psl.h>\r
-#else\r
-#include <machine/cpu.h>\r
-#endif\r
-#endif\r
-\r
-#define        _MACHINE        i386\r
-#define        MACHINE         "i386"\r
-#define        _MACHINE_ARCH   i386\r
-#define        MACHINE_ARCH    "i386"\r
-#define        MID_MACHINE     MID_I386\r
+#define _MACHINE      i386\r
+#define MACHINE       "i386"\r
+#define _MACHINE_ARCH i386\r
+#define MACHINE_ARCH  "i386"\r
+#define MID_MACHINE   MID_I386\r
 \r
 /*\r
  * Round p (pointer or byte index) up to a correctly-aligned value\r
 \r
 /*\r
  * Round p (pointer or byte index) up to a correctly-aligned value\r
  * ALIGNED_POINTER is a boolean macro that checks whether an address\r
  * is valid to fetch data elements of type t from on this architecture.\r
  * This does not reflect the optimal alignment, just the possibility\r
  * ALIGNED_POINTER is a boolean macro that checks whether an address\r
  * is valid to fetch data elements of type t from on this architecture.\r
  * This does not reflect the optimal alignment, just the possibility\r
- * (within reasonable limits). \r
+ * (within reasonable limits).\r
  *\r
  */\r
  *\r
  */\r
-#define ALIGNBYTES             (sizeof(int) - 1)\r
-#define ALIGN(p)               (((u_int)(u_long)(p) + ALIGNBYTES) &~ \\r
-    ALIGNBYTES)\r
-#define ALIGNED_POINTER(p,t)   1\r
-\r
-#define        PGSHIFT         12              /* LOG2(NBPG) */\r
-#define        NBPG            (1 << PGSHIFT)  /* bytes/page */\r
-#define        PGOFSET         (NBPG-1)        /* byte offset into page */\r
-#define        NPTEPG          (NBPG/(sizeof (pt_entry_t)))\r
-\r
-#if defined(_KERNEL_OPT)\r
-#include "opt_kernbase.h"\r
-#endif /* defined(_KERNEL_OPT) */\r
-\r
-#ifdef KERNBASE_LOCORE\r
-#error "You should only re-define KERNBASE"\r
+#define ALIGNBYTES            (sizeof(int) - 1)\r
+#define ALIGN(p)              (((EFI_ULONG_T)(p) + ALIGNBYTES) & ~ALIGNBYTES)\r
+#define ALIGNED_POINTER(p,t)  1\r
+\r
+#define PGSHIFT     12              /* LOG2(NBPG) */\r
+#define NBPG        (1 << PGSHIFT)  /* bytes/page */\r
+#define PGOFSET     (NBPG-1)        /* byte offset into page */\r
+#define NPTEPG      (NBPG/(sizeof (pt_entry_t)))\r
+\r
+#define DEV_BSHIFT      9           /* log2(DEV_BSIZE) */\r
+#define DEV_BSIZE       (1 << DEV_BSHIFT)\r
+#define BLKDEV_IOSIZE   2048\r
+#ifndef MAXPHYS\r
+  #define MAXPHYS       (64 * 1024) /* max raw I/O transfer size */\r
 #endif\r
 \r
 #endif\r
 \r
-#ifndef        KERNBASE\r
-#define        KERNBASE        0xc0000000UL    /* start of kernel virtual space */\r
-#endif\r
-\r
-#define        KERNTEXTOFF     (KERNBASE + 0x100000) /* start of kernel text */\r
-#define        BTOPKERNBASE    (KERNBASE >> PGSHIFT)\r
-\r
-#define        DEV_BSHIFT      9               /* log2(DEV_BSIZE) */\r
-#define        DEV_BSIZE       (1 << DEV_BSHIFT)\r
-#define        BLKDEV_IOSIZE   2048\r
-#ifndef        MAXPHYS\r
-#define        MAXPHYS         (64 * 1024)     /* max raw I/O transfer size */\r
-#endif\r
-\r
-#define        SSIZE           1               /* initial stack size/NBPG */\r
-#define        SINCR           1               /* increment of stack/NBPG */\r
+#define SSIZE   1   /* initial stack size/NBPG */\r
+#define SINCR   1   /* increment of stack/NBPG */\r
 \r
 \r
-#ifdef _KERNEL_OPT\r
-#include "opt_noredzone.h"\r
-#endif\r
 #ifndef UPAGES\r
 #ifndef UPAGES\r
-#ifdef NOREDZONE\r
-#define        UPAGES          2               /* pages of u-area */\r
-#else\r
-#define UPAGES         3\r
-#endif /*NOREDZONE */\r
+  #ifdef NOREDZONE\r
+    #define UPAGES    2   /* pages of u-area */\r
+  #else\r
+    #define UPAGES    3\r
+  #endif /*NOREDZONE */\r
 #endif /* !defined(UPAGES) */\r
 #endif /* !defined(UPAGES) */\r
-#define        USPACE          (UPAGES * NBPG) /* total size of u-area */\r
+#define USPACE        (UPAGES * NBPG) /* total size of u-area */\r
 \r
 #ifndef MSGBUFSIZE\r
 \r
 #ifndef MSGBUFSIZE\r
-#define MSGBUFSIZE     4*NBPG          /* default message buffer size */\r
+  #define MSGBUFSIZE  4*NBPG          /* default message buffer size */\r
 #endif\r
 \r
 /*\r
 #endif\r
 \r
 /*\r
  * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple\r
  * of the hardware page size.\r
  */\r
  * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple\r
  * of the hardware page size.\r
  */\r
-#define        MSIZE           256             /* size of an mbuf */\r
+#define MSIZE         256   /* size of an mbuf */\r
 \r
 #ifndef MCLSHIFT\r
 \r
 #ifndef MCLSHIFT\r
-#define        MCLSHIFT        11              /* convert bytes to m_buf clusters */\r
-                                       /* 2K cluster can hold Ether frame */\r
-#endif /* MCLSHIFT */\r
+  #define MCLSHIFT    11    /* convert bytes to m_buf clusters */\r
+            /* 2K cluster can hold Ether frame */\r
+#endif  /* MCLSHIFT */\r
 \r
 \r
-#define        MCLBYTES        (1 << MCLSHIFT) /* size of a m_buf cluster */\r
+#define MCLBYTES      (1 << MCLSHIFT) /* size of a m_buf cluster */\r
 \r
 #ifndef NMBCLUSTERS\r
 \r
 #ifndef NMBCLUSTERS\r
-#if defined(_KERNEL_OPT)\r
-#include "opt_gateway.h"\r
-#endif\r
-\r
-#ifdef GATEWAY\r
-#define        NMBCLUSTERS     2048            /* map size, max cluster allocation */\r
-#else\r
-#define        NMBCLUSTERS     1024            /* map size, max cluster allocation */\r
-#endif\r
+  #ifdef GATEWAY\r
+    #define NMBCLUSTERS 2048    /* map size, max cluster allocation */\r
+  #else\r
+    #define NMBCLUSTERS 1024    /* map size, max cluster allocation */\r
+  #endif\r
 #endif\r
 \r
 #ifndef NFS_RSIZE\r
 #endif\r
 \r
 #ifndef NFS_RSIZE\r
-#define NFS_RSIZE      32768\r
+  #define NFS_RSIZE   32768\r
 #endif\r
 #ifndef NFS_WSIZE\r
 #endif\r
 #ifndef NFS_WSIZE\r
-#define NFS_WSIZE      32768\r
+  #define NFS_WSIZE   32768\r
 #endif\r
 \r
 /*\r
  * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized\r
  * logical pages.\r
  */\r
 #endif\r
 \r
 /*\r
  * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized\r
  * logical pages.\r
  */\r
-#define        NKMEMPAGES_MIN_DEFAULT  ((8 * 1024 * 1024) >> PAGE_SHIFT)\r
-#define        NKMEMPAGES_MAX_DEFAULT  ((128 * 1024 * 1024) >> PAGE_SHIFT)\r
+#define NKMEMPAGES_MIN_DEFAULT  ((8 * 1024 * 1024) >> PAGE_SHIFT)\r
+#define NKMEMPAGES_MAX_DEFAULT  ((128 * 1024 * 1024) >> PAGE_SHIFT)\r
 \r
 /*\r
  * Mach derived conversion macros\r
  */\r
 \r
 /*\r
  * Mach derived conversion macros\r
  */\r
-#define        x86_round_pdr(x)        ((((unsigned)(x)) + PDOFSET) & ~PDOFSET)\r
-#define        x86_trunc_pdr(x)        ((unsigned)(x) & ~PDOFSET)\r
-#define        x86_btod(x)             ((unsigned)(x) >> PDSHIFT)\r
-#define        x86_dtob(x)             ((unsigned)(x) << PDSHIFT)\r
-#define        x86_round_page(x)       ((((unsigned)(x)) + PGOFSET) & ~PGOFSET)\r
-#define        x86_trunc_page(x)       ((unsigned)(x) & ~PGOFSET)\r
-#define        x86_btop(x)             ((unsigned)(x) >> PGSHIFT)\r
-#define        x86_ptob(x)             ((unsigned)(x) << PGSHIFT)\r
+#define x86_round_pdr(x)  ((((EFI_ULONG_T)(x)) + PDOFSET) & ~PDOFSET)\r
+#define x86_trunc_pdr(x)    ((EFI_ULONG_T)(x) & ~PDOFSET)\r
+#define x86_btod(x)         ((EFI_ULONG_T)(x) >> PDSHIFT)\r
+#define x86_dtob(x)         ((EFI_ULONG_T)(x) << PDSHIFT)\r
+#define x86_round_page(x) ((((EFI_ULONG_T)(x)) + PGOFSET) & ~PGOFSET)\r
+#define x86_trunc_page(x)   ((EFI_ULONG_T)(x) & ~PGOFSET)\r
+#define x86_btop(x)         ((EFI_ULONG_T)(x) >> PGSHIFT)\r
+#define x86_ptob(x)         ((EFI_ULONG_T)(x) << PGSHIFT)\r
 \r
 #endif /* _I386_PARAM_H_ */\r
 \r
 #endif /* _I386_PARAM_H_ */\r
index 1d7180606a031d06938f4b632b43eb56a093afb9..c832f3487e815d74f45ee0d0d66d1a41cb8cf9ff 100644 (file)
@@ -1,6 +1,15 @@
-/*     $NetBSD: param.h,v 1.2 2006/08/28 13:43:35 yamt Exp $   */\r
+/** @file\r
+    Machine dependent constants for Intel Itanium Architecture(IPF).\r
+\r
+    Copyright (c) 2010-2012, Intel Corporation. All rights reserved.<BR>\r
+    This program and the accompanying materials are licensed and made available under\r
+    the terms and conditions of the BSD License that accompanies this distribution.\r
+    The full text of the license may be found at\r
+    http://opensource.org/licenses/bsd-license.\r
+\r
+    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 \r
-/*-\r
  * Copyright (c) 1990 The Regents of the University of California.\r
  * All rights reserved.\r
  *\r
  * Copyright (c) 1990 The Regents of the University of California.\r
  * All rights reserved.\r
  *\r
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
  * SUCH DAMAGE.\r
  *\r
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
  * SUCH DAMAGE.\r
  *\r
- *     @(#)param.h     5.8 (Berkeley) 6/28/91\r
+ *  @(#)param.h 5.8 (Berkeley) 6/28/91\r
+ *  $NetBSD: param.h,v 1.2 2006/08/28 13:43:35 yamt Exp\r
  */\r
  */\r
-\r
 #ifndef _IA64_PARAM_H_\r
 #define _IA64_PARAM_H_\r
 \r
 #ifndef _IA64_PARAM_H_\r
 #define _IA64_PARAM_H_\r
 \r
-/*\r
- * Machine dependent constants for Intel Itanium.\r
- */\r
-\r
-#define        _MACHINE        ia64\r
-#define        MACHINE         "ia64"\r
-#define        _MACHINE_ARCH   ia64\r
-#define        MACHINE_ARCH    "ia64"\r
-#define        MID_MACHINE     MID_IA64\r
+#define _MACHINE  ia64\r
+#define MACHINE   "ia64"\r
+#define _MACHINE_ARCH ia64\r
+#define MACHINE_ARCH  "ia64"\r
+#define MID_MACHINE MID_IA64\r
 \r
 #ifdef SMP\r
 \r
 #ifdef SMP\r
-#define        MAXCPU          16\r
+#define MAXCPU    512\r
 #else\r
 #else\r
-#define MAXCPU         1\r
+#define MAXCPU    1\r
 #endif\r
 \r
 #endif\r
 \r
-#define        DEV_BSHIFT      9               /* log2(DEV_BSIZE) */\r
-#define        DEV_BSIZE       (1<<DEV_BSHIFT)\r
-#define        BLKDEV_IOSIZE   2048\r
+#define DEV_BSHIFT  9   /* log2(DEV_BSIZE) */\r
+#define DEV_BSIZE (1<<DEV_BSHIFT)\r
+#define BLKDEV_IOSIZE 2048\r
 \r
 #ifndef MAXPHYS\r
 \r
 #ifndef MAXPHYS\r
-#define MAXPHYS                (64 * 1024)     /* max raw I/O transfer size */\r
+#define MAXPHYS   (64 * 1024) /* max raw I/O transfer size */\r
 #endif\r
 \r
 #endif\r
 \r
-#define UPAGES         4\r
-#define        USPACE          (UPAGES * NBPG) /* total size of u-area */\r
+#define UPAGES    4\r
+#define USPACE    (UPAGES * NBPG) /* total size of u-area */\r
 \r
 #ifndef MSGBUFSIZE\r
 \r
 #ifndef MSGBUFSIZE\r
-#define MSGBUFSIZE     NBPG            /* default message buffer size */\r
+#define MSGBUFSIZE  NBPG    /* default message buffer size */\r
 #endif\r
 \r
 #endif\r
 \r
-#ifndef        KSTACK_PAGES\r
-#define        KSTACK_PAGES    4               /* pages of kernel stack */\r
+#ifndef KSTACK_PAGES\r
+#define KSTACK_PAGES  4   /* pages of kernel stack */\r
 #endif\r
 #endif\r
-#define        KSTACK_GUARD_PAGES 0            /* pages of kstack guard; 0 disables */\r
+#define KSTACK_GUARD_PAGES 0    /* pages of kstack guard; 0 disables */\r
 \r
 /*\r
  * Round p (pointer or byte index) up to a correctly-aligned value\r
 \r
 /*\r
  * Round p (pointer or byte index) up to a correctly-aligned value\r
  * ALIGNED_POINTER is a boolean macro that checks whether an address\r
  * is valid to fetch data elements of type t from on this architecture.\r
  * This does not reflect the optimal alignment, just the possibility\r
  * ALIGNED_POINTER is a boolean macro that checks whether an address\r
  * is valid to fetch data elements of type t from on this architecture.\r
  * This does not reflect the optimal alignment, just the possibility\r
- * (within reasonable limits). \r
+ * (within reasonable limits).\r
  *\r
  */\r
 \r
  *\r
  */\r
 \r
-#define        ALIGNBYTES              15\r
-#define        ALIGN(p)                (((u_long)(p) + ALIGNBYTES) &~ ALIGNBYTES)\r
-#define ALIGNED_POINTER(p,t)   ((((u_long)(p)) & (sizeof(t)-1)) == 0)\r
+#define ALIGNBYTES              15\r
+#define ALIGN(p)                (((UINT64)(p) + ALIGNBYTES) &~ ALIGNBYTES)\r
+#define ALIGNED_POINTER(p,t)    ((((UINT64)(p)) & (sizeof(t)-1)) == 0)\r
 \r
 \r
-#define ALIGNBYTES32           (sizeof(int) - 1)\r
-#define ALIGN32(p)             (((u_long)(p) + ALIGNBYTES32) &~ALIGNBYTES32)\r
+#define ALIGNBYTES32            (sizeof(INT32) - 1)\r
+#define ALIGN32(p)              (((UINT64)(p) + ALIGNBYTES32) &~ALIGNBYTES32)\r
 \r
 \r
-#define        PGSHIFT         14              /* LOG2(NBPG) */\r
-#define        NBPG            (1 << PGSHIFT)  /* bytes/page */\r
-#define        PGOFSET         (NBPG-1)        /* byte offset into page */\r
-#define        NPTEPG          (NBPG/(sizeof (pt_entry_t)))\r
+#define PGSHIFT       14    /* LOG2(NBPG) */\r
+#define NBPG          (1 << PGSHIFT)  /* bytes/page */\r
+#define PGOFSET       (NBPG-1)  /* byte offset into page */\r
+#define NPTEPG        (NBPG/(sizeof (pt_entry_t)))\r
 /*\r
  * Constants related to network buffer management.\r
  * MCLBYTES must be no larger than NBPG (the software page size), and,\r
 /*\r
  * Constants related to network buffer management.\r
  * MCLBYTES must be no larger than NBPG (the software page size), and,\r
  * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple\r
  * of the hardware page size.\r
  */\r
  * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple\r
  * of the hardware page size.\r
  */\r
-#define        MSIZE           256             /* size of an mbuf */\r
+#define MSIZE         256   /* size of an mbuf */\r
 \r
 #ifndef MCLSHIFT\r
 \r
 #ifndef MCLSHIFT\r
-#define        MCLSHIFT        11              /* convert bytes to m_buf clusters */\r
-                                       /* 2K cluster can hold Ether frame */\r
-#endif /* MCLSHIFT */\r
-\r
-#define        MCLBYTES        (1 << MCLSHIFT) /* size of a m_buf cluster */\r
+  #define MCLSHIFT    11    /* convert bytes to m_buf clusters */\r
+            /* 2K cluster can hold Ether frame */\r
+#endif  /* MCLSHIFT */\r
 \r
 \r
-#ifndef NMBCLUSTERS\r
-#if defined(_KERNEL_OPT)\r
-#include "opt_gateway.h"\r
-#endif\r
+#define MCLBYTES      (1 << MCLSHIFT) /* size of a m_buf cluster */\r
 \r
 #ifdef GATEWAY\r
 \r
 #ifdef GATEWAY\r
-#define        NMBCLUSTERS     2048            /* map size, max cluster allocation */\r
+  #define NMBCLUSTERS 2048    /* map size, max cluster allocation */\r
 #else\r
 #else\r
-#define        NMBCLUSTERS     1024            /* map size, max cluster allocation */\r
+  #define NMBCLUSTERS 1024    /* map size, max cluster allocation */\r
 #endif\r
 #endif\r
 \r
 #endif\r
 #endif\r
 \r
  * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized\r
  * logical pages.\r
  */\r
  * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized\r
  * logical pages.\r
  */\r
-#define        NKMEMPAGES_MIN_DEFAULT  ((12 * 1024 * 1024) >> PAGE_SHIFT)\r
-#define        NKMEMPAGES_MAX_DEFAULT  ((128 * 1024 * 1024) >> PAGE_SHIFT)\r
+#define NKMEMPAGES_MIN_DEFAULT  ((12 * 1024 * 1024) >> PAGE_SHIFT)\r
+#define NKMEMPAGES_MAX_DEFAULT  ((128 * 1024 * 1024) >> PAGE_SHIFT)\r
 \r
 /*\r
  * Mach derived conversion macros\r
  */\r
 \r
 \r
 /*\r
  * Mach derived conversion macros\r
  */\r
 \r
-#define ia64_round_page(x)   ((((unsigned long)(x)) + NBPG - 1) & ~(NBPG - 1))\r
-#define ia64_trunc_page(x)   ((unsigned long)(x) & ~(NBPG - 1))\r
-                \r
-#define ia64_btop(x)            ((unsigned long)(x) >> PGSHIFT)\r
-#define ia64_ptob(x)            ((unsigned long)(x) << PGSHIFT) \r
-                \r
-#ifdef _KERNEL\r
-#ifndef _LOCORE\r
-\r
-#include <machine/intr.h>\r
+#define ia64_round_page(x)    ((((EFI_ULONG_T)(x)) + NBPG - 1) & ~(NBPG - 1))\r
+#define ia64_trunc_page(x)      ((EFI_ULONG_T)(x) & ~(NBPG - 1))\r
 \r
 \r
-#endif /* _LOCORE */\r
-#endif /* _KERNEL */\r
+#define ia64_btop(x)            ((EFI_ULONG_T)(x) >> PGSHIFT)\r
+#define ia64_ptob(x)            ((EFI_ULONG_T)(x) << PGSHIFT)\r
 \r
 #endif /* _IA64_PARAM_H_ */\r
 \r
 #endif /* _IA64_PARAM_H_ */\r
index abb97900319bc5283ac3adca82e98e9a00af5c8f..85269090243124b6fb39f807171078b47a4c79db 100644 (file)
@@ -1,10 +1,25 @@
-/*  $NetBSD: param.h,v 1.3 2006/08/28 13:43:35 yamt Exp $ */\r
+/** @file\r
+    Machine dependent constants for the Intel64 Architecture(X64).\r
 \r
 \r
-#define _MACHINE  amd64\r
-#define MACHINE   "amd64"\r
+    Copyright (c) 2010-2012, Intel Corporation. All rights reserved.<BR>\r
+    This program and the accompanying materials are licensed and made available under\r
+    the terms and conditions of the BSD License that accompanies this distribution.\r
+    The full text of the license may be found at\r
+    http://opensource.org/licenses/bsd-license.\r
+\r
+    THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+    WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ *  $NetBSD: param.h,v 1.3 2006/08/28 13:43:35 yamt Exp\r
+**/\r
+#ifndef _X64_PARAM_H_\r
+#define _X64_PARAM_H_\r
+\r
+#define _MACHINE      amd64\r
+#define MACHINE       "amd64"\r
 #define _MACHINE_ARCH x86_64\r
 #define MACHINE_ARCH  "x86_64"\r
 #define _MACHINE_ARCH x86_64\r
 #define MACHINE_ARCH  "x86_64"\r
-#define MID_MACHINE MID_X86_64\r
+#define MID_MACHINE   MID_X86_64\r
 \r
 /*\r
  * Round p (pointer or byte index) up to a correctly-aligned value\r
 \r
 /*\r
  * Round p (pointer or byte index) up to a correctly-aligned value\r
  * (within reasonable limits).\r
  *\r
  */\r
  * (within reasonable limits).\r
  *\r
  */\r
-#define ALIGNBYTES    (sizeof(INT64) - 1)\r
-#define ALIGN(p)    (((UINT64)(p) + ALIGNBYTES) &~ALIGNBYTES)\r
+#define ALIGNBYTES            (sizeof(INT64) - 1)\r
+#define ALIGN(p)              (((UINT64)(p) + ALIGNBYTES) &~ALIGNBYTES)\r
 #define ALIGNED_POINTER(p,t)  1\r
 \r
 #define ALIGNED_POINTER(p,t)  1\r
 \r
-#define ALIGNBYTES32    (sizeof(INT32) - 1)\r
-#define ALIGN32(p)    (((UINT32)(p) + ALIGNBYTES32) &~ALIGNBYTES32)\r
-\r
-#define PGSHIFT   12    /* LOG2(NBPG) */\r
-#define NBPG    (1 << PGSHIFT)  /* bytes/page */\r
-#define PGOFSET   (NBPG-1)  /* byte offset into page */\r
-#define NPTEPG    (NBPG/(sizeof (pt_entry_t)))\r
-\r
-/*\r
- * XXXfvdl change this (after bootstrap) to take # of bits from\r
- * config info into account.\r
- */\r
-#define KERNBASE  0xffffffff80000000 /* start of kernel virtual space */\r
-#define KERNTEXTOFF 0xffffffff80100000 /* start of kernel text */\r
-#define BTOPKERNBASE  ((u_long)KERNBASE >> PGSHIFT)\r
-\r
-#define KERNTEXTOFF_HI  0xffffffff\r
-#define KERNTEXTOFF_LO  0x80100000\r
+#define ALIGNBYTES32          (sizeof(INT32) - 1)\r
+#define ALIGN32(p)            (((UINT64)(p) + ALIGNBYTES32) &~ALIGNBYTES32)\r
 \r
 \r
-#define KERNBASE_HI 0xffffffff\r
-#define KERNBASE_LO 0x80000000\r
+#define PGSHIFT       12    /* LOG2(NBPG) */\r
+#define NBPG          (1 << PGSHIFT)  /* bytes/page */\r
+#define PGOFSET       (NBPG-1)  /* byte offset into page */\r
+#define NPTEPG        (NBPG/(sizeof (pt_entry_t)))\r
 \r
 \r
-#define DEV_BSHIFT  9   /* log2(DEV_BSIZE) */\r
-#define DEV_BSIZE (1 << DEV_BSHIFT)\r
+#define DEV_BSHIFT    9   /* log2(DEV_BSIZE) */\r
+#define DEV_BSIZE     (1 << DEV_BSHIFT)\r
 #define BLKDEV_IOSIZE 2048\r
 #ifndef MAXPHYS\r
 #define BLKDEV_IOSIZE 2048\r
 #ifndef MAXPHYS\r
-#define MAXPHYS   (64 * 1024) /* max raw I/O transfer size */\r
+  #define MAXPHYS     (64 * 1024) /* max raw I/O transfer size */\r
 #endif\r
 \r
 #endif\r
 \r
-#define SSIZE   1   /* initial stack size/NBPG */\r
-#define SINCR   1   /* increment of stack/NBPG */\r
-#define UPAGES    5   /* pages of u-area */\r
-#define USPACE    (UPAGES * NBPG) /* total size of u-area */\r
+#define SSIZE         1                 /* initial stack size/NBPG */\r
+#define SINCR         1                 /* increment of stack/NBPG */\r
+#define UPAGES        5                 /* pages of u-area */\r
+#define USPACE        (UPAGES * NBPG)   /* total size of u-area */\r
 \r
 #ifndef MSGBUFSIZE\r
 \r
 #ifndef MSGBUFSIZE\r
-#define MSGBUFSIZE  4*NBPG    /* default message buffer size */\r
+  #define MSGBUFSIZE  4*NBPG          /* default message buffer size */\r
 #endif\r
 \r
 /*\r
 #endif\r
 \r
 /*\r
  * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple\r
  * of the hardware page size.\r
  */\r
  * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple\r
  * of the hardware page size.\r
  */\r
-#define MSIZE   512   /* size of an mbuf */\r
+#define MSIZE         512   /* size of an mbuf */\r
 \r
 #ifndef MCLSHIFT\r
 \r
 #ifndef MCLSHIFT\r
-#define MCLSHIFT  11    /* convert bytes to m_buf clusters */\r
-          /* 2K cluster can hold Ether frame */\r
+  #define MCLSHIFT    11    /* convert bytes to m_buf clusters */\r
+            /* 2K cluster can hold Ether frame */\r
 #endif  /* MCLSHIFT */\r
 \r
 #endif  /* MCLSHIFT */\r
 \r
-#define MCLBYTES  (1 << MCLSHIFT) /* size of a m_buf cluster */\r
+#define MCLBYTES      (1 << MCLSHIFT) /* size of a m_buf cluster */\r
 \r
 #ifndef NMBCLUSTERS\r
   #ifdef GATEWAY\r
 \r
 #ifndef NMBCLUSTERS\r
   #ifdef GATEWAY\r
 #endif\r
 \r
 #ifndef NFS_RSIZE\r
 #endif\r
 \r
 #ifndef NFS_RSIZE\r
-  #define NFS_RSIZE       32768\r
+  #define NFS_RSIZE     32768\r
 #endif\r
 #ifndef NFS_WSIZE\r
 #endif\r
 #ifndef NFS_WSIZE\r
-  #define NFS_WSIZE       32768\r
+  #define NFS_WSIZE     32768\r
 #endif\r
 \r
 #endif\r
 \r
-/*\r
- * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized\r
- * logical pages.\r
- */\r
-//#define NKMEMPAGES_MIN_DEFAULT  ((8 * 1024 * 1024) >> PAGE_SHIFT)\r
-//#define NKMEMPAGES_MAX_DEFAULT  ((1 *1024 * 1024 * 1024) >> PAGE_SHIFT)\r
+#define x86_round_page(x) ((((EFI_ULONG_T)(x)) + PGOFSET) & ~PGOFSET)\r
+#define x86_trunc_page(x)   ((EFI_ULONG_T)(x) & ~PGOFSET)\r
+#define x86_btop(x)         ((EFI_ULONG_T)(x) >> PGSHIFT)\r
+#define x86_ptob(x)         ((EFI_ULONG_T)(x) << PGSHIFT)\r
 \r
 \r
-/*\r
- * XXXfvdl the PD* stuff is different from i386.\r
- */\r
-/*\r
- * Mach derived conversion macros\r
- */\r
-#ifdef  MACH_DCM\r
-  #define x86_round_pdr(x)  ((((unsigned long)(x)) + (NBPD_L2 - 1)) & ~(NBPD_L2 - 1))\r
-  #define x86_trunc_pdr(x)  ((unsigned long)(x) & ~(NBPD_L2 - 1))\r
-  #define x86_btod(x)       ((unsigned long)(x) >> L2_SHIFT)\r
-  #define x86_dtob(x)       ((unsigned long)(x) << L2_SHIFT)\r
-#endif  // MACH_DCM\r
-\r
-#define x86_round_page(x) ((((ULONG32)(x)) + PGOFSET) & ~PGOFSET)\r
-#define x86_trunc_page(x) ((ULONG32)(x) & ~PGOFSET)\r
-#define x86_btop(x)   ((ULONG32)(x) >> PGSHIFT)\r
-#define x86_ptob(x)   ((ULONG32)(x) << PGSHIFT)\r
-\r
-#define btop(x)       x86_btop(x)\r
-#define ptob(x)       x86_ptob(x)\r
+#define btop(x)           x86_btop(x)\r
+#define ptob(x)           x86_ptob(x)\r
 #define round_pdr(x)      x86_round_pdr(x)\r
 \r
 #define mstohz(ms) ((ms + 0UL) * hz / 1000)\r
 #define round_pdr(x)      x86_round_pdr(x)\r
 \r
 #define mstohz(ms) ((ms + 0UL) * hz / 1000)\r
+\r
+#endif  /* _X64_PARAM_H_ */\r
index 812a495d95a28f2dbc5c043d99f0818fe4223f56..be114ddbe487014b8a81863c01e4cfb41b5b8d88 100644 (file)
@@ -22,7 +22,7 @@
     This file and its contents are inspired by the <sys/cdefs.h> files in Berkeley\r
     Unix.  They have been re-implemented to be specific to the EFI environment.\r
 \r
     This file and its contents are inspired by the <sys/cdefs.h> files in Berkeley\r
     Unix.  They have been re-implemented to be specific to the EFI environment.\r
 \r
-    Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+    Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
   #error You must specify /Zc:wchar_t- to the compiler to turn off intrinsic wchar_t.\r
   #endif\r
 \r
   #error You must specify /Zc:wchar_t- to the compiler to turn off intrinsic wchar_t.\r
   #endif\r
 \r
+  /* Get rid of pre-defined macros that are misleading in this environment. */\r
+  #undef  _WIN32\r
+  #undef  _WIN64\r
+\r
   // Keep compiler quiet about casting from smaller to larger types\r
   #pragma warning ( disable : 4306 )\r
 #endif  /* defined(_MSC_VER) */\r
   // Keep compiler quiet about casting from smaller to larger types\r
   #pragma warning ( disable : 4306 )\r
 #endif  /* defined(_MSC_VER) */\r
@@ -344,8 +348,8 @@ typedef UINT32  ULONG32;
 typedef  INT64   LONG64;\r
 typedef UINT64  ULONG64;\r
 \r
 typedef  INT64   LONG64;\r
 typedef UINT64  ULONG64;\r
 \r
-typedef   INT32   EFI_LONG_T;\r
-typedef  UINT32   EFI_ULONG_T;\r
+typedef   INTN   EFI_LONG_T;\r
+typedef  UINTN   EFI_ULONG_T;\r
 \r
 /* These types reflect the compiler's size for long */\r
 #if defined(__GNUC__)\r
 \r
 /* These types reflect the compiler's size for long */\r
 #if defined(__GNUC__)\r
index 59a72bd6308d26d5229382dd6a1f3b1d081eac15..523965fa4368b53d975b3b99027d34593954747b 100644 (file)
@@ -4,7 +4,7 @@
   All of the global data in the gMD structure is initialized to 0, NULL, or\r
   SIG_DFL; as appropriate.\r
 \r
   All of the global data in the gMD structure is initialized to 0, NULL, or\r
   SIG_DFL; as appropriate.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials are licensed and made available under\r
   the terms and conditions of the BSD License that accompanies this distribution.\r
   The full text of the license may be found at\r
   This program and the accompanying materials are licensed and made available under\r
   the terms and conditions of the BSD License that accompanies this distribution.\r
   The full text of the license may be found at\r
@@ -74,7 +74,7 @@ static
 char **\r
 ArgvConvert(UINTN Argc, CHAR16 **Argv)\r
 {\r
 char **\r
 ArgvConvert(UINTN Argc, CHAR16 **Argv)\r
 {\r
-  size_t  AVsz;       /* Size of a single nArgv string */\r
+  ssize_t  AVsz;       /* Size of a single nArgv string, or -1 */\r
   UINTN   count;\r
   char  **nArgv;\r
   char   *string;\r
   UINTN   count;\r
   char  **nArgv;\r
   char   *string;\r
@@ -90,7 +90,7 @@ DEBUG_CODE_END();
   nArgvSize = Argc;\r
   /* Determine space needed for narrow Argv strings. */\r
   for(count = 0; count < Argc; ++count) {\r
   nArgvSize = Argc;\r
   /* Determine space needed for narrow Argv strings. */\r
   for(count = 0; count < Argc; ++count) {\r
-    AVsz = wcstombs(NULL, Argv[count], ARG_MAX);\r
+    AVsz = (ssize_t)wcstombs(NULL, Argv[count], ARG_MAX);\r
     if(AVsz < 0) {\r
       Print(L"ABORTING: Argv[%d] contains an unconvertable character.\n", count);\r
       exit(EXIT_FAILURE);\r
     if(AVsz < 0) {\r
       Print(L"ABORTING: Argv[%d] contains an unconvertable character.\n", count);\r
       exit(EXIT_FAILURE);\r
index 989663a01e74afe555b9f87f3094713fdfb08845..5cc6b8e44e21e994681656a2576e420639d5ac30 100644 (file)
@@ -1,35 +1,48 @@
-/* $NetBSD: strtod.c,v 1.4.14.1 2008/04/08 21:10:55 jdc Exp $ */\r
-\r
-/****************************************************************\r
-\r
-The author of this software is David M. Gay.\r
-\r
-Copyright (C) 1998-2001 by Lucent Technologies\r
-All Rights Reserved\r
-\r
-Permission to use, copy, modify, and distribute this software and\r
-its documentation for any purpose and without fee is hereby\r
-granted, provided that the above copyright notice appear in all\r
-copies and that both that the copyright notice and this\r
-permission notice and warranty disclaimer appear in supporting\r
-documentation, and that the name of Lucent or any of its entities\r
-not be used in advertising or publicity pertaining to\r
-distribution of the software without specific, written prior\r
-permission.\r
-\r
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\r
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.\r
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY\r
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\r
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER\r
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\r
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\r
-THIS SOFTWARE.\r
-\r
-****************************************************************/\r
-\r
-/* Please send bug reports to David M. Gay (dmg at acm dot org,\r
- * with " at " changed at "@" and " dot " changed to ".").  */\r
+/** @file\r
+\r
+  Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+  *****************************************************************\r
+\r
+  The author of this software is David M. Gay.\r
+\r
+  Copyright (C) 1998-2001 by Lucent Technologies\r
+  All Rights Reserved\r
+\r
+  Permission to use, copy, modify, and distribute this software and\r
+  its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of Lucent or any of its entities\r
+  not be used in advertising or publicity pertaining to\r
+  distribution of the software without specific, written prior\r
+  permission.\r
+\r
+  LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\r
+  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.\r
+  IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY\r
+  SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\r
+  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER\r
+  IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\r
+  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\r
+  THIS SOFTWARE.\r
+\r
+\r
+  Please send bug reports to David M. Gay (dmg at acm dot org,\r
+  with " at " changed at "@" and " dot " changed to ".").\r
+\r
+  *****************************************************************\r
+\r
+  NetBSD: strtod.c,v 1.4.14.1 2008/04/08 21:10:55 jdc Exp\r
+**/\r
 #include  <LibConfig.h>\r
 \r
 #include "gdtoaimp.h"\r
 #include  <LibConfig.h>\r
 \r
 #include "gdtoaimp.h"\r
@@ -477,7 +490,7 @@ strtod(CONST char *s00, char **se)
       for(j = 0; e1 > 0; j++, e1 = (unsigned int)e1 >> 1)\r
         if (e1 & 1)\r
           dval(rv) *= tinytens[j];\r
       for(j = 0; e1 > 0; j++, e1 = (unsigned int)e1 >> 1)\r
         if (e1 & 1)\r
           dval(rv) *= tinytens[j];\r
-      if (scale && (j = 2*P + 1 - ((word0(rv) & Exp_mask)\r
+      if (scale && (j = 2*P + 1 - (unsigned int)((word0(rv) & Exp_mask)\r
             >> Exp_shift)) > 0) {\r
         /* scaled rv is denormal; zap j low bits */\r
         if (j >= 32) {\r
             >> Exp_shift)) > 0) {\r
         /* scaled rv is denormal; zap j low bits */\r
         if (j >= 32) {\r
index fc0ae7cf38575f254e269e94b27d11bb26ad36a7..a8c28cf09153bbca81e7e812721804ddaafc3812 100644 (file)
@@ -1,35 +1,48 @@
-/* $NetBSD: strtodg.c,v 1.5.14.1 2008/04/08 21:10:55 jdc Exp $ */\r
+/** @file\r
 \r
 \r
-/****************************************************************\r
+  Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.\r
 \r
 \r
-The author of this software is David M. Gay.\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 \r
-Copyright (C) 1998-2001 by Lucent Technologies\r
-All Rights Reserved\r
+  *****************************************************************\r
 \r
 \r
-Permission to use, copy, modify, and distribute this software and\r
-its documentation for any purpose and without fee is hereby\r
-granted, provided that the above copyright notice appear in all\r
-copies and that both that the copyright notice and this\r
-permission notice and warranty disclaimer appear in supporting\r
-documentation, and that the name of Lucent or any of its entities\r
-not be used in advertising or publicity pertaining to\r
-distribution of the software without specific, written prior\r
-permission.\r
+  The author of this software is David M. Gay.\r
 \r
 \r
-LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\r
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.\r
-IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY\r
-SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\r
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER\r
-IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\r
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\r
-THIS SOFTWARE.\r
+  Copyright (C) 1998-2001 by Lucent Technologies\r
+  All Rights Reserved\r
 \r
 \r
-****************************************************************/\r
+  Permission to use, copy, modify, and distribute this software and\r
+  its documentation for any purpose and without fee is hereby\r
+  granted, provided that the above copyright notice appear in all\r
+  copies and that both that the copyright notice and this\r
+  permission notice and warranty disclaimer appear in supporting\r
+  documentation, and that the name of Lucent or any of its entities\r
+  not be used in advertising or publicity pertaining to\r
+  distribution of the software without specific, written prior\r
+  permission.\r
 \r
 \r
-/* Please send bug reports to David M. Gay (dmg at acm dot org,\r
- * with " at " changed at "@" and " dot " changed to ".").  */\r
+  LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,\r
+  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.\r
+  IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY\r
+  SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\r
+  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER\r
+  IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\r
+  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\r
+  THIS SOFTWARE.\r
+\r
+\r
+  Please send bug reports to David M. Gay (dmg at acm dot org,\r
+  with " at " changed at "@" and " dot " changed to ".").\r
+\r
+  *****************************************************************\r
+\r
+  NetBSD: strtodg.c,v 1.5.14.1 2008/04/08 21:10:55 jdc Exp\r
+**/\r
 #include  <LibConfig.h>\r
 \r
 #include "gdtoaimp.h"\r
 #include  <LibConfig.h>\r
 \r
 #include "gdtoaimp.h"\r
@@ -611,14 +624,14 @@ strtodg
     if (e1 &= ~15) {\r
       e1 = (unsigned int)e1 >> 4;\r
       while(e1 >= (1 << (n_bigtens-1))) {\r
     if (e1 &= ~15) {\r
       e1 = (unsigned int)e1 >> 4;\r
       while(e1 >= (1 << (n_bigtens-1))) {\r
-        e2 += ((word0(rv) & Exp_mask)\r
+        e2 += (unsigned int)((word0(rv) & Exp_mask)\r
           >> Exp_shift1) - Bias;\r
         word0(rv) &= ~Exp_mask;\r
         word0(rv) |= Bias << Exp_shift1;\r
         dval(rv) *= bigtens[n_bigtens-1];\r
         e1 -= 1 << (n_bigtens-1);\r
         }\r
           >> Exp_shift1) - Bias;\r
         word0(rv) &= ~Exp_mask;\r
         word0(rv) |= Bias << Exp_shift1;\r
         dval(rv) *= bigtens[n_bigtens-1];\r
         e1 -= 1 << (n_bigtens-1);\r
         }\r
-      e2 += ((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;\r
+      e2 += (unsigned int)((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;\r
       word0(rv) &= ~Exp_mask;\r
       word0(rv) |= Bias << Exp_shift1;\r
       for(j = 0; e1 > 0; j++, e1 = (unsigned int)e1 >> 1)\r
       word0(rv) &= ~Exp_mask;\r
       word0(rv) |= Bias << Exp_shift1;\r
       for(j = 0; e1 > 0; j++, e1 = (unsigned int)e1 >> 1)\r
@@ -633,14 +646,14 @@ strtodg
     if (e1 &= ~15) {\r
       e1 = (unsigned int)e1 >> 4;\r
       while(e1 >= (1 << (n_bigtens-1))) {\r
     if (e1 &= ~15) {\r
       e1 = (unsigned int)e1 >> 4;\r
       while(e1 >= (1 << (n_bigtens-1))) {\r
-        e2 += ((word0(rv) & Exp_mask)\r
+        e2 += (unsigned int)((word0(rv) & Exp_mask)\r
           >> Exp_shift1) - Bias;\r
         word0(rv) &= ~Exp_mask;\r
         word0(rv) |= Bias << Exp_shift1;\r
         dval(rv) *= tinytens[n_bigtens-1];\r
         e1 -= 1 << (n_bigtens-1);\r
         }\r
           >> Exp_shift1) - Bias;\r
         word0(rv) &= ~Exp_mask;\r
         word0(rv) |= Bias << Exp_shift1;\r
         dval(rv) *= tinytens[n_bigtens-1];\r
         e1 -= 1 << (n_bigtens-1);\r
         }\r
-      e2 += ((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;\r
+      e2 += (unsigned int)((word0(rv) & Exp_mask) >> Exp_shift1) - Bias;\r
       word0(rv) &= ~Exp_mask;\r
       word0(rv) |= Bias << Exp_shift1;\r
       for(j = 0; e1 > 0; j++, e1 = (unsigned int)e1 >> 1)\r
       word0(rv) &= ~Exp_mask;\r
       word0(rv) |= Bias << Exp_shift1;\r
       for(j = 0; e1 > 0; j++, e1 = (unsigned int)e1 >> 1)\r
index fa1865659ba80d36fa80c98cdc5a820c48873d29..013977c52a9416b5076910f4826a0526eefb3d22 100644 (file)
@@ -5,7 +5,7 @@
 # The including DSC file must DEFINE the EMULATE macro if\r
 # the application is to be run in an emulation environment.\r
 #\r
 # The including DSC file must DEFINE the EMULATE macro if\r
 # the application is to be run in an emulation environment.\r
 #\r
-#  Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution. The full text of the license may be found at\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
 #  which accompanies this distribution. The full text of the license may be found at\r
 !ifndef $(EMULATE)\r
   # These Build Options are used when building the Standard Libraries to be run\r
   # on real hardware.\r
 !ifndef $(EMULATE)\r
   # These Build Options are used when building the Standard Libraries to be run\r
   # on real hardware.\r
-  INTEL:*_*_*_CC_FLAGS      = /Qfreestanding\r
-   MSFT:*_*_*_CC_FLAGS      = /X /Zc:wchar_t\r
-    GCC:*_*_*_CC_FLAGS      = -nostdinc -nostdlib\r
-    RVCT:*_*_*_CC_FLAGS      = --library_interface=none -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm\r
-  ARMGCC:*_*_*_CC_FLAGS      = -nostdinc -nostdlib -Wno-unknown-pragmas -Wno-unused -Wno-format-zero-length\r
+  INTEL:*_*_*_CC_FLAGS      = /Qfreestanding /D UEFI_C_SOURCE\r
+   MSFT:*_*_*_CC_FLAGS      = /X /Zc:wchar_t /D UEFI_C_SOURCE\r
+    GCC:*_*_*_CC_FLAGS      = -nostdinc -nostdlib -DUEFI_C_SOURCE\r
+    RVCT:*_*_*_CC_FLAGS      = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm\r
+  ARMGCC:*_*_*_CC_FLAGS      = -nostdinc -nostdlib -DUEFI_C_SOURCE -Wno-unknown-pragmas -Wno-unused -Wno-format-zero-length\r
 \r
 !else\r
   # The Build Options, below, are only used when building the Standard Libraries\r
   # to be run under an emulation environment.\r
   # They disable optimization which facillitates debugging under the Emulation environment.\r
 \r
 !else\r
   # The Build Options, below, are only used when building the Standard Libraries\r
   # to be run under an emulation environment.\r
   # They disable optimization which facillitates debugging under the Emulation environment.\r
-  INTEL:*_*_IA32_CC_FLAGS     = /Od\r
-   MSFT:*_*_IA32_CC_FLAGS     = /Od\r
-    GCC:*_*_IA32_CC_FLAGS     = -O0\r
-    RVCT:*_*_*_CC_FLAGS      = --library_interface=none -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm\r
-  ARMGCC:*_*_*_CC_FLAGS      = -O0 -Wno-unknown-pragmas -Wno-unused -Wno-format-zero-length\r
+  INTEL:*_*_IA32_CC_FLAGS     = /Od /D UEFI_C_SOURCE\r
+   MSFT:*_*_IA32_CC_FLAGS     = /Od /D UEFI_C_SOURCE\r
+    GCC:*_*_IA32_CC_FLAGS     = -O0 -DUEFI_C_SOURCE\r
+    RVCT:*_*_*_CC_FLAGS      = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm\r
+  ARMGCC:*_*_*_CC_FLAGS      = -O0 -DUEFI_C_SOURCE -Wno-unknown-pragmas -Wno-unused -Wno-format-zero-length\r
 !endif\r
 !endif\r
index e0303dca114f4c2af198dace9bc1f11bbee4198e..cffb59559d2e4421af0d129d75984e560848222d 100644 (file)
@@ -1,6 +1,15 @@
-/*  $NetBSD: extern.h,v 1.14 2006/11/22 17:23:25 christos Exp $ */\r
+/*  @file\r
+    Misc. external declarations.\r
+\r
+  Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials are licensed and made available under\r
+  the terms and conditions of the BSD License that accompanies this distribution.\r
+  The full text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.\r
+\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 \r
-/*\r
  * Copyright (c) 1997 Christos Zoulas.  All rights reserved.\r
  *\r
  * Redistribution and use in source and binary forms, with or without\r
  * Copyright (c) 1997 Christos Zoulas.  All rights reserved.\r
  *\r
  * Redistribution and use in source and binary forms, with or without\r
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\r
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+    NetBSD: extern.h,v 1.14 2006/11/22 17:23:25 christos Exp\r
  */\r
 #include  <Uefi.h>\r
 #include  <time.h>\r
 \r
 __BEGIN_DECLS\r
  */\r
 #include  <Uefi.h>\r
 #include  <time.h>\r
 \r
 __BEGIN_DECLS\r
-extern char *__minbrk;\r
-int __getcwd(char *, size_t);\r
-int __getlogin(char *, size_t);\r
-int __setlogin(const char *);\r
-void _resumecontext(void);\r
-const char *__strerror(int , char *, size_t);\r
-const char *__strsignal(int , char *, size_t);\r
-char *__dtoa(double, int, int, int *, int *, char **);\r
-void __freedtoa(char *);\r
-int __sysctl(const int *, unsigned int, void *, size_t *, const void *, size_t);\r
+extern char * __minbrk;\r
+int           __getcwd(char *, size_t);\r
+int           __getlogin(char *, size_t);\r
+int           __setlogin(const char *);\r
+void          _resumecontext(void);\r
+const char  * __strerror(int , char *, size_t);\r
+const char  * __strsignal(int , char *, size_t);\r
+char        * __dtoa(double, int, int, int *, int *, char **);\r
+void          __freedtoa(char *);\r
+int           __sysctl(const int *, unsigned int, void *, size_t *, const void *, size_t);\r
 \r
 \r
-//struct sigaction;\r
-//int __sigaction_sigtramp(int, const struct sigaction *,\r
-//    struct sigaction *, const void *, int);\r
+#ifdef  HAVE_SIGACTION\r
+  struct      sigaction;\r
+  int         __sigaction_sigtramp (int, const struct sigaction *,\r
+                                    struct sigaction *, const void *, int);\r
+#endif  /* HAVE_SIGACTION */\r
 \r
 #ifdef WIDE_DOUBLE\r
 \r
 #ifdef WIDE_DOUBLE\r
-  char *__hdtoa(double, const char *, int, int *, int *, char **);\r
-  char *__hldtoa(long double, const char *, int, int *, int *,  char **);\r
-  char *__ldtoa(long double *, int, int, int *, int *, char **);\r
+  char      * __hdtoa(double, const char *, int, int *, int *, char **);\r
+  char      * __hldtoa(long double, const char *, int, int *, int *,  char **);\r
+  char      * __ldtoa(long double *, int, int, int *, int *, char **);\r
 #endif\r
 \r
 #endif\r
 \r
-//struct syslog_data;\r
-//void  syslog_ss(int, struct syslog_data *, const char *, ...)\r
-//    __attribute__((__format__(__printf__,3,4)));\r
-//void  vsyslog_ss(int, struct syslog_data *, const char *, _BSD_VA_LIST_);\r
+#ifdef  HAVE_SYSLOG\r
+  struct syslog_data;\r
+  void  syslog_ss(int, struct syslog_data *, const char *, ...)\r
+      __attribute__((__format__(__printf__,3,4)));\r
+  void  vsyslog_ss(int, struct syslog_data *, const char *, _BSD_VA_LIST_);\r
+#endif  /* HAVE_SYSLOG */\r
+\r
+#ifdef  HAVE_SNPRINTF_SS\r
+  int snprintf_ss(char * __restrict, size_t, const char * __restrict, ...)\r
+                  __attribute__((__format__(__printf__, 3, 4)));\r
+#endif  /* HAVE_SNPRINTF_SS */\r
 \r
 \r
-//int snprintf_ss(char * __restrict, size_t, const char * __restrict, ...)\r
-//    __attribute__((__format__(__printf__, 3, 4)));\r
-//int vsnprintf_ss(char * __restrict, size_t, const char * __restrict,\r
-//    _BSD_VA_LIST_) __attribute__((__format__(__printf__, 3, 0)));\r
+#ifdef  HAVE_VSNPRINTF_SS\r
+  int vsnprintf_ss(char * __restrict, size_t, const char * __restrict,\r
+                    _BSD_VA_LIST_) __attribute__((__format__(__printf__, 3, 0)));\r
+#endif  /* HAVE_VSNPRINTF_SS */\r
 \r
 void    Efi2Tm( EFI_TIME *ET, struct tm *BT);\r
 time_t  Efi2Time( EFI_TIME *EfiBDtime);\r
 \r
 void    Efi2Tm( EFI_TIME *ET, struct tm *BT);\r
 time_t  Efi2Time( EFI_TIME *EfiBDtime);\r