[FREELDR] Fix a whole bunch of assumptions about default calling convention being...
authorStefan Ginsberg <stefanginsberg@gmail.com>
Tue, 15 Sep 2015 11:07:28 +0000 (11:07 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Tue, 15 Sep 2015 11:07:28 +0000 (11:07 +0000)
svn path=/trunk/; revision=69240

reactos/boot/freeldr/freeldr/arch/i386/i386idt.c
reactos/boot/freeldr/freeldr/freeldr.c
reactos/boot/freeldr/freeldr/fs/pxe.c
reactos/boot/freeldr/freeldr/include/arch/i386/i386.h
reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h
reactos/boot/freeldr/freeldr/include/arch/pc/pcbios.h
reactos/boot/freeldr/freeldr/include/freeldr.h
reactos/boot/freeldr/freeldr/include/linux.h

index a4dd2e8..f63eb99 100644 (file)
@@ -19,6 +19,7 @@ InitIdtVector(
 }
 
 void
+__cdecl
 InitIdt(void)
 {
     InitIdtVector(0, i386DivideByZero, 0x8e00);
index f1ad520..d6bcaa8 100644 (file)
@@ -26,7 +26,7 @@ DBG_DEFAULT_CHANNEL(WARNING);
 
 /* FUNCTIONS ******************************************************************/
 
-VOID BootMain(LPSTR CmdLine)
+VOID __cdecl BootMain(LPSTR CmdLine)
 {
     CmdLineParse(CmdLine);
     MachInit(CmdLine);
index bb1df78..c384175 100644 (file)
@@ -84,7 +84,7 @@ static PPXE GetPxeStructure(VOID)
     return pPxe;
 }
 
-extern PXENV_EXIT PxeCallApi(UINT16 Segment, UINT16 Offset, UINT16 Service, VOID *Parameter);
+extern PXENV_EXIT __cdecl PxeCallApi(UINT16 Segment, UINT16 Offset, UINT16 Service, VOID *Parameter);
 BOOLEAN CallPxe(UINT16 Service, PVOID Parameter)
 {
     PPXE pxe;
index 3037856..16d7542 100644 (file)
@@ -50,23 +50,23 @@ typedef struct _PAGE_DIRECTORY_X86
     HARDWARE_PTE Pde[1024];
 } PAGE_DIRECTORY_X86, *PPAGE_DIRECTORY_X86;
 
-void i386DivideByZero(void);
-void i386DebugException(void);
-void i386NMIException(void);
-void i386Breakpoint(void);
-void i386Overflow(void);
-void i386BoundException(void);
-void i386InvalidOpcode(void);
-void i386FPUNotAvailable(void);
-void i386DoubleFault(void);
-void i386CoprocessorSegment(void);
-void i386InvalidTSS(void);
-void i386SegmentNotPresent(void);
-void i386StackException(void);
-void i386GeneralProtectionFault(void);
-void i386PageFault(void);
-void i386CoprocessorError(void);
-void i386AlignmentCheck(void);
-void i386MachineCheck(void);
+void __cdecl i386DivideByZero(void);
+void __cdecl i386DebugException(void);
+void __cdecl i386NMIException(void);
+void __cdecl i386Breakpoint(void);
+void __cdecl i386Overflow(void);
+void __cdecl i386BoundException(void);
+void __cdecl i386InvalidOpcode(void);
+void __cdecl i386FPUNotAvailable(void);
+void __cdecl i386DoubleFault(void);
+void __cdecl i386CoprocessorSegment(void);
+void __cdecl i386InvalidTSS(void);
+void __cdecl i386SegmentNotPresent(void);
+void __cdecl i386StackException(void);
+void __cdecl i386GeneralProtectionFault(void);
+void __cdecl i386PageFault(void);
+void __cdecl i386CoprocessorError(void);
+void __cdecl i386AlignmentCheck(void);
+void __cdecl i386MachineCheck(void);
 
 /* EOF */
index 5a7afa3..21e49dc 100644 (file)
@@ -44,13 +44,13 @@ VOID DetectApmBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber);
 VOID DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber);
 
 /* i386pnp.S */
-ULONG_PTR PnpBiosSupported(VOID);
-ULONG PnpBiosGetDeviceNodeCount(ULONG *NodeSize,
+ULONG_PTR __cdecl PnpBiosSupported(VOID);
+ULONG __cdecl PnpBiosGetDeviceNodeCount(ULONG *NodeSize,
                   ULONG *NodeCount);
-ULONG PnpBiosGetDeviceNode(UCHAR *NodeId,
+ULONG __cdecl PnpBiosGetDeviceNode(UCHAR *NodeId,
              UCHAR *NodeBuffer);
 
 /* i386pxe.S */
-USHORT PxeCallApi(USHORT Segment, USHORT Offset, USHORT Service, VOID* Parameter);
+USHORT __cdecl PxeCallApi(USHORT Segment, USHORT Offset, USHORT Service, VOID* Parameter);
 
 /* EOF */
index bee9c0b..ecfaf90 100644 (file)
@@ -114,16 +114,16 @@ typedef union
 // Make sure all memory pointers are in SEG:OFFS format and
 // not linear addresses, unless the interrupt handler
 // specifically handles linear addresses.
-int        Int386(int ivec, REGS* in, REGS* out);
+int __cdecl Int386(int ivec, REGS* in, REGS* out);
 
 // This macro tests the Carry Flag
 // If CF is set then the call failed (usually)
 #define INT386_SUCCESS(regs)    ((regs.x.eflags & EFLAGS_CF) == 0)
 
 void    EnableA20(void);
-VOID    ChainLoadBiosBootSectorCode(VOID);    // Implemented in boot.S
-VOID    Reboot(VOID);                    // Implemented in boot.S
-VOID    DetectHardware(VOID);        // Implemented in hardware.c
+VOID __cdecl ChainLoadBiosBootSectorCode(VOID);    // Implemented in boot.S
+VOID __cdecl Reboot(VOID);                    // Implemented in boot.S
+VOID    DetectHardware(VOID);                 // Implemented in hardware.c
 
 #endif /* ! __ASM__ */
 
index 57b31aa..d96d400 100644 (file)
 #include <arch/mips/arcbios.h>
 #endif
 
-VOID BootMain(LPSTR CmdLine);
+VOID __cdecl BootMain(LPSTR CmdLine);
 VOID LoadOperatingSystem(IN OperatingSystemItem* OperatingSystem);
 VOID RunLoader(VOID);
 VOID FrLdrCheckCpuCompatiblity(VOID);
index f0f5cc9..78c16bc 100644 (file)
@@ -128,8 +128,8 @@ typedef struct
 } LINUX_SETUPSECTOR, *PLINUX_SETUPSECTOR;
 #include <poppack.h>
 
-VOID    BootNewLinuxKernel(VOID);                // Implemented in linux.S
-VOID    BootOldLinuxKernel(ULONG KernelSize);        // Implemented in linux.S
+VOID    __cdecl BootNewLinuxKernel(VOID);                // Implemented in linux.S
+VOID    __cdecl BootOldLinuxKernel(ULONG KernelSize);        // Implemented in linux.S
 
 VOID
 LoadAndBootLinux(IN OperatingSystemItem* OperatingSystem,