-if(ARCH MATCHES i386)
+if(ARCH MATCHES i386 OR ARCH MATCHES amd64)
CreateBootSectorTarget2(frldr16
${CMAKE_CURRENT_SOURCE_DIR}/arch/realmode/i386.S
${CMAKE_CURRENT_BINARY_DIR}/frldr16.bin
endif()
elseif(ARCH MATCHES amd64)
list(APPEND FREELDR_COMMON_SOURCE
+ arch/amd64/entry.S
arch/amd64/loader.c
arch/i386/hardware.c
arch/i386/hwacpi.c
arch/i386/pcvideo.c
windows/amd64/ntsetup.c
windows/amd64/wlmemory.c)
- if(NOT MSVC)
- list(APPEND FREELDR_COMMON_SOURCE
- arch/i386/drvmap.S
- arch/i386/i386trap.S
- arch/amd64/mb.S)
- else()
- list(APPEND FREELDR_COMMON_SOURCE
- arch/amd64/stubs.S)
- endif()
else()
#TBD
endif()
--- /dev/null
+
+
+#include <asm.inc>
+#include <arch/pc/x86common.h>
+
+.code64
+
+PUBLIC RealEntryPoint
+RealEntryPoint:
+
+PUBLIC FrldrBootDrive
+FrldrBootDrive:
+
+PUBLIC FrldrBootPartition
+FrldrBootPartition:
+
+PUBLIC PageDirectoryEnd
+PageDirectoryEnd:
+PUBLIC PageDirectoryStart
+PageDirectoryStart:
+PUBLIC PnpBiosGetDeviceNode
+PnpBiosGetDeviceNode:
+PUBLIC PnpBiosGetDeviceNodeCount
+PnpBiosGetDeviceNodeCount:
+PUBLIC PnpBiosSupported
+PnpBiosSupported:
+PUBLIC Int386
+Int386:
+PUBLIC PxeCallApi
+PxeCallApi:
+
+nop
+
+
+END
/* Long mode selectors */
#define LMODE_CS 0x10
#define LMODE_DS 0x18
-#define RMODE_CS 0x20 /* RMode code selector, base 0 limit 64k */
-#define RMODE_DS 0x28 /* RMode data selector, base 0 limit 64k */
-#define CMODE_CS 0x30
#define VA_MASK 0x0000FFFFFFFFFFFFUL
BOOLEAN DiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer); // Implemented in i386disk.c
BOOLEAN DiskIsDriveRemovable(ULONG DriveNumber);
VOID DiskStopFloppyMotor(VOID); // Implemented in i386disk.c
-#ifndef _M_AMD64
extern ULONG FrldrBootDrive;
extern ULONG FrldrBootPartition;
-#endif
BOOLEAN DiskGetBootPath(char *BootPath, unsigned Size);
#include <ui/tui.h>
/* arch specific includes */
+#if defined(_M_IX86) || defined(_M_AMD64)
+#include <arch/pc/hardware.h>
+#include <arch/pc/machpc.h>
+#include <arch/pc/x86common.h>
+#include <arch/pc/pcbios.h>
+#include <arch/pc/pxe.h>
+#endif
#if defined(_M_IX86)
#include <arch/i386/custom.h>
#include <arch/i386/drivemap.h>
#include <arch/i386/i386.h>
#include <arch/i386/machxbox.h>
#include <arch/i386/miscboot.h>
-#include <arch/pc/hardware.h>
-#include <arch/pc/machpc.h>
-#include <arch/pc/x86common.h>
-#include <arch/pc/pcbios.h>
-#include <arch/pc/pxe.h>
#include <internal/i386/intrin_i.h>
#elif defined(_M_AMD64)
#include <arch/amd64/amd64.h>
-#include <arch/pc/hardware.h>
-#include <arch/pc/machpc.h>
-#include <arch/pc/x86common.h>
-#include <arch/pc/pcbios.h>
-#include <arch/pc/pxe.h>
#include <internal/amd64/intrin_i.h>
#elif defined(_M_PPC)
#include <arch/powerpc/hardware.h>