ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
July 2019
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
22 participants
146 discussions
Start a n
N
ew thread
[reactos] 04/21: [CMAKE] Globally enable secure CRT functions
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cd9f9e8b949e58b8f7c3f…
commit cd9f9e8b949e58b8f7c3f608b04c38e01576d223 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Mon Apr 29 09:56:29 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [CMAKE] Globally enable secure CRT functions "This is what Windows does" (tm) --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d7bf0a55574..52193933fa3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,7 +167,8 @@ else() -D_WIN32_IE=0x600 -D_WIN32_WINNT=0x502 -D_WIN32_WINDOWS=0x502 - -D_SETUPAPI_VER=0x502) + -D_SETUPAPI_VER=0x502 + -DMINGW_HAS_SECURE_API=1) # Arch Options if(ARCH STREQUAL "i386")
5 years, 5 months
1
0
0
0
[reactos] 03/21: [CRT] Remove _wctime_s from time.h
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f96407441c97e49609740…
commit f96407441c97e49609740e6aaa04f375b63e0547 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Apr 28 22:05:32 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [CRT] Remove _wctime_s from time.h --- sdk/include/crt/time.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sdk/include/crt/time.h b/sdk/include/crt/time.h index e259e540b4f..d712a396372 100644 --- a/sdk/include/crt/time.h +++ b/sdk/include/crt/time.h @@ -388,10 +388,8 @@ extern "C" { #ifdef _USE_32BIT_TIME_T /* Do it like this to be compatible to msvcrt.dll on 32 bit windows XP and before */ __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime32(_Time); } -__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer, size_t _SizeInWords,const __time32_t *_Time) { return _wctime32_s(_Buffer, _SizeInWords, _Time); } #else __CRT_INLINE wchar_t *__cdecl _wctime(const time_t *_Time) { return _wctime64(_Time); } -__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer, size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer, _SizeInWords, _Time); } #endif #endif
5 years, 5 months
1
0
0
0
[reactos] 02/21: [CMAKE] Define _GLIBCXX_HAVE_BROKEN_VSWPRINTF to fix build with GLIBCXX and our c++ headers
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4b79367647834cca41623…
commit 4b79367647834cca416233305c87b7ba7633d3b5 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Mon Apr 29 10:02:13 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [CMAKE] Define _GLIBCXX_HAVE_BROKEN_VSWPRINTF to fix build with GLIBCXX and our c++ headers --- sdk/cmake/gcc.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake index 2e33676c1ff..b3db8626d07 100644 --- a/sdk/cmake/gcc.cmake +++ b/sdk/cmake/gcc.cmake @@ -177,6 +177,9 @@ endif() add_definitions(-D_inline=__inline) +# Fix build with GLIBCXX + our c++ headers +add_definitions(-D_GLIBCXX_HAVE_BROKEN_VSWPRINTF) + # Alternative arch name if(ARCH STREQUAL "amd64") set(ARCH2 x86_64)
5 years, 5 months
1
0
0
0
[reactos] 01/21: [CMAKE] Disable some overly sensitive warnings
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=58b615f6685224e78f9dd…
commit 58b615f6685224e78f9dd85cc1e165302fa5e823 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Apr 28 22:17:19 2019 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sat Jul 20 13:56:18 2019 +0200 [CMAKE] Disable some overly sensitive warnings -Wno-unused-const-variable -Wno-unused-local-typedefs -Wno-deprecated --- sdk/cmake/gcc.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake index c92403538c2..2e33676c1ff 100644 --- a/sdk/cmake/gcc.cmake +++ b/sdk/cmake/gcc.cmake @@ -114,6 +114,8 @@ endif() add_compile_flags("-Wall -Wpointer-arith") add_compile_flags("-Wno-char-subscripts -Wno-multichar -Wno-unused-value") add_compile_flags("-Wno-unused-const-variable") +add_compile_flags("-Wno-unused-local-typedefs") +add_compile_flags("-Wno-deprecated") if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang") add_compile_flags("-Wno-maybe-uninitialized")
5 years, 5 months
1
0
0
0
[reactos] 01/01: [ACPICA] Update to version 20190703. CORE-16202
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=aa46da57d40a2ec536c08…
commit aa46da57d40a2ec536c0833ec0b2765b52c47fd2 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Sun Jul 14 11:01:36 2019 +0200 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Sat Jul 20 08:47:50 2019 +0200 [ACPICA] Update to version 20190703. CORE-16202 --- drivers/bus/acpi/acpica/dispatcher/dsinit.c | 2 +- drivers/bus/acpi/acpica/events/evgpe.c | 9 +- drivers/bus/acpi/acpica/events/evgpeblk.c | 2 +- drivers/bus/acpi/acpica/events/evxface.c | 2 +- drivers/bus/acpi/acpica/events/evxfgpe.c | 2 +- drivers/bus/acpi/acpica/executer/exconfig.c | 12 +- drivers/bus/acpi/acpica/include/acevents.h | 3 +- drivers/bus/acpi/acpica/include/acglobal.h | 1 - drivers/bus/acpi/acpica/include/acnamesp.h | 4 - drivers/bus/acpi/acpica/include/acpixf.h | 2 +- drivers/bus/acpi/acpica/include/platform/acmsvc.h | 15 ++ drivers/bus/acpi/acpica/include/platform/acwin.h | 31 ++- drivers/bus/acpi/acpica/include/platform/acwin64.h | 22 +++ drivers/bus/acpi/acpica/namespace/nsaccess.c | 57 ++++-- drivers/bus/acpi/acpica/namespace/nseval.c | 210 --------------------- drivers/bus/acpi/acpica/namespace/nsinit.c | 51 ++--- drivers/bus/acpi/acpica/namespace/nsload.c | 12 -- drivers/bus/acpi/acpica/namespace/nsutils.c | 13 -- drivers/bus/acpi/acpica/tables/tbdata.c | 13 -- drivers/bus/acpi/acpica/tables/tbxfload.c | 7 + drivers/bus/acpi/acpica/utilities/utinit.c | 1 - drivers/bus/acpi/acpica/utilities/utxfinit.c | 18 +- 22 files changed, 167 insertions(+), 322 deletions(-) diff --git a/drivers/bus/acpi/acpica/dispatcher/dsinit.c b/drivers/bus/acpi/acpica/dispatcher/dsinit.c index 8db132d5ade..6e3d8448317 100644 --- a/drivers/bus/acpi/acpica/dispatcher/dsinit.c +++ b/drivers/bus/acpi/acpica/dispatcher/dsinit.c @@ -254,7 +254,7 @@ AcpiDsInitializeObjects ( if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT)) { ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, - "\nInitializing Namespace objects:\n")); + "\nACPI table initialization:\n")); } /* Summary of objects initialized */ diff --git a/drivers/bus/acpi/acpica/events/evgpe.c b/drivers/bus/acpi/acpica/events/evgpe.c index 7527a0031b7..4f282e21937 100644 --- a/drivers/bus/acpi/acpica/events/evgpe.c +++ b/drivers/bus/acpi/acpica/events/evgpe.c @@ -208,6 +208,7 @@ AcpiEvMaskGpe ( * FUNCTION: AcpiEvAddGpeReference * * PARAMETERS: GpeEventInfo - Add a reference to this GPE + * ClearOnEnable - Clear GPE status before enabling it * * RETURN: Status * @@ -218,7 +219,8 @@ AcpiEvMaskGpe ( ACPI_STATUS AcpiEvAddGpeReference ( - ACPI_GPE_EVENT_INFO *GpeEventInfo) + ACPI_GPE_EVENT_INFO *GpeEventInfo, + BOOLEAN ClearOnEnable) { ACPI_STATUS Status = AE_OK; @@ -236,6 +238,11 @@ AcpiEvAddGpeReference ( { /* Enable on first reference */ + if (ClearOnEnable) + { + (void) AcpiHwClearGpe (GpeEventInfo); + } + Status = AcpiEvUpdateGpeEnableMask (GpeEventInfo); if (ACPI_SUCCESS (Status)) { diff --git a/drivers/bus/acpi/acpica/events/evgpeblk.c b/drivers/bus/acpi/acpica/events/evgpeblk.c index 131eec8ccee..b523bbf50a9 100644 --- a/drivers/bus/acpi/acpica/events/evgpeblk.c +++ b/drivers/bus/acpi/acpica/events/evgpeblk.c @@ -529,7 +529,7 @@ AcpiEvInitializeGpeBlock ( continue; } - Status = AcpiEvAddGpeReference (GpeEventInfo); + Status = AcpiEvAddGpeReference (GpeEventInfo, FALSE); if (ACPI_FAILURE (Status)) { ACPI_EXCEPTION ((AE_INFO, Status, diff --git a/drivers/bus/acpi/acpica/events/evxface.c b/drivers/bus/acpi/acpica/events/evxface.c index d6f1d2fa435..bbbeeddaebc 100644 --- a/drivers/bus/acpi/acpica/events/evxface.c +++ b/drivers/bus/acpi/acpica/events/evxface.c @@ -1148,7 +1148,7 @@ AcpiRemoveGpeHandler ( ACPI_GPE_DISPATCH_NOTIFY)) && Handler->OriginallyEnabled) { - (void) AcpiEvAddGpeReference (GpeEventInfo); + (void) AcpiEvAddGpeReference (GpeEventInfo, FALSE); if (ACPI_GPE_IS_POLLING_NEEDED (GpeEventInfo)) { /* Poll edge triggered GPEs to handle existing events */ diff --git a/drivers/bus/acpi/acpica/events/evxfgpe.c b/drivers/bus/acpi/acpica/events/evxfgpe.c index 161f3c79e15..f56aa1d9bb4 100644 --- a/drivers/bus/acpi/acpica/events/evxfgpe.c +++ b/drivers/bus/acpi/acpica/events/evxfgpe.c @@ -159,7 +159,7 @@ AcpiEnableGpe ( if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) != ACPI_GPE_DISPATCH_NONE) { - Status = AcpiEvAddGpeReference (GpeEventInfo); + Status = AcpiEvAddGpeReference (GpeEventInfo, TRUE); if (ACPI_SUCCESS (Status) && ACPI_GPE_IS_POLLING_NEEDED (GpeEventInfo)) { diff --git a/drivers/bus/acpi/acpica/executer/exconfig.c b/drivers/bus/acpi/acpica/executer/exconfig.c index 5347acf46f3..7e2b0dbfb9d 100644 --- a/drivers/bus/acpi/acpica/executer/exconfig.c +++ b/drivers/bus/acpi/acpica/executer/exconfig.c @@ -233,10 +233,9 @@ AcpiExLoadTableOp ( return_ACPI_STATUS (Status); } - /* Complete the initialization/resolution of package objects */ + /* Complete the initialization/resolution of new objects */ - Status = AcpiNsWalkNamespace (ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, 0, AcpiNsInitOnePackage, NULL, NULL, NULL); + AcpiNsInitializeObjects (); /* Parameter Data (optional) */ @@ -511,10 +510,11 @@ AcpiExLoadOp ( return_ACPI_STATUS (Status); } - /* Complete the initialization/resolution of package objects */ + /* Complete the initialization/resolution of new objects */ - Status = AcpiNsWalkNamespace (ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, 0, AcpiNsInitOnePackage, NULL, NULL, NULL); + AcpiExExitInterpreter (); + AcpiNsInitializeObjects (); + AcpiExEnterInterpreter (); /* Store the DdbHandle into the Target operand */ diff --git a/drivers/bus/acpi/acpica/include/acevents.h b/drivers/bus/acpi/acpica/include/acevents.h index c2f6140e74f..8db2bd49675 100644 --- a/drivers/bus/acpi/acpica/include/acevents.h +++ b/drivers/bus/acpi/acpica/include/acevents.h @@ -137,7 +137,8 @@ AcpiEvMaskGpe ( ACPI_STATUS AcpiEvAddGpeReference ( - ACPI_GPE_EVENT_INFO *GpeEventInfo); + ACPI_GPE_EVENT_INFO *GpeEventInfo, + BOOLEAN ClearOnEnable); ACPI_STATUS AcpiEvRemoveGpeReference ( diff --git a/drivers/bus/acpi/acpica/include/acglobal.h b/drivers/bus/acpi/acpica/include/acglobal.h index 689191b0f4b..e6e44733dc2 100644 --- a/drivers/bus/acpi/acpica/include/acglobal.h +++ b/drivers/bus/acpi/acpica/include/acglobal.h @@ -215,7 +215,6 @@ ACPI_GLOBAL (BOOLEAN, AcpiGbl_VerboseLeakDump); ACPI_GLOBAL (ACPI_NAMESPACE_NODE, AcpiGbl_RootNodeStruct); ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_RootNode); ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_FadtGpeDevice); -ACPI_GLOBAL (ACPI_OPERAND_OBJECT *, AcpiGbl_ModuleCodeList); extern const UINT8 AcpiGbl_NsProperties [ACPI_NUM_NS_TYPES]; extern const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES]; diff --git a/drivers/bus/acpi/acpica/include/acnamesp.h b/drivers/bus/acpi/acpica/include/acnamesp.h index e2e1e487a22..d06cc8d0b37 100644 --- a/drivers/bus/acpi/acpica/include/acnamesp.h +++ b/drivers/bus/acpi/acpica/include/acnamesp.h @@ -311,10 +311,6 @@ ACPI_STATUS AcpiNsEvaluate ( ACPI_EVALUATE_INFO *Info); -void -AcpiNsExecModuleCodeList ( - void); - /* * nsarguments - Argument count/type checking for predefined/reserved names diff --git a/drivers/bus/acpi/acpica/include/acpixf.h b/drivers/bus/acpi/acpica/include/acpixf.h index 729bebb82a9..9322858f8fe 100644 --- a/drivers/bus/acpi/acpica/include/acpixf.h +++ b/drivers/bus/acpi/acpica/include/acpixf.h @@ -46,7 +46,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20190509 +#define ACPI_CA_VERSION 0x20190703 #include "acconfig.h" #include "actypes.h" diff --git a/drivers/bus/acpi/acpica/include/platform/acmsvc.h b/drivers/bus/acpi/acpica/include/platform/acmsvc.h index 936cbf4ebff..fe8ca747178 100644 --- a/drivers/bus/acpi/acpica/include/platform/acmsvc.h +++ b/drivers/bus/acpi/acpica/include/platform/acmsvc.h @@ -211,6 +211,10 @@ #endif /* _M_IX86 */ #endif /* __REACTOS__ */ +/* warn C4001: use of slash-slash comments */ +/* NOTE: MSVC 2015 headers use these extensively */ +#pragma warning(disable:4001) + /* warn C4100: unreferenced formal parameter */ #pragma warning(disable:4100) @@ -223,10 +227,21 @@ /* warn C4131: uses old-style declarator (iASL compiler only) */ #pragma warning(disable:4131) +/* warn C4131: uses old-style declarator (iASL compiler only) */ +#pragma warning(disable:4459) + #if _MSC_VER > 1200 /* Versions above VC++ 6 */ #pragma warning( disable : 4295 ) /* needed for acpredef.h array */ #endif +/* + * MSVC 2015+ + */ + + /* warn C4459: xxxx (identifier) hides global declaration */ +#pragma warning(disable:4459) + + /* Debug support. */ diff --git a/drivers/bus/acpi/acpica/include/platform/acwin.h b/drivers/bus/acpi/acpica/include/platform/acwin.h index 5dbb7126af2..2c2bd51dcf7 100644 --- a/drivers/bus/acpi/acpica/include/platform/acwin.h +++ b/drivers/bus/acpi/acpica/include/platform/acwin.h @@ -44,9 +44,33 @@ #ifndef __ACWIN_H__ #define __ACWIN_H__ +#include <io.h> + #define ACPI_USE_STANDARD_HEADERS #define ACPI_USE_SYSTEM_CLIBRARY + /* Note: do not include any C library headers here */ + + /* + * Note: MSVC project files should define ACPI_DEBUGGER and ACPI_DISASSEMBLER + * as appropriate to enable editor functions like "Find all references". + * The editor isn't smart enough to dig through the include files to find + * out if these are actually defined. + */ + + /* Eliminate warnings for "old" (non-secure) versions of clib functions */ + +#ifndef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS +#endif + +/* Eliminate warnings for POSIX clib function names (open, write, etc.) */ + +#ifndef _CRT_NONSTDC_NO_DEPRECATE +#define _CRT_NONSTDC_NO_DEPRECATE +#endif + + #define ACPI_MACHINE_WIDTH 32 #define ACPI_USE_NATIVE_DIVIDE #define ACPI_USE_NATIVE_MATH64 @@ -75,7 +99,9 @@ typedef COMPILER_DEPENDENT_UINT64 u64; #define stat _stat #define fstat _fstat #define mkdir _mkdir -#define snprintf _snprintf +#define fileno _fileno +#define isatty _isatty + #if _MSC_VER <= 1200 /* Versions below VC++ 6 */ #define vsnprintf _vsnprintf #endif @@ -87,6 +113,9 @@ typedef COMPILER_DEPENDENT_UINT64 u64; #define S_IREAD _S_IREAD #define S_IWRITE _S_IWRITE #define S_IFDIR _S_IFDIR +#if _MSC_VER < 1900 +#define snprintf _snprintf +#endif /* diff --git a/drivers/bus/acpi/acpica/include/platform/acwin64.h b/drivers/bus/acpi/acpica/include/platform/acwin64.h index 9ad34088c9d..7a060c7cdc2 100644 --- a/drivers/bus/acpi/acpica/include/platform/acwin64.h +++ b/drivers/bus/acpi/acpica/include/platform/acwin64.h @@ -47,6 +47,28 @@ #define ACPI_USE_STANDARD_HEADERS #define ACPI_USE_SYSTEM_CLIBRARY + /* Note: do not include any C library headers here */ + + /* + * Note: MSVC project files should define ACPI_DEBUGGER and ACPI_DISASSEMBLER + * as appropriate to enable editor functions like "Find all references". + * The editor isn't smart enough to dig through the include files to find + * out if these are actually defined. + */ + + /* Eliminate warnings for "old" (non-secure) versions of clib functions */ + +#ifndef _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS +#endif + +/* Eliminate warnings for POSIX clib function names (open, write, etc.) */ + +#ifndef _CRT_NONSTDC_NO_DEPRECATE +#define _CRT_NONSTDC_NO_DEPRECATE +#endif + + #define ACPI_MACHINE_WIDTH 64 /* diff --git a/drivers/bus/acpi/acpica/namespace/nsaccess.c b/drivers/bus/acpi/acpica/namespace/nsaccess.c index 949e2e11b3f..c0c829012d3 100644 --- a/drivers/bus/acpi/acpica/namespace/nsaccess.c +++ b/drivers/bus/acpi/acpica/namespace/nsaccess.c @@ -76,6 +76,7 @@ AcpiNsRootInitialize ( ACPI_STATUS Status; const ACPI_PREDEFINED_NAMES *InitVal = NULL; ACPI_NAMESPACE_NODE *NewNode; + ACPI_NAMESPACE_NODE *PrevNode = NULL; ACPI_OPERAND_OBJECT *ObjDesc; ACPI_STRING Val = NULL; @@ -105,13 +106,30 @@ AcpiNsRootInitialize ( */ AcpiGbl_RootNode = &AcpiGbl_RootNodeStruct; - /* Enter the pre-defined names in the name table */ + /* Enter the predefined names in the name table */ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Entering predefined entries into namespace\n")); + /* + * Create the initial (default) namespace. + * This namespace looks like something similar to this: + * + * ACPI Namespace (from Namespace Root): + * 0 _GPE Scope 00203160 00 + * 0 _PR_ Scope 002031D0 00 + * 0 _SB_ Device 00203240 00 Notify Object: 0020ADD8 + * 0 _SI_ Scope 002032B0 00 + * 0 _TZ_ Device 00203320 00 + * 0 _REV Integer 00203390 00 = 0000000000000002 + * 0 _OS_ String 00203488 00 Len 14 "Microsoft Windows NT" + * 0 _GL_ Mutex 00203580 00 Object 002035F0 + * 0 _OSI Method 00203678 00 Args 1 Len 0000 Aml 00000000 + */ for (InitVal = AcpiGbl_PreDefinedNames; InitVal->Name; InitVal++) { + Status = AE_OK; + /* _OSI is optional for now, will be permanent later */ if (!strcmp (InitVal->Name, "_OSI") && !AcpiGbl_CreateOsiMethod) @@ -119,17 +137,35 @@ AcpiNsRootInitialize ( continue; } - Status = AcpiNsLookup (NULL, ACPI_CAST_PTR (char, InitVal->Name), - InitVal->Type, ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH, - NULL, &NewNode); - if (ACPI_FAILURE (Status)) + /* + * Create, init, and link the new predefined name + * Note: No need to use AcpiNsLookup here because all the + * predefined names are at the root level. It is much easier to + * just create and link the new node(s) here. + */ + NewNode = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_NAMESPACE_NODE)); + if (!NewNode) { - ACPI_EXCEPTION ((AE_INFO, Status, - "Could not create predefined name %s", - InitVal->Name)); - continue; + Status = AE_NO_MEMORY; + goto UnlockAndExit; } + ACPI_COPY_NAMESEG (NewNode->Name.Ascii, InitVal->Name); + NewNode->DescriptorType = ACPI_DESC_TYPE_NAMED; + NewNode->Type = InitVal->Type; + + if (!PrevNode) + { + AcpiGbl_RootNodeStruct.Child = NewNode; + } + else + { + PrevNode->Peer = NewNode; + } + + NewNode->Parent = &AcpiGbl_RootNodeStruct; + PrevNode = NewNode; + /* * Name entered successfully. If entry in PreDefinedNames[] specifies * an initial value, create the initial value. @@ -178,7 +214,7 @@ AcpiNsRootInitialize ( NewNode->Value = ObjDesc->Method.ParamCount; #else - /* Mark this as a very SPECIAL method */ + /* Mark this as a very SPECIAL method (_OSI) */ ObjDesc->Method.InfoFlags = ACPI_METHOD_INTERNAL_ONLY; ObjDesc->Method.Dispatch.Implementation = AcpiUtOsiImplementation; @@ -251,7 +287,6 @@ AcpiNsRootInitialize ( } } - UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); diff --git a/drivers/bus/acpi/acpica/namespace/nseval.c b/drivers/bus/acpi/acpica/namespace/nseval.c index c8f73411e0d..02bbadd4556 100644 --- a/drivers/bus/acpi/acpica/namespace/nseval.c +++ b/drivers/bus/acpi/acpica/namespace/nseval.c @@ -51,13 +51,6 @@ #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME ("nseval") -/* Local prototypes */ - -static void -AcpiNsExecModuleCode ( - ACPI_OPERAND_OBJECT *MethodObj, - ACPI_EVALUATE_INFO *Info); - /******************************************************************************* * @@ -356,206 +349,3 @@ Cleanup: Info->FullPathname = NULL; return_ACPI_STATUS (Status); } - - -/******************************************************************************* - * - * FUNCTION: AcpiNsExecModuleCodeList - * - * PARAMETERS: None - * - * RETURN: None. Exceptions during method execution are ignored, since - * we cannot abort a table load. - * - * DESCRIPTION: Execute all elements of the global module-level code list. - * Each element is executed as a single control method. - * - * NOTE: With this option enabled, each block of detected executable AML - * code that is outside of any control method is wrapped with a temporary - * control method object and placed on a global list. The methods on this - * list are executed below. - * - * This function executes the module-level code for all tables only after - * all of the tables have been loaded. It is a legacy option and is - * not compatible with other ACPI implementations. See AcpiNsLoadTable. - * - * This function will be removed when the legacy option is removed. - * - ******************************************************************************/ - -void -AcpiNsExecModuleCodeList ( - void) -{ - ACPI_OPERAND_OBJECT *Prev; - ACPI_OPERAND_OBJECT *Next; - ACPI_EVALUATE_INFO *Info; - UINT32 MethodCount = 0; - - - ACPI_FUNCTION_TRACE (NsExecModuleCodeList); - - - /* Exit now if the list is empty */ - - Next = AcpiGbl_ModuleCodeList; - if (!Next) - { - ACPI_DEBUG_PRINT ((ACPI_DB_INIT_NAMES, - "Legacy MLC block list is empty\n")); - - return_VOID; - } - - /* Allocate the evaluation information block */ - - Info = ACPI_ALLOCATE (sizeof (ACPI_EVALUATE_INFO)); - if (!Info) - { - return_VOID; - } - - /* Walk the list, executing each "method" */ - - while (Next) - { - Prev = Next; - Next = Next->Method.Mutex; - - /* Clear the link field and execute the method */ - - Prev->Method.Mutex = NULL; - AcpiNsExecModuleCode (Prev, Info); - MethodCount++; - - /* Delete the (temporary) method object */ - - AcpiUtRemoveReference (Prev); - } - - ACPI_INFO (( - "Executed %u blocks of module-level executable AML code", - MethodCount)); - - ACPI_FREE (Info); - AcpiGbl_ModuleCodeList = NULL; - return_VOID; -} - - -/******************************************************************************* - * - * FUNCTION: AcpiNsExecModuleCode - * - * PARAMETERS: MethodObj - Object container for the module-level code - * Info - Info block for method evaluation - * - * RETURN: None. Exceptions during method execution are ignored, since - * we cannot abort a table load. - * - * DESCRIPTION: Execute a control method containing a block of module-level - * executable AML code. The control method is temporarily - * installed to the root node, then evaluated. - * - ******************************************************************************/ - -static void -AcpiNsExecModuleCode ( - ACPI_OPERAND_OBJECT *MethodObj, - ACPI_EVALUATE_INFO *Info) -{ - ACPI_OPERAND_OBJECT *ParentObj; - ACPI_NAMESPACE_NODE *ParentNode; - ACPI_OBJECT_TYPE Type; - ACPI_STATUS Status; - - - ACPI_FUNCTION_TRACE (NsExecModuleCode); - - - /* - * Get the parent node. We cheat by using the NextObject field - * of the method object descriptor. - */ - ParentNode = ACPI_CAST_PTR ( - ACPI_NAMESPACE_NODE, MethodObj->Method.NextObject); - Type = AcpiNsGetType (ParentNode); - - /* - * Get the region handler and save it in the method object. We may need - * this if an operation region declaration causes a _REG method to be run. - * - * We can't do this in AcpiPsLinkModuleCode because - * AcpiGbl_RootNode->Object is NULL at PASS1. - */ - if ((Type == ACPI_TYPE_DEVICE) && ParentNode->Object) - { - MethodObj->Method.Dispatch.Handler = - ParentNode->Object->Device.Handler; - } - - /* Must clear NextObject (AcpiNsAttachObject needs the field) */ - - MethodObj->Method.NextObject = NULL; - - /* Initialize the evaluation information block */ - - memset (Info, 0, sizeof (ACPI_EVALUATE_INFO)); - Info->PrefixNode = ParentNode; - - /* - * Get the currently attached parent object. Add a reference, - * because the ref count will be decreased when the method object - * is installed to the parent node. - */ - ParentObj = AcpiNsGetAttachedObject (ParentNode); - if (ParentObj) - { - AcpiUtAddReference (ParentObj); - } - - /* Install the method (module-level code) in the parent node */ - - Status = AcpiNsAttachObject (ParentNode, MethodObj, ACPI_TYPE_METHOD); - if (ACPI_FAILURE (Status)) - { - goto Exit; - } - - /* Execute the parent node as a control method */ - - Status = AcpiNsEvaluate (Info); - - ACPI_DEBUG_PRINT ((ACPI_DB_INIT_NAMES, - "Executed module-level code at %p\n", - MethodObj->Method.AmlStart)); - - /* Delete a possible implicit return value (in slack mode) */ - - if (Info->ReturnObject) - { - AcpiUtRemoveReference (Info->ReturnObject); - } - - /* Detach the temporary method object */ - - AcpiNsDetachObject (ParentNode); - - /* Restore the original parent object */ - - if (ParentObj) - { - Status = AcpiNsAttachObject (ParentNode, ParentObj, Type); - } - else - { - ParentNode->Type = (UINT8) Type; - } - -Exit: - if (ParentObj) - { - AcpiUtRemoveReference (ParentObj); - } - return_VOID; -} diff --git a/drivers/bus/acpi/acpica/namespace/nsinit.c b/drivers/bus/acpi/acpica/namespace/nsinit.c index 5866479d5ab..195d8c59955 100644 --- a/drivers/bus/acpi/acpica/namespace/nsinit.c +++ b/drivers/bus/acpi/acpica/namespace/nsinit.c @@ -104,29 +104,30 @@ AcpiNsInitializeObjects ( ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "**** Starting initialization of namespace objects ****\n")); ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, - "Completing Region/Field/Buffer/Package initialization:\n")); + "Final data object initialization: ")); - /* Set all init info to zero */ + /* Clear the info block */ memset (&Info, 0, sizeof (ACPI_INIT_WALK_INFO)); /* Walk entire namespace from the supplied root */ + /* + * TBD: will become ACPI_TYPE_PACKAGE as this type object + * is now the only one that supports deferred initialization + * (forward references). + */ Status = AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, - ACPI_UINT32_MAX, AcpiNsInitOneObject, NULL, - &Info, NULL); + ACPI_UINT32_MAX, AcpiNsInitOneObject, NULL, &Info, NULL); if (ACPI_FAILURE (Status)) { ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace")); } ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, - " Initialized %u/%u Regions %u/%u Fields %u/%u " - "Buffers %u/%u Packages (%u nodes)\n", - Info.OpRegionInit, Info.OpRegionCount, - Info.FieldInit, Info.FieldCount, - Info.BufferInit, Info.BufferCount, - Info.PackageInit, Info.PackageCount, Info.ObjectCount)); + "Namespace contains %u (0x%X) objects\n", + Info.ObjectCount, + Info.ObjectCount)); ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "%u Control Methods found\n%u Op Regions found\n", @@ -453,35 +454,19 @@ AcpiNsInitOneObject ( AcpiExEnterInterpreter (); /* - * Each of these types can contain executable AML code within the - * declaration. + * Only initialization of Package objects can be deferred, in order + * to support forward references. */ switch (Type) { - case ACPI_TYPE_REGION: - - Info->OpRegionInit++; - Status = AcpiDsGetRegionArguments (ObjDesc); - break; - - case ACPI_TYPE_BUFFER_FIELD: - - Info->FieldInit++; - Status = AcpiDsGetBufferFieldArguments (ObjDesc); - break; - case ACPI_TYPE_LOCAL_BANK_FIELD: + /* TBD: BankFields do not require deferred init, remove this code */ + Info->FieldInit++; Status = AcpiDsGetBankFieldArguments (ObjDesc); break; - case ACPI_TYPE_BUFFER: - - Info->BufferInit++; - Status = AcpiDsGetBufferArguments (ObjDesc); - break; - case ACPI_TYPE_PACKAGE: /* Complete the initialization/resolution of the package object */ @@ -492,8 +477,12 @@ AcpiNsInitOneObject ( default: - /* No other types can get here */ + /* No other types should get here */ + Status = AE_TYPE; + ACPI_EXCEPTION ((AE_INFO, Status, + "Opcode is not deferred [%4.4s] (%s)", + AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Type))); break; } diff --git a/drivers/bus/acpi/acpica/namespace/nsload.c b/drivers/bus/acpi/acpica/namespace/nsload.c index 07f5b6b70e3..dc1bb9a890e 100644 --- a/drivers/bus/acpi/acpica/namespace/nsload.c +++ b/drivers/bus/acpi/acpica/namespace/nsload.c @@ -160,18 +160,6 @@ Unlock: ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Completed Table Object Initialization\n")); - /* - * This case handles the legacy option that groups all module-level - * code blocks together and defers execution until all of the tables - * are loaded. Execute all of these blocks at this time. - * Execute any module-level code that was detected during the table - * load phase. - * - * Note: this option is deprecated and will be eliminated in the - * future. Use of this option can cause problems with AML code that - * depends upon in-order immediate execution of module-level code. - */ - AcpiNsExecModuleCodeList (); return_ACPI_STATUS (Status); } diff --git a/drivers/bus/acpi/acpica/namespace/nsutils.c b/drivers/bus/acpi/acpica/namespace/nsutils.c index 2584dca6a2a..6873ecd0296 100644 --- a/drivers/bus/acpi/acpica/namespace/nsutils.c +++ b/drivers/bus/acpi/acpica/namespace/nsutils.c @@ -694,24 +694,11 @@ AcpiNsTerminate ( void) { ACPI_STATUS Status; - ACPI_OPERAND_OBJECT *Prev; - ACPI_OPERAND_OBJECT *Next; ACPI_FUNCTION_TRACE (NsTerminate); - /* Delete any module-level code blocks */ - - Next = AcpiGbl_ModuleCodeList; - while (Next) - { - Prev = Next; - Next = Next->Method.Mutex; - Prev->Method.Mutex = NULL; /* Clear the Mutex (cheated) field */ - AcpiUtRemoveReference (Prev); - } - /* * Free the entire namespace -- all nodes and all objects * attached to the nodes diff --git a/drivers/bus/acpi/acpica/tables/tbdata.c b/drivers/bus/acpi/acpica/tables/tbdata.c index 63d3137ec61..977eee87318 100644 --- a/drivers/bus/acpi/acpica/tables/tbdata.c +++ b/drivers/bus/acpi/acpica/tables/tbdata.c @@ -1082,19 +1082,6 @@ AcpiTbLoadTable ( Status = AcpiNsLoadTable (TableIndex, ParentNode); - /* - * This case handles the legacy option that groups all module-level - * code blocks together and defers execution until all of the tables - * are loaded. Execute all of these blocks at this time. - * Execute any module-level code that was detected during the table - * load phase. - * - * Note: this option is deprecated and will be eliminated in the - * future. Use of this option can cause problems with AML code that - * depends upon in-order immediate execution of module-level code. - */ - AcpiNsExecModuleCodeList (); - /* * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is * responsible for discovering any new wake GPEs by running _PRW methods diff --git a/drivers/bus/acpi/acpica/tables/tbxfload.c b/drivers/bus/acpi/acpica/tables/tbxfload.c index 723924ae5db..4db4f522fe3 100644 --- a/drivers/bus/acpi/acpica/tables/tbxfload.c +++ b/drivers/bus/acpi/acpica/tables/tbxfload.c @@ -371,6 +371,13 @@ AcpiLoadTable ( ACPI_INFO (("Host-directed Dynamic ACPI Table Load:")); Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table), ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, &TableIndex); + if (ACPI_SUCCESS (Status)) + { + /* Complete the initialization/resolution of new objects */ + + AcpiNsInitializeObjects (); + } + return_ACPI_STATUS (Status); } diff --git a/drivers/bus/acpi/acpica/utilities/utinit.c b/drivers/bus/acpi/acpica/utilities/utinit.c index 5b2fc1c8ce6..4dfb8e585de 100644 --- a/drivers/bus/acpi/acpica/utilities/utinit.c +++ b/drivers/bus/acpi/acpica/utilities/utinit.c @@ -234,7 +234,6 @@ AcpiUtInitGlobals ( /* Namespace */ - AcpiGbl_ModuleCodeList = NULL; AcpiGbl_RootNode = NULL; AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME; AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED; diff --git a/drivers/bus/acpi/acpica/utilities/utxfinit.c b/drivers/bus/acpi/acpica/utilities/utxfinit.c index 40b06e4eca7..97c9525bec3 100644 --- a/drivers/bus/acpi/acpica/utilities/utxfinit.c +++ b/drivers/bus/acpi/acpica/utilities/utxfinit.c @@ -273,24 +273,17 @@ AcpiInitializeObjects ( ACPI_FUNCTION_TRACE (AcpiInitializeObjects); +#ifdef ACPI_OBSOLETE_BEHAVIOR /* - * This case handles the legacy option that groups all module-level - * code blocks together and defers execution until all of the tables - * are loaded. Execute all of these blocks at this time. - * Execute any module-level code that was detected during the table - * load phase. - * - * Note: this option is deprecated and will be eliminated in the - * future. Use of this option can cause problems with AML code that - * depends upon in-order immediate execution of module-level code. + * 05/2019: Removed, initialization now happens at both object + * creation and table load time */ - AcpiNsExecModuleCodeList (); /* * Initialize the objects that remain uninitialized. This * runs the executable AML that may be part of the - * declaration of these objects: - * OperationRegions, BufferFields, Buffers, and Packages. + * declaration of these objects: OperationRegions, BufferFields, + * BankFields, Buffers, and Packages. */ if (!(Flags & ACPI_NO_OBJECT_INIT)) { @@ -300,6 +293,7 @@ AcpiInitializeObjects ( return_ACPI_STATUS (Status); } } +#endif /* * Initialize all device/region objects in the namespace. This runs
5 years, 5 months
1
0
0
0
[reactos] 01/01: [TRANSLATION] Hebrew Translation for Services (#1741)
by Shy Zedaka
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=10798fa3ff51fc650e137…
commit 10798fa3ff51fc650e137fd24badfb1ea0c0f6f1 Author: Shy Zedaka <shaytzedaka(a)outlook.com> AuthorDate: Fri Jul 19 18:08:33 2019 +0300 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Fri Jul 19 17:08:33 2019 +0200 [TRANSLATION] Hebrew Translation for Services (#1741) --- base/system/services/lang/he-IL.rc | 12 ++++++++++++ base/system/services/services.rc | 3 +++ 2 files changed, 15 insertions(+) diff --git a/base/system/services/lang/he-IL.rc b/base/system/services/lang/he-IL.rc new file mode 100644 index 00000000000..5b3a454ced0 --- /dev/null +++ b/base/system/services/lang/he-IL.rc @@ -0,0 +1,12 @@ +LANGUAGE LANG_HEBREW, SUBLANG_DEFAULT + +STRINGTABLE +BEGIN + IDS_SERVICE_START "התחל" + IDS_SERVICE_STOP "עצור" + IDS_SERVICE_PAUSE "השהה" + IDS_SERVICE_RESUME "התחל מחדש" + IDS_SERVICE_RUNNING "פועל" + IDS_SERVICE_STOPPED "נעצר" + IDS_SERVICE_PAUSED "מושהה" +END diff --git a/base/system/services/services.rc b/base/system/services/services.rc index 5293003d6fb..e2564f5197a 100644 --- a/base/system/services/services.rc +++ b/base/system/services/services.rc @@ -27,6 +27,9 @@ #ifdef LANGUAGE_FR_FR #include "lang/fr-FR.rc" #endif +#ifdef LANGUAGE_HE_IL + #include "lang/he-IL.rc" +#endif #ifdef LANGUAGE_ID_ID #include "lang/id-ID.rc" #endif
5 years, 5 months
1
0
0
0
[reactos] 01/01: [FREELDR] Abstract VGA BIOS specific code (#1736)
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=74bcf3083d439bdaa72e6…
commit 74bcf3083d439bdaa72e62f46224c457b5177ce4 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Fri Jul 19 00:09:59 2019 +0300 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Jul 18 23:09:59 2019 +0200 [FREELDR] Abstract VGA BIOS specific code (#1736) * [FREELDR] Abstract VGA BIOS specific code WinLdrSetupSpecialDataPointers() uses INT 10h video interrupts, but they are not available on Xbox, so make them machine-specific. CORE-16204 CORE-16210 * [FREELDR] Abstract getting extended BIOS data area WinLdrSetupSpecialDataPointers() uses INT 15h AH=C1h to get extended BIOS data area, but it's not available on Xbox, so make it machine-specific. CORE-16204 CORE-16210 --- boot/freeldr/freeldr/arch/i386/machpc.c | 23 ++++++++ boot/freeldr/freeldr/arch/i386/machxbox.c | 10 ++++ boot/freeldr/freeldr/arch/i386/pcvideo.c | 48 +++++++++++++++++ boot/freeldr/freeldr/arch/i386/xboxvideo.c | 9 ++++ boot/freeldr/freeldr/include/arch/i386/machxbox.h | 1 + boot/freeldr/freeldr/include/arch/pc/machpc.h | 1 + boot/freeldr/freeldr/include/machine.h | 6 +++ boot/freeldr/freeldr/ntldr/arch/i386/winldr.c | 65 ++++------------------- 8 files changed, 108 insertions(+), 55 deletions(-) diff --git a/boot/freeldr/freeldr/arch/i386/machpc.c b/boot/freeldr/freeldr/arch/i386/machpc.c index 6e9de4ee26f..497f89b5483 100644 --- a/boot/freeldr/freeldr/arch/i386/machpc.c +++ b/boot/freeldr/freeldr/arch/i386/machpc.c @@ -77,6 +77,27 @@ DBG_DEFAULT_CHANNEL(HWDETECT); #define CONTROLLER_TIMEOUT 250 +VOID +PcGetExtendedBIOSData(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize) +{ + REGS BiosRegs; + + /* Get address and size of the extended BIOS data area */ + BiosRegs.d.eax = 0xC100; + Int386(0x15, &BiosRegs, &BiosRegs); + if (INT386_SUCCESS(BiosRegs)) + { + *ExtendedBIOSDataArea = BiosRegs.w.es << 4; + *ExtendedBIOSDataSize = 1024; + } + else + { + WARN("Int 15h AH=C1h call failed\n"); + *ExtendedBIOSDataArea = 0; + *ExtendedBIOSDataSize = 0; + } +} + // NOTE: Similar to machxbox.c!XboxGetHarddiskConfigurationData(), // but with extended geometry support. static @@ -1379,6 +1400,7 @@ PcMachInit(const char *CmdLine) MachVtbl.VideoSetDisplayMode = PcVideoSetDisplayMode; MachVtbl.VideoGetDisplaySize = PcVideoGetDisplaySize; MachVtbl.VideoGetBufferSize = PcVideoGetBufferSize; + MachVtbl.VideoGetFontsFromFirmware = PcVideoGetFontsFromFirmware; MachVtbl.VideoSetTextCursorPosition = PcVideoSetTextCursorPosition; MachVtbl.VideoHideShowTextCursor = PcVideoHideShowTextCursor; MachVtbl.VideoPutChar = PcVideoPutChar; @@ -1390,6 +1412,7 @@ PcMachInit(const char *CmdLine) MachVtbl.Beep = PcBeep; MachVtbl.PrepareForReactOS = PcPrepareForReactOS; MachVtbl.GetMemoryMap = PcMemGetMemoryMap; + MachVtbl.GetExtendedBIOSData = PcGetExtendedBIOSData; MachVtbl.GetFloppyCount = PcGetFloppyCount; MachVtbl.DiskGetBootPath = PcDiskGetBootPath; MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors; diff --git a/boot/freeldr/freeldr/arch/i386/machxbox.c b/boot/freeldr/freeldr/arch/i386/machxbox.c index 030b9772c99..350a0c3e1e7 100644 --- a/boot/freeldr/freeldr/arch/i386/machxbox.c +++ b/boot/freeldr/freeldr/arch/i386/machxbox.c @@ -23,6 +23,14 @@ DBG_DEFAULT_CHANNEL(HWDETECT); +VOID +XboxGetExtendedBIOSData(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize) +{ + TRACE("XboxGetExtendedBIOSData(): UNIMPLEMENTED\n"); + *ExtendedBIOSDataArea = 0; + *ExtendedBIOSDataSize = 0; +} + // NOTE: Similar to machpc.c!PcGetHarddiskConfigurationData(), // but without extended geometry support. static @@ -201,6 +209,7 @@ XboxMachInit(const char *CmdLine) MachVtbl.VideoSetDisplayMode = XboxVideoSetDisplayMode; MachVtbl.VideoGetDisplaySize = XboxVideoGetDisplaySize; MachVtbl.VideoGetBufferSize = XboxVideoGetBufferSize; + MachVtbl.VideoGetFontsFromFirmware = XboxVideoGetFontsFromFirmware; MachVtbl.VideoHideShowTextCursor = XboxVideoHideShowTextCursor; MachVtbl.VideoPutChar = XboxVideoPutChar; MachVtbl.VideoCopyOffScreenBufferToVRAM = XboxVideoCopyOffScreenBufferToVRAM; @@ -211,6 +220,7 @@ XboxMachInit(const char *CmdLine) MachVtbl.Beep = PcBeep; MachVtbl.PrepareForReactOS = XboxPrepareForReactOS; MachVtbl.GetMemoryMap = XboxMemGetMemoryMap; + MachVtbl.GetExtendedBIOSData = XboxGetExtendedBIOSData; MachVtbl.GetFloppyCount = XboxGetFloppyCount; MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskReadLogicalSectors = XboxDiskReadLogicalSectors; diff --git a/boot/freeldr/freeldr/arch/i386/pcvideo.c b/boot/freeldr/freeldr/arch/i386/pcvideo.c index 6eb070fbb6c..7f21fc2c049 100644 --- a/boot/freeldr/freeldr/arch/i386/pcvideo.c +++ b/boot/freeldr/freeldr/arch/i386/pcvideo.c @@ -118,6 +118,20 @@ static BOOLEAN VesaVideoMode = FALSE; /* Are we using a VESA static SVGA_MODE_INFORMATION VesaVideoModeInformation; /* Only valid when in VESA mode */ static ULONG CurrentMemoryBank = 0; /* Currently selected VESA bank */ +enum +{ + INT1FhFont = 0x00, + INT43hFont = 0x01, + ROM_8x14CharacterFont = 0x02, + ROM_8x8DoubleDotFontLo = 0x03, + ROM_8x8DoubleDotFontHi = 0x04, + ROM_AlphaAlternate = 0x05, + ROM_8x16Font = 0x06, + ROM_Alternate9x16Font = 0x07, + UltraVision_8x20Font = 0x11, + UltraVision_8x10Font = 0x12, +}; + static ULONG PcVideoDetectVideoCard(VOID) { @@ -957,6 +971,40 @@ PcVideoGetBufferSize(VOID) return ScreenHeight * BytesPerScanLine; } +VOID +PcVideoGetFontsFromFirmware(PULONG RomFontPointers) +{ + REGS BiosRegs; + + /* Get the address of the BIOS ROM fonts. + Int 10h, AX=1130h, BH = pointer specifier + returns: es:bp = address */ + BiosRegs.d.eax = 0x1130; + BiosRegs.b.bh = ROM_8x14CharacterFont; + Int386(0x10, &BiosRegs, &BiosRegs); + RomFontPointers[0] = BiosRegs.w.es << 4 | BiosRegs.w.bp; + + BiosRegs.b.bh = ROM_8x8DoubleDotFontLo; + Int386(0x10, &BiosRegs, &BiosRegs); + RomFontPointers[1] = BiosRegs.w.es << 16 | BiosRegs.w.bp; + + BiosRegs.b.bh = ROM_8x8DoubleDotFontHi; + Int386(0x10, &BiosRegs, &BiosRegs); + RomFontPointers[2] = BiosRegs.w.es << 16 | BiosRegs.w.bp; + + BiosRegs.b.bh = ROM_AlphaAlternate; + Int386(0x10, &BiosRegs, &BiosRegs); + RomFontPointers[3] = BiosRegs.w.es << 16 | BiosRegs.w.bp; + + BiosRegs.b.bh = ROM_8x16Font; + Int386(0x10, &BiosRegs, &BiosRegs); + RomFontPointers[4] = BiosRegs.w.es << 16 | BiosRegs.w.bp; + + BiosRegs.b.bh = ROM_Alternate9x16Font; + Int386(0x10, &BiosRegs, &BiosRegs); + RomFontPointers[5] = BiosRegs.w.es << 16 | BiosRegs.w.bp; +} + VOID PcVideoSetTextCursorPosition(UCHAR X, UCHAR Y) { diff --git a/boot/freeldr/freeldr/arch/i386/xboxvideo.c b/boot/freeldr/freeldr/arch/i386/xboxvideo.c index cb54dd2bf5f..bcb70d0ce10 100644 --- a/boot/freeldr/freeldr/arch/i386/xboxvideo.c +++ b/boot/freeldr/freeldr/arch/i386/xboxvideo.c @@ -20,6 +20,9 @@ */ #include <freeldr.h> +#include <debug.h> + +DBG_DEFAULT_CHANNEL(UI); static PVOID FrameBuffer; static ULONG ScreenWidth; @@ -180,6 +183,12 @@ XboxVideoGetBufferSize(VOID) return (ScreenHeight - 2 * TOP_BOTTOM_LINES) / CHAR_HEIGHT * (ScreenWidth / CHAR_WIDTH) * 2; } +VOID +XboxVideoGetFontsFromFirmware(PULONG RomFontPointers) +{ + TRACE("XboxVideoGetFontsFromFirmware(): UNIMPLEMENTED\n"); +} + VOID XboxVideoSetTextCursorPosition(UCHAR X, UCHAR Y) { diff --git a/boot/freeldr/freeldr/include/arch/i386/machxbox.h b/boot/freeldr/freeldr/include/arch/i386/machxbox.h index 93bcb7835f1..3a394c35703 100644 --- a/boot/freeldr/freeldr/include/arch/i386/machxbox.h +++ b/boot/freeldr/freeldr/include/arch/i386/machxbox.h @@ -35,6 +35,7 @@ VOID XboxVideoClearScreen(UCHAR Attr); VIDEODISPLAYMODE XboxVideoSetDisplayMode(char *DisplayModem, BOOLEAN Init); VOID XboxVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth); ULONG XboxVideoGetBufferSize(VOID); +VOID XboxVideoGetFontsFromFirmware(PULONG RomFontPointers); VOID XboxVideoSetTextCursorPosition(UCHAR X, UCHAR Y); VOID XboxVideoHideShowTextCursor(BOOLEAN Show); VOID XboxVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y); diff --git a/boot/freeldr/freeldr/include/arch/pc/machpc.h b/boot/freeldr/freeldr/include/arch/pc/machpc.h index 444db26fa9a..fb8284fe763 100644 --- a/boot/freeldr/freeldr/include/arch/pc/machpc.h +++ b/boot/freeldr/freeldr/include/arch/pc/machpc.h @@ -36,6 +36,7 @@ VOID PcVideoClearScreen(UCHAR Attr); VIDEODISPLAYMODE PcVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init); VOID PcVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth); ULONG PcVideoGetBufferSize(VOID); +VOID PcVideoGetFontsFromFirmware(PULONG RomFontPointers); VOID PcVideoSetTextCursorPosition(UCHAR X, UCHAR Y); VOID PcVideoHideShowTextCursor(BOOLEAN Show); VOID PcVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y); diff --git a/boot/freeldr/freeldr/include/machine.h b/boot/freeldr/freeldr/include/machine.h index 8a9b02e9291..3e5b2836406 100644 --- a/boot/freeldr/freeldr/include/machine.h +++ b/boot/freeldr/freeldr/include/machine.h @@ -46,6 +46,7 @@ typedef struct tagMACHVTBL VIDEODISPLAYMODE (*VideoSetDisplayMode)(char *DisplayMode, BOOLEAN Init); VOID (*VideoGetDisplaySize)(PULONG Width, PULONG Height, PULONG Depth); ULONG (*VideoGetBufferSize)(VOID); + VOID (*VideoGetFontsFromFirmware)(PULONG RomFontPointers); VOID (*VideoSetTextCursorPosition)(UCHAR X, UCHAR Y); VOID (*VideoHideShowTextCursor)(BOOLEAN Show); VOID (*VideoPutChar)(int Ch, UCHAR Attr, unsigned X, unsigned Y); @@ -60,6 +61,7 @@ typedef struct tagMACHVTBL // NOTE: Not in the machine.c ... FREELDR_MEMORY_DESCRIPTOR* (*GetMemoryDescriptor)(FREELDR_MEMORY_DESCRIPTOR* Current); PFREELDR_MEMORY_DESCRIPTOR (*GetMemoryMap)(PULONG MaxMemoryMapSize); + VOID (*GetExtendedBIOSData)(PULONG ExtendedBIOSDataArea, PULONG ExtendedBIOSDataSize); UCHAR (*GetFloppyCount)(VOID); BOOLEAN (*DiskGetBootPath)(PCHAR BootPath, ULONG Size); @@ -96,6 +98,8 @@ VOID MachInit(const char *CmdLine); MachVtbl.VideoGetDisplaySize((W), (H), (D)) #define MachVideoGetBufferSize() \ MachVtbl.VideoGetBufferSize() +#define MachVideoGetFontsFromFirmware(RomFontPointers) \ + MachVtbl.VideoGetFontsFromFirmware((RomFontPointers)) #define MachVideoSetTextCursorPosition(X, Y) \ MachVtbl.VideoSetTextCursorPosition((X), (Y)) #define MachVideoHideShowTextCursor(Show) \ @@ -116,6 +120,8 @@ VOID MachInit(const char *CmdLine); MachVtbl.Beep() #define MachPrepareForReactOS() \ MachVtbl.PrepareForReactOS() +#define MachGetExtendedBIOSData(ExtendedBIOSDataArea, ExtendedBIOSDataSize) \ + MachVtbl.GetExtendedBIOSData((ExtendedBIOSDataArea), (ExtendedBIOSDataSize)) #define MachGetFloppyCount() \ MachVtbl.GetFloppyCount() #define MachDiskGetBootPath(Path, Size) \ diff --git a/boot/freeldr/freeldr/ntldr/arch/i386/winldr.c b/boot/freeldr/freeldr/ntldr/arch/i386/winldr.c index bb16ec4d350..abb86f9617e 100644 --- a/boot/freeldr/freeldr/ntldr/arch/i386/winldr.c +++ b/boot/freeldr/freeldr/ntldr/arch/i386/winldr.c @@ -287,69 +287,24 @@ WinLdrMapSpecialPages(void) #define ExtendedBIOSDataSize ((PULONG)0x744) #define RomFontPointers ((PULONG)0x700) -enum -{ - INT1FhFont = 0x00, - INT43hFont = 0x01, - ROM_8x14CharacterFont = 0x02, - ROM_8x8DoubleDotFontLo = 0x03, - ROM_8x8DoubleDotFontHi = 0x04, - ROM_AlphaAlternate = 0x05, - ROM_8x16Font = 0x06, - ROM_Alternate9x16Font = 0x07, - UltraVision_8x20Font = 0x11, - UltraVision_8x10Font = 0x12, -}; - static void WinLdrSetupSpecialDataPointers(VOID) { - REGS BiosRegs; - - /* Get the address of the bios rom fonts. Win 2003 videoprt reads these + /* Get the address of the BIOS ROM fonts. Win 2003 videoprt reads these values from address 0x700 .. 0x718 and store them in the registry - in HKLM\System\CurrentControlSet\Control\Wow\RomFontPointers - Int 10h, AX=1130h, BH = pointer specifier - returns: es:bp = address */ - BiosRegs.d.eax = 0x1130; - BiosRegs.b.bh = ROM_8x14CharacterFont; - Int386(0x10, &BiosRegs, &BiosRegs); - RomFontPointers[0] = BiosRegs.w.es << 4 | BiosRegs.w.bp; - - BiosRegs.b.bh = ROM_8x8DoubleDotFontLo; - Int386(0x10, &BiosRegs, &BiosRegs); - RomFontPointers[1] = BiosRegs.w.es << 16 | BiosRegs.w.bp; - - BiosRegs.b.bh = ROM_8x8DoubleDotFontHi; - Int386(0x10, &BiosRegs, &BiosRegs); - RomFontPointers[2] = BiosRegs.w.es << 16 | BiosRegs.w.bp; - - BiosRegs.b.bh = ROM_AlphaAlternate; - Int386(0x10, &BiosRegs, &BiosRegs); - RomFontPointers[3] = BiosRegs.w.es << 16 | BiosRegs.w.bp; - - BiosRegs.b.bh = ROM_8x16Font; - Int386(0x10, &BiosRegs, &BiosRegs); - RomFontPointers[4] = BiosRegs.w.es << 16 | BiosRegs.w.bp; - - BiosRegs.b.bh = ROM_Alternate9x16Font; - Int386(0x10, &BiosRegs, &BiosRegs); - RomFontPointers[5] = BiosRegs.w.es << 16 | BiosRegs.w.bp; - - /* Store address of the extended bios data area in 0x740 */ - BiosRegs.d.eax = 0xC100; - Int386(0x15, &BiosRegs, &BiosRegs); - if (INT386_SUCCESS(BiosRegs)) + in HKLM\System\CurrentControlSet\Control\Wow\RomFontPointers */ + MachVideoGetFontsFromFirmware(RomFontPointers); + + /* Store address of the extended BIOS data area in 0x740 */ + MachGetExtendedBIOSData(ExtendedBIOSDataArea, ExtendedBIOSDataSize); + + if (*ExtendedBIOSDataArea == 0 && *ExtendedBIOSDataSize == 0) { - *ExtendedBIOSDataArea = BiosRegs.w.es << 4; - *ExtendedBIOSDataSize = 1024; - TRACE("*ExtendedBIOSDataArea = 0x%lx\n", *ExtendedBIOSDataArea); + WARN("Couldn't get address of extended BIOS data area\n"); } else { - WARN("Couldn't get address of extended BIOS data area\n"); - *ExtendedBIOSDataArea = 0; - *ExtendedBIOSDataSize = 0; + TRACE("*ExtendedBIOSDataArea = 0x%lx\n", *ExtendedBIOSDataArea); } }
5 years, 5 months
1
0
0
0
[reactos] 01/01: [FREELDR] Abstract floppy drive detection code (#1735)
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7547f85b7eead1fc4d8d0…
commit 7547f85b7eead1fc4d8d0c70b122fbdb4ee6910d Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Thu Jul 18 23:50:48 2019 +0300 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Jul 18 22:50:48 2019 +0200 [FREELDR] Abstract floppy drive detection code (#1735) Make floppy detection code machine-specific, because Xbox CMOS cannot be used to detect floppies. Based on a patch by Matt Borgerson. CORE-16204 CORE-16207 Co-authored-by: Matt Borgerson <contact(a)mborgerson.com> --- boot/freeldr/freeldr/arch/i386/hardware.c | 14 +------------- boot/freeldr/freeldr/arch/i386/machpc.c | 13 +++++++++++++ boot/freeldr/freeldr/arch/i386/machxbox.c | 17 +++++++++++++++++ boot/freeldr/freeldr/include/machine.h | 3 +++ 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/boot/freeldr/freeldr/arch/i386/hardware.c b/boot/freeldr/freeldr/arch/i386/hardware.c index a94ab48e324..f8d628d2640 100644 --- a/boot/freeldr/freeldr/arch/i386/hardware.c +++ b/boot/freeldr/freeldr/arch/i386/hardware.c @@ -165,18 +165,6 @@ HalpCalibrateStallExecution(VOID) } -static -UCHAR -GetFloppyCount(VOID) -{ - UCHAR Data; - - WRITE_PORT_UCHAR((PUCHAR)0x70, 0x10); - Data = READ_PORT_UCHAR((PUCHAR)0x71); - - return ((Data & 0xF0) ? 1 : 0) + ((Data & 0x0F) ? 1 : 0); -} - static UCHAR GetFloppyType(UCHAR DriveNumber) @@ -285,7 +273,7 @@ DetectBiosFloppyController(PCONFIGURATION_COMPONENT_DATA BusKey) ULONG Size; ULONG FloppyCount; - FloppyCount = GetFloppyCount(); + FloppyCount = MachGetFloppyCount(); TRACE("Floppy count: %u\n", FloppyCount); /* Always create a BIOS disk controller, no matter if we have floppy drives or not */ diff --git a/boot/freeldr/freeldr/arch/i386/machpc.c b/boot/freeldr/freeldr/arch/i386/machpc.c index 4e21727a19b..6e9de4ee26f 100644 --- a/boot/freeldr/freeldr/arch/i386/machpc.c +++ b/boot/freeldr/freeldr/arch/i386/machpc.c @@ -1301,6 +1301,18 @@ DetectIsaBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber) /* FIXME: Detect more ISA devices */ } +static +UCHAR +PcGetFloppyCount(VOID) +{ + UCHAR Data; + + WRITE_PORT_UCHAR((PUCHAR)0x70, 0x10); + Data = READ_PORT_UCHAR((PUCHAR)0x71); + + return ((Data & 0xF0) ? 1 : 0) + ((Data & 0x0F) ? 1 : 0); +} + PCONFIGURATION_COMPONENT_DATA PcHwDetect(VOID) { @@ -1378,6 +1390,7 @@ PcMachInit(const char *CmdLine) MachVtbl.Beep = PcBeep; MachVtbl.PrepareForReactOS = PcPrepareForReactOS; MachVtbl.GetMemoryMap = PcMemGetMemoryMap; + MachVtbl.GetFloppyCount = PcGetFloppyCount; MachVtbl.DiskGetBootPath = PcDiskGetBootPath; MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors; MachVtbl.DiskGetDriveGeometry = PcDiskGetDriveGeometry; diff --git a/boot/freeldr/freeldr/arch/i386/machxbox.c b/boot/freeldr/freeldr/arch/i386/machxbox.c index c7873f0c0f3..030b9772c99 100644 --- a/boot/freeldr/freeldr/arch/i386/machxbox.c +++ b/boot/freeldr/freeldr/arch/i386/machxbox.c @@ -139,6 +139,22 @@ DetectIsaBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber) /* FIXME: Detect more ISA devices */ } +static +UCHAR +XboxGetFloppyCount(VOID) +{ + /* On a PC we use CMOS/RTC I/O ports 0x70 and 0x71 to detect floppies. + * However an Xbox CMOS memory range [0x10, 0x70) and [0x80, 0x100) + * is filled with 0x55 0xAA 0x55 0xAA ... byte pattern which is used + * to validate the date/time settings by Xbox OS. + * + * Technically it's possible to connect a floppy drive to Xbox, but + * CMOS detection method should not be used here. */ + + WARN("XboxGetFloppyCount() is UNIMPLEMENTED, returning 0\n"); + return 0; +} + PCONFIGURATION_COMPONENT_DATA XboxHwDetect(VOID) { @@ -195,6 +211,7 @@ XboxMachInit(const char *CmdLine) MachVtbl.Beep = PcBeep; MachVtbl.PrepareForReactOS = XboxPrepareForReactOS; MachVtbl.GetMemoryMap = XboxMemGetMemoryMap; + MachVtbl.GetFloppyCount = XboxGetFloppyCount; MachVtbl.DiskGetBootPath = DiskGetBootPath; MachVtbl.DiskReadLogicalSectors = XboxDiskReadLogicalSectors; MachVtbl.DiskGetDriveGeometry = XboxDiskGetDriveGeometry; diff --git a/boot/freeldr/freeldr/include/machine.h b/boot/freeldr/freeldr/include/machine.h index abf6a4d343c..8a9b02e9291 100644 --- a/boot/freeldr/freeldr/include/machine.h +++ b/boot/freeldr/freeldr/include/machine.h @@ -61,6 +61,7 @@ typedef struct tagMACHVTBL FREELDR_MEMORY_DESCRIPTOR* (*GetMemoryDescriptor)(FREELDR_MEMORY_DESCRIPTOR* Current); PFREELDR_MEMORY_DESCRIPTOR (*GetMemoryMap)(PULONG MaxMemoryMapSize); + UCHAR (*GetFloppyCount)(VOID); BOOLEAN (*DiskGetBootPath)(PCHAR BootPath, ULONG Size); BOOLEAN (*DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); BOOLEAN (*DiskGetDriveGeometry)(UCHAR DriveNumber, PGEOMETRY DriveGeometry); @@ -115,6 +116,8 @@ VOID MachInit(const char *CmdLine); MachVtbl.Beep() #define MachPrepareForReactOS() \ MachVtbl.PrepareForReactOS() +#define MachGetFloppyCount() \ + MachVtbl.GetFloppyCount() #define MachDiskGetBootPath(Path, Size) \ MachVtbl.DiskGetBootPath((Path), (Size)) #define MachDiskReadLogicalSectors(Drive, Start, Count, Buf) \
5 years, 5 months
1
0
0
0
[reactos] 02/02: [FREELDR] Fix memory initialization on Xbox
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bca8093b89d6abab6cdd7…
commit bca8093b89d6abab6cdd719f8e52a86c15794340 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Tue Jul 16 00:36:54 2019 +0300 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Jul 18 22:49:51 2019 +0200 [FREELDR] Fix memory initialization on Xbox - Refactor and use PC memory map init functions - This fixes filesystem detection and probably some other problems Based on a patch by Matt Borgerson. CORE-16204 CORE-16206 Co-authored-by: Matt Borgerson <contact(a)mborgerson.com> --- boot/freeldr/freeldr/arch/i386/pcmem.c | 115 +++++++++++++++++-------------- boot/freeldr/freeldr/arch/i386/xboxmem.c | 35 ++++++++-- 2 files changed, 91 insertions(+), 59 deletions(-) diff --git a/boot/freeldr/freeldr/arch/i386/pcmem.c b/boot/freeldr/freeldr/arch/i386/pcmem.c index 21647d49a83..2add4d918bf 100644 --- a/boot/freeldr/freeldr/arch/i386/pcmem.c +++ b/boot/freeldr/freeldr/arch/i386/pcmem.c @@ -480,6 +480,7 @@ nextRange: VOID ReserveMemory( + PFREELDR_MEMORY_DESCRIPTOR MemoryMap, ULONG_PTR BaseAddress, SIZE_T Size, TYPE_OF_MEMORY MemoryType, @@ -494,11 +495,11 @@ ReserveMemory( for (i = 0; i < PcMapCount; i++) { /* Check for conflicting descriptor */ - if ((PcMemoryMap[i].BasePage < BasePage + PageCount) && - (PcMemoryMap[i].BasePage + PcMemoryMap[i].PageCount > BasePage)) + if ((MemoryMap[i].BasePage < BasePage + PageCount) && + (MemoryMap[i].BasePage + MemoryMap[i].PageCount > BasePage)) { /* Check if the memory is free */ - if (PcMemoryMap[i].MemoryType != LoaderFree) + if (MemoryMap[i].MemoryType != LoaderFree) { FrLdrBugCheckWithMessage( MEMORY_INIT_FAILURE, @@ -513,7 +514,7 @@ ReserveMemory( } /* Add the memory descriptor */ - PcMapCount = AddMemoryDescriptor(PcMemoryMap, + PcMapCount = AddMemoryDescriptor(MemoryMap, MAX_BIOS_DESCRIPTORS, BasePage, PageCount, @@ -522,6 +523,7 @@ ReserveMemory( VOID SetMemory( + PFREELDR_MEMORY_DESCRIPTOR MemoryMap, ULONG_PTR BaseAddress, SIZE_T Size, TYPE_OF_MEMORY MemoryType) @@ -532,17 +534,67 @@ SetMemory( PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(BaseAddress, Size); /* Add the memory descriptor */ - PcMapCount = AddMemoryDescriptor(PcMemoryMap, + PcMapCount = AddMemoryDescriptor(MemoryMap, MAX_BIOS_DESCRIPTORS, BasePage, PageCount, MemoryType); } +ULONG +PcMemFinalizeMemoryMap( + PFREELDR_MEMORY_DESCRIPTOR MemoryMap) +{ + ULONG i; + + /* Reserve some static ranges for freeldr */ + ReserveMemory(MemoryMap, 0x1000, STACKLOW - 0x1000, LoaderFirmwareTemporary, "BIOS area"); + ReserveMemory(MemoryMap, STACKLOW, STACKADDR - STACKLOW, LoaderOsloaderStack, "FreeLdr stack"); + ReserveMemory(MemoryMap, FREELDR_BASE, FrLdrImageSize, LoaderLoadedProgram, "FreeLdr image"); + + /* Default to 1 page above freeldr for the disk read buffer */ + DiskReadBuffer = (PUCHAR)ALIGN_UP_BY(FREELDR_BASE + FrLdrImageSize, PAGE_SIZE); + DiskReadBufferSize = PAGE_SIZE; + + /* Scan for free range above freeldr image */ + for (i = 0; i < PcMapCount; i++) + { + if ((MemoryMap[i].BasePage > (FREELDR_BASE / PAGE_SIZE)) && + (MemoryMap[i].MemoryType == LoaderFree)) + { + /* Use this range for the disk read buffer */ + DiskReadBuffer = (PVOID)(MemoryMap[i].BasePage * PAGE_SIZE); + DiskReadBufferSize = min(MemoryMap[i].PageCount * PAGE_SIZE, + MAX_DISKREADBUFFER_SIZE); + break; + } + } + + TRACE("DiskReadBuffer=0x%p, DiskReadBufferSize=0x%lx\n", + DiskReadBuffer, DiskReadBufferSize); + + /* Now reserve the range for the disk read buffer */ + ReserveMemory(MemoryMap, + (ULONG_PTR)DiskReadBuffer, + DiskReadBufferSize, + LoaderFirmwareTemporary, + "Disk read buffer"); + + TRACE("Dumping resulting memory map:\n"); + for (i = 0; i < PcMapCount; i++) + { + TRACE("BasePage=0x%lx, PageCount=0x%lx, Type=%s\n", + MemoryMap[i].BasePage, + MemoryMap[i].PageCount, + MmGetSystemMemoryMapTypeString(MemoryMap[i].MemoryType)); + } + return PcMapCount; +} + PFREELDR_MEMORY_DESCRIPTOR PcMemGetMemoryMap(ULONG *MemoryMapSize) { - ULONG i, EntryCount; + ULONG EntryCount; ULONG ExtendedMemorySizeAtOneMB; ULONG ExtendedMemorySizeAtSixteenMB; ULONG EbdaBase, EbdaSize; @@ -596,53 +648,12 @@ PcMemGetMemoryMap(ULONG *MemoryMapSize) } /* Setup some protected ranges */ - SetMemory(0x000000, 0x01000, LoaderFirmwarePermanent); // Realmode IVT / BDA - SetMemory(0x0A0000, 0x50000, LoaderFirmwarePermanent); // Video memory - SetMemory(0x0F0000, 0x10000, LoaderSpecialMemory); // ROM - SetMemory(0xFFF000, 0x01000, LoaderSpecialMemory); // unusable memory (do we really need this?) - - /* Reserve some static ranges for freeldr */ - ReserveMemory(0x1000, STACKLOW - 0x1000, LoaderFirmwareTemporary, "BIOS area"); - ReserveMemory(STACKLOW, STACKADDR - STACKLOW, LoaderOsloaderStack, "FreeLdr stack"); - ReserveMemory(FREELDR_BASE, FrLdrImageSize, LoaderLoadedProgram, "FreeLdr image"); - - /* Default to 1 page above freeldr for the disk read buffer */ - DiskReadBuffer = (PUCHAR)ALIGN_UP_BY(FREELDR_BASE + FrLdrImageSize, PAGE_SIZE); - DiskReadBufferSize = PAGE_SIZE; - - /* Scan for free range above freeldr image */ - for (i = 0; i < PcMapCount; i++) - { - if ((PcMemoryMap[i].BasePage > (FREELDR_BASE / PAGE_SIZE)) && - (PcMemoryMap[i].MemoryType == LoaderFree)) - { - /* Use this range for the disk read buffer */ - DiskReadBuffer = (PVOID)(PcMemoryMap[i].BasePage * PAGE_SIZE); - DiskReadBufferSize = min(PcMemoryMap[i].PageCount * PAGE_SIZE, - MAX_DISKREADBUFFER_SIZE); - break; - } - } - - TRACE("DiskReadBuffer=0x%p, DiskReadBufferSize=0x%lx\n", - DiskReadBuffer, DiskReadBufferSize); - - /* Now reserve the range for the disk read buffer */ - ReserveMemory((ULONG_PTR)DiskReadBuffer, - DiskReadBufferSize, - LoaderFirmwareTemporary, - "Disk read buffer"); - - TRACE("Dumping resulting memory map:\n"); - for (i = 0; i < PcMapCount; i++) - { - TRACE("BasePage=0x%lx, PageCount=0x%lx, Type=%s\n", - PcMemoryMap[i].BasePage, - PcMemoryMap[i].PageCount, - MmGetSystemMemoryMapTypeString(PcMemoryMap[i].MemoryType)); - } + SetMemory(PcMemoryMap, 0x000000, 0x01000, LoaderFirmwarePermanent); // Realmode IVT / BDA + SetMemory(PcMemoryMap, 0x0A0000, 0x50000, LoaderFirmwarePermanent); // Video memory + SetMemory(PcMemoryMap, 0x0F0000, 0x10000, LoaderSpecialMemory); // ROM + SetMemory(PcMemoryMap, 0xFFF000, 0x01000, LoaderSpecialMemory); // unusable memory (do we really need this?) - *MemoryMapSize = PcMapCount; + *MemoryMapSize = PcMemFinalizeMemoryMap(PcMemoryMap); return PcMemoryMap; } diff --git a/boot/freeldr/freeldr/arch/i386/xboxmem.c b/boot/freeldr/freeldr/arch/i386/xboxmem.c index 2e763bb0b8c..ee5da0fec1f 100644 --- a/boot/freeldr/freeldr/arch/i386/xboxmem.c +++ b/boot/freeldr/freeldr/arch/i386/xboxmem.c @@ -20,6 +20,9 @@ */ #include <freeldr.h> +#include <debug.h> + +DBG_DEFAULT_CHANNEL(MEMORY); static ULONG InstalledMemoryMb = 0; static ULONG AvailableMemoryMb = 0; @@ -28,6 +31,17 @@ static ULONG AvailableMemoryMb = 0; #define TEST_PATTERN1 0xAA #define TEST_PATTERN2 0x55 +extern VOID +SetMemory( + PFREELDR_MEMORY_DESCRIPTOR MemoryMap, + ULONG_PTR BaseAddress, + SIZE_T Size, + TYPE_OF_MEMORY MemoryType); + +extern ULONG +PcMemFinalizeMemoryMap( + PFREELDR_MEMORY_DESCRIPTOR MemoryMap); + VOID XboxMemInit(VOID) { @@ -71,6 +85,7 @@ XboxMemInit(VOID) WRITE_PORT_ULONG((ULONG*) 0xcf8, CONFIG_CMD(0, 0, 0x84)); WRITE_PORT_ULONG((ULONG*) 0xcfc, InstalledMemoryMb * 1024 * 1024 - 1); + /* 4 MB video framebuffer is reserved later using XboxMemReserveMemory() */ AvailableMemoryMb = InstalledMemoryMb; } @@ -79,25 +94,31 @@ FREELDR_MEMORY_DESCRIPTOR XboxMemoryMap[2]; PFREELDR_MEMORY_DESCRIPTOR XboxMemGetMemoryMap(ULONG *MemoryMapSize) { + TRACE("XboxMemGetMemoryMap()\n"); + /* Synthesize memory map */ /* Available RAM block */ - XboxMemoryMap[0].BasePage = 0; - XboxMemoryMap[0].PageCount = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; - XboxMemoryMap[0].MemoryType = LoaderFree; + SetMemory(XboxMemoryMap, + 0, + AvailableMemoryMb * 1024 * 1024, + LoaderFree); /* Video memory */ - XboxMemoryMap[1].BasePage = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; - XboxMemoryMap[1].PageCount = (InstalledMemoryMb - AvailableMemoryMb) * 1024 * 1024 / MM_PAGE_SIZE; - XboxMemoryMap[1].MemoryType = LoaderFirmwarePermanent; + SetMemory(XboxMemoryMap, + AvailableMemoryMb * 1024 * 1024, + (InstalledMemoryMb - AvailableMemoryMb) * 1024 * 1024, + LoaderFirmwarePermanent); - *MemoryMapSize = 2; + *MemoryMapSize = PcMemFinalizeMemoryMap(XboxMemoryMap); return XboxMemoryMap; } PVOID XboxMemReserveMemory(ULONG MbToReserve) { + /* This function is used to reserve video framebuffer in XboxVideoInit() */ + if (InstalledMemoryMb == 0) { /* Hmm, seems we're not initialized yet */
5 years, 5 months
1
0
0
0
[reactos] 01/02: [FREELDR] Whitespace improvements - no code changes
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8c55fdd17caf0c243b1ea…
commit 8c55fdd17caf0c243b1eab06781e34d9ef7c9657 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Mon Jul 15 22:40:10 2019 +0300 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Jul 18 22:49:51 2019 +0200 [FREELDR] Whitespace improvements - no code changes --- boot/freeldr/freeldr/arch/i386/xboxdisk.c | 12 ++-- boot/freeldr/freeldr/arch/i386/xboxmem.c | 105 +++++++++++++++--------------- 2 files changed, 59 insertions(+), 58 deletions(-) diff --git a/boot/freeldr/freeldr/arch/i386/xboxdisk.c b/boot/freeldr/freeldr/arch/i386/xboxdisk.c index dcdf3199092..c63f066551c 100644 --- a/boot/freeldr/freeldr/arch/i386/xboxdisk.c +++ b/boot/freeldr/freeldr/arch/i386/xboxdisk.c @@ -433,21 +433,21 @@ XboxDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG Sect ULONG StartSector; UCHAR Count; - if (DriveNumber < 0x80 || 2 <= (DriveNumber & 0x0f)) + if (DriveNumber < 0x80 || (DriveNumber & 0x0f) >= 2) { /* Xbox has only 1 IDE controller and no floppy */ WARN("Invalid drive number\n"); return FALSE; } - if (UINT64_C(0) != ((SectorNumber + SectorCount) & UINT64_C(0xfffffffff0000000))) + if (((SectorNumber + SectorCount) & UINT64_C(0xfffffffff0000000)) != UINT64_C(0)) { FIXME("48bit LBA required but not implemented\n"); return FALSE; } StartSector = (ULONG) SectorNumber; - while (0 < SectorCount) + while (SectorCount > 0) { Count = (SectorCount <= 255 ? (UCHAR)SectorCount : 255); if (!XboxDiskPolledRead(XBOX_IDE_COMMAND_PORT, @@ -457,7 +457,7 @@ XboxDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG Sect (StartSector >> 8) & 0xff, (StartSector >> 16) & 0xff, ((StartSector >> 24) & 0x0f) | IDE_DH_LBA | - (0 == (DriveNumber & 0x0f) ? IDE_DH_DRV0 : IDE_DH_DRV1), + ((DriveNumber & 0x0f) == 0 ? IDE_DH_DRV0 : IDE_DH_DRV1), IDE_CMD_READ, Buffer)) { @@ -512,7 +512,7 @@ XboxDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry) 0, 0, 0, - (0 == (DriveNumber & 0x0f) ? IDE_DH_DRV0 : IDE_DH_DRV1), + ((DriveNumber & 0x0f) == 0 ? IDE_DH_DRV0 : IDE_DH_DRV1), (Atapi ? IDE_CMD_IDENT_ATAPI_DRV : IDE_CMD_IDENT_ATA_DRV), (PUCHAR) &DrvParms)) { @@ -524,7 +524,7 @@ XboxDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry) Geometry->Heads = DrvParms.LogicalHeads; Geometry->Sectors = DrvParms.SectorsPerTrack; - if (! Atapi && 0 != (DrvParms.Capabilities & IDE_DRID_LBA_SUPPORTED)) + if (!Atapi && (DrvParms.Capabilities & IDE_DRID_LBA_SUPPORTED) != 0) { /* LBA ATA drives always have a sector size of 512 */ Geometry->BytesPerSector = 512; diff --git a/boot/freeldr/freeldr/arch/i386/xboxmem.c b/boot/freeldr/freeldr/arch/i386/xboxmem.c index 36c2f0bf108..2e763bb0b8c 100644 --- a/boot/freeldr/freeldr/arch/i386/xboxmem.c +++ b/boot/freeldr/freeldr/arch/i386/xboxmem.c @@ -15,8 +15,8 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Note: much of this code was based on knowledge and/or code developed - * by the Xbox Linux group:
http://www.xbox-linux.org
+ * Note: much of this code was based on knowledge and/or code developed + * by the Xbox Linux group:
http://www.xbox-linux.org
*/ #include <freeldr.h> @@ -25,53 +25,53 @@ static ULONG InstalledMemoryMb = 0; static ULONG AvailableMemoryMb = 0; #define TEST_SIZE 0x200 -#define TEST_PATTERN1 0xaa +#define TEST_PATTERN1 0xAA #define TEST_PATTERN2 0x55 VOID XboxMemInit(VOID) { - UCHAR ControlRegion[TEST_SIZE]; - PVOID MembaseTop = (PVOID)(64 * 1024 * 1024); - PVOID MembaseLow = (PVOID)0; + UCHAR ControlRegion[TEST_SIZE]; + PVOID MembaseTop = (PVOID)(64 * 1024 * 1024); + PVOID MembaseLow = (PVOID)0; - (*(PULONG)(0xfd000000 + 0x100200)) = 0x03070103 ; - (*(PULONG)(0xfd000000 + 0x100204)) = 0x11448000 ; + (*(PULONG)(0xfd000000 + 0x100200)) = 0x03070103; + (*(PULONG)(0xfd000000 + 0x100204)) = 0x11448000; - WRITE_PORT_ULONG((ULONG*) 0xcf8, CONFIG_CMD(0, 0, 0x84)); - WRITE_PORT_ULONG((ULONG*) 0xcfc, 0x7ffffff); /* Prep hardware for 128 Mb */ + WRITE_PORT_ULONG((ULONG*) 0xcf8, CONFIG_CMD(0, 0, 0x84)); + WRITE_PORT_ULONG((ULONG*) 0xcfc, 0x7ffffff); /* Prep hardware for 128 Mb */ - InstalledMemoryMb = 64; - memset(ControlRegion, TEST_PATTERN1, TEST_SIZE); - memset(MembaseTop, TEST_PATTERN1, TEST_SIZE); - __wbinvd(); + InstalledMemoryMb = 64; + memset(ControlRegion, TEST_PATTERN1, TEST_SIZE); + memset(MembaseTop, TEST_PATTERN1, TEST_SIZE); + __wbinvd(); - if (0 == memcmp(MembaseTop, ControlRegion, TEST_SIZE)) + if (memcmp(MembaseTop, ControlRegion, TEST_SIZE) == 0) { - /* Looks like there is memory .. maybe a 128MB box */ - memset(ControlRegion, TEST_PATTERN2, TEST_SIZE); - memset(MembaseTop, TEST_PATTERN2, TEST_SIZE); - __wbinvd(); - if (0 == memcmp(MembaseTop, ControlRegion, TEST_SIZE)) + /* Looks like there is memory .. maybe a 128MB box */ + memset(ControlRegion, TEST_PATTERN2, TEST_SIZE); + memset(MembaseTop, TEST_PATTERN2, TEST_SIZE); + __wbinvd(); + if (memcmp(MembaseTop, ControlRegion, TEST_SIZE) == 0) { - /* Definitely looks like there is memory */ - if (0 == memcmp(MembaseLow, ControlRegion, TEST_SIZE)) + /* Definitely looks like there is memory */ + if (memcmp(MembaseLow, ControlRegion, TEST_SIZE) == 0) { - /* Hell, we find the Test-string at 0x0 too ! */ - InstalledMemoryMb = 64; + /* Hell, we find the Test-string at 0x0 too! */ + InstalledMemoryMb = 64; } - else + else { - InstalledMemoryMb = 128; + InstalledMemoryMb = 128; } } } - /* Set hardware for amount of memory detected */ - WRITE_PORT_ULONG((ULONG*) 0xcf8, CONFIG_CMD(0, 0, 0x84)); - WRITE_PORT_ULONG((ULONG*) 0xcfc, InstalledMemoryMb * 1024 * 1024 - 1); + /* Set hardware for amount of memory detected */ + WRITE_PORT_ULONG((ULONG*) 0xcf8, CONFIG_CMD(0, 0, 0x84)); + WRITE_PORT_ULONG((ULONG*) 0xcfc, InstalledMemoryMb * 1024 * 1024 - 1); - AvailableMemoryMb = InstalledMemoryMb; + AvailableMemoryMb = InstalledMemoryMb; } FREELDR_MEMORY_DESCRIPTOR XboxMemoryMap[2]; @@ -79,40 +79,41 @@ FREELDR_MEMORY_DESCRIPTOR XboxMemoryMap[2]; PFREELDR_MEMORY_DESCRIPTOR XboxMemGetMemoryMap(ULONG *MemoryMapSize) { - /* Synthesize memory map */ - /* Available RAM block */ - XboxMemoryMap[0].BasePage = 0; - XboxMemoryMap[0].PageCount = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; - XboxMemoryMap[0].MemoryType = LoaderFree; - - /* Video memory */ - XboxMemoryMap[1].BasePage = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; - XboxMemoryMap[1].PageCount = (InstalledMemoryMb - AvailableMemoryMb) * 1024 * 1024 / MM_PAGE_SIZE; - XboxMemoryMap[1].MemoryType = LoaderFirmwarePermanent; - - *MemoryMapSize = 2; - return XboxMemoryMap; + /* Synthesize memory map */ + + /* Available RAM block */ + XboxMemoryMap[0].BasePage = 0; + XboxMemoryMap[0].PageCount = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; + XboxMemoryMap[0].MemoryType = LoaderFree; + + /* Video memory */ + XboxMemoryMap[1].BasePage = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; + XboxMemoryMap[1].PageCount = (InstalledMemoryMb - AvailableMemoryMb) * 1024 * 1024 / MM_PAGE_SIZE; + XboxMemoryMap[1].MemoryType = LoaderFirmwarePermanent; + + *MemoryMapSize = 2; + return XboxMemoryMap; } PVOID XboxMemReserveMemory(ULONG MbToReserve) { - if (0 == InstalledMemoryMb) + if (InstalledMemoryMb == 0) { - /* Hmm, seems we're not initialized yet */ - XboxMemInit(); + /* Hmm, seems we're not initialized yet */ + XboxMemInit(); } - if (AvailableMemoryMb < MbToReserve) + if (MbToReserve > AvailableMemoryMb) { - /* Can't satisfy the request */ - return NULL; + /* Can't satisfy the request */ + return NULL; } - AvailableMemoryMb -= MbToReserve; + AvailableMemoryMb -= MbToReserve; - /* Top of available memory points to the space just reserved */ - return (PVOID) (AvailableMemoryMb * 1024 * 1024); + /* Top of available memory points to the space just reserved */ + return (PVOID)(AvailableMemoryMb * 1024 * 1024); } /* EOF */
5 years, 5 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
15
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Results per page:
10
25
50
100
200