1 /////////////////////////////////////////////////////////////////////////
2 // $Id: rombios32start.S,v 1.3 2006/10/02 06:29:38 vruppert Exp $
3 /////////////////////////////////////////////////////////////////////////
5 // 32 bit Bochs BIOS init code
6 // Copyright (C) 2006 Fabrice Bellard
8 // This library is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU Lesser General Public
10 // License as published by the Free Software Foundation; either
11 // version 2 of the License, or (at your option) any later version.
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 .globl smp_ap_boot_code_start
25 .globl smp_ap_boot_code_end
26 .global smm_relocation_start
27 .global smm_relocation_end
28 .global smm_code_start
32 /* clear bss section */
34 mov $__bss_start, %edi
42 smp_ap_boot_code_start:
55 /* code to relocate SMBASE to 0xa0000 */
57 mov $0x38000 + 0x7efc, %ebx
58 addr32 mov (%ebx), %al /* revision ID to see if x86_64 or x86 */
61 mov $0x38000 + 0x7ef8, %ebx
64 mov $0x38000 + 0x7f00, %ebx
67 addr32 movl %eax, (%ebx)
68 /* indicate to the BIOS that the SMM code was executed */
75 /* minimal SMM code to enable or disable ACPI */
83 mov $PM_IO_BASE + 0x04, %dx /* PMCNTRL */
95 mov $PM_IO_BASE + 0x04, %dx /* PMCNTRL */