aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles/load_igb_uio/tasks/main.yml
blob: d144ea4b76d64aad64cdfda8121298877ef5f5e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Copyright (c) 2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
- name: reload module dependencies
  command: "depmod -a"

- modprobe: name=uio state=present
- modprobe: name=igb_uio state=present
pol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* 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 */ }
/**
 ** Standalone startup code for Linux PROM emulator.
 ** Copyright 1999 Pete A. Zaitcev
 ** This code is licensed under GNU General Public License.
 **/
/*
 * $Id: head.S,v 1.12 2002/07/23 05:47:09 zaitcev Exp $
 */

#define __ASSEMBLY__
#include <asm/asi.h>
#include "pstate.h"
#include "lsu.h"
#define NO_QEMU_PROTOS
#define NO_OPENBIOS_PROTOS
#include "arch/common/fw_cfg.h"

#define PROM_ADDR 0x1fff0000000
#define CFG_ADDR  0x1fe02000510
#define HZ        1 * 1000 * 1000
#define TICK_INT_DIS 0x8000000000000000

        .globl	entry, _entry

	.section ".text", "ax"
	.align	8
        .register %g2, #scratch
        .register %g3, #scratch
        .register %g6, #scratch
        .register %g7, #scratch

/*
 * Entry point
 * We start execution from here.
 */
_entry:
entry:
        ! Set up CPU state
        wrpr    %g0, PSTATE_PRIV, %pstate
        wr      %g0, 0, %fprs
        wrpr    %g0, 0x0, %tl

        ! Extract NWINDOWS from %ver
        rdpr    %ver, %g1
        and     %g1, 0xf, %g1
        dec     %g1
        wrpr    %g1, 0, %cleanwin
        wrpr    %g1, 0, %cansave
        wrpr    %g0, 0, %canrestore
        wrpr    %g0, 0, %otherwin
        wrpr    %g0, 0, %wstate
        ! disable timer now
        setx    TICK_INT_DIS, %g2, %g1
        wr      %g1, 0, %tick_cmpr

        ! Disable I/D MMUs and caches
        stxa    %g0, [%g0] ASI_LSU_CONTROL

        ! Check signature "QEMU"
        setx    CFG_ADDR, %g2, %g5
        mov     FW_CFG_SIGNATURE, %g2
        stha    %g2, [%g5] ASI_PHYS_BYPASS_EC_E_L
        inc     %g5
        lduba   [%g5] ASI_PHYS_BYPASS_EC_E, %g2
        cmp     %g2, 'Q'
        bne     bad_conf
         nop
        lduba   [%g5] ASI_PHYS_BYPASS_EC_E, %g2
        cmp     %g2, 'E'
        bne     bad_conf
         nop
        lduba   [%g5] ASI_PHYS_BYPASS_EC_E, %g2
        cmp     %g2, 'M'
        bne     bad_conf
         nop
        lduba   [%g5] ASI_PHYS_BYPASS_EC_E, %g2
        cmp     %g2, 'U'
        bne     bad_conf
         nop

        ! Clear ITLB
        mov     6 << 3, %g1
        stxa    %g0, [%g1] ASI_IMMU
        stxa    %g0, [%g1] ASI_DMMU
        mov     63 << 3, %g1
1:      stxa    %g0, [%g1] ASI_ITLB_DATA_ACCESS
        subcc   %g1, 1 << 3, %g1
        bpos    1b
         nop

        ! Clear DTLB
        mov     63 << 3, %g1
1:      stxa    %g0, [%g1] ASI_DTLB_DATA_ACCESS
        subcc   %g1, 1 << 3, %g1
        bpos    1b
         nop

        ! Get memory size from configuration device
        ! NB: little endian format
        mov     FW_CFG_RAM_SIZE, %g2
        dec     %g5
        stha    %g2, [%g5] ASI_PHYS_BYPASS_EC_E_L
        inc     %g5
        lduba   [%g5] ASI_PHYS_BYPASS_EC_E, %g4

        lduba   [%g5] ASI_PHYS_BYPASS_EC_E, %g3
        sllx    %g3, 8, %g3
        or      %g3, %g4, %g4

        lduba   [%g5] ASI_PHYS_BYPASS_EC_E, %g3
        sllx    %g3, 16, %g3
        or      %g3, %g4, %g4

        lduba   [%g5] ASI_PHYS_BYPASS_EC_E, %g3
        sllx    %g3, 24, %g3
        or      %g3, %g4, %g4

        lduba   [%g5] ASI_PHYS_BYPASS_EC_E, %g3
        sllx    %g3, 32, %g3
        or      %g3, %g4, %g4

        lduba   [%g5] ASI_PHYS_BYPASS_EC_E, %g3
        sllx    %g3, 40, %g3
        or      %g3, %g4, %g4

        lduba   [%g5] ASI_PHYS_BYPASS_EC_E, %g3
        sllx    %g3, 48, %g3
        or      %g3, %g4, %g4

        lduba   [%g5] ASI_PHYS_BYPASS_EC_E, %g3
        sllx    %g3, 56, %g3
        or      %g3, %g4, %g1
        ! %g1 contains end of memory

        setx    _end, %g7, %g3
        set     0x7ffff, %g2
        add     %g3, %g2, %g3
        andn    %g3, %g2, %g3
        setx    _data, %g7, %g2
        sub     %g3, %g2, %g2
        sub	%g1, %g2, %g2			! %g2 = start of private memory
        mov     %g2, %l0

	! setup .data & .bss
        setx    _data, %g7, %g4
        sub     %g3, %g4, %g5
        srlx    %g5, 19, %g6			! %g6 = # of 512k .bss pages
	set	0xc0000000, %g3
	sllx	%g3, 32, %g3
	or	%g3, 0x76, %g3
	! valid, 512k, locked, cacheable(I/E/C), priv, writable
	set	48, %g7
1:	stxa	%g4, [%g7] ASI_DMMU		! vaddr = _data + N * 0x80000, ctx=0
	or	%g2, %g3, %g5
	! paddr = start_mem + N * 0x80000
	stxa	%g5, [%g0] ASI_DTLB_DATA_IN
	set	0x80000, %g5
	add	%g2, %g5, %g2
	add	%g4, %g5, %g4
	deccc	%g6
	bne	1b
	 nop

	! setup .rodata, also make .text readable
	setx	_data, %g7, %g5
	setx	_start, %g7, %g4
        sub     %g5, %g4, %g5
	srlx    %g5, 19, %g6			! %g6 = # of 512k .rodata pages
	set	48, %g7
	set	0x80000, %g5
        setx    PROM_ADDR, %l1, %l2
1:      stxa	%g4, [%g7] ASI_DMMU		! vaddr = _rodata, ctx=0
	set	0xc0000000, %g3
	sllx	%g3, 32, %g3
	or	%g3, 0x74, %g3
	or	%l2, %g3, %g3
	! valid, 512k, locked, cacheable(I/E/C), priv
	! paddr = _rodata + N * 0x10000
	stxa	%g3, [%g0] ASI_DTLB_DATA_IN
	add	%g4, %g5, %g4
	deccc	%g6
	bne	1b
	 add	%l2, %g5, %l2

	membar	#Sync

	setx	_start, %g7, %g4
	setx	_rodata, %g7, %g5
        sub     %g5, %g4, %g5
	set 0x7ffff, %g7
	add %g5, %g7, %g5					! round to 512k
        srlx    %g5, 19, %g6			! %g6 = # of 512k .text pages
	set	0x80000, %g5
	set	48, %g7
        setx    PROM_ADDR, %l1, %l2
1:      stxa	%g4, [%g7] ASI_IMMU		! vaddr = _start, ctx=0
	set	0xc0000000, %g3
	sllx	%g3, 32, %g3
	or	%g3, 0x74, %g3
	or	%l2, %g3, %g3
	! valid, 512k, locked, cacheable(I/E/C), priv
	! paddr = _start + N * 0x80000
	stxa	%g3, [%g0] ASI_ITLB_DATA_IN
	add	%g4, %g5, %g4
	deccc	%g6
	bne	1b
	 add	%l2, %g5, %l2

	flush	%g4

	mov	%g1, %g3

	set     8, %g2
	sta     %g0, [%g2] ASI_DMMU		! set primary ctx=0

	! Enable I/D MMUs and caches
        setx    lowmem, %g2, %g1
	set	LSU_CONTROL_DM|LSU_CONTROL_IM|LSU_CONTROL_DC|LSU_CONTROL_IC, %g2
        jmp     %g1
         stxa	%g2, [%g0] ASI_LSU_CONTROL

lowmem:
        /* Copy the DATA section from ROM. */
        setx	_data - 8, %o7, %o0             ! First address of DATA
        setx	_bss, %o7, %o1                  ! Last address of DATA
        setx    _start, %o7, %o2
        sub     %o0, %o2, %o2                   ! _data - _start
        setx    PROM_ADDR, %o7, %o3
        add     %o3, %o2, %o2                   ! PROM_ADDR + (_data - _start)
        ba	2f
         nop
1:
        ldxa    [%o2] ASI_PHYS_BYPASS_EC_E, %g1
        stx	%g1, [%o0]
2:
        add	%o2, 0x8, %o2
        subcc	%o0, %o1, %g0
        bl	1b
         add	%o0, 0x8, %o0

        /* Zero out our BSS section. */
        setx    _bss - 8, %o7, %o0              ! First address of BSS
        setx    _end - 8, %o7, %o1                  ! Last address of BSS
        ba	2f
         nop
1:
        stx     %g0, [%o0]
2:
        subcc	%o0, %o1, %g0
        bl	1b
         add	%o0, 0x8, %o0

        setx    trap_table, %g2, %g1
        wrpr    %g1, %tba

        setx    qemu_mem_size, %g7, %g1
        stx     %g3, [%g1]

        setx    _data, %g7, %g1                 ! Store va->pa conversion factor
        sub     %g1, %l0, %g2
        setx    va_shift, %g7, %g1
        stx     %g2, [%g1]

        /* Finally, turn on traps so that we can call c-code. */
	wrpr    %g0, (PSTATE_PRIV|PSTATE_PEF|PSTATE_IE), %pstate

        ! 100 Hz timer
        setx    TICK_INT_DIS, %g2, %g1
        rd      %tick, %g2
        andn    %g2, %g1, %g2
        set     HZ, %g1
        add     %g1, %g2, %g1
        wr      %g1, 0, %tick_cmpr

        /* Switch to our main context.
         * Main context is statically defined in C.
         */

        call    __switch_context_nosave
         nop

        /* We get here when the main context switches back to
         * the boot context.
         */
bad_conf:
        b       bad_conf
         nop