Nyanix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit 02e229942fb0a8fdb6659ae1023f18b931870fa3
parent a426beab80c85e245138449fcaae88c68a6a2ea5
Author: Dani Frisk <dani@silverskin.fi>
Date:   Tue, 14 Aug 2018 20:44:33 +0300

big update, much file tree, even license, wow

Diffstat:
LICENSE | 29+++++++++++++++++++++++++++++
src/boot_early/2nd_stage.s | 5+++++
src/boot_early/boot.s | 13+++++++++----
src/main_loader/kernel_loader.s | 5+++++
4 files changed, 48 insertions(+), 4 deletions(-)

diff --git a/LICENSE b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2018, k4m1 <k4m1@protonmail.com> +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/boot_early/2nd_stage.s b/src/boot_early/2nd_stage.s @@ -1,5 +1,10 @@ ; ========================================================================== ; +; /src/2nd_stage.s ; +; Copyright (c) 2018, k4m1 <k4m1@protonmail.com> ; +; All rights reserved. ; +; See /LICENSE for further copyright information. ; +; ; ; Entry of 2nd stage of the bootloader ; ; ========================================================================== ; global _start diff --git a/src/boot_early/boot.s b/src/boot_early/boot.s @@ -1,4 +1,9 @@ ; ============================================================================ ; +; /src/boot.s ; +; Copyright (c) 2018, k4m1 <k4m1@protonmail.com> ; +; All rights reserved. ; +; See /LICENSE for further copyright information. ; +; ; ; The entrypoint for bootloader. ; ; ============================================================================ ; @@ -7,7 +12,7 @@ align 4 org 0x7c00 section .text -; Clearing out the Code-Segment, as some BIOSes start the bootloader +; Clear out the Code-Segment, as some BIOSes start the bootloader ; by setting CS=0x7c00 instead of just jmp 0x0000:0x7c00 jmp 0x0000:_entry @@ -17,9 +22,9 @@ _entry: cld cli - ; back-uping boot device id & clearing registers + ; backup boot device id & clearing registers mov [BOOT_DEVICE_DB], dl - ; change to text-mode (and clear the screen) + ; change to textmode (and clear the screen) xor ah, ah mov al, 0x03 int 0x10 @@ -82,7 +87,7 @@ load_2nd_stage: BOOT_DEVICE_DB db 0 BL_SECTORS db 0 -; Filling rest of the sector with null-bytes until signature. +; Fill rest of the sector with null-bytes until signature. times 510-($-$$) db 0x00 db 0x55 db 0xAA diff --git a/src/main_loader/kernel_loader.s b/src/main_loader/kernel_loader.s @@ -1,4 +1,9 @@ ; ========================================================================== ; +; /src/kernel_loader.s ; +; Copyright (c) 2018, k4m1 <k4m1@protonmail.com> ; +; All rights reserved. ; +; See /LICENSE for further copyright information. ; +; ; ; This file contains code responsible for rest of the loading process. ; ; At this point, usage of A20 line has been enabled, we've loaded a little ; ; GDT, swapped to 32-bit protected mode, and saved Real mode Data segment & ;