mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[FREELDR] Fix a whole bunch of assumptions about default calling convention being cdecl, mostly in code called from/to assembly. Freeldr now links with /Gz (standard calling convention as stdcall), which is what this is all about
svn path=/trunk/; revision=69240
This commit is contained in:
@@ -19,6 +19,7 @@ InitIdtVector(
|
||||
}
|
||||
|
||||
void
|
||||
__cdecl
|
||||
InitIdt(void)
|
||||
{
|
||||
InitIdtVector(0, i386DivideByZero, 0x8e00);
|
||||
|
||||
@@ -26,7 +26,7 @@ DBG_DEFAULT_CHANNEL(WARNING);
|
||||
|
||||
/* FUNCTIONS ******************************************************************/
|
||||
|
||||
VOID BootMain(LPSTR CmdLine)
|
||||
VOID __cdecl BootMain(LPSTR CmdLine)
|
||||
{
|
||||
CmdLineParse(CmdLine);
|
||||
MachInit(CmdLine);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
#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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user