10Sstevel@tonic-gate/* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 51548Srshoaib * Common Development and Distribution License (the "License"). 61548Srshoaib * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 211548Srshoaib 220Sstevel@tonic-gate/* 2312199Sgerald.jelinek@sun.com * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate#include <sys/asm_linkage.h> 270Sstevel@tonic-gate 280Sstevel@tonic-gate#if defined(__lint) 290Sstevel@tonic-gate 300Sstevel@tonic-gatechar stubs_base[1], stubs_end[1]; 310Sstevel@tonic-gate 320Sstevel@tonic-gate#else /* __lint */ 330Sstevel@tonic-gate 340Sstevel@tonic-gate#include "assym.h" 350Sstevel@tonic-gate 360Sstevel@tonic-gate/* 370Sstevel@tonic-gate * !!!!!!!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!!!!!! 380Sstevel@tonic-gate * 390Sstevel@tonic-gate * For functions which are either STUBs or WSTUBs the actual function 400Sstevel@tonic-gate * need to be called using 'call' instruction because of preamble and 410Sstevel@tonic-gate * postamble (i.e mod_hold_stub and mod_release_stub) around the 420Sstevel@tonic-gate * function call. Due to this we need to copy arguments for the 430Sstevel@tonic-gate * real function. On Intel we can't tell how many arguments are there 440Sstevel@tonic-gate * on the stack so we have to either copy everything between esp and 450Sstevel@tonic-gate * ebp or copy only a fixed number (MAXNARG - defined here) for 460Sstevel@tonic-gate * all the stub functions. Currently we are using MAXNARG (it is a kludge 470Sstevel@tonic-gate * but worth it?!). 480Sstevel@tonic-gate * 490Sstevel@tonic-gate * NOTE: Use NO_UNLOAD_STUBs if the module is NOT unloadable once it is 500Sstevel@tonic-gate * loaded. 510Sstevel@tonic-gate */ 520Sstevel@tonic-gate#define MAXNARG 10 530Sstevel@tonic-gate 540Sstevel@tonic-gate/* 550Sstevel@tonic-gate * WARNING: there is no check for forgetting to write END_MODULE, 560Sstevel@tonic-gate * and if you do, the kernel will most likely crash. Be careful 570Sstevel@tonic-gate * 580Sstevel@tonic-gate * This file assumes that all of the contributions to the data segment 590Sstevel@tonic-gate * will be contiguous in the output file, even though they are separated 600Sstevel@tonic-gate * by pieces of text. This is safe for all assemblers I know of now... 610Sstevel@tonic-gate */ 620Sstevel@tonic-gate 630Sstevel@tonic-gate/* 640Sstevel@tonic-gate * This file uses ansi preprocessor features: 650Sstevel@tonic-gate * 660Sstevel@tonic-gate * 1. #define mac(a) extra_ ## a --> mac(x) expands to extra_a 670Sstevel@tonic-gate * The old version of this is 680Sstevel@tonic-gate * #define mac(a) extra_/.*.*./a 690Sstevel@tonic-gate * but this fails if the argument has spaces "mac ( x )" 700Sstevel@tonic-gate * (Ignore the dots above, I had to put them in to keep this a comment.) 710Sstevel@tonic-gate * 720Sstevel@tonic-gate * 2. #define mac(a) #a --> mac(x) expands to "x" 730Sstevel@tonic-gate * The old version is 740Sstevel@tonic-gate * #define mac(a) "a" 750Sstevel@tonic-gate * 760Sstevel@tonic-gate * For some reason, the 5.0 preprocessor isn't happy with the above usage. 770Sstevel@tonic-gate * For now, we're not using these ansi features. 780Sstevel@tonic-gate * 790Sstevel@tonic-gate * The reason is that "the 5.0 ANSI preprocessor" is built into the compiler 800Sstevel@tonic-gate * and is a tokenizing preprocessor. This means, when confronted by something 810Sstevel@tonic-gate * other than C token generation rules, strange things occur. In this case, 820Sstevel@tonic-gate * when confronted by an assembly file, it would turn the token ".globl" into 830Sstevel@tonic-gate * two tokens "." and "globl". For this reason, the traditional, non-ANSI 840Sstevel@tonic-gate * preprocessor is used on assembly files. 850Sstevel@tonic-gate * 860Sstevel@tonic-gate * It would be desirable to have a non-tokenizing cpp (accp?) to use for this. 870Sstevel@tonic-gate */ 880Sstevel@tonic-gate 890Sstevel@tonic-gate/* 900Sstevel@tonic-gate * This file contains the stubs routines for modules which can be autoloaded. 910Sstevel@tonic-gate */ 920Sstevel@tonic-gate 930Sstevel@tonic-gate#if defined(__amd64) 940Sstevel@tonic-gate 950Sstevel@tonic-gate/* 960Sstevel@tonic-gate * See the 'struct mod_modinfo' definition to see what this declaration 970Sstevel@tonic-gate * is trying to achieve here. 980Sstevel@tonic-gate */ 990Sstevel@tonic-gate#define MODULE(module,namespace) \ 1000Sstevel@tonic-gate .data; \ 1010Sstevel@tonic-gatemodule/**/_modname: \ 1020Sstevel@tonic-gate .string "namespace/module"; \ 1030Sstevel@tonic-gate SET_SIZE(module/**/_modname); \ 1040Sstevel@tonic-gate .align CPTRSIZE; \ 1050Sstevel@tonic-gate .globl module/**/_modinfo; \ 1060Sstevel@tonic-gate .type module/**/_modinfo, @object; \ 1070Sstevel@tonic-gatemodule/**/_modinfo: \ 1080Sstevel@tonic-gate .quad module/**/_modname; \ 1090Sstevel@tonic-gate .quad 0 /* storage for modctl pointer */ 1100Sstevel@tonic-gate 1110Sstevel@tonic-gate /* then mod_stub_info structures follow until a mods_func_adr is 0 */ 1120Sstevel@tonic-gate 1130Sstevel@tonic-gate/* this puts a 0 where the next mods_func_adr would be */ 1140Sstevel@tonic-gate#define END_MODULE(module) \ 1150Sstevel@tonic-gate .data; \ 1160Sstevel@tonic-gate .align CPTRSIZE; \ 1170Sstevel@tonic-gate .quad 0; \ 1180Sstevel@tonic-gate SET_SIZE(module/**/_modinfo) 1190Sstevel@tonic-gate 1200Sstevel@tonic-gate/* 1210Sstevel@tonic-gate * The data section in the stub_common macro is the 1220Sstevel@tonic-gate * mod_stub_info structure for the stub function 1230Sstevel@tonic-gate */ 1240Sstevel@tonic-gate 1250Sstevel@tonic-gate#define STUB_COMMON(module, fcnname, install_fcn, retfcn, weak) \ 1260Sstevel@tonic-gate ENTRY(fcnname); \ 1270Sstevel@tonic-gate leaq fcnname/**/_info(%rip), %rax; \ 1280Sstevel@tonic-gate cmpl $0, MODS_FLAG(%rax); /* weak? */ \ 1290Sstevel@tonic-gate je stubs_common_code; /* not weak */ \ 1300Sstevel@tonic-gate testb $MODS_INSTALLED, MODS_FLAG(%rax); /* installed? */ \ 1310Sstevel@tonic-gate jne stubs_common_code; /* yes, do the mod_hold */ \ 1320Sstevel@tonic-gate jmp *MODS_RETFCN(%rax); /* no, jump to retfcn */ \ 1330Sstevel@tonic-gate SET_SIZE(fcnname); \ 1340Sstevel@tonic-gate .data; \ 1350Sstevel@tonic-gate .align CPTRSIZE; \ 1360Sstevel@tonic-gate .type fcnname/**/_info, @object; \ 1370Sstevel@tonic-gatefcnname/**/_info: \ 1380Sstevel@tonic-gate .quad install_fcn; /* 0 */ \ 1390Sstevel@tonic-gate .quad module/**/_modinfo; /* 0x8 */ \ 1400Sstevel@tonic-gate .quad fcnname; /* 0x10 */ \ 1410Sstevel@tonic-gate .quad retfcn; /* 0x18 */ \ 1420Sstevel@tonic-gate .long weak; /* 0x20 */ \ 1430Sstevel@tonic-gate SET_SIZE(fcnname/**/_info) 1440Sstevel@tonic-gate 1450Sstevel@tonic-gate#define STUB_UNLOADABLE(module, fcnname, install_fcn, retfcn, weak) \ 1460Sstevel@tonic-gate ENTRY(fcnname); \ 1470Sstevel@tonic-gate leaq fcnname/**/_info(%rip), %rax; \ 1480Sstevel@tonic-gate testb $MODS_INSTALLED, MODS_FLAG(%rax); /* installed? */ \ 1490Sstevel@tonic-gate je 5f; /* no */ \ 1500Sstevel@tonic-gate jmp *(%rax); /* yes, jump to install_fcn */ \ 1510Sstevel@tonic-gate5: testb $MODS_WEAK, MODS_FLAG(%rax); /* weak? */ \ 1520Sstevel@tonic-gate je stubs_common_code; /* no, do mod load */ \ 1530Sstevel@tonic-gate jmp *MODS_RETFCN(%rax); /* yes, jump to retfcn */ \ 1540Sstevel@tonic-gate SET_SIZE(fcnname); \ 1550Sstevel@tonic-gate .data; \ 1560Sstevel@tonic-gate .align CPTRSIZE; \ 1570Sstevel@tonic-gate .type fcnname/**/_info, @object; \ 1580Sstevel@tonic-gatefcnname/**/_info: \ 1590Sstevel@tonic-gate .quad install_fcn; /* 0 */ \ 1600Sstevel@tonic-gate .quad module/**/_modinfo; /* 0x8 */ \ 1610Sstevel@tonic-gate .quad fcnname; /* 0x10 */ \ 1620Sstevel@tonic-gate .quad retfcn; /* 0x18 */ \ 1630Sstevel@tonic-gate .long weak; /* 0x20 */ \ 1640Sstevel@tonic-gate SET_SIZE(fcnname/**/_info) 1650Sstevel@tonic-gate 1660Sstevel@tonic-gate/* 1670Sstevel@tonic-gate * We branch here with the fcnname_info pointer in %rax 1680Sstevel@tonic-gate */ 1690Sstevel@tonic-gate ENTRY_NP(stubs_common_code) 1700Sstevel@tonic-gate .globl mod_hold_stub 1710Sstevel@tonic-gate .globl mod_release_stub 1720Sstevel@tonic-gate pushq %rbp 1730Sstevel@tonic-gate movq %rsp, %rbp 1740Sstevel@tonic-gate subq $0x10, %rsp 1750Sstevel@tonic-gate movq %r15, (%rsp) /* (caller saved) */ 1760Sstevel@tonic-gate movq %rax, %r15 /* stash the fcnname_info pointer */ 1770Sstevel@tonic-gate /* 1780Sstevel@tonic-gate * save incoming register arguments 1790Sstevel@tonic-gate */ 1800Sstevel@tonic-gate pushq %rdi 1810Sstevel@tonic-gate pushq %rsi 1820Sstevel@tonic-gate pushq %rdx 1830Sstevel@tonic-gate pushq %rcx 1840Sstevel@tonic-gate pushq %r8 1850Sstevel@tonic-gate pushq %r9 1860Sstevel@tonic-gate /* (next 4 args, if any, are already on the stack above %rbp) */ 1870Sstevel@tonic-gate movq %r15, %rdi 1880Sstevel@tonic-gate call mod_hold_stub /* mod_hold_stub(mod_stub_info *) */ 1890Sstevel@tonic-gate cmpl $-1, %eax /* error? */ 1900Sstevel@tonic-gate jne .L1 1910Sstevel@tonic-gate movq 0x18(%r15), %rax 1920Sstevel@tonic-gate call *%rax 1930Sstevel@tonic-gate addq $0x30, %rsp 1940Sstevel@tonic-gate jmp .L2 1950Sstevel@tonic-gate.L1: 1960Sstevel@tonic-gate /* 1970Sstevel@tonic-gate * copy MAXNARG == 10 incoming arguments 1980Sstevel@tonic-gate */ 1990Sstevel@tonic-gate popq %r9 2000Sstevel@tonic-gate popq %r8 2010Sstevel@tonic-gate popq %rcx 2020Sstevel@tonic-gate popq %rdx 2030Sstevel@tonic-gate popq %rsi 2040Sstevel@tonic-gate popq %rdi 2050Sstevel@tonic-gate /* 2060Sstevel@tonic-gate * stack: 2070Sstevel@tonic-gate * arg9 0x38(%rsp) 2080Sstevel@tonic-gate * arg8 0x30(%rsp) 2090Sstevel@tonic-gate * arg7 0x28(%rsp) 2100Sstevel@tonic-gate * arg6 0x20(%rsp) 2110Sstevel@tonic-gate * saved %rip 0x18(%rsp) 2120Sstevel@tonic-gate * saved %rbp 0x10(%rsp) 2130Sstevel@tonic-gate * <pad> 0x8(%rsp) 2140Sstevel@tonic-gate * saved %r15 0x0(%rsp) 2150Sstevel@tonic-gate */ 2160Sstevel@tonic-gate movl $MAXNARG - 6 + 3, %r11d 2170Sstevel@tonic-gate pushq (%rsp, %r11, 8) 2180Sstevel@tonic-gate pushq (%rsp, %r11, 8) 2190Sstevel@tonic-gate pushq (%rsp, %r11, 8) 2200Sstevel@tonic-gate pushq (%rsp, %r11, 8) 2210Sstevel@tonic-gate call *(%r15) /* call the stub fn(arg, ..) */ 2220Sstevel@tonic-gate addq $0x20, %rsp /* pop off last 4 args */ 2230Sstevel@tonic-gate pushq %rax /* save any return values */ 2240Sstevel@tonic-gate pushq %rdx 2250Sstevel@tonic-gate movq %r15, %rdi 2260Sstevel@tonic-gate call mod_release_stub /* release hold on module */ 2270Sstevel@tonic-gate popq %rdx /* restore return values */ 2280Sstevel@tonic-gate popq %rax 2290Sstevel@tonic-gate.L2: 2300Sstevel@tonic-gate popq %r15 2310Sstevel@tonic-gate leave 2320Sstevel@tonic-gate ret 2330Sstevel@tonic-gate SET_SIZE(stubs_common_code) 2340Sstevel@tonic-gate 2350Sstevel@tonic-gate#elif defined(__i386) 2360Sstevel@tonic-gate 2370Sstevel@tonic-gate/* 2380Sstevel@tonic-gate * See the 'struct mod_modinfo' definition to see what this declaration 2390Sstevel@tonic-gate * is trying to achieve here. 2400Sstevel@tonic-gate */ 2410Sstevel@tonic-gate#define MODULE(module,namespace) \ 2420Sstevel@tonic-gate .data; \ 2430Sstevel@tonic-gatemodule/**/_modname: \ 2440Sstevel@tonic-gate .string "namespace/module"; \ 2450Sstevel@tonic-gate SET_SIZE(module/**/_modname); \ 2460Sstevel@tonic-gate .align CPTRSIZE; \ 2470Sstevel@tonic-gate .globl module/**/_modinfo; \ 2480Sstevel@tonic-gate .type module/**/_modinfo, @object; \ 2490Sstevel@tonic-gatemodule/**/_modinfo: \ 2500Sstevel@tonic-gate .long module/**/_modname; \ 2510Sstevel@tonic-gate .long 0 /* storage for modctl pointer */ 2520Sstevel@tonic-gate 2530Sstevel@tonic-gate /* then mod_stub_info structures follow until a mods_func_adr is 0 */ 2540Sstevel@tonic-gate 2550Sstevel@tonic-gate/* this puts a 0 where the next mods_func_adr would be */ 2560Sstevel@tonic-gate#define END_MODULE(module) \ 2570Sstevel@tonic-gate .data; \ 2580Sstevel@tonic-gate .align CPTRSIZE; \ 2590Sstevel@tonic-gate .long 0; \ 2600Sstevel@tonic-gate SET_SIZE(module/**/_modinfo) 2610Sstevel@tonic-gate 2620Sstevel@tonic-gate/* 2630Sstevel@tonic-gate * The data section in the stub_common macro is the 2640Sstevel@tonic-gate * mod_stub_info structure for the stub function 2650Sstevel@tonic-gate */ 2660Sstevel@tonic-gate 2670Sstevel@tonic-gate/* 2680Sstevel@tonic-gate * The flag MODS_INSTALLED is stored in the stub data and is used to 2690Sstevel@tonic-gate * indicate if a module is installed and initialized. This flag is used 2700Sstevel@tonic-gate * instead of the mod_stub_info->mods_modinfo->mod_installed flag 2710Sstevel@tonic-gate * to minimize the number of pointer de-references for each function 2720Sstevel@tonic-gate * call (and also to avoid possible TLB misses which could be induced 2730Sstevel@tonic-gate * by dereferencing these pointers.) 2740Sstevel@tonic-gate */ 2750Sstevel@tonic-gate 2760Sstevel@tonic-gate#define STUB_COMMON(module, fcnname, install_fcn, retfcn, weak) \ 2770Sstevel@tonic-gate ENTRY(fcnname); \ 2780Sstevel@tonic-gate leal fcnname/**/_info, %eax; \ 2790Sstevel@tonic-gate cmpl $0, MODS_FLAG(%eax); /* weak? */ \ 2800Sstevel@tonic-gate je stubs_common_code; /* not weak */ \ 2810Sstevel@tonic-gate testb $MODS_INSTALLED, MODS_FLAG(%eax); /* installed? */ \ 2820Sstevel@tonic-gate jne stubs_common_code; /* yes, do the mod_hold */ \ 2830Sstevel@tonic-gate jmp *MODS_RETFCN(%eax); /* no, just jump to retfcn */ \ 2840Sstevel@tonic-gate SET_SIZE(fcnname); \ 2850Sstevel@tonic-gate .data; \ 2860Sstevel@tonic-gate .align CPTRSIZE; \ 2870Sstevel@tonic-gate .type fcnname/**/_info, @object; \ 2880Sstevel@tonic-gatefcnname/**/_info: \ 2890Sstevel@tonic-gate .long install_fcn; \ 2900Sstevel@tonic-gate .long module/**/_modinfo; \ 2910Sstevel@tonic-gate .long fcnname; \ 2920Sstevel@tonic-gate .long retfcn; \ 2930Sstevel@tonic-gate .long weak; \ 2940Sstevel@tonic-gate SET_SIZE(fcnname/**/_info) 2950Sstevel@tonic-gate 2960Sstevel@tonic-gate#define STUB_UNLOADABLE(module, fcnname, install_fcn, retfcn, weak) \ 2970Sstevel@tonic-gate ENTRY(fcnname); \ 2980Sstevel@tonic-gate leal fcnname/**/_info, %eax; \ 2990Sstevel@tonic-gate testb $MODS_INSTALLED, MODS_FLAG(%eax); /* installed? */ \ 3000Sstevel@tonic-gate je 5f; /* no */ \ 3010Sstevel@tonic-gate jmp *(%eax); /* yes, just jump to install_fcn */ \ 3020Sstevel@tonic-gate5: testb $MODS_WEAK, MODS_FLAG(%eax); /* weak? */ \ 3030Sstevel@tonic-gate je stubs_common_code; /* no, do mod load */ \ 3040Sstevel@tonic-gate jmp *MODS_RETFCN(%eax); /* yes, just jump to retfcn */ \ 3050Sstevel@tonic-gate SET_SIZE(fcnname); \ 3060Sstevel@tonic-gate .data; \ 3070Sstevel@tonic-gate .align CPTRSIZE; \ 3080Sstevel@tonic-gate .type fcnname/**/_info, @object; \ 3090Sstevel@tonic-gatefcnname/**/_info: \ 3100Sstevel@tonic-gate .long install_fcn; /* 0 */ \ 3110Sstevel@tonic-gate .long module/**/_modinfo; /* 0x4 */ \ 3120Sstevel@tonic-gate .long fcnname; /* 0x8 */ \ 3130Sstevel@tonic-gate .long retfcn; /* 0xc */ \ 3140Sstevel@tonic-gate .long weak; /* 0x10 */ \ 3150Sstevel@tonic-gate SET_SIZE(fcnname/**/_info) 3160Sstevel@tonic-gate 3170Sstevel@tonic-gate/* 3180Sstevel@tonic-gate * We branch here with the fcnname_info pointer in %eax 3190Sstevel@tonic-gate */ 3200Sstevel@tonic-gate ENTRY_NP(stubs_common_code) 3210Sstevel@tonic-gate .globl mod_hold_stub 3220Sstevel@tonic-gate .globl mod_release_stub 3230Sstevel@tonic-gate pushl %esi 3240Sstevel@tonic-gate movl %eax, %esi / save the info pointer 3250Sstevel@tonic-gate pushl %eax 3260Sstevel@tonic-gate call mod_hold_stub / mod_hold_stub(mod_stub_info *) 3270Sstevel@tonic-gate popl %ecx 3280Sstevel@tonic-gate cmpl $-1, %eax / error? 3290Sstevel@tonic-gate jne .L1 3300Sstevel@tonic-gate movl MODS_RETFCN(%esi), %eax 3310Sstevel@tonic-gate call *%eax 3320Sstevel@tonic-gate popl %esi / yes, return error (panic?) 3330Sstevel@tonic-gate ret 3340Sstevel@tonic-gate.L1: 3350Sstevel@tonic-gate movl $MAXNARG+1, %ecx 3360Sstevel@tonic-gate / copy incoming arguments 3370Sstevel@tonic-gate pushl (%esp, %ecx, 4) / push MAXNARG times 3380Sstevel@tonic-gate pushl (%esp, %ecx, 4) 3390Sstevel@tonic-gate pushl (%esp, %ecx, 4) 3400Sstevel@tonic-gate pushl (%esp, %ecx, 4) 3410Sstevel@tonic-gate pushl (%esp, %ecx, 4) 3420Sstevel@tonic-gate pushl (%esp, %ecx, 4) 3430Sstevel@tonic-gate pushl (%esp, %ecx, 4) 3440Sstevel@tonic-gate pushl (%esp, %ecx, 4) 3450Sstevel@tonic-gate pushl (%esp, %ecx, 4) 3460Sstevel@tonic-gate pushl (%esp, %ecx, 4) 3470Sstevel@tonic-gate call *(%esi) / call the stub function(arg1,arg2, ...) 3480Sstevel@tonic-gate add $_MUL(MAXNARG, 4), %esp / pop off MAXNARG arguments 3490Sstevel@tonic-gate pushl %eax / save any return values from the stub 3500Sstevel@tonic-gate pushl %edx 3510Sstevel@tonic-gate pushl %esi 3520Sstevel@tonic-gate call mod_release_stub / release hold on module 3530Sstevel@tonic-gate addl $4, %esp 3540Sstevel@tonic-gate popl %edx / restore return values 3550Sstevel@tonic-gate popl %eax 3560Sstevel@tonic-gate.L2: 3570Sstevel@tonic-gate popl %esi 3580Sstevel@tonic-gate ret 3590Sstevel@tonic-gate SET_SIZE(stubs_common_code) 3600Sstevel@tonic-gate 3610Sstevel@tonic-gate#endif /* __i386 */ 3620Sstevel@tonic-gate 3630Sstevel@tonic-gate#define STUB(module, fcnname, retfcn) \ 3640Sstevel@tonic-gate STUB_COMMON(module, fcnname, mod_hold_stub, retfcn, 0) 3650Sstevel@tonic-gate 3660Sstevel@tonic-gate/* 3670Sstevel@tonic-gate * "weak stub", don't load on account of this call 3680Sstevel@tonic-gate */ 3690Sstevel@tonic-gate#define WSTUB(module, fcnname, retfcn) \ 3700Sstevel@tonic-gate STUB_COMMON(module, fcnname, retfcn, retfcn, MODS_WEAK) 3710Sstevel@tonic-gate 3720Sstevel@tonic-gate/* 3730Sstevel@tonic-gate * "non-unloadable stub", don't bother 'holding' module if it's already loaded 3740Sstevel@tonic-gate * since the module cannot be unloaded. 3750Sstevel@tonic-gate * 3760Sstevel@tonic-gate * User *MUST* guarantee the module is not unloadable (no _fini routine). 3770Sstevel@tonic-gate */ 3780Sstevel@tonic-gate#define NO_UNLOAD_STUB(module, fcnname, retfcn) \ 3790Sstevel@tonic-gate STUB_UNLOADABLE(module, fcnname, retfcn, retfcn, MODS_NOUNLOAD) 3800Sstevel@tonic-gate 3810Sstevel@tonic-gate/* 3820Sstevel@tonic-gate * "weak stub" for non-unloadable module, don't load on account of this call 3830Sstevel@tonic-gate */ 3840Sstevel@tonic-gate#define NO_UNLOAD_WSTUB(module, fcnname, retfcn) \ 3850Sstevel@tonic-gate STUB_UNLOADABLE(module, fcnname, retfcn, retfcn, MODS_NOUNLOAD|MODS_WEAK) 3860Sstevel@tonic-gate 3870Sstevel@tonic-gate/* 3880Sstevel@tonic-gate * this is just a marker for the beginning area of text that contains stubs 3890Sstevel@tonic-gate */ 3900Sstevel@tonic-gate ENTRY_NP(stubs_base) 3910Sstevel@tonic-gate nop 3920Sstevel@tonic-gate 3930Sstevel@tonic-gate/* 3940Sstevel@tonic-gate * WARNING WARNING WARNING!!!!!! 3950Sstevel@tonic-gate * 3960Sstevel@tonic-gate * On the MODULE macro you MUST NOT use any spaces!!! They are 3970Sstevel@tonic-gate * significant to the preprocessor. With ansi c there is a way around this 3980Sstevel@tonic-gate * but for some reason (yet to be investigated) ansi didn't work for other 3990Sstevel@tonic-gate * reasons! 4000Sstevel@tonic-gate * 4010Sstevel@tonic-gate * When zero is used as the return function, the system will call 4020Sstevel@tonic-gate * panic if the stub can't be resolved. 4030Sstevel@tonic-gate */ 4040Sstevel@tonic-gate 4050Sstevel@tonic-gate/* 4060Sstevel@tonic-gate * Stubs for devfs. A non-unloadable module. 4070Sstevel@tonic-gate */ 4080Sstevel@tonic-gate 4090Sstevel@tonic-gate#ifndef DEVFS_MODULE 4100Sstevel@tonic-gate MODULE(devfs,fs); 4110Sstevel@tonic-gate NO_UNLOAD_STUB(devfs, devfs_clean, nomod_minus_one); 4120Sstevel@tonic-gate NO_UNLOAD_STUB(devfs, devfs_lookupname, nomod_minus_one); 4130Sstevel@tonic-gate NO_UNLOAD_STUB(devfs, devfs_walk, nomod_minus_one); 4140Sstevel@tonic-gate NO_UNLOAD_STUB(devfs, devfs_devpolicy, nomod_minus_one); 4150Sstevel@tonic-gate NO_UNLOAD_STUB(devfs, devfs_reset_perm, nomod_minus_one); 4160Sstevel@tonic-gate NO_UNLOAD_STUB(devfs, devfs_remdrv_cleanup, nomod_minus_one); 4170Sstevel@tonic-gate END_MODULE(devfs); 4180Sstevel@tonic-gate#endif 4190Sstevel@tonic-gate 4202621Sllai1#ifndef DEV_MODULE 4212621Sllai1 MODULE(dev,fs); 4222621Sllai1 NO_UNLOAD_STUB(dev, sdev_modctl_readdir, nomod_minus_one); 4232621Sllai1 NO_UNLOAD_STUB(dev, sdev_modctl_readdir_free, nomod_minus_one); 4242621Sllai1 NO_UNLOAD_STUB(dev, devname_filename_register, nomod_minus_one); 4252621Sllai1 NO_UNLOAD_STUB(dev, sdev_modctl_devexists, nomod_minus_one); 4262621Sllai1 NO_UNLOAD_STUB(dev, devname_profile_update, nomod_minus_one); 4272621Sllai1 NO_UNLOAD_STUB(dev, sdev_devstate_change, nomod_minus_one); 4287688SAaron.Zang@Sun.COM NO_UNLOAD_STUB(dev, devvt_getvnodeops, nomod_minus_one); 4292621Sllai1 NO_UNLOAD_STUB(dev, devpts_getvnodeops, nomod_zero); 4302621Sllai1 END_MODULE(dev); 4312621Sllai1#endif 4322621Sllai1 4330Sstevel@tonic-gate/* 4340Sstevel@tonic-gate * Stubs for specfs. A non-unloadable module. 4350Sstevel@tonic-gate */ 4360Sstevel@tonic-gate 4370Sstevel@tonic-gate#ifndef SPEC_MODULE 4380Sstevel@tonic-gate MODULE(specfs,fs); 4390Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, common_specvp, nomod_zero); 4400Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, makectty, nomod_zero); 4410Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, makespecvp, nomod_zero); 4420Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, smark, nomod_zero); 4430Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, spec_segmap, nomod_einval); 4440Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, specfind, nomod_zero); 4450Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, specvp, nomod_zero); 4460Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, devi_stillreferenced, nomod_zero); 4470Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, spec_getvnodeops, nomod_zero); 4480Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, spec_char_map, nomod_zero); 4490Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, specvp_devfs, nomod_zero); 4500Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, spec_assoc_vp_with_devi, nomod_void); 4510Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, spec_hold_devi_by_vp, nomod_zero); 4520Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, spec_snode_walk, nomod_void); 4530Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, spec_devi_open_count, nomod_minus_one); 4540Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, spec_is_clone, nomod_zero); 4550Sstevel@tonic-gate NO_UNLOAD_STUB(specfs, spec_is_selfclone, nomod_zero); 4564845Svikram NO_UNLOAD_STUB(specfs, spec_fence_snode, nomod_minus_one); 4574845Svikram NO_UNLOAD_STUB(specfs, spec_unfence_snode, nomod_minus_one); 4580Sstevel@tonic-gate END_MODULE(specfs); 4590Sstevel@tonic-gate#endif 4600Sstevel@tonic-gate 4610Sstevel@tonic-gate 4620Sstevel@tonic-gate/* 4630Sstevel@tonic-gate * Stubs for sockfs. A non-unloadable module. 4640Sstevel@tonic-gate */ 4650Sstevel@tonic-gate#ifndef SOCK_MODULE 4660Sstevel@tonic-gate MODULE(sockfs,fs); 4670Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, so_socket, nomod_zero); 4680Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, so_socketpair, nomod_zero); 4690Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, bind, nomod_zero); 4700Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, listen, nomod_zero); 4710Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, accept, nomod_zero); 4720Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, connect, nomod_zero); 4730Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, shutdown, nomod_zero); 4740Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, recv, nomod_zero); 4750Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, recvfrom, nomod_zero); 4760Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, recvmsg, nomod_zero); 4770Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, send, nomod_zero); 4780Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, sendmsg, nomod_zero); 4790Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, sendto, nomod_zero); 4800Sstevel@tonic-gate#ifdef _SYSCALL32_IMPL 4810Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, recv32, nomod_zero); 4820Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, recvfrom32, nomod_zero); 4830Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, send32, nomod_zero); 4840Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, sendto32, nomod_zero); 4850Sstevel@tonic-gate#endif /* _SYSCALL32_IMPL */ 4860Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, getpeername, nomod_zero); 4870Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, getsockname, nomod_zero); 4880Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, getsockopt, nomod_zero); 4890Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, setsockopt, nomod_zero); 4900Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, sockconfig, nomod_zero); 4910Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, sock_getmsg, nomod_zero); 4920Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, sock_putmsg, nomod_zero); 4930Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, sosendfile64, nomod_zero); 4944173Spr14459 NO_UNLOAD_STUB(sockfs, snf_segmap, nomod_einval); 4950Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, sock_getfasync, nomod_zero); 4960Sstevel@tonic-gate NO_UNLOAD_STUB(sockfs, nl7c_sendfilev, nomod_zero); 4978348SEric.Yu@Sun.COM NO_UNLOAD_STUB(sockfs, sotpi_sototpi, nomod_zero); 4988348SEric.Yu@Sun.COM NO_UNLOAD_STUB(sockfs, socket_sendmblk, nomod_zero); 4998348SEric.Yu@Sun.COM NO_UNLOAD_STUB(sockfs, socket_setsockopt, nomod_zero); 5000Sstevel@tonic-gate END_MODULE(sockfs); 5010Sstevel@tonic-gate#endif 5020Sstevel@tonic-gate 5030Sstevel@tonic-gate/* 5040Sstevel@tonic-gate * IPsec stubs. 5050Sstevel@tonic-gate */ 5060Sstevel@tonic-gate 5070Sstevel@tonic-gate#ifndef IPSECAH_MODULE 5080Sstevel@tonic-gate MODULE(ipsecah,drv); 5090Sstevel@tonic-gate WSTUB(ipsecah, ipsec_construct_inverse_acquire, nomod_zero); 5100Sstevel@tonic-gate WSTUB(ipsecah, sadb_acquire, nomod_zero); 5110Sstevel@tonic-gate WSTUB(ipsecah, ipsecah_algs_changed, nomod_zero); 5120Sstevel@tonic-gate WSTUB(ipsecah, sadb_alg_update, nomod_zero); 5130Sstevel@tonic-gate WSTUB(ipsecah, sadb_unlinkassoc, nomod_zero); 5140Sstevel@tonic-gate WSTUB(ipsecah, sadb_insertassoc, nomod_zero); 5150Sstevel@tonic-gate WSTUB(ipsecah, ipsecah_in_assocfailure, nomod_zero); 5160Sstevel@tonic-gate WSTUB(ipsecah, sadb_set_lpkt, nomod_zero); 5170Sstevel@tonic-gate WSTUB(ipsecah, ipsecah_icmp_error, nomod_zero); 5180Sstevel@tonic-gate END_MODULE(ipsecah); 5190Sstevel@tonic-gate#endif 5200Sstevel@tonic-gate 5210Sstevel@tonic-gate#ifndef IPSECESP_MODULE 5220Sstevel@tonic-gate MODULE(ipsecesp,drv); 5230Sstevel@tonic-gate WSTUB(ipsecesp, ipsecesp_fill_defs, nomod_zero); 5240Sstevel@tonic-gate WSTUB(ipsecesp, ipsecesp_algs_changed, nomod_zero); 5250Sstevel@tonic-gate WSTUB(ipsecesp, ipsecesp_in_assocfailure, nomod_zero); 5260Sstevel@tonic-gate WSTUB(ipsecesp, ipsecesp_init_funcs, nomod_zero); 5270Sstevel@tonic-gate WSTUB(ipsecesp, ipsecesp_icmp_error, nomod_zero); 5284987Sdanmcd WSTUB(ipsecesp, ipsecesp_send_keepalive, nomod_zero); 5290Sstevel@tonic-gate END_MODULE(ipsecesp); 5300Sstevel@tonic-gate#endif 5310Sstevel@tonic-gate 5320Sstevel@tonic-gate#ifndef KEYSOCK_MODULE 5330Sstevel@tonic-gate MODULE(keysock, drv); 5340Sstevel@tonic-gate WSTUB(keysock, keysock_plumb_ipsec, nomod_zero); 5350Sstevel@tonic-gate WSTUB(keysock, keysock_extended_reg, nomod_zero); 5360Sstevel@tonic-gate WSTUB(keysock, keysock_next_seq, nomod_zero); 5370Sstevel@tonic-gate END_MODULE(keysock); 5380Sstevel@tonic-gate#endif 5390Sstevel@tonic-gate 5400Sstevel@tonic-gate#ifndef SPDSOCK_MODULE 5410Sstevel@tonic-gate MODULE(spdsock,drv); 5420Sstevel@tonic-gate WSTUB(spdsock, spdsock_update_pending_algs, nomod_zero); 5430Sstevel@tonic-gate END_MODULE(spdsock); 5440Sstevel@tonic-gate#endif 5450Sstevel@tonic-gate 5460Sstevel@tonic-gate/* 5470Sstevel@tonic-gate * Stubs for nfs common code. 5480Sstevel@tonic-gate * XXX nfs_getvnodeops should go away with removal of kludge in vnode.c 5490Sstevel@tonic-gate */ 5500Sstevel@tonic-gate#ifndef NFS_MODULE 5510Sstevel@tonic-gate MODULE(nfs,fs); 5520Sstevel@tonic-gate WSTUB(nfs, nfs_getvnodeops, nomod_zero); 5530Sstevel@tonic-gate WSTUB(nfs, nfs_perror, nomod_zero); 5540Sstevel@tonic-gate WSTUB(nfs, nfs_cmn_err, nomod_zero); 5550Sstevel@tonic-gate WSTUB(nfs, clcleanup_zone, nomod_zero); 5560Sstevel@tonic-gate WSTUB(nfs, clcleanup4_zone, nomod_zero); 5570Sstevel@tonic-gate END_MODULE(nfs); 5580Sstevel@tonic-gate#endif 5590Sstevel@tonic-gate 5600Sstevel@tonic-gate 5610Sstevel@tonic-gate/* 5620Sstevel@tonic-gate * Stubs for nfs_dlboot (diskless booting). 5630Sstevel@tonic-gate */ 5640Sstevel@tonic-gate#ifndef NFS_DLBOOT_MODULE 5650Sstevel@tonic-gate MODULE(nfs_dlboot,misc); 5660Sstevel@tonic-gate STUB(nfs_dlboot, mount_root, nomod_minus_one); 5670Sstevel@tonic-gate STUB(nfs_dlboot, dhcpinit, nomod_minus_one); 5680Sstevel@tonic-gate END_MODULE(nfs_dlboot); 5690Sstevel@tonic-gate#endif 5700Sstevel@tonic-gate 5710Sstevel@tonic-gate/* 5720Sstevel@tonic-gate * Stubs for nfs server-only code. 5730Sstevel@tonic-gate */ 5740Sstevel@tonic-gate#ifndef NFSSRV_MODULE 5750Sstevel@tonic-gate MODULE(nfssrv,misc); 5760Sstevel@tonic-gate STUB(nfssrv, lm_nfs3_fhtovp, nomod_minus_one); 5770Sstevel@tonic-gate STUB(nfssrv, lm_fhtovp, nomod_minus_one); 5780Sstevel@tonic-gate STUB(nfssrv, exportfs, nomod_minus_one); 5790Sstevel@tonic-gate STUB(nfssrv, nfs_getfh, nomod_minus_one); 5800Sstevel@tonic-gate STUB(nfssrv, nfsl_flush, nomod_minus_one); 5812140Srmesta STUB(nfssrv, rfs4_check_delegated, nomod_zero); 5822140Srmesta STUB(nfssrv, mountd_args, nomod_minus_one); 5830Sstevel@tonic-gate NO_UNLOAD_STUB(nfssrv, rdma_start, nomod_zero); 5840Sstevel@tonic-gate NO_UNLOAD_STUB(nfssrv, nfs_svc, nomod_zero); 5850Sstevel@tonic-gate END_MODULE(nfssrv); 5860Sstevel@tonic-gate#endif 5870Sstevel@tonic-gate 5880Sstevel@tonic-gate/* 5890Sstevel@tonic-gate * Stubs for kernel lock manager. 5900Sstevel@tonic-gate */ 5910Sstevel@tonic-gate#ifndef KLM_MODULE 5920Sstevel@tonic-gate MODULE(klmmod,misc); 5930Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_svc, nomod_zero); 5940Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_shutdown, nomod_zero); 5950Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_unexport, nomod_zero); 5965295Srandyf NO_UNLOAD_STUB(klmmod, lm_cprresume, nomod_zero); 5975295Srandyf NO_UNLOAD_STUB(klmmod, lm_cprsuspend, nomod_zero); 5980Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_safelock, nomod_zero); 5990Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_safemap, nomod_zero); 6000Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_has_sleep, nomod_zero); 6010Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_free_config, nomod_zero); 6020Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_vp_active, nomod_zero); 6030Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_get_sysid, nomod_zero); 6040Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_rel_sysid, nomod_zero); 6050Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_alloc_sysidt, nomod_minus_one); 6060Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_free_sysidt, nomod_zero); 6070Sstevel@tonic-gate NO_UNLOAD_STUB(klmmod, lm_sysidt, nomod_minus_one); 6080Sstevel@tonic-gate END_MODULE(klmmod); 6090Sstevel@tonic-gate#endif 6100Sstevel@tonic-gate 6110Sstevel@tonic-gate#ifndef KLMOPS_MODULE 6120Sstevel@tonic-gate MODULE(klmops,misc); 6130Sstevel@tonic-gate NO_UNLOAD_STUB(klmops, lm_frlock, nomod_zero); 6140Sstevel@tonic-gate NO_UNLOAD_STUB(klmops, lm4_frlock, nomod_zero); 6150Sstevel@tonic-gate NO_UNLOAD_STUB(klmops, lm_shrlock, nomod_zero); 6160Sstevel@tonic-gate NO_UNLOAD_STUB(klmops, lm4_shrlock, nomod_zero); 6170Sstevel@tonic-gate NO_UNLOAD_STUB(klmops, lm_nlm_dispatch, nomod_zero); 6180Sstevel@tonic-gate NO_UNLOAD_STUB(klmops, lm_nlm4_dispatch, nomod_zero); 6190Sstevel@tonic-gate NO_UNLOAD_STUB(klmops, lm_nlm_reclaim, nomod_zero); 6200Sstevel@tonic-gate NO_UNLOAD_STUB(klmops, lm_nlm4_reclaim, nomod_zero); 6210Sstevel@tonic-gate NO_UNLOAD_STUB(klmops, lm_register_lock_locally, nomod_zero); 6220Sstevel@tonic-gate END_MODULE(klmops); 6230Sstevel@tonic-gate#endif 6240Sstevel@tonic-gate 6250Sstevel@tonic-gate/* 6260Sstevel@tonic-gate * Stubs for kernel TLI module 6270Sstevel@tonic-gate * XXX currently we never allow this to unload 6280Sstevel@tonic-gate */ 6290Sstevel@tonic-gate#ifndef TLI_MODULE 6300Sstevel@tonic-gate MODULE(tlimod,misc); 6310Sstevel@tonic-gate NO_UNLOAD_STUB(tlimod, t_kopen, nomod_minus_one); 6320Sstevel@tonic-gate NO_UNLOAD_STUB(tlimod, t_kunbind, nomod_zero); 6330Sstevel@tonic-gate NO_UNLOAD_STUB(tlimod, t_kadvise, nomod_zero); 6340Sstevel@tonic-gate NO_UNLOAD_STUB(tlimod, t_krcvudata, nomod_zero); 6350Sstevel@tonic-gate NO_UNLOAD_STUB(tlimod, t_ksndudata, nomod_zero); 6360Sstevel@tonic-gate NO_UNLOAD_STUB(tlimod, t_kalloc, nomod_zero); 6370Sstevel@tonic-gate NO_UNLOAD_STUB(tlimod, t_kbind, nomod_zero); 6380Sstevel@tonic-gate NO_UNLOAD_STUB(tlimod, t_kclose, nomod_zero); 6390Sstevel@tonic-gate NO_UNLOAD_STUB(tlimod, t_kspoll, nomod_zero); 6400Sstevel@tonic-gate NO_UNLOAD_STUB(tlimod, t_kfree, nomod_zero); 6410Sstevel@tonic-gate END_MODULE(tlimod); 6420Sstevel@tonic-gate#endif 6430Sstevel@tonic-gate 6440Sstevel@tonic-gate/* 6450Sstevel@tonic-gate * Stubs for kernel RPC module 6460Sstevel@tonic-gate * XXX currently we never allow this to unload 6470Sstevel@tonic-gate */ 6480Sstevel@tonic-gate#ifndef RPC_MODULE 6490Sstevel@tonic-gate MODULE(rpcmod,strmod); 6500Sstevel@tonic-gate NO_UNLOAD_STUB(rpcmod, clnt_tli_kcreate, nomod_minus_one); 6510Sstevel@tonic-gate NO_UNLOAD_STUB(rpcmod, svc_tli_kcreate, nomod_minus_one); 6520Sstevel@tonic-gate NO_UNLOAD_STUB(rpcmod, bindresvport, nomod_minus_one); 6530Sstevel@tonic-gate NO_UNLOAD_STUB(rpcmod, rdma_register_mod, nomod_minus_one); 6540Sstevel@tonic-gate NO_UNLOAD_STUB(rpcmod, rdma_unregister_mod, nomod_minus_one); 6550Sstevel@tonic-gate NO_UNLOAD_STUB(rpcmod, svc_queuereq, nomod_minus_one); 6560Sstevel@tonic-gate NO_UNLOAD_STUB(rpcmod, clist_add, nomod_minus_one); 6570Sstevel@tonic-gate END_MODULE(rpcmod); 6580Sstevel@tonic-gate#endif 6590Sstevel@tonic-gate 6600Sstevel@tonic-gate/* 6610Sstevel@tonic-gate * Stubs for des 6620Sstevel@tonic-gate */ 6630Sstevel@tonic-gate#ifndef DES_MODULE 6640Sstevel@tonic-gate MODULE(des,misc); 6650Sstevel@tonic-gate STUB(des, cbc_crypt, nomod_zero); 6660Sstevel@tonic-gate STUB(des, ecb_crypt, nomod_zero); 6670Sstevel@tonic-gate STUB(des, _des_crypt, nomod_zero); 6680Sstevel@tonic-gate END_MODULE(des); 6690Sstevel@tonic-gate#endif 6700Sstevel@tonic-gate 6710Sstevel@tonic-gate/* 6720Sstevel@tonic-gate * Stubs for procfs. A non-unloadable module. 6730Sstevel@tonic-gate */ 6740Sstevel@tonic-gate#ifndef PROC_MODULE 6750Sstevel@tonic-gate MODULE(procfs,fs); 6760Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prfree, nomod_zero); 6770Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prexit, nomod_zero); 6780Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prlwpfree, nomod_zero); 6790Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prlwpexit, nomod_zero); 6800Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prinvalidate, nomod_zero); 6810Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prnsegs, nomod_zero); 6820Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prgetcred, nomod_zero); 6830Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prgetpriv, nomod_zero); 6840Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prgetprivsize, nomod_zero); 6850Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prgetstatus, nomod_zero); 6860Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prgetlwpstatus, nomod_zero); 6870Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prgetpsinfo, nomod_zero); 6880Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prgetlwpsinfo, nomod_zero); 6890Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, oprgetstatus, nomod_zero); 6900Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, oprgetpsinfo, nomod_zero); 6910Sstevel@tonic-gate#ifdef _SYSCALL32_IMPL 6920Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prgetstatus32, nomod_zero); 6930Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prgetlwpstatus32, nomod_zero); 6940Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prgetpsinfo32, nomod_zero); 6950Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prgetlwpsinfo32, nomod_zero); 6960Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, oprgetstatus32, nomod_zero); 6970Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, oprgetpsinfo32, nomod_zero); 6980Sstevel@tonic-gate#endif /* _SYSCALL32_IMPL */ 6990Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prnotify, nomod_zero); 7000Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prexecstart, nomod_zero); 7010Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prexecend, nomod_zero); 7020Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prrelvm, nomod_zero); 7030Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, prbarrier, nomod_zero); 7040Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, estimate_msacct, nomod_zero); 7050Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, pr_getprot, nomod_zero); 7060Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, pr_getprot_done, nomod_zero); 7070Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, pr_getsegsize, nomod_zero); 7080Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, pr_isobject, nomod_zero); 7090Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, pr_isself, nomod_zero); 7100Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, pr_allstopped, nomod_zero); 7110Sstevel@tonic-gate NO_UNLOAD_STUB(procfs, pr_free_watched_pages, nomod_zero); 7120Sstevel@tonic-gate END_MODULE(procfs); 7130Sstevel@tonic-gate#endif 7140Sstevel@tonic-gate 7150Sstevel@tonic-gate/* 7160Sstevel@tonic-gate * Stubs for fifofs 7170Sstevel@tonic-gate */ 7180Sstevel@tonic-gate#ifndef FIFO_MODULE 7190Sstevel@tonic-gate MODULE(fifofs,fs); 7200Sstevel@tonic-gate STUB(fifofs, fifovp, 0); 7210Sstevel@tonic-gate STUB(fifofs, fifo_getinfo, 0); 7220Sstevel@tonic-gate STUB(fifofs, fifo_vfastoff, 0); 7230Sstevel@tonic-gate END_MODULE(fifofs); 7240Sstevel@tonic-gate#endif 7250Sstevel@tonic-gate 7260Sstevel@tonic-gate/* 7270Sstevel@tonic-gate * Stubs for ufs 7280Sstevel@tonic-gate * 7290Sstevel@tonic-gate * This is needed to support the old quotactl system call. 7300Sstevel@tonic-gate * When the old sysent stuff goes away, this will need to be revisited. 7310Sstevel@tonic-gate */ 7320Sstevel@tonic-gate#ifndef UFS_MODULE 7330Sstevel@tonic-gate MODULE(ufs,fs); 7340Sstevel@tonic-gate STUB(ufs, quotactl, nomod_minus_one); 7350Sstevel@tonic-gate END_MODULE(ufs); 7360Sstevel@tonic-gate#endif 7370Sstevel@tonic-gate 7380Sstevel@tonic-gate/* 7396423Sgw25295 * Stubs for zfs 7406423Sgw25295 */ 7416423Sgw25295#ifndef ZFS_MODULE 7426423Sgw25295 MODULE(zfs,fs); 74312236SRic.Aleshire@Sun.COM STUB(zfs, dsl_prop_get, nomod_minus_one); 7446423Sgw25295 STUB(zfs, spa_boot_init, nomod_minus_one); 74512236SRic.Aleshire@Sun.COM STUB(zfs, zfs_prop_to_name, nomod_zero); 7466423Sgw25295 END_MODULE(zfs); 7476423Sgw25295#endif 7486423Sgw25295 7496423Sgw25295/* 7505648Ssetje * Stubs for dcfs 7515648Ssetje */ 7525648Ssetje#ifndef DCFS_MODULE 7535648Ssetje MODULE(dcfs,fs); 7545648Ssetje STUB(dcfs, decompvp, 0); 7555648Ssetje END_MODULE(dcfs); 7565648Ssetje#endif 7575648Ssetje 7585648Ssetje/* 7590Sstevel@tonic-gate * Stubs for namefs 7600Sstevel@tonic-gate */ 7610Sstevel@tonic-gate#ifndef NAMEFS_MODULE 7620Sstevel@tonic-gate MODULE(namefs,fs); 7630Sstevel@tonic-gate STUB(namefs, nm_unmountall, 0); 7640Sstevel@tonic-gate END_MODULE(namefs); 7650Sstevel@tonic-gate#endif 7660Sstevel@tonic-gate 7670Sstevel@tonic-gate/* 76811173SJonathan.Adams@Sun.COM * Stubs for sysdc 76911173SJonathan.Adams@Sun.COM */ 77011173SJonathan.Adams@Sun.COM#ifndef SDC_MODULE 77111173SJonathan.Adams@Sun.COM MODULE(SDC,sched); 77211173SJonathan.Adams@Sun.COM NO_UNLOAD_STUB(SDC, sysdc_thread_enter, nomod_zero); 77311173SJonathan.Adams@Sun.COM END_MODULE(SDC); 77411173SJonathan.Adams@Sun.COM#endif 77511173SJonathan.Adams@Sun.COM 77611173SJonathan.Adams@Sun.COM/* 7770Sstevel@tonic-gate * Stubs for ts_dptbl 7780Sstevel@tonic-gate */ 7790Sstevel@tonic-gate#ifndef TS_DPTBL_MODULE 7800Sstevel@tonic-gate MODULE(TS_DPTBL,sched); 7810Sstevel@tonic-gate STUB(TS_DPTBL, ts_getdptbl, 0); 7820Sstevel@tonic-gate STUB(TS_DPTBL, ts_getkmdpris, 0); 7830Sstevel@tonic-gate STUB(TS_DPTBL, ts_getmaxumdpri, 0); 7840Sstevel@tonic-gate END_MODULE(TS_DPTBL); 7850Sstevel@tonic-gate#endif 7860Sstevel@tonic-gate 7870Sstevel@tonic-gate/* 7880Sstevel@tonic-gate * Stubs for rt_dptbl 7890Sstevel@tonic-gate */ 7900Sstevel@tonic-gate#ifndef RT_DPTBL_MODULE 7910Sstevel@tonic-gate MODULE(RT_DPTBL,sched); 7920Sstevel@tonic-gate STUB(RT_DPTBL, rt_getdptbl, 0); 7930Sstevel@tonic-gate END_MODULE(RT_DPTBL); 7940Sstevel@tonic-gate#endif 7950Sstevel@tonic-gate 7960Sstevel@tonic-gate/* 7970Sstevel@tonic-gate * Stubs for ia_dptbl 7980Sstevel@tonic-gate */ 7990Sstevel@tonic-gate#ifndef IA_DPTBL_MODULE 8000Sstevel@tonic-gate MODULE(IA_DPTBL,sched); 8010Sstevel@tonic-gate STUB(IA_DPTBL, ia_getdptbl, nomod_zero); 8020Sstevel@tonic-gate STUB(IA_DPTBL, ia_getkmdpris, nomod_zero); 8030Sstevel@tonic-gate STUB(IA_DPTBL, ia_getmaxumdpri, nomod_zero); 8040Sstevel@tonic-gate END_MODULE(IA_DPTBL); 8050Sstevel@tonic-gate#endif 8060Sstevel@tonic-gate 8070Sstevel@tonic-gate/* 8080Sstevel@tonic-gate * Stubs for FSS scheduler 8090Sstevel@tonic-gate */ 8100Sstevel@tonic-gate#ifndef FSS_MODULE 8110Sstevel@tonic-gate MODULE(FSS,sched); 8120Sstevel@tonic-gate WSTUB(FSS, fss_allocbuf, nomod_zero); 8130Sstevel@tonic-gate WSTUB(FSS, fss_freebuf, nomod_zero); 8140Sstevel@tonic-gate WSTUB(FSS, fss_changeproj, nomod_zero); 8150Sstevel@tonic-gate WSTUB(FSS, fss_changepset, nomod_zero); 8160Sstevel@tonic-gate END_MODULE(FSS); 8170Sstevel@tonic-gate#endif 8180Sstevel@tonic-gate 8190Sstevel@tonic-gate/* 8200Sstevel@tonic-gate * Stubs for fx_dptbl 8210Sstevel@tonic-gate */ 8220Sstevel@tonic-gate#ifndef FX_DPTBL_MODULE 8230Sstevel@tonic-gate MODULE(FX_DPTBL,sched); 8240Sstevel@tonic-gate STUB(FX_DPTBL, fx_getdptbl, 0); 8250Sstevel@tonic-gate STUB(FX_DPTBL, fx_getmaxumdpri, 0); 8260Sstevel@tonic-gate END_MODULE(FX_DPTBL); 8270Sstevel@tonic-gate#endif 8280Sstevel@tonic-gate 8290Sstevel@tonic-gate/* 8300Sstevel@tonic-gate * Stubs for bootdev 8310Sstevel@tonic-gate */ 8320Sstevel@tonic-gate#ifndef BOOTDEV_MODULE 8330Sstevel@tonic-gate MODULE(bootdev,misc); 8340Sstevel@tonic-gate STUB(bootdev, i_promname_to_devname, 0); 8350Sstevel@tonic-gate STUB(bootdev, i_convert_boot_device_name, 0); 8360Sstevel@tonic-gate END_MODULE(bootdev); 8370Sstevel@tonic-gate#endif 8380Sstevel@tonic-gate 8390Sstevel@tonic-gate/* 8400Sstevel@tonic-gate * stubs for strplumb... 8410Sstevel@tonic-gate */ 8420Sstevel@tonic-gate#ifndef STRPLUMB_MODULE 8430Sstevel@tonic-gate MODULE(strplumb,misc); 8440Sstevel@tonic-gate STUB(strplumb, strplumb, 0); 8450Sstevel@tonic-gate STUB(strplumb, strplumb_load, 0); 8460Sstevel@tonic-gate STUB(strplumb, strplumb_get_netdev_path, 0); 8470Sstevel@tonic-gate END_MODULE(strplumb); 8480Sstevel@tonic-gate#endif 8490Sstevel@tonic-gate 8500Sstevel@tonic-gate/* 8510Sstevel@tonic-gate * Stubs for console configuration module 8520Sstevel@tonic-gate */ 8530Sstevel@tonic-gate#ifndef CONSCONFIG_MODULE 8540Sstevel@tonic-gate MODULE(consconfig,misc); 8550Sstevel@tonic-gate STUB(consconfig, consconfig, 0); 8560Sstevel@tonic-gate STUB(consconfig, consconfig_get_usb_kb_path, 0); 8570Sstevel@tonic-gate STUB(consconfig, consconfig_get_usb_ms_path, 0); 8588960SJan.Setje-Eilers@Sun.COM STUB(consconfig, consconfig_get_plat_fbpath, 0); 85910783SVincent.Wang@Sun.COM STUB(consconfig, consconfig_console_is_ready, 0); 8600Sstevel@tonic-gate END_MODULE(consconfig); 8610Sstevel@tonic-gate#endif 8620Sstevel@tonic-gate 8630Sstevel@tonic-gate/* 8640Sstevel@tonic-gate * Stubs for accounting. 8650Sstevel@tonic-gate */ 8660Sstevel@tonic-gate#ifndef SYSACCT_MODULE 8670Sstevel@tonic-gate MODULE(sysacct,sys); 8680Sstevel@tonic-gate WSTUB(sysacct, acct, nomod_zero); 8690Sstevel@tonic-gate WSTUB(sysacct, acct_fs_in_use, nomod_zero); 8700Sstevel@tonic-gate END_MODULE(sysacct); 8710Sstevel@tonic-gate#endif 8720Sstevel@tonic-gate 8730Sstevel@tonic-gate/* 8740Sstevel@tonic-gate * Stubs for semaphore routines. sem.c 8750Sstevel@tonic-gate */ 8760Sstevel@tonic-gate#ifndef SEMSYS_MODULE 8770Sstevel@tonic-gate MODULE(semsys,sys); 8780Sstevel@tonic-gate WSTUB(semsys, semexit, nomod_zero); 8790Sstevel@tonic-gate END_MODULE(semsys); 8800Sstevel@tonic-gate#endif 8810Sstevel@tonic-gate 8820Sstevel@tonic-gate/* 8830Sstevel@tonic-gate * Stubs for shmem routines. shm.c 8840Sstevel@tonic-gate */ 8850Sstevel@tonic-gate#ifndef SHMSYS_MODULE 8860Sstevel@tonic-gate MODULE(shmsys,sys); 8870Sstevel@tonic-gate WSTUB(shmsys, shmexit, nomod_zero); 8880Sstevel@tonic-gate WSTUB(shmsys, shmfork, nomod_zero); 889942Sahl WSTUB(shmsys, shmgetid, nomod_minus_one); 8900Sstevel@tonic-gate END_MODULE(shmsys); 8910Sstevel@tonic-gate#endif 8920Sstevel@tonic-gate 8930Sstevel@tonic-gate/* 8940Sstevel@tonic-gate * Stubs for doors 8950Sstevel@tonic-gate */ 8960Sstevel@tonic-gate#ifndef DOOR_MODULE 8970Sstevel@tonic-gate MODULE(doorfs,sys); 8980Sstevel@tonic-gate WSTUB(doorfs, door_slam, nomod_zero); 8990Sstevel@tonic-gate WSTUB(doorfs, door_exit, nomod_zero); 9000Sstevel@tonic-gate WSTUB(doorfs, door_revoke_all, nomod_zero); 9010Sstevel@tonic-gate WSTUB(doorfs, door_fork, nomod_zero); 9020Sstevel@tonic-gate NO_UNLOAD_STUB(doorfs, door_upcall, nomod_einval); 9030Sstevel@tonic-gate NO_UNLOAD_STUB(doorfs, door_ki_create, nomod_einval); 9040Sstevel@tonic-gate NO_UNLOAD_STUB(doorfs, door_ki_open, nomod_einval); 9050Sstevel@tonic-gate NO_UNLOAD_STUB(doorfs, door_ki_lookup, nomod_zero); 9060Sstevel@tonic-gate WSTUB(doorfs, door_ki_upcall, nomod_einval); 9076997Sjwadams WSTUB(doorfs, door_ki_upcall_limited, nomod_einval); 9080Sstevel@tonic-gate WSTUB(doorfs, door_ki_hold, nomod_zero); 9090Sstevel@tonic-gate WSTUB(doorfs, door_ki_rele, nomod_zero); 9100Sstevel@tonic-gate WSTUB(doorfs, door_ki_info, nomod_einval); 9110Sstevel@tonic-gate END_MODULE(doorfs); 9120Sstevel@tonic-gate#endif 9130Sstevel@tonic-gate 9140Sstevel@tonic-gate/* 9159160SSherry.Moore@Sun.COM * Stubs for MD5 9169160SSherry.Moore@Sun.COM */ 9179160SSherry.Moore@Sun.COM#ifndef MD5_MODULE 9189160SSherry.Moore@Sun.COM MODULE(md5,misc); 9199160SSherry.Moore@Sun.COM WSTUB(md5, MD5Init, nomod_zero); 9209160SSherry.Moore@Sun.COM WSTUB(md5, MD5Update, nomod_zero); 9219160SSherry.Moore@Sun.COM WSTUB(md5, MD5Final, nomod_zero); 9229160SSherry.Moore@Sun.COM END_MODULE(md5); 9239160SSherry.Moore@Sun.COM#endif 9249160SSherry.Moore@Sun.COM 9259160SSherry.Moore@Sun.COM/* 9264520Snw141292 * Stubs for idmap 9274520Snw141292 */ 9284520Snw141292#ifndef IDMAP_MODULE 9294520Snw141292 MODULE(idmap,misc); 9305771Sjp151216 STUB(idmap, kidmap_batch_getgidbysid, nomod_zero); 9315771Sjp151216 STUB(idmap, kidmap_batch_getpidbysid, nomod_zero); 9325771Sjp151216 STUB(idmap, kidmap_batch_getsidbygid, nomod_zero); 9335771Sjp151216 STUB(idmap, kidmap_batch_getsidbyuid, nomod_zero); 9345771Sjp151216 STUB(idmap, kidmap_batch_getuidbysid, nomod_zero); 9355771Sjp151216 STUB(idmap, kidmap_get_create, nomod_zero); 9365771Sjp151216 STUB(idmap, kidmap_get_destroy, nomod_zero); 9375771Sjp151216 STUB(idmap, kidmap_get_mappings, nomod_zero); 9385771Sjp151216 STUB(idmap, kidmap_getgidbysid, nomod_zero); 9395771Sjp151216 STUB(idmap, kidmap_getpidbysid, nomod_zero); 9405771Sjp151216 STUB(idmap, kidmap_getsidbygid, nomod_zero); 9415771Sjp151216 STUB(idmap, kidmap_getsidbyuid, nomod_zero); 9425771Sjp151216 STUB(idmap, kidmap_getuidbysid, nomod_zero); 9435771Sjp151216 STUB(idmap, idmap_get_door, nomod_einval); 9445771Sjp151216 STUB(idmap, idmap_unreg_dh, nomod_einval); 9455771Sjp151216 STUB(idmap, idmap_reg_dh, nomod_einval); 9465771Sjp151216 STUB(idmap, idmap_purge_cache, nomod_einval); 9474520Snw141292 END_MODULE(idmap); 9484520Snw141292#endif 9494520Snw141292 9504520Snw141292/* 9510Sstevel@tonic-gate * Stubs for auditing. 9520Sstevel@tonic-gate */ 9530Sstevel@tonic-gate#ifndef C2AUDIT_MODULE 9540Sstevel@tonic-gate MODULE(c2audit,sys); 95511861SMarek.Pospisil@Sun.COM NO_UNLOAD_STUB(c2audit, audit_init_module, nomod_zero); 9560Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_start, nomod_zero); 9570Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_finish, nomod_zero); 95811861SMarek.Pospisil@Sun.COM NO_UNLOAD_STUB(c2audit, audit, nomod_zero); 95911861SMarek.Pospisil@Sun.COM NO_UNLOAD_STUB(c2audit, auditdoor, nomod_zero); 9600Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_closef, nomod_zero); 9610Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_core_start, nomod_zero); 9620Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_core_finish, nomod_zero); 9630Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_strputmsg, nomod_zero); 9640Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_savepath, nomod_zero); 9650Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_anchorpath, nomod_zero); 9660Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_exit, nomod_zero); 9670Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_exec, nomod_zero); 9680Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_symlink, nomod_zero); 9690Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_symlink_create, nomod_zero); 9700Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_vncreate_start, nomod_zero); 9710Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_vncreate_finish, nomod_zero); 9720Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_enterprom, nomod_zero); 9730Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_exitprom, nomod_zero); 9740Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_chdirec, nomod_zero); 9750Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_setf, nomod_zero); 9760Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_sock, nomod_zero); 9770Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_strgetmsg, nomod_zero); 9780Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_ipc, nomod_zero); 9790Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_ipcget, nomod_zero); 9800Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_fdsend, nomod_zero); 9810Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_fdrecv, nomod_zero); 9820Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_priv, nomod_zero); 9830Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_setppriv, nomod_zero); 9840Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_devpolicy, nomod_zero); 9850Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_setfsat_path, nomod_zero); 9860Sstevel@tonic-gate NO_UNLOAD_STUB(c2audit, audit_cryptoadm, nomod_zero); 987898Skais NO_UNLOAD_STUB(c2audit, audit_kssl, nomod_zero); 9884307Spwernau NO_UNLOAD_STUB(c2audit, audit_pf_policy, nomod_zero); 98911861SMarek.Pospisil@Sun.COM NO_UNLOAD_STUB(c2audit, au_doormsg, nomod_zero); 99011861SMarek.Pospisil@Sun.COM NO_UNLOAD_STUB(c2audit, au_uwrite, nomod_zero); 99111861SMarek.Pospisil@Sun.COM NO_UNLOAD_STUB(c2audit, au_to_arg32, nomod_zero); 99211861SMarek.Pospisil@Sun.COM NO_UNLOAD_STUB(c2audit, au_free_rec, nomod_zero); 9930Sstevel@tonic-gate END_MODULE(c2audit); 9940Sstevel@tonic-gate#endif 9950Sstevel@tonic-gate 9960Sstevel@tonic-gate/* 9970Sstevel@tonic-gate * Stubs for kernel rpc security service module 9980Sstevel@tonic-gate */ 9990Sstevel@tonic-gate#ifndef RPCSEC_MODULE 10000Sstevel@tonic-gate MODULE(rpcsec,misc); 10010Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec, sec_clnt_revoke, nomod_zero); 10020Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec, authkern_create, nomod_zero); 10030Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec, sec_svc_msg, nomod_zero); 10040Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec, sec_svc_control, nomod_zero); 10050Sstevel@tonic-gate END_MODULE(rpcsec); 10060Sstevel@tonic-gate#endif 10070Sstevel@tonic-gate 10080Sstevel@tonic-gate/* 10090Sstevel@tonic-gate * Stubs for rpc RPCSEC_GSS security service module 10100Sstevel@tonic-gate */ 10110Sstevel@tonic-gate#ifndef RPCSEC_GSS_MODULE 10120Sstevel@tonic-gate MODULE(rpcsec_gss,misc); 10130Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, __svcrpcsec_gss, nomod_zero); 10140Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_getcred, nomod_zero); 10150Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_set_callback, nomod_zero); 10160Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secget, nomod_zero); 10170Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secfree, nomod_zero); 10180Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_seccreate, nomod_zero); 10190Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_set_defaults, nomod_zero); 10200Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_revauth, nomod_zero); 10210Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_secpurge, nomod_zero); 10220Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_cleanup, nomod_zero); 10230Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_get_versions, nomod_zero); 10240Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_max_data_length, nomod_zero); 10250Sstevel@tonic-gate NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_svc_max_data_length, nomod_zero); 10267387SRobert.Gordon@Sun.COM NO_UNLOAD_STUB(rpcsec_gss, rpc_gss_get_service_type, nomod_zero); 10270Sstevel@tonic-gate END_MODULE(rpcsec_gss); 10280Sstevel@tonic-gate#endif 10290Sstevel@tonic-gate 10300Sstevel@tonic-gate/* 10310Sstevel@tonic-gate * Stubs for PCI configurator module (misc/pcicfg). 10320Sstevel@tonic-gate */ 10330Sstevel@tonic-gate#ifndef PCICFG_MODULE 10340Sstevel@tonic-gate MODULE(pcicfg,misc); 10350Sstevel@tonic-gate STUB(pcicfg, pcicfg_configure, 0); 10360Sstevel@tonic-gate STUB(pcicfg, pcicfg_unconfigure, 0); 10370Sstevel@tonic-gate END_MODULE(pcicfg); 10380Sstevel@tonic-gate#endif 10390Sstevel@tonic-gate 1040881Sjohnny/* 104110923SEvan.Yan@Sun.COM * Stubs for pcieb nexus driver. 1042881Sjohnny */ 104310923SEvan.Yan@Sun.COM#ifndef PCIEB_MODULE 104410923SEvan.Yan@Sun.COM MODULE(pcieb,drv); 104510923SEvan.Yan@Sun.COM STUB(pcieb, pcieb_intel_error_workaround, 0); 104610923SEvan.Yan@Sun.COM END_MODULE(pcieb); 1047881Sjohnny#endif 1048881Sjohnny 10490Sstevel@tonic-gate#ifndef IWSCN_MODULE 10500Sstevel@tonic-gate MODULE(iwscn,drv); 10510Sstevel@tonic-gate STUB(iwscn, srpop, 0); 10520Sstevel@tonic-gate END_MODULE(iwscn); 10530Sstevel@tonic-gate#endif 10540Sstevel@tonic-gate 10550Sstevel@tonic-gate/* 10560Sstevel@tonic-gate * Stubs for checkpoint-resume module 10570Sstevel@tonic-gate */ 10580Sstevel@tonic-gate#ifndef CPR_MODULE 10590Sstevel@tonic-gate MODULE(cpr,misc); 10600Sstevel@tonic-gate STUB(cpr, cpr, 0); 10610Sstevel@tonic-gate END_MODULE(cpr); 10620Sstevel@tonic-gate#endif 10630Sstevel@tonic-gate 10640Sstevel@tonic-gate/* 10650Sstevel@tonic-gate * Stubs for kernel probes (tnf module). Not unloadable. 10660Sstevel@tonic-gate */ 10670Sstevel@tonic-gate#ifndef TNF_MODULE 10680Sstevel@tonic-gate MODULE(tnf,drv); 10690Sstevel@tonic-gate NO_UNLOAD_STUB(tnf, tnf_ref32_1, nomod_zero); 10700Sstevel@tonic-gate NO_UNLOAD_STUB(tnf, tnf_string_1, nomod_zero); 10710Sstevel@tonic-gate NO_UNLOAD_STUB(tnf, tnf_opaque_array_1, nomod_zero); 10720Sstevel@tonic-gate NO_UNLOAD_STUB(tnf, tnf_struct_tag_1, nomod_zero); 10730Sstevel@tonic-gate NO_UNLOAD_STUB(tnf, tnf_allocate, nomod_zero); 10740Sstevel@tonic-gate END_MODULE(tnf); 10750Sstevel@tonic-gate#endif 10760Sstevel@tonic-gate 10770Sstevel@tonic-gate/* 10786318Sedp * Stubs for i86hvm bootstraping 10796318Sedp */ 10806318Sedp#ifndef HVM_BOOTSTRAP 10816318Sedp MODULE(hvm_bootstrap,misc); 10826318Sedp NO_UNLOAD_STUB(hvm_bootstrap, hvmboot_rootconf, nomod_zero); 10836318Sedp END_MODULE(hvm_bootstrap); 10846318Sedp#endif 10856318Sedp 10866318Sedp/* 10870Sstevel@tonic-gate * Clustering: stubs for bootstrapping. 10880Sstevel@tonic-gate */ 10890Sstevel@tonic-gate#ifndef CL_BOOTSTRAP 10900Sstevel@tonic-gate MODULE(cl_bootstrap,misc); 10910Sstevel@tonic-gate NO_UNLOAD_WSTUB(cl_bootstrap, clboot_modload, nomod_minus_one); 10920Sstevel@tonic-gate NO_UNLOAD_WSTUB(cl_bootstrap, clboot_loadrootmodules, nomod_zero); 10930Sstevel@tonic-gate NO_UNLOAD_WSTUB(cl_bootstrap, clboot_rootconf, nomod_zero); 10940Sstevel@tonic-gate NO_UNLOAD_WSTUB(cl_bootstrap, clboot_mountroot, nomod_zero); 10950Sstevel@tonic-gate NO_UNLOAD_WSTUB(cl_bootstrap, clconf_init, nomod_zero); 10960Sstevel@tonic-gate NO_UNLOAD_WSTUB(cl_bootstrap, clconf_get_nodeid, nomod_zero); 10970Sstevel@tonic-gate NO_UNLOAD_WSTUB(cl_bootstrap, clconf_maximum_nodeid, nomod_zero); 10980Sstevel@tonic-gate NO_UNLOAD_WSTUB(cl_bootstrap, cluster, nomod_zero); 10990Sstevel@tonic-gate END_MODULE(cl_bootstrap); 11000Sstevel@tonic-gate#endif 11010Sstevel@tonic-gate 11020Sstevel@tonic-gate/* 11030Sstevel@tonic-gate * Clustering: stubs for cluster infrastructure. 11040Sstevel@tonic-gate */ 11050Sstevel@tonic-gate#ifndef CL_COMM_MODULE 11060Sstevel@tonic-gate MODULE(cl_comm,misc); 11070Sstevel@tonic-gate NO_UNLOAD_STUB(cl_comm, cladmin, nomod_minus_one); 11080Sstevel@tonic-gate END_MODULE(cl_comm); 11090Sstevel@tonic-gate#endif 11100Sstevel@tonic-gate 11110Sstevel@tonic-gate/* 11120Sstevel@tonic-gate * Clustering: stubs for global file system operations. 11130Sstevel@tonic-gate */ 11140Sstevel@tonic-gate#ifndef PXFS_MODULE 11150Sstevel@tonic-gate MODULE(pxfs,fs); 11160Sstevel@tonic-gate NO_UNLOAD_WSTUB(pxfs, clpxfs_aio_read, nomod_zero); 11170Sstevel@tonic-gate NO_UNLOAD_WSTUB(pxfs, clpxfs_aio_write, nomod_zero); 11180Sstevel@tonic-gate NO_UNLOAD_WSTUB(pxfs, cl_flk_state_transition_notify, nomod_zero); 11190Sstevel@tonic-gate END_MODULE(pxfs); 11200Sstevel@tonic-gate#endif 11210Sstevel@tonic-gate 11220Sstevel@tonic-gate/* 11230Sstevel@tonic-gate * Stubs for kernel cryptographic framework module (misc/kcf). 11240Sstevel@tonic-gate */ 11250Sstevel@tonic-gate#ifndef KCF_MODULE 11260Sstevel@tonic-gate MODULE(kcf,misc); 11270Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_mech2id, nomod_minus_one); 11280Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_register_provider, nomod_minus_one); 11290Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_unregister_provider, nomod_minus_one); 11300Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_provider_notification, nomod_minus_one); 11310Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_op_notification, nomod_minus_one); 11320Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_kmflag, nomod_minus_one); 11330Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_digest, nomod_minus_one); 1134904Smcpowers NO_UNLOAD_STUB(kcf, crypto_digest_prov, nomod_minus_one); 11350Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_digest_init, nomod_minus_one); 1136904Smcpowers NO_UNLOAD_STUB(kcf, crypto_digest_init_prov, nomod_minus_one); 11370Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_digest_update, nomod_minus_one); 11380Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_digest_final, nomod_minus_one); 1139904Smcpowers NO_UNLOAD_STUB(kcf, crypto_digest_key_prov, nomod_minus_one); 11400Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_encrypt, nomod_minus_one); 1141904Smcpowers NO_UNLOAD_STUB(kcf, crypto_encrypt_prov, nomod_minus_one); 11420Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_encrypt_init, nomod_minus_one); 1143904Smcpowers NO_UNLOAD_STUB(kcf, crypto_encrypt_init_prov, nomod_minus_one); 11440Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_encrypt_update, nomod_minus_one); 11450Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_encrypt_final, nomod_minus_one); 11460Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_decrypt, nomod_minus_one); 1147904Smcpowers NO_UNLOAD_STUB(kcf, crypto_decrypt_prov, nomod_minus_one); 11480Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_decrypt_init, nomod_minus_one); 1149904Smcpowers NO_UNLOAD_STUB(kcf, crypto_decrypt_init_prov, nomod_minus_one); 11500Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_decrypt_update, nomod_minus_one); 11510Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_decrypt_final, nomod_minus_one); 11520Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_get_all_mech_info, nomod_minus_one); 1153904Smcpowers NO_UNLOAD_STUB(kcf, crypto_key_check, nomod_minus_one); 1154904Smcpowers NO_UNLOAD_STUB(kcf, crypto_key_check_prov, nomod_minus_one); 1155904Smcpowers NO_UNLOAD_STUB(kcf, crypto_key_derive, nomod_minus_one); 1156904Smcpowers NO_UNLOAD_STUB(kcf, crypto_key_generate, nomod_minus_one); 1157904Smcpowers NO_UNLOAD_STUB(kcf, crypto_key_generate_pair, nomod_minus_one); 1158904Smcpowers NO_UNLOAD_STUB(kcf, crypto_key_unwrap, nomod_minus_one); 1159904Smcpowers NO_UNLOAD_STUB(kcf, crypto_key_wrap, nomod_minus_one); 11600Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_mac, nomod_minus_one); 1161904Smcpowers NO_UNLOAD_STUB(kcf, crypto_mac_prov, nomod_minus_one); 11620Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_mac_verify, nomod_minus_one); 1163904Smcpowers NO_UNLOAD_STUB(kcf, crypto_mac_verify_prov, nomod_minus_one); 11640Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_mac_init, nomod_minus_one); 1165904Smcpowers NO_UNLOAD_STUB(kcf, crypto_mac_init_prov, nomod_minus_one); 11660Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_mac_update, nomod_minus_one); 11670Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_mac_final, nomod_minus_one); 11680Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_mac_decrypt, nomod_minus_one); 1169904Smcpowers NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_prov, nomod_minus_one); 11700Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_mac_verify_decrypt, nomod_minus_one); 1171904Smcpowers NO_UNLOAD_STUB(kcf, crypto_mac_verify_decrypt_prov, nomod_minus_one); 11720Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_init, nomod_minus_one); 1173904Smcpowers NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_init_prov, nomod_minus_one); 11740Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_update, nomod_minus_one); 11750Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_mac_decrypt_final, nomod_minus_one); 1176904Smcpowers NO_UNLOAD_STUB(kcf, crypto_object_copy, nomod_minus_one); 1177904Smcpowers NO_UNLOAD_STUB(kcf, crypto_object_create, nomod_minus_one); 1178904Smcpowers NO_UNLOAD_STUB(kcf, crypto_object_destroy, nomod_minus_one); 1179904Smcpowers NO_UNLOAD_STUB(kcf, crypto_object_find_final, nomod_minus_one); 1180904Smcpowers NO_UNLOAD_STUB(kcf, crypto_object_find_init, nomod_minus_one); 1181904Smcpowers NO_UNLOAD_STUB(kcf, crypto_object_find, nomod_minus_one); 1182904Smcpowers NO_UNLOAD_STUB(kcf, crypto_object_get_attribute_value, nomod_minus_one); 1183904Smcpowers NO_UNLOAD_STUB(kcf, crypto_object_get_size, nomod_minus_one); 1184904Smcpowers NO_UNLOAD_STUB(kcf, crypto_object_set_attribute_value, nomod_minus_one); 1185904Smcpowers NO_UNLOAD_STUB(kcf, crypto_session_close, nomod_minus_one); 1186904Smcpowers NO_UNLOAD_STUB(kcf, crypto_session_login, nomod_minus_one); 1187904Smcpowers NO_UNLOAD_STUB(kcf, crypto_session_logout, nomod_minus_one); 1188904Smcpowers NO_UNLOAD_STUB(kcf, crypto_session_open, nomod_minus_one); 11890Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_encrypt_mac, nomod_minus_one); 1190904Smcpowers NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_prov, nomod_minus_one); 11910Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_init, nomod_minus_one); 1192904Smcpowers NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_init_prov, nomod_minus_one); 11930Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_update, nomod_minus_one); 11940Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_encrypt_mac_final, nomod_minus_one); 11950Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_create_ctx_template, nomod_minus_one); 11960Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_destroy_ctx_template, nomod_minus_one); 11970Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_get_mech_list, nomod_minus_one); 11980Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_free_mech_list, nomod_minus_one); 11990Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_cancel_req, nomod_minus_one); 12000Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_cancel_ctx, nomod_minus_one); 12010Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_bufcall_alloc, nomod_minus_one); 12020Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_bufcall_free, nomod_minus_one); 12030Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_bufcall, nomod_minus_one); 12040Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_unbufcall, nomod_minus_one); 12050Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_notify_events, nomod_minus_one); 12060Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_unnotify_events, nomod_minus_one); 1207904Smcpowers NO_UNLOAD_STUB(kcf, crypto_get_provider, nomod_minus_one); 12082800Skrishna NO_UNLOAD_STUB(kcf, crypto_get_provinfo, nomod_minus_one); 1209904Smcpowers NO_UNLOAD_STUB(kcf, crypto_release_provider, nomod_minus_one); 12100Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_sign, nomod_minus_one); 1211904Smcpowers NO_UNLOAD_STUB(kcf, crypto_sign_prov, nomod_minus_one); 12120Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_sign_init, nomod_minus_one); 1213904Smcpowers NO_UNLOAD_STUB(kcf, crypto_sign_init_prov, nomod_minus_one); 12140Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_sign_update, nomod_minus_one); 12150Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_sign_final, nomod_minus_one); 12160Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_sign_recover, nomod_minus_one); 1217904Smcpowers NO_UNLOAD_STUB(kcf, crypto_sign_recover_prov, nomod_minus_one); 1218904Smcpowers NO_UNLOAD_STUB(kcf, crypto_sign_recover_init_prov, nomod_minus_one); 12190Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_verify, nomod_minus_one); 1220904Smcpowers NO_UNLOAD_STUB(kcf, crypto_verify_prov, nomod_minus_one); 12210Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_verify_init, nomod_minus_one); 1222904Smcpowers NO_UNLOAD_STUB(kcf, crypto_verify_init_prov, nomod_minus_one); 12230Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_verify_update, nomod_minus_one); 12240Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_verify_final, nomod_minus_one); 12250Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, crypto_verify_recover, nomod_minus_one); 1226904Smcpowers NO_UNLOAD_STUB(kcf, crypto_verify_recover_prov, nomod_minus_one); 1227904Smcpowers NO_UNLOAD_STUB(kcf, crypto_verify_recover_init_prov, nomod_minus_one); 12280Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, random_add_entropy, nomod_minus_one); 12298513SVladimir.Kotal@Sun.COM NO_UNLOAD_STUB(kcf, random_add_pseudo_entropy, nomod_minus_one); 12300Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, random_get_bytes, nomod_minus_one); 12310Sstevel@tonic-gate NO_UNLOAD_STUB(kcf, random_get_pseudo_bytes, nomod_minus_one); 12320Sstevel@tonic-gate END_MODULE(kcf); 12330Sstevel@tonic-gate#endif 12340Sstevel@tonic-gate 12350Sstevel@tonic-gate/* 12360Sstevel@tonic-gate * Stubs for sha1. A non-unloadable module. 12370Sstevel@tonic-gate */ 12380Sstevel@tonic-gate#ifndef SHA1_MODULE 12390Sstevel@tonic-gate MODULE(sha1,crypto); 12400Sstevel@tonic-gate NO_UNLOAD_STUB(sha1, SHA1Init, nomod_void); 12410Sstevel@tonic-gate NO_UNLOAD_STUB(sha1, SHA1Update, nomod_void); 12420Sstevel@tonic-gate NO_UNLOAD_STUB(sha1, SHA1Final, nomod_void); 12430Sstevel@tonic-gate END_MODULE(sha1); 12440Sstevel@tonic-gate#endif 12450Sstevel@tonic-gate 1246269Sericheng/* 1247269Sericheng * The following stubs are used by the mac module. 12485895Syz147064 * Since dld already depends on mac, these 12495895Syz147064 * stubs are needed to avoid circular dependencies. 12505895Syz147064 */ 12515895Syz147064#ifndef DLD_MODULE 12525895Syz147064 MODULE(dld,drv); 12535895Syz147064 STUB(dld, dld_init_ops, nomod_void); 12545895Syz147064 STUB(dld, dld_fini_ops, nomod_void); 125510654SGarrett.Damore@Sun.COM STUB(dld, dld_devt_to_instance, nomod_minus_one); 12565895Syz147064 STUB(dld, dld_autopush, nomod_minus_one); 12578275SEric Cheng STUB(dld, dld_ioc_register, nomod_einval); 12588275SEric Cheng STUB(dld, dld_ioc_unregister, nomod_void); 12595895Syz147064 END_MODULE(dld); 12605895Syz147064#endif 12615895Syz147064 12625895Syz147064/* 12635895Syz147064 * The following stubs are used by the mac module. 12645895Syz147064 * Since dls already depends on mac, these 1265269Sericheng * stubs are needed to avoid circular dependencies. 1266269Sericheng */ 1267269Sericheng#ifndef DLS_MODULE 1268269Sericheng MODULE(dls,misc); 12695895Syz147064 STUB(dls, dls_devnet_mac, nomod_zero); 12705895Syz147064 STUB(dls, dls_devnet_hold_tmp, nomod_einval); 12715895Syz147064 STUB(dls, dls_devnet_rele_tmp, nomod_void); 12728275SEric Cheng STUB(dls, dls_devnet_hold_link, nomod_einval); 12738275SEric Cheng STUB(dls, dls_devnet_rele_link, nomod_void); 12746916Sartem STUB(dls, dls_devnet_prop_task_wait, nomod_void); 12755895Syz147064 STUB(dls, dls_mgmt_get_linkid, nomod_einval); 12768275SEric Cheng STUB(dls, dls_devnet_macname2linkid, nomod_einval); 12778275SEric Cheng STUB(dls, dls_mgmt_get_linkinfo, nomod_einval); 12785895Syz147064 END_MODULE(dls); 1279269Sericheng#endif 1280269Sericheng 12815895Syz147064#ifndef SOFTMAC_MODULE 12825895Syz147064 MODULE(softmac,drv); 12835895Syz147064 STUB(softmac, softmac_hold_device, nomod_einval); 12845895Syz147064 STUB(softmac, softmac_rele_device, nomod_void); 12855895Syz147064 STUB(softmac, softmac_recreate, nomod_void); 12865895Syz147064 END_MODULE(softmac); 12870Sstevel@tonic-gate#endif 12880Sstevel@tonic-gate 128910616SSebastien.Roy@Sun.COM#ifndef IPTUN_MODULE 129010616SSebastien.Roy@Sun.COM MODULE(iptun,drv); 129110616SSebastien.Roy@Sun.COM STUB(iptun, iptun_create, nomod_einval); 129210616SSebastien.Roy@Sun.COM STUB(iptun, iptun_delete, nomod_einval); 129310616SSebastien.Roy@Sun.COM STUB(iptun, iptun_set_policy, nomod_void) ; 129410616SSebastien.Roy@Sun.COM END_MODULE(iptun); 129510616SSebastien.Roy@Sun.COM#endif 129610616SSebastien.Roy@Sun.COM 1297898Skais/* 12986707Sbrutus * Stubs for dcopy, for Intel IOAT KAPIs 12996707Sbrutus */ 13006707Sbrutus#ifndef DCOPY_MODULE 13016707Sbrutus MODULE(dcopy,misc); 13026707Sbrutus NO_UNLOAD_STUB(dcopy, dcopy_query, nomod_minus_one); 13036707Sbrutus NO_UNLOAD_STUB(dcopy, dcopy_query_channel, nomod_minus_one); 13046707Sbrutus NO_UNLOAD_STUB(dcopy, dcopy_alloc, nomod_minus_one); 13056707Sbrutus NO_UNLOAD_STUB(dcopy, dcopy_free, nomod_minus_one); 13066707Sbrutus NO_UNLOAD_STUB(dcopy, dcopy_cmd_alloc, nomod_minus_one); 13076707Sbrutus NO_UNLOAD_STUB(dcopy, dcopy_cmd_free, nomod_void); 13086707Sbrutus NO_UNLOAD_STUB(dcopy, dcopy_cmd_post, nomod_minus_one); 13096707Sbrutus NO_UNLOAD_STUB(dcopy, dcopy_cmd_poll, nomod_minus_one); 13106707Sbrutus END_MODULE(dcopy); 13116707Sbrutus#endif 13126707Sbrutus 13138906SEric.Saxe@Sun.COM/* 13148906SEric.Saxe@Sun.COM * Stubs for acpica 13158906SEric.Saxe@Sun.COM */ 13168906SEric.Saxe@Sun.COM#ifndef ACPICA_MODULE 13178906SEric.Saxe@Sun.COM MODULE(acpica,misc); 13188906SEric.Saxe@Sun.COM NO_UNLOAD_STUB(acpica, AcpiOsReadPort, nomod_minus_one) ; 13198906SEric.Saxe@Sun.COM NO_UNLOAD_STUB(acpica, AcpiOsWritePort, nomod_minus_one) ; 13208906SEric.Saxe@Sun.COM NO_UNLOAD_STUB(acpica, AcpiInstallNotifyHandler, nomod_minus_one) ; 13218906SEric.Saxe@Sun.COM NO_UNLOAD_STUB(acpica, AcpiRemoveNotifyHandler, nomod_minus_one) ; 13228906SEric.Saxe@Sun.COM NO_UNLOAD_STUB(acpica, AcpiEvaluateObject, nomod_minus_one) ; 13238906SEric.Saxe@Sun.COM NO_UNLOAD_STUB(acpica, AcpiEvaluateObjectTyped, nomod_minus_one) ; 13249980SDana.Myers@Sun.COM NO_UNLOAD_STUB(acpica, AcpiWriteBitRegister, nomod_minus_one) ; 13259980SDana.Myers@Sun.COM NO_UNLOAD_STUB(acpica, AcpiReadBitRegister, nomod_minus_one) ; 13268906SEric.Saxe@Sun.COM NO_UNLOAD_STUB(acpica, AcpiOsFree, nomod_minus_one) ; 13278906SEric.Saxe@Sun.COM NO_UNLOAD_STUB(acpica, acpica_get_handle_cpu, nomod_minus_one) ; 13288906SEric.Saxe@Sun.COM NO_UNLOAD_STUB(acpica, acpica_get_global_FADT, nomod_minus_one) ; 132910147SMark.Haywood@Sun.COM NO_UNLOAD_STUB(acpica, acpica_write_cpupm_capabilities, 133010147SMark.Haywood@Sun.COM nomod_minus_one) ; 13318906SEric.Saxe@Sun.COM NO_UNLOAD_STUB(acpica, __acpi_wbinvd, nomod_minus_one) ; 133210457SSaurabh.Mishra@Sun.COM NO_UNLOAD_STUB(acpica, acpi_reset_system, nomod_minus_one) ; 13338906SEric.Saxe@Sun.COM END_MODULE(acpica); 13348906SEric.Saxe@Sun.COM#endif 13358906SEric.Saxe@Sun.COM 133612004Sjiang.liu@intel.com/* 133712004Sjiang.liu@intel.com * Stubs for acpidev 133812004Sjiang.liu@intel.com */ 133912004Sjiang.liu@intel.com#ifndef ACPIDEV_MODULE 134012004Sjiang.liu@intel.com MODULE(acpidev,misc); 134112004Sjiang.liu@intel.com NO_UNLOAD_STUB(acpidev, acpidev_dr_get_cpu_numa_info, nomod_minus_one) ; 134212004Sjiang.liu@intel.com NO_UNLOAD_STUB(acpidev, acpidev_dr_free_cpu_numa_info, 134312004Sjiang.liu@intel.com nomod_minus_one) ; 134412004Sjiang.liu@intel.com END_MODULE(acpidev); 134512004Sjiang.liu@intel.com#endif 134612004Sjiang.liu@intel.com 13478023SPhil.Kirk@Sun.COM#ifndef IPNET_MODULE 13488023SPhil.Kirk@Sun.COM MODULE(ipnet,drv); 13498023SPhil.Kirk@Sun.COM STUB(ipnet, ipnet_if_getdev, nomod_zero); 13508023SPhil.Kirk@Sun.COM STUB(ipnet, ipnet_walk_if, nomod_zero); 13518023SPhil.Kirk@Sun.COM END_MODULE(ipnet); 13528023SPhil.Kirk@Sun.COM#endif 13538023SPhil.Kirk@Sun.COM 13548249SVikram.Hegde@Sun.COM#ifndef IOMMULIB_MODULE 13558249SVikram.Hegde@Sun.COM MODULE(iommulib,misc); 13568249SVikram.Hegde@Sun.COM STUB(iommulib, iommulib_nex_close, nomod_void); 13578249SVikram.Hegde@Sun.COM END_MODULE(iommulib); 13588249SVikram.Hegde@Sun.COM#endif 13598249SVikram.Hegde@Sun.COM 13608348SEric.Yu@Sun.COM/* 136111600SVikram.Hegde@Sun.COM * Stubs for rootnex nexus driver. 136211600SVikram.Hegde@Sun.COM */ 136311600SVikram.Hegde@Sun.COM#ifndef ROOTNEX_MODULE 136411600SVikram.Hegde@Sun.COM MODULE(rootnex,drv); 136511600SVikram.Hegde@Sun.COM STUB(rootnex, immu_init, 0); 136611600SVikram.Hegde@Sun.COM STUB(rootnex, immu_startup, 0); 136711600SVikram.Hegde@Sun.COM STUB(rootnex, immu_physmem_update, 0); 136811600SVikram.Hegde@Sun.COM END_MODULE(rootnex); 136911600SVikram.Hegde@Sun.COM#endif 137011600SVikram.Hegde@Sun.COM 137111600SVikram.Hegde@Sun.COM/* 13728348SEric.Yu@Sun.COM * Stubs for kernel socket, for iscsi 13738348SEric.Yu@Sun.COM */ 13748348SEric.Yu@Sun.COM#ifndef KSOCKET_MODULE 13758348SEric.Yu@Sun.COM MODULE(ksocket, misc); 13768348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_setsockopt, nomod_minus_one); 13778348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_getsockopt, nomod_minus_one); 13788348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_getpeername, nomod_minus_one); 13798348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_getsockname, nomod_minus_one); 13808348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_socket, nomod_minus_one); 13818348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_bind, nomod_minus_one); 13828348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_listen, nomod_minus_one); 13838348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_accept, nomod_minus_one); 13848348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_connect, nomod_minus_one); 13858348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_recv, nomod_minus_one); 13868348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_recvfrom, nomod_minus_one); 13878348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_recvmsg, nomod_minus_one); 13888348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_send, nomod_minus_one); 13898348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_sendto, nomod_minus_one); 13908348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_sendmsg, nomod_minus_one); 13918348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_ioctl, nomod_minus_one); 13928348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_setcallbacks, nomod_minus_one); 13938348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_hold, nomod_minus_one); 13948348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_rele, nomod_minus_one); 13958348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_shutdown, nomod_minus_one); 13968348SEric.Yu@Sun.COM NO_UNLOAD_STUB(ksocket, ksocket_close, nomod_minus_one); 13978348SEric.Yu@Sun.COM END_MODULE(ksocket); 13988348SEric.Yu@Sun.COM#endif 13998348SEric.Yu@Sun.COM 140012199Sgerald.jelinek@sun.com/* 140112199Sgerald.jelinek@sun.com * Stubs for elfexec 140212199Sgerald.jelinek@sun.com */ 140312199Sgerald.jelinek@sun.com#ifndef ELFEXEC_MODULE 140412199Sgerald.jelinek@sun.com MODULE(elfexec,exec); 140512199Sgerald.jelinek@sun.com STUB(elfexec, elfexec, nomod_einval); 140612267SGerald.Jelinek@Sun.COM STUB(elfexec, mapexec_brand, nomod_einval); 140712267SGerald.Jelinek@Sun.COM#if defined(__amd64) 140812199Sgerald.jelinek@sun.com STUB(elfexec, elf32exec, nomod_einval); 140912199Sgerald.jelinek@sun.com STUB(elfexec, mapexec32_brand, nomod_einval); 141012267SGerald.Jelinek@Sun.COM#endif 141112199Sgerald.jelinek@sun.com END_MODULE(elfexec); 141212199Sgerald.jelinek@sun.com#endif 141312199Sgerald.jelinek@sun.com 1414*12683SJimmy.Vetayases@oracle.com/* 1415*12683SJimmy.Vetayases@oracle.com * Stub(s) for APIX module. 1416*12683SJimmy.Vetayases@oracle.com */ 1417*12683SJimmy.Vetayases@oracle.com#ifndef APIX_MODULE 1418*12683SJimmy.Vetayases@oracle.com MODULE(apix,mach); 1419*12683SJimmy.Vetayases@oracle.com WSTUB(apix, apix_loaded, nomod_zero); 1420*12683SJimmy.Vetayases@oracle.com END_MODULE(apix); 1421*12683SJimmy.Vetayases@oracle.com#endif 1422*12683SJimmy.Vetayases@oracle.com 14230Sstevel@tonic-gate/ this is just a marker for the area of text that contains stubs 14240Sstevel@tonic-gate 14250Sstevel@tonic-gate ENTRY_NP(stubs_end) 14260Sstevel@tonic-gate nop 14270Sstevel@tonic-gate 14280Sstevel@tonic-gate#endif /* lint */ 1429