arm linux内核启动过程(自解压后)的启动分析

内核启动过程分析

/*

* linux/arch/arm/kernel/head.S

*

* Copyright (C) 1994-2002 Russell King

* Copyright (c) 2003 ARM Limited

* All Rights Reserved

*

* This program is free software; you can redistribute it and/or modify

* it under the terms of the GNU General Public License version 2 as

* published by the Free Software Foundation.

*

* Kernel startup code for all 32-bit CPUs

*/

#include <linux/linkage.h>

#include <linux/init.h>

#include <asm/assembler.h>

#include <asm/domain.h>

#include <asm/ptrace.h>

#include <asm/asm-offsets.h>

#include <asm/memory.h>

#include <asm/thread_info.h>

#include <asm/system.h>

#if (PHYS_OFFSET & 0x001fffff)

#error "PHYS_OFFSET must be at an even 2MiB boundary!"//boundary(分界线) #endif

#define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET)

#define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET)

/*

* swapper_pg_dir is the virtual address of the initial page

* We place the page tables 16K below KERNEL_RAM_VADDR. Therefore, we must * make sure that KERNEL_RAM_VADDR is correctly set. Currently, we expect * the least significant 16 bits to be 0x8000, but we could probably

* relax this restriction to KERNEL_RAM_VADDR >= PAGE_OFFSET + 0x4000.

*/ swapper_pg_dir 是初始页表的虚拟地址.我们将页表放在

KERNEL_RAM_VADDR以下16K的空间中. 因此我们必须保证

你可能喜欢

  • 嵌入式Linux
  • start_kernel
  • linux启动过程
  • Linux内核分析
  • Linux内核配置

arm linux内核启动过程(自解压后)的启动分析相关文档

最新文档

返回顶部