machdep.c (286584) | machdep.c (286667) |
---|---|
1/*- 2 * Copyright (c) 2003 Peter Wemm. 3 * Copyright (c) 1992 Terrence R. Lambert. 4 * Copyright (c) 1982, 1987, 1990 The Regents of the University of California. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * William Jolitz. --- 25 unchanged lines hidden (view full) --- 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 39 */ 40 41#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 Peter Wemm. 3 * Copyright (c) 1992 Terrence R. Lambert. 4 * Copyright (c) 1982, 1987, 1990 The Regents of the University of California. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * William Jolitz. --- 25 unchanged lines hidden (view full) --- 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 39 */ 40 41#include <sys/cdefs.h> |
42__FBSDID("$FreeBSD: head/sys/amd64/amd64/machdep.c 286584 2015-08-10 17:18:21Z kib $"); | 42__FBSDID("$FreeBSD: head/sys/amd64/amd64/machdep.c 286667 2015-08-12 15:26:32Z marcel $"); |
43 44#include "opt_atpic.h" 45#include "opt_compat.h" 46#include "opt_cpu.h" 47#include "opt_ddb.h" 48#include "opt_inet.h" 49#include "opt_isa.h" 50#include "opt_kstack_pages.h" --- 1569 unchanged lines hidden (view full) --- 1620 /* 1621 * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4) 1622 * transition). 1623 */ 1624 if (kmdp != NULL && preload_search_info(kmdp, 1625 MODINFO_METADATA | MODINFOMD_EFI_MAP) != NULL) 1626 vty_set_preferred(VTY_VT); 1627 | 43 44#include "opt_atpic.h" 45#include "opt_compat.h" 46#include "opt_cpu.h" 47#include "opt_ddb.h" 48#include "opt_inet.h" 49#include "opt_isa.h" 50#include "opt_kstack_pages.h" --- 1569 unchanged lines hidden (view full) --- 1620 /* 1621 * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4) 1622 * transition). 1623 */ 1624 if (kmdp != NULL && preload_search_info(kmdp, 1625 MODINFO_METADATA | MODINFOMD_EFI_MAP) != NULL) 1626 vty_set_preferred(VTY_VT); 1627 |
1628 /* 1629 * Initialize the console before we print anything out. 1630 */ 1631 cninit(); 1632 1633#ifdef DEV_ISA 1634#ifdef DEV_ATPIC 1635 elcr_probe(); 1636 atpic_startup(); 1637#else 1638 /* Reset and mask the atpics and leave them shut down. */ 1639 atpic_reset(); 1640 1641 /* 1642 * Point the ICU spurious interrupt vectors at the APIC spurious 1643 * interrupt handler. 1644 */ 1645 setidt(IDT_IO_INTS + 7, IDTVEC(spuriousint), SDT_SYSIGT, SEL_KPL, 0); 1646 setidt(IDT_IO_INTS + 15, IDTVEC(spuriousint), SDT_SYSIGT, SEL_KPL, 0); 1647#endif 1648#else 1649#error "have you forgotten the isa device?"; 1650#endif 1651 1652 kdb_init(); 1653 1654#ifdef KDB 1655 if (boothowto & RB_KDB) 1656 kdb_enter(KDB_WHY_BOOTFLAGS, 1657 "Boot flags requested debugger"); 1658#endif 1659 | |
1660 identify_cpu(); /* Final stage of CPU initialization */ 1661 initializecpu(); /* Initialize CPU registers */ 1662 initializecpucache(); 1663 1664 /* doublefault stack space, runs on ist1 */ 1665 common_tss[0].tss_ist1 = (long)&dblfault_stack[sizeof(dblfault_stack)]; 1666 1667 /* --- 20 unchanged lines hidden (view full) --- 1688 wrmsr(MSR_STAR, msr); 1689 wrmsr(MSR_SF_MASK, PSL_NT|PSL_T|PSL_I|PSL_C|PSL_D); 1690 1691 getmemsize(kmdp, physfree); 1692 init_param2(physmem); 1693 1694 /* now running on new page tables, configured,and u/iom is accessible */ 1695 | 1628 identify_cpu(); /* Final stage of CPU initialization */ 1629 initializecpu(); /* Initialize CPU registers */ 1630 initializecpucache(); 1631 1632 /* doublefault stack space, runs on ist1 */ 1633 common_tss[0].tss_ist1 = (long)&dblfault_stack[sizeof(dblfault_stack)]; 1634 1635 /* --- 20 unchanged lines hidden (view full) --- 1656 wrmsr(MSR_STAR, msr); 1657 wrmsr(MSR_SF_MASK, PSL_NT|PSL_T|PSL_I|PSL_C|PSL_D); 1658 1659 getmemsize(kmdp, physfree); 1660 init_param2(physmem); 1661 1662 /* now running on new page tables, configured,and u/iom is accessible */ 1663 |
1664 cninit(); 1665 1666#ifdef DEV_ISA 1667#ifdef DEV_ATPIC 1668 elcr_probe(); 1669 atpic_startup(); 1670#else 1671 /* Reset and mask the atpics and leave them shut down. */ 1672 atpic_reset(); 1673 1674 /* 1675 * Point the ICU spurious interrupt vectors at the APIC spurious 1676 * interrupt handler. 1677 */ 1678 setidt(IDT_IO_INTS + 7, IDTVEC(spuriousint), SDT_SYSIGT, SEL_KPL, 0); 1679 setidt(IDT_IO_INTS + 15, IDTVEC(spuriousint), SDT_SYSIGT, SEL_KPL, 0); 1680#endif 1681#else 1682#error "have you forgotten the isa device?"; 1683#endif 1684 1685 kdb_init(); 1686 1687#ifdef KDB 1688 if (boothowto & RB_KDB) 1689 kdb_enter(KDB_WHY_BOOTFLAGS, 1690 "Boot flags requested debugger"); 1691#endif 1692 |
|
1696 msgbufinit(msgbufp, msgbufsize); 1697 fpuinit(); 1698 1699 /* 1700 * Set up thread0 pcb after fpuinit calculated pcb + fpu save 1701 * area size. Zero out the extended state header in fpu save 1702 * area. 1703 */ --- 766 unchanged lines hidden --- | 1693 msgbufinit(msgbufp, msgbufsize); 1694 fpuinit(); 1695 1696 /* 1697 * Set up thread0 pcb after fpuinit calculated pcb + fpu save 1698 * area size. Zero out the extended state header in fpu save 1699 * area. 1700 */ --- 766 unchanged lines hidden --- |