Difference between revisions of "AMD64"

From ReactOS Wiki
Jump to: navigation, search
(Links: Enough information here already, categorizing to Category:Development)
(Status)
 
(34 intermediate revisions by 14 users not shown)
Line 1: Line 1:
This page describes the current status of the AMD64 port of ReactOS. AMD64 refers to AMD's specifications for a 64-bit extension to the x86 instruction set. It is also known as x86-64 (and variants such as x86_64 and x64).
+
This page describes the current status of the AMD64 port of ReactOS. AMD64 refers to AMD's specifications for a 64-bit extension to the x86 instruction set. It is also known as x64, x86-64 or x86_64 and it is not limited to AMD processors.
  
The ros-amd64-bringup branch was created on {{rev|34699}} by [[User:ThePhysicist|Timo Kreuzer]].
+
The [http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/ ros-amd64-bringup] branch was created on {{rev|34699}} by [[User:ThePhysicist|Timo Kreuzer]]. The code is now fully integrated into master.
  
== Status ==
+
= Status =
 +
 
 +
* The current code base can be compiled for x64 using the 64 bit development command prompt from VS 2015-2022 (see [[Building ReactOS]])
 +
* It can also be compiled with x64 GCC and Clang, but it will probably not boot.
 +
* The main code base (git master) does boot on VirtualBox / KVM. Choose WS2003 x64 as your OS and enable I/O APIC.
 +
* The buildbot based tests complete only after commenting out some tests, this is WIP.
 +
* WoW64 is not implemented yet, so you cannot use 32-bit programs.
  
* Everything builds
 
* A bootcd is created
 
* setupldr loads, switches the cpu to long mode, initializes hardware/memory/paging and jumps to ntoskrnl
 
* Basic Mm initialization is done, then the system crashes
 
* Non paged pool allocations work
 
* Debugging with WinDbg (break points, single stepping etc) works
 
* Enabling interrupts makes everything go nots
 
  
 
== Completion Status (rough estimates) ==
 
== Completion Status (rough estimates) ==
 +
{| class="wikitable"
 +
!
 +
! completion
 +
! comment
 +
|-
 +
| freeldr    || 100% ||
 +
|-
 +
| hal        ||  99% || Mostly completed, might need some bugfixing here and there.
 +
|-
 +
| ntoskrnl/ke || 99% || Mostly completed, might need some bugfixing here and there.
 +
|-
 +
| ntoskrnl/mm || 95% || Mostly completed, some limitations might exist.
 +
|-
 +
| rtl        || 95% || exception handling and unwinding is still slightly buggy.
 +
|-
 +
| crt        || 99% || Mostly completed, might need some bugfixing here and there.
 +
|-
 +
|}
 +
 +
==Building port==
 +
Last updated: 2022/09/04
 +
 +
Currently it's only possible to build ReactOS x86-64 on Windows. Note that <code>MYUSER</code> is a placeholder for your username.<br/>
 +
Prerequisites are:
 +
* <u>MSVC</u> (Visual C++) and <u>Cmake tools for Windows</u> (easiest through Visual Studio component install)
 +
* [https://reactos.org/wiki/Build_Environment RosBE] for Windows with <code>add BIN folder to PATH variable</code> active
 +
* Some form of git to clone the repository
 +
<br/>
 +
Ⅰ. Clone the ReactOS code to the RosBE source directory.<br/>
 +
You are at <code>C:\Users\MYUSER</code> and the command is:
 +
<pre>
 +
git clone  https://github.com/reactos/reactos/ -b amd64/test_test
 +
</pre>
  
* freeldr: 95% (only fixes expected)
+
Ⅱ. Set these two environment variables ([[Building_ReactOS#Windows.2FMSVC|source]])
* hal: 5% (only initial work has been done, most missing is support for interrupts)
+
* <u>M4</u> with value <code>C:\RosBE\bin\m4.exe</code>
* ntoskrnl/ke: 50% (core functionality is implemented)
+
* <u>BISON_PKGDATADIR</u> with value <code>C:\RosBE\share\bison</code>
* ntoskrnl/mm: 10% (only a few functions are implemented, most stuff is missing)
+
<br/>
* rtl: 60% (exception handling is missing and unwinding is incomplete)
+
Ⅲ. Open <code>x64 Native Tools Command Prompt</code> and configure the build.<br/>
* crt: 60% (missing stuff here and there)
+
The commands for configuring are:
* PSEH: 0% (unimplemented. Waiting for mingw-w64 support)
+
<pre>
 +
cd \Users\MYUSER\reactos
 +
configure.cmd
 +
</pre>
 +
 
 +
Ⅳ. Lastly navigate to the newly created folder of your configuration and start the build<br/>
 +
The commands for this are:
 +
<pre>
 +
cd output-VS-amd64
 +
ninja livecd
 +
</pre>
 +
 
 +
If <code>livecd</code> is replaced with <code>bootcd</code> in the last command, an installable medium will be built instead<br/>
 +
The output file is usually ~80mb in size
  
 
== Links ==
 
== Links ==
  
* ViewVC of [http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/ ros-amd64-bringup]
+
* [https://git.reactos.org/?p=reactos.git;a=shortlog;h=refs/heads/tkreuzer/The_ultimate_ros_amd64_bringup The_ultimate_ros_amd64_bringup branch]
 
* [http://www.nynaeve.net/?p=99 Nynaeve: Programming against the x64 exception handling support]
 
* [http://www.nynaeve.net/?p=99 Nynaeve: Programming against the x64 exception handling support]
 +
* [http://github.com/reactos/reactos/pull/361 PR Make ReactOS boot to user mode on x64]
 +
* [http://youtu.be/qZ9KvJv7P3E Attempt to boot ReactOS x64 from 01/01/2018]
 +
* [https://youtu.be/-rgsXXbs2FA Attempt to boot ReactOS x64 RAM boot on modern hardware from 31/05/2019]
 +
* [https://www.youtube.com/watch?v=n35a1tYvG-o Status of x64 port in June 2021]
 +
* [https://www.youtube.com/watch?v=iSwbAIxbpC8 Blender 2.21 x64 works in ReactOS x64]
 +
 +
==See Also==
 +
[[ReactOS_ports#AMD64_.28.22amd64.22.29|ReactOS Ports AMD64 Section]]
 +
 +
{{Navigation Ports}}
  
 +
[[Category:Documentation]]
 
[[Category:Development]]
 
[[Category:Development]]
 +
[[Category:amd64]]
 +
[[Category:Branches]]

Latest revision as of 20:41, 1 December 2022

This page describes the current status of the AMD64 port of ReactOS. AMD64 refers to AMD's specifications for a 64-bit extension to the x86 instruction set. It is also known as x64, x86-64 or x86_64 and it is not limited to AMD processors.

The ros-amd64-bringup branch was created on r34699 by Timo Kreuzer. The code is now fully integrated into master.

Status

  • The current code base can be compiled for x64 using the 64 bit development command prompt from VS 2015-2022 (see Building ReactOS)
  • It can also be compiled with x64 GCC and Clang, but it will probably not boot.
  • The main code base (git master) does boot on VirtualBox / KVM. Choose WS2003 x64 as your OS and enable I/O APIC.
  • The buildbot based tests complete only after commenting out some tests, this is WIP.
  • WoW64 is not implemented yet, so you cannot use 32-bit programs.


Completion Status (rough estimates)

completion comment
freeldr 100%
hal 99% Mostly completed, might need some bugfixing here and there.
ntoskrnl/ke 99% Mostly completed, might need some bugfixing here and there.
ntoskrnl/mm 95% Mostly completed, some limitations might exist.
rtl 95% exception handling and unwinding is still slightly buggy.
crt 99% Mostly completed, might need some bugfixing here and there.

Building port

Last updated: 2022/09/04

Currently it's only possible to build ReactOS x86-64 on Windows. Note that MYUSER is a placeholder for your username.
Prerequisites are:

  • MSVC (Visual C++) and Cmake tools for Windows (easiest through Visual Studio component install)
  • RosBE for Windows with add BIN folder to PATH variable active
  • Some form of git to clone the repository


Ⅰ. Clone the ReactOS code to the RosBE source directory.
You are at C:\Users\MYUSER and the command is:

git clone  https://github.com/reactos/reactos/ -b amd64/test_test

Ⅱ. Set these two environment variables (source)

  • M4 with value C:\RosBE\bin\m4.exe
  • BISON_PKGDATADIR with value C:\RosBE\share\bison


Ⅲ. Open x64 Native Tools Command Prompt and configure the build.
The commands for configuring are:

cd \Users\MYUSER\reactos
configure.cmd

Ⅳ. Lastly navigate to the newly created folder of your configuration and start the build
The commands for this are:

cd output-VS-amd64
ninja livecd

If livecd is replaced with bootcd in the last command, an installable medium will be built instead
The output file is usually ~80mb in size

Links

See Also

ReactOS Ports AMD64 Section

ReactOS ports‎
In active development Intel IA-32 (x86) | AMD64 (x64)
In slow development ARM64 (aarch64) | ARM32 (armv7) | NEC PC-98 (x86) | OG Xbox (x86) | Apple TV (1st generation) (x86)
Unmaintained OLPC (x86)
Missing ports that Windows has Intel IA-64 (Itanium) | IBM PS/2 MCA (x86) | SGI 320/540 (x86) | DEC Alpha (axp) | MIPS | PowerPC (ppc)
Ideas for new ports FM Towns (x86) | PlayStation 4 (x64) | Intel SFI (x86)