Skip to main content

Kernel head

This is a late post. Simply explains how the kernel sits in after grub.



[BITS 32]

global _start
extern kernel_entry

PAGEALIGN equ 1<<0
MEMORYINFO equ 1<<1
HEADERFLAGS equ PAGEALIGN | MEMORYINFO ; 0x3 that is
HEADERMAGIC equ 0x1BADB002
CHECKSUM equ -(HEADERMAGIC + HEADERFLAGS)
STACKSIZE equ 0x4000

section .text
ALIGN 4 ; section must be 4 byte-aligned
multibootheader ;
dd HEADERMAGIC
dd HEADERFLAGS
dd CHECKSUM

_start:
mov esp, stack+STACKSIZE
push eax
push ebx
call kernel_entry
jmp $

; GDT here

; ISRs here

section .bss
ALIGN 4
stack resb STACKSIZE ; 16KB of memory

I’m just sad tonight, that’s why I decided to post this out of nothing. Well I guess keeping myself busy would be wise enough.

Comments

Popular posts from this blog

Architecture Complexity

Here are the items to consider: Coding to an interface Service Oriented Architecture Automated Testing Domain Driven Design Custom Data Access Layer Layered architecture Complexity is relatively equal the number of lines of code. Note that complexity is not bad. It must be justified.

Repair Windows 7 System Files

8 out of 10 average PC users have their box’s system files altered by malwares, viruses, etc. We usually reinstall the OS if the antivirus and anti malware software did not perform their job well. Here’s one way to fix the corrupted system files without the need of restarting your Windows 7 box. 1. Run the Command Prompt as Administrator 2. Type the following command C:\Windows\system32\> sfc /scannow 3. After the verification phase, you will receive a message about your system files’ integrity Windows Resource Protection did not find any integrity violations.

Android Studio:Unknown Host Error

After installing Android Studio, I got the following error: Unknown host 'services.gradle.org'. Please ensure the host name is correct. If you are behind an HTTP proxy, please configure the proxy settings either in Android Studio or Gradle. Consult IDE log for more details (Help | Show Log) Solution File --> Settings --> HTTP Proxy --> Auto-detect proxy settings