VirtualBox

Changeset 106636 in vbox


Ignore:
Timestamp:
Oct 23, 2024 9:59:56 PM (5 weeks ago)
Author:
vboxsync
Message:

SUPDrv: Making it build on win.arm64... jiraref:VBP-1253

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asmdefs-arm.h

    r106625 r106636  
    4141
    4242#include <iprt/cdefs.h>
     43#ifdef ASM_FORMAT_PE
     44# include <iprt/formats/pecoff.h>
     45#endif
     46
     47/* Quick hack for #defines from pecoff.h */
     48#define UINT8_C(v)      v
     49#define UINT16_C(v)     v
     50#define UINT32_C(v)     v
     51#define UINT64_C(v)     v
     52#define INT8_C(v)       v
     53#define INT16_C(v)      v
     54#define INT32_C(v)      v
     55#define INT64_C(v)      v
    4356
    4457
     
    189202 */
    190203.macro BEGINPROC, a_Name
     204#if defined(ASM_FORMAT_PE)
     205        .def            NAME(\a_Name)
     206        .scl            IMAGE_SYM_CLASS_EXTERNAL
     207        .type           IMAGE_SYM_DTYPE_FUNCTION << N_BTSHFT
     208        .endef
     209#endif
     210        .globl          NAME(\a_Name)
    191211NAME(\a_Name):
    192212.endm
     
    205225#elif defined(ASM_FORMAT_PE)
    206226        .def            NAME(\a_Name)
    207         .type           32      /* function */
     227        .scl            IMAGE_SYM_CLASS_EXTERNAL
     228        .type           IMAGE_SYM_DTYPE_FUNCTION << N_BTSHFT
    208229        .endef
    209230#endif
     
    228249        .popsection
    229250        .def            NAME(\a_Name)
    230         .type           32      /* function */
     251        .scl            IMAGE_SYM_CLASS_EXTERNAL
     252        .type           IMAGE_SYM_DTYPE_FUNCTION << N_BTSHFT
    231253        .endef
    232254#endif
  • trunk/include/iprt/formats/pecoff.h

    r106061 r106636  
    4141#endif
    4242
    43 #include <iprt/types.h>
     43#ifndef __ASSEMBLER__
     44# include <iprt/types.h>
     45#endif
    4446#include <iprt/assertcompile.h>
    4547
     
    5153
    5254
     55#ifndef __ASSEMBLER__
    5356/**
    5457 * PE & COFF file header.
     
    7073typedef IMAGE_FILE_HEADER *PIMAGE_FILE_HEADER;
    7174typedef IMAGE_FILE_HEADER const *PCIMAGE_FILE_HEADER;
     75#endif /* !__ASSEMBLER__ */
    7276
    7377
     
    185189
    186190
     191#ifndef __ASSEMBLER__
    187192/**
    188193 * PE data directory.
     
    200205typedef IMAGE_DATA_DIRECTORY *PIMAGE_DATA_DIRECTORY;
    201206typedef IMAGE_DATA_DIRECTORY const *PCIMAGE_DATA_DIRECTORY;
     207#endif /* !__ASSEMBLER__ */
    202208
    203209/** The standard number of data directories in the optional header.
     
    207213#define IMAGE_NUMBEROF_DIRECTORY_ENTRIES        0x10
    208214
     215#ifndef __ASSEMBLER__
    209216
    210217/**
     
    289296typedef IMAGE_OPTIONAL_HEADER64 const *PCIMAGE_OPTIONAL_HEADER64;
    290297
     298#endif /* !__ASSEMBLER__ */
     299
    291300/** @name Optional header magic values.
    292301 * @{ */
     
    358367/** @} */
    359368
     369#ifndef __ASSEMBLER__
    360370
    361371/**
     
    389399typedef IMAGE_NT_HEADERS64 const *PCIMAGE_NT_HEADERS64;
    390400
     401#endif /* !__ASSEMBLER__ */
     402
    391403/** The PE signature.
    392404 * Used by IMAGE_NT_HEADERS32::Signature, IMAGE_NT_HEADERS64::Signature. */
     
    397409#define IMAGE_SIZEOF_SHORT_NAME             0x8
    398410
     411#ifndef __ASSEMBLER__
    399412/**
    400413 * PE & COFF section header.
     
    420433typedef IMAGE_SECTION_HEADER *PIMAGE_SECTION_HEADER;
    421434typedef IMAGE_SECTION_HEADER const *PCIMAGE_SECTION_HEADER;
     435#endif /* !__ASSEMBLER__ */
    422436
    423437/** @name IMAGE_SCN_XXX - Section header characteristics.
     
    478492
    479493
     494#ifndef __ASSEMBLER__
    480495/**
    481496 * PE image base relocations block header.
     
    497512typedef IMAGE_BASE_RELOCATION *PIMAGE_BASE_RELOCATION;
    498513typedef IMAGE_BASE_RELOCATION const *PCIMAGE_BASE_RELOCATION;
     514#endif /* !__ASSEMBLER__ */
    499515
    500516/** @name IMAGE_REL_BASED_XXX - PE base relocations.
     
    512528#define IMAGE_REL_BASED_HIGH3ADJ            UINT16_C(0xb)
    513529/** @} */
     530
     531#ifndef __ASSEMBLER__
    514532
    515533/**
     
    567585
    568586
    569 #if 0
     587# if 0
    570588/* The image_thunk_data32/64 structures are not very helpful except for getting RSI.
    571589   keep them around till all the code has been converted. */
     
    595613typedef IMAGE_THUNK_DATA32 *PIMAGE_THUNK_DATA32;
    596614typedef IMAGE_THUNK_DATA32 const *PCIMAGE_THUNK_DATA32;
    597 #endif
     615# endif
     616
     617#endif /* !__ASSEMBLER__ */
    598618
    599619/** @name PE import directory macros.
     
    607627#define IMAGE_SNAP_BY_ORDINAL64(ord)        (!!((ord) & IMAGE_ORDINAL_FLAG64))
    608628/** @} */
     629
     630#ifndef __ASSEMBLER__
    609631
    610632/** @name PE Resource directory
     
    647669typedef IMAGE_RESOURCE_DIRECTORY_ENTRY const *PCIMAGE_RESOURCE_DIRECTORY_ENTRY;
    648670
     671#endif /* !__ASSEMBLER__ */
     672
    649673#define IMAGE_RESOURCE_NAME_IS_STRING       UINT32_C(0x80000000)
    650674#define IMAGE_RESOURCE_DATA_IS_DIRECTORY    UINT32_C(0x80000000)
     675
     676#ifndef __ASSEMBLER__
    651677
    652678typedef struct _IMAGE_RESOURCE_DIRECTORY_STRING
     
    678704typedef IMAGE_RESOURCE_DATA_ENTRY const *PCIMAGE_RESOURCE_DATA_ENTRY;
    679705
     706#endif /* !__ASSEMBLER__ */
     707
    680708/** @} */
    681709
    682710/** @name Image exception information
    683711 * @{ */
     712
     713#ifndef __ASSEMBLER__
    684714
    685715/** This structure is used by AMD64 and "Itanic".
     
    746776typedef IMAGE_UNWIND_INFO const *PCIMAGE_UNWIND_INFO;
    747777
     778#endif /* !__ASSEMBLER__ */
     779
    748780/** IMAGE_UNW_FLAGS_XXX - IMAGE_UNWIND_INFO::Flags.
    749781 * @{  */
     
    763795/** @}  */
    764796
     797#ifndef __ASSEMBLER__
    765798/**
    766799 * AMD64 unwind opcodes.
     
    825858    IMAGE_AMD64_UWOP_PUSH_MACHFRAME
    826859} IMAGE_AMD64_UNWIND_OP_CODES;
     860#endif /* !__ASSEMBLER__ */
     861
    827862/** @} */
    828863
     
    831866/** @name Image load config directories
    832867 * @{ */
     868#ifndef __ASSEMBLER__
    833869
    834870/** @since Windows 10 (preview 9879) */
     
    19341970typedef PCIMAGE_LOAD_CONFIG_DIRECTORY64_V13 PCIMAGE_LOAD_CONFIG_DIRECTORY64;
    19351971
    1936 /** @} */
    1937 
    1938 
     1972#endif /* !__ASSEMBLER__ */
     1973/** @} */
     1974
     1975
     1976#ifndef __ASSEMBLER__
    19391977/**
    19401978 * PE certificate directory.
     
    19521990typedef WIN_CERTIFICATE *PWIN_CERTIFICATE;
    19531991typedef WIN_CERTIFICATE const *PCWIN_CERTIFICATE;
     1992#endif /* !__ASSEMBLER__ */
    19541993
    19551994/** @name WIN_CERT_REVISION_XXX - Certificate data directory revision.
     
    19782017
    19792018
     2019#ifndef __ASSEMBLER__
    19802020/**
    19812021 * Debug directory.
     
    19972037typedef IMAGE_DEBUG_DIRECTORY *PIMAGE_DEBUG_DIRECTORY;
    19982038typedef IMAGE_DEBUG_DIRECTORY const *PCIMAGE_DEBUG_DIRECTORY;
     2039#endif /* !__ASSEMBLER__ */
    19992040
    20002041/** @name IMAGE_DEBUG_TYPE_XXX - Debug format types.
     
    20262067/** @} */
    20272068
     2069#ifndef __ASSEMBLER__
    20282070
    20292071/**
     
    20412083typedef IMAGE_DEBUG_MISC *PIMAGE_DEBUG_MISC;
    20422084typedef IMAGE_DEBUG_MISC const *PCIMAGE_DEBUG_MISC;
    2043 
    20442085
    20452086
     
    20672108typedef IMAGE_SEPARATE_DEBUG_HEADER const *PCIMAGE_SEPARATE_DEBUG_HEADER;
    20682109
     2110#endif /* !__ASSEMBLER__ */
     2111
    20692112/** The signature of a IMAGE_SEPARATE_DEBUG_HEADER. */
    20702113#define IMAGE_SEPARATE_DEBUG_SIGNATURE      UINT16_C(0x4944)
    20712114
     2115#ifndef __ASSEMBLER__
    20722116
    20732117/**
     
    21102154typedef IMAGE_LINENUMBER const *PCIMAGE_LINENUMBER;
    21112155
     2156#endif /* !__ASSEMBLER__ */
    21122157
    21132158/** The size of a IMAGE_SYMBOL & IMAGE_AUX_SYMBOL structure. */
     
    21152160/** The size of a IMAGE_SYMBOL_EX & IMAGE_AUX_SYMBOL_EX structure. */
    21162161#define IMAGE_SIZE_OF_SYMBOL_EX             20
     2162
     2163#ifndef __ASSEMBLER__
    21172164
    21182165/**
     
    22892336typedef IMAGE_AUX_SYMBOL_EX *PIMAGE_AUX_SYMBOL_EX;
    22902337typedef IMAGE_AUX_SYMBOL_EX const *PCIMAGE_AUX_SYMBOL_EX;
     2338
     2339#endif /* !__ASSEMBLER__ */
    22912340
    22922341/** @name Special COFF section numbers.
     
    23812430
    23822431
     2432#ifndef __ASSEMBLER__
    23832433/**
    23842434 * COFF relocation table entry.
     
    24052455typedef IMAGE_RELOCATION *PIMAGE_RELOCATION;
    24062456typedef IMAGE_RELOCATION const *PCIMAGE_RELOCATION;
     2457#endif /* !__ASSEMBLER__ */
    24072458
    24082459
  • trunk/include/iprt/x86.h

    r106610 r106636  
    26532653/** Pointer to a const page table. */
    26542654typedef const X86PTPAE *PCX86PTPAE;
    2655 #endif /* !__ASSEMBLY__ */
     2655#endif /* !__ASSEMBLER__ */
    26562656
    26572657/** The page shift to get the PA PTE index. */
  • trunk/src/VBox/HostDrivers/Support/Makefile.kmk

    r106635 r106636  
    560560VBoxSupLib_LDFLAGS.win.amd64 = -Entry:DllMainEntrypoint
    561561VBoxSupLib_LDFLAGS.win.x86   = -Entry:DllMainEntrypoint
     562VBoxSupLib_LDFLAGS.win.arm64 = -Entry:DllMainEntrypoint
    562563VBoxSupLib_DEFS = \
    563564        $(if $(VBOX_WITHOUT_DEBUGGER_CHECKS),VBOX_WITHOUT_DEBUGGER_CHECKS,)
     
    773774   VBoxDrv_LDFLAGS.solaris += -N drv/dtrace
    774775  endif
    775   VBoxDrv_LDFLAGS.win.x86 = -Entry:DriverEntry@8
     776  VBoxDrv_LDFLAGS.win.x86   = -Entry:DriverEntry@8
    776777  VBoxDrv_LDFLAGS.win.amd64 = -Entry:DriverEntry
     778  VBoxDrv_LDFLAGS.win.arm64 = -Entry:DriverEntry
    777779
    778780  VBoxDrv_SOURCES.darwin  = \
  • trunk/src/VBox/HostDrivers/Support/SUPDrvTracerA-arm64.S

    r106625 r106636  
    4848
    4949/** Dummy stub function that just returns. */
     50ALIGNCODE(32)
    5051BEGINPROC supdrvTracerProbeFireStub
    5152        ret
     
    5455
    5556/** Tail jump function. */
     57ALIGNCODE(32)
    5658BEGINPROC_EXPORTED SUPR0TracerFireProbe
    5759        adrp    x8, PAGE(NAME(g_pfnSupdrvProbeFireKernel))
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette