2 ; -----------------------------------------------------------------------
4 ; Copyright 2004-2008 H. Peter Anvin - All Rights Reserved
5 ; Copyright 2009 Intel Corporation; author: H. Peter Anvin
7 ; This program is free software; you can redistribute it and/or modify
8 ; it under the terms of the GNU General Public License as published by
9 ; the Free Software Foundation, Inc., 53 Temple Place Ste 330,
10 ; Boston MA 02111-1307, USA; either version 2 of the License, or
11 ; (at your option) any later version; incorporated herein by reference.
13 ; -----------------------------------------------------------------------
18 ; Common initialization code (inline)
23 ; Initialize PM invocation framework
27 ; Save derivative-specific data
31 ; Decompress PM code to its target location
36 extern syslinux_register_bios, init
38 pm_call syslinux_register_bios
42 ; Set up the COMBOOT APIs
44 call comboot_setup_api
48 ; The code to decompress the PM code and initialize other segments.
50 extern _lzo1x_decompress_asm_fast_safe
55 push __pm_code_len + 16 ; Space for decompressed size
56 push esp ; Pointer to previous word
57 push __pm_code_start ; Target address
58 push dword [lzo_data_size] ; Compressed size
59 push dword __pm_code_lma
60 call _lzo1x_decompress_asm_fast_safe
62 pop RM_EAX ; Decompressed size
64 ; Zero bss sections (but not .earlybss, since it may
65 ; contain already-live data.)
71 mov ecx,__bss16_dwords
73 mov edi,__high_clear_start ; .uibss, .lowmem
74 mov ecx,__high_clear_dwords
80 lzo_data_size dd 0 ; filled in by compressor