1 /////////////////////////////////////////////////////////////////////////
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
39 /* copy data section */
41 mov $__data_start, %edi
49 smp_ap_boot_code_start:
58 /* code to relocate SMBASE to 0xa0000 */
60 mov $0x38000 + 0x7efc, %ebx
61 addr32 mov (%ebx), %al /* revision ID to see if x86_64 or x86 */
64 mov $0x38000 + 0x7ef8, %ebx
67 mov $0x38000 + 0x7f00, %ebx
70 addr32 movl %eax, (%ebx)
71 /* indicate to the BIOS that the SMM code was executed */
78 /* minimal SMM code to enable or disable ACPI */
86 mov $PM_IO_BASE + 0x04, %dx /* PMCNTRL */
98 mov $PM_IO_BASE + 0x04, %dx /* PMCNTRL */