From f19fc81b23f500efda29ac5f31ecf8104da35d89 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Fri, 17 Jun 2011 22:26:11 +0000 Subject: [PATCH] [FREELDR] - convert mb.S to portable syntax - remove obsolete reactos_memory_map - Make use of CR / LF in isoboot.S svn path=/trunk/; revision=52324 --- reactos/boot/freeldr/bootsect/isoboot.S | 18 ++++----- reactos/boot/freeldr/freeldr/CMakeLists.txt | 6 +-- reactos/boot/freeldr/freeldr/arch/i386/mb.S | 39 ++++++------------- .../boot/freeldr/freeldr/arch/i386/realmode.S | 13 ------- 4 files changed, 24 insertions(+), 52 deletions(-) diff --git a/reactos/boot/freeldr/bootsect/isoboot.S b/reactos/boot/freeldr/bootsect/isoboot.S index ecbd34a809b..2934a3d729b 100644 --- a/reactos/boot/freeldr/bootsect/isoboot.S +++ b/reactos/boot/freeldr/bootsect/isoboot.S @@ -923,9 +923,9 @@ pollchar_and_empty: isolinux_banner: - .asciz "\r\nLoading IsoBoot...\r\n" + .asciz CR, LF, "Loading IsoBoot...", CR, LF copyright_str: - .asciz " (C) 1994-2002 H. Peter Anvin\r\n" + .asciz " (C) 1994-2002 H. Peter Anvin", CR, LF presskey_msg: .asciz "Press any key to boot from CD" dot_msg: @@ -957,33 +957,33 @@ startldr_msg: #endif spec_err_msg: - .asciz "Load spec failed, trying wing ...\r\n" + .asciz "Load spec failed, trying wing ...", CR, LF maybe_msg: .asciz "Found smth at drive = " alright_msg: - .asciz "might be ok, continuing...\r\n" + .asciz "might be ok, continuing...", CR, LF nothing_msg: - .asciz "Failed locate CD-ROM; boot failed.\r\n" + .asciz "Failed locate CD-ROM; boot failed.", CR, LF isolinux_str: .asciz "IsoBoot: " crlf_msg: - .asciz "\r\n" + .asciz CR, LF diskerr_msg: .asciz "Disk error " ondrive_str: .asciz ", drive " err_bootfailed: - .asciz "\r\nfailed.." + .asciz CR, LF, "failed.." isolinux_dir: .asciz "\\LOADER" no_dir_msg: - .asciz "LOADER dir not found.\r\n" + .asciz "LOADER dir not found.", CR, LF isolinux_bin: .asciz "SETUPLDR.SYS" no_isolinux_msg: - .asciz "SETUPLDR not found.\r\n" + .asciz "SETUPLDR not found.", CR, LF // diff --git a/reactos/boot/freeldr/freeldr/CMakeLists.txt b/reactos/boot/freeldr/freeldr/CMakeLists.txt index 1559a5d2b13..17db1a68bd4 100644 --- a/reactos/boot/freeldr/freeldr/CMakeLists.txt +++ b/reactos/boot/freeldr/freeldr/CMakeLists.txt @@ -14,13 +14,13 @@ if(ARCH MATCHES i386) arch/i386/i386idt.c arch/i386/i386trap.S arch/i386/i386pnp.cmake.S - arch/i386/i386bug.c) + arch/i386/i386bug.c + arch/i386/mb.S) if(NOT MSVC) list(APPEND FREELDR_BASE64K_SOURCE arch/i386/drvmap.S arch/i386/linux.S - arch/i386/multiboot.S - arch/i386/mb.S) + arch/i386/multiboot.S) else() list(APPEND FREELDR_BASE64K_SOURCE arch/i386/realmode.S) diff --git a/reactos/boot/freeldr/freeldr/arch/i386/mb.S b/reactos/boot/freeldr/freeldr/arch/i386/mb.S index 9f9ad808430..592e066b58f 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/mb.S +++ b/reactos/boot/freeldr/freeldr/arch/i386/mb.S @@ -17,39 +17,22 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - .text - .code16 - +#include #include #include - /* - * Here we assume the kernel is loaded at 1mb - * This boots the kernel - */ - .code32 - .globl _PageDirectoryStart +.code32 +PUBLIC _PageDirectoryStart - .globl _startup_pagedirectory - .globl _lowmem_pagetable - .globl _kernel_pagetable - .globl _apic_pagetable - - .globl _PageDirectoryEnd - - // - // Boot information structure - // - -EXTERN(_reactos_memory_map_descriptor_size) - .long 0 - -EXTERN(_reactos_memory_map) - .rept (32 * /*sizeof(memory_map_t)*/24) - .byte 0 - .endr +PUBLIC _startup_pagedirectory +PUBLIC _lowmem_pagetable +PUBLIC _kernel_pagetable +PUBLIC _apic_pagetable +PUBLIC _PageDirectoryEnd +#ifndef _USE_ML .bss +#endif _PageDirectoryStart: _startup_pagedirectory: .fill 4096, 1, 0 @@ -64,3 +47,5 @@ _apic_pagetable: .fill 4096, 1, 0 _PageDirectoryEnd: + +END diff --git a/reactos/boot/freeldr/freeldr/arch/i386/realmode.S b/reactos/boot/freeldr/freeldr/arch/i386/realmode.S index 93e37beba10..333f9425b91 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/realmode.S +++ b/reactos/boot/freeldr/freeldr/arch/i386/realmode.S @@ -6,19 +6,6 @@ // globals -PUBLIC _PageDirectoryStart -_PageDirectoryStart: -PUBLIC _PageDirectoryEnd -_PageDirectoryEnd: - -PUBLIC _startup_pagedirectory -_startup_pagedirectory: -PUBLIC _apic_pagetable -_apic_pagetable: -PUBLIC _kernel_pagetable -_kernel_pagetable: -PUBLIC _lowmem_pagetable -_lowmem_pagetable: PUBLIC _BootOldLinuxKernel _BootOldLinuxKernel: