aboutsummaryrefslogtreecommitdiffstats
path: root/target/imagebuilder
Commit message (Expand)AuthorAgeFilesLines
* postinst trigger: the new postinst trigger broke IBJohn Crispin2014-09-161-4/+5
* imagebuilder: remove postinst files before generating imageFelix Fietkau2014-08-311-0/+1
* build: introduce per feed repository supportJo-Philipp Wich2014-08-051-2/+2
* imagebuilder: fix typo that copied grub to the wrong folderJohn Crispin2014-07-241-2/+2
* imagebuilder: copy dts folderJohn Crispin2014-07-211-1/+5
* imagebuilder: x86 fails to build inside the imagebuilderJohn Crispin2014-07-101-1/+4
* target/imagebuilder: add missing package index (fixes #16675)Felix Fietkau2014-06-021-0/+1
* imagebuilder: bundle dtc (#12953, #14741)Jo-Philipp Wich2014-05-141-0/+2
* build: consistently use 'depends on' instead of 'depends'Felix Fietkau2013-04-171-3/+3
* imagebuilder: use file_copy to deploy files/ in the image generation phaseJo-Philipp Wich2012-12-021-9/+1
* imagebuilder: merge r25078 to align files/ handling with current buildrootJo-Philipp Wich2012-11-221-0/+8
* derive system from hostcc to allow building inside a chrootJohn Crispin2012-08-221-2/+2
* use bundle-libraries.sh to install required host utilities into imagebuilder ...Jo-Philipp Wich2012-08-151-1/+2
* package/index: filter out the libc package from the indexFelix Fietkau2012-06-111-0/+1
* add $(SUBTARGET) to the filename if availableJohn Crispin2012-05-301-1/+1
* imagebuilder: explicitly install the kernel .ipk before installing anything e...Felix Fietkau2012-05-141-0/+1
* build: rework verbosity level selectionFelix Fietkau2012-04-261-1/+1
* don't overwrite version.mk, substitute REVISION insteadJo-Philipp Wich2012-04-171-2/+2
* populate repositories.conf from version.mkJo-Philipp Wich2012-04-122-3/+4
* ImageBuilder: respect the PROFILE parameterGabor Juhos2012-01-241-4/+5
* Various enhancements from Manuel Munz <freifunk@somakoma.de> - don't regenera...Jo-Philipp Wich2011-09-091-2/+9
* imagebuilder: clean opkg files if requested (patch from #9866)Felix Fietkau2011-08-011-0/+1
* Send ipkg-make-index.sh output to stdoutJo-Philipp Wich2011-02-231-1/+1
* allow overriding BIN_DIR (#7412)Jo-Philipp Wich2010-10-261-1/+3
* copy kernel .config, needed by mkfs.jffs2 to detect compression capabilitiesJo-Philipp Wich2010-10-261-1/+3
* - sync with host opkg changes - get rid of autogenerated opkg.conf - utilize ...Jo-Philipp Wich2010-09-124-58/+14
* fix a small typo in sed patternJo-Philipp Wich2010-09-101-1/+1
* fix arch detection pattern to cope with underscores in board name, e.g. "adm5...Jo-Philipp Wich2010-09-081-1/+2
* - add a helper script to generate opkg.conf, attempt to detect package archit...Jo-Philipp Wich2010-09-084-10/+56
* use --force-run-hooks for host opkg installJo-Philipp Wich2010-09-071-1/+2
* use opkg/host for package installation - speeds up rebuild operations - align...Jo-Philipp Wich2010-09-061-6/+20
* revert r22372 and r22405, dependency on host libtool causes problemsJo-Philipp Wich2010-07-281-20/+6
* use host opkg for installing packages in buildroot and ImageBuilderJo-Philipp Wich2010-07-231-6/+20
* - correctly copy .config when scripts/env is used in the buildroot - prevent ...Jo-Philipp Wich2010-04-272-9/+20
* imagebuilder: don't disable on umlNicolas Thill2010-03-301-1/+0
* imagebuilder: various fixes * only copy host tools from $(STAGING_DIR_HOST)/b...Nicolas Thill2010-03-301-7/+5
* remove dependency on CONFIG_ALLJo-Philipp Wich2010-03-091-1/+0
* imagebuilder: add REVISION variable (closes #6795)Gabor Juhos2010-03-082-2/+6
* fix custom package selectionJo-Philipp Wich2010-02-131-1/+1
* disable IB & SDK when using an external toolchain (closes: #6001)Nicolas Thill2009-12-181-0/+1
* imagebuilder: accept empty profile names, some targets do not define profiles...Felix Fietkau2009-10-221-6/+1
* remove board name hack (#5823)Florian Fainelli2009-09-201-1/+0
* remove legacy 2.4-specific behavior, fixes IB on brcm-2.4Andy Boyett2009-07-021-4/+0
* fix profile package selection, packages from last parsed profile were acciden...Andy Boyett2009-07-021-2/+2
* fix initscripts activation (closes: #4037, #4745)Nicolas Thill2009-04-211-2/+2
* get rid of $Id$ - it has never helped us and it has broken too many patches ;)Felix Fietkau2009-04-171-1/+0
* fix ImageBuilder (closes: #3863)Nicolas Thill2008-08-223-3/+5
* some more build system cleanupFelix Fietkau2008-08-171-0/+2
* Generate gzipped package lists - Can be used by changing the src line in /etc...Andy Boyett2008-07-291-2/+4
* Detach the building of sdk and imagebuilder from "Select all packages by defa...Felix Fietkau2008-03-191-1/+0
ld } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/******************************************************************************
 * hypercall.h
 * 
 * Linux-specific hypervisor handling.
 * 
 * Copyright (c) 2002-2004, K A Fraser
 * 
 * This file may be distributed separately from the Linux kernel, or
 * incorporated into other software packages, subject to the following license:
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this source file (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy, modify,
 * merge, publish, distribute, sublicense, and/or sell copies of the Software,
 * and to permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */
/*
 * Benjamin Liu <benjamin.liu@intel.com>
 * Jun Nakajima <jun.nakajima@intel.com>
 *   Ported to x86-64.
 * 
 */

#ifndef __HYPERCALL_H__
#define __HYPERCALL_H__
#include <asm-xen/xen-public/xen.h>

#define __syscall_clobber "r11","rcx","memory"

/*
 * Assembler stubs for hyper-calls.
 */
static inline int
HYPERVISOR_set_trap_table(
    trap_info_t *table)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_set_trap_table), "D" (table)
	: __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_mmu_update(
    mmu_update_t *req, int count, int *success_count, domid_t domid)
{
    int ret;

    __asm__ __volatile__ (
        "movq %5, %%r10;" TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_mmu_update), "D" (req), "S" ((long)count),
	  "d" (success_count), "g" ((unsigned long)domid)
	: __syscall_clobber, "r10" );

    return ret;
}

static inline int
HYPERVISOR_mmuext_op(
    struct mmuext_op *op, int count, int *success_count, domid_t domid)
{
    int ret;

    __asm__ __volatile__ (
        "movq %5, %%r10;" TRAP_INSTR
        : "=a" (ret)
        : "0" (__HYPERVISOR_mmuext_op), "D" (op), "S" ((long)count), 
          "d" (success_count), "g" ((unsigned long)domid)
        : __syscall_clobber, "r10" );

    return ret;
}

static inline int
HYPERVISOR_set_gdt(
    unsigned long *frame_list, int entries)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_set_gdt), "D" (frame_list), "S" ((long)entries)
	: __syscall_clobber );


    return ret;
}
static inline int
HYPERVISOR_stack_switch(
    unsigned long ss, unsigned long esp)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_stack_switch), "D" (ss), "S" (esp)
	: __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_set_callbacks(
    unsigned long event_address, unsigned long failsafe_address, 
    unsigned long syscall_address)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_set_callbacks), "D" (event_address),
	  "S" (failsafe_address), "d" (syscall_address)
	: __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_fpu_taskswitch(
    int set)
{
    int ret;
    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret) : "0" ((unsigned long)__HYPERVISOR_fpu_taskswitch),
          "D" ((unsigned long) set) : __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_yield(
    void)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_sched_op), "D" ((unsigned long)SCHEDOP_yield)
	: __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_block(
    void)
{
    int ret;
    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_sched_op), "D" ((unsigned long)SCHEDOP_block)
	: __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_shutdown(
    void)
{
    int ret;
    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_sched_op),
	  "D" ((unsigned long)(SCHEDOP_shutdown | (SHUTDOWN_poweroff << SCHEDOP_reasonshift)))
	: __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_reboot(
    void)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_sched_op),
	  "D" ((unsigned long)(SCHEDOP_shutdown | (SHUTDOWN_reboot << SCHEDOP_reasonshift)))
	: __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_suspend(
    unsigned long srec)
{
    int ret;

    /* NB. On suspend, control software expects a suspend record in %esi. */
    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_sched_op),
        "D" ((unsigned long)(SCHEDOP_shutdown | (SHUTDOWN_suspend << SCHEDOP_reasonshift))), 
        "S" (srec)
	: __syscall_clobber );

    return ret;
}

/*
 * We can have the timeout value in a single argument for the hypercall, but
 * that will break the common code. 
 */
static inline long
HYPERVISOR_set_timer_op(
    u64 timeout)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_set_timer_op),
	  "D" (timeout)
	: __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_dom0_op(
    dom0_op_t *dom0_op)
{
    int ret;

    dom0_op->interface_version = DOM0_INTERFACE_VERSION;
    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_dom0_op), "D" (dom0_op)
	: __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_set_debugreg(
    int reg, unsigned long value)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_set_debugreg), "D" ((unsigned long)reg), "S" (value)
	: __syscall_clobber );

    return ret;
}

static inline unsigned long
HYPERVISOR_get_debugreg(
    int reg)
{
    unsigned long ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_get_debugreg), "D" ((unsigned long)reg)
	: __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_update_descriptor(
    unsigned long ma, unsigned long word)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_update_descriptor), "D" (ma),
	  "S" (word)
	: __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_set_fast_trap(
    int idx)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_set_fast_trap), "D" ((unsigned long)idx)
	: __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_dom_mem_op(
    unsigned int op, unsigned long *extent_list,
    unsigned long nr_extents, unsigned int extent_order)
{
    int ret;

    __asm__ __volatile__ (
        "movq %5,%%r10; movq %6,%%r8;" TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_dom_mem_op), "D" ((unsigned long)op), "S" (extent_list),
	  "d" (nr_extents), "g" ((unsigned long) extent_order), "g" ((unsigned long) DOMID_SELF)
	: __syscall_clobber,"r8","r10");

    return ret;
}

static inline int
HYPERVISOR_multicall(
    void *call_list, int nr_calls)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_multicall), "D" (call_list), "S" ((unsigned long)nr_calls)
	: __syscall_clobber);

    return ret;
}

static inline int
HYPERVISOR_update_va_mapping(
    unsigned long page_nr, pte_t new_val, unsigned long flags)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_update_va_mapping), 
          "D" (page_nr), "S" (new_val.pte), "d" (flags)
	: __syscall_clobber);

    return ret;
}

static inline int
HYPERVISOR_event_channel_op(
    void *op)
{
    int ret;
    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_event_channel_op), "D" (op)
	: __syscall_clobber);

    return ret;
}

static inline int
HYPERVISOR_xen_version(
    int cmd)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_xen_version), "D" ((unsigned long)cmd)
	: __syscall_clobber);

    return ret;
}

static inline int
HYPERVISOR_console_io(
    int cmd, int count, char *str)
{
    int ret;
    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_console_io), "D" ((unsigned long)cmd), "S" ((unsigned long)count), "d" (str)
	: __syscall_clobber);

    return ret;
}

static inline int
HYPERVISOR_physdev_op(
    void *physdev_op)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_physdev_op), "D" (physdev_op)
	: __syscall_clobber);

    return ret;
}

static inline int
HYPERVISOR_grant_table_op(
    unsigned int cmd, void *uop, unsigned int count)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_grant_table_op), "D" ((unsigned long)cmd), "S" ((unsigned long)uop), "d" (count)
	: __syscall_clobber);

    return ret;
}

static inline int
HYPERVISOR_update_va_mapping_otherdomain(
    unsigned long page_nr, pte_t new_val, unsigned long flags, domid_t domid)
{
    int ret;

    __asm__ __volatile__ (
        "movq %5, %%r10;" TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_update_va_mapping_otherdomain),
          "D" (page_nr), "S" (new_val.pte), "d" (flags), "g" ((unsigned long)domid)
	: __syscall_clobber,"r10");
    
    return ret;
}

static inline int
HYPERVISOR_vm_assist(
    unsigned int cmd, unsigned int type)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_vm_assist), "D" ((unsigned long)cmd), "S" ((unsigned long)type)
	: __syscall_clobber);

    return ret;
}

static inline int
HYPERVISOR_switch_to_user(void)
{
    int ret;
    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret) : "0" ((unsigned long)__HYPERVISOR_switch_to_user) : __syscall_clobber );

    return ret;
}

static inline int
HYPERVISOR_boot_vcpu(
    unsigned long vcpu, vcpu_guest_context_t *ctxt)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" (__HYPERVISOR_boot_vcpu), "D" (vcpu), "S" (ctxt)
	: __syscall_clobber);

    return ret;
}

static inline int
HYPERVISOR_set_segment_base(
    int reg, unsigned long value)
{
    int ret;

    __asm__ __volatile__ (
        TRAP_INSTR
        : "=a" (ret)
	: "0" ((unsigned long)__HYPERVISOR_set_segment_base), "D" ((unsigned long)reg), "S" (value)
	: __syscall_clobber );

    return ret;
}

#endif /* __HYPERCALL_H__ */