|
|
|
Re: [PATCH 08/36] AArch64: Kernel booting and initialisation | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
|
On Fri, Jul 06, 2012 at 10:32:54PM +0100, Stephen Warren wrote: > On 07/06/2012 03:05 PM, Catalin Marinas wrote: > > The patch adds the kernel booting and the initial setup code. > > Documentation/aarch64/booting.txt describes the booting protocol on the > > AArch64 Linux kernel. This is subject to change following the work on > > boot standardisation, ACPI. > > > diff --git a/Documentation/aarch64/booting.txt b/Documentation/aarch64/booting.txt > > > +3. Decompress the kernel image > > +------------------------------ > > + > > +Requirement: OPTIONAL > > + > > +The AArch64 kernel does not provide a decompressor and therefore > > +requires gzip decompression to be performed by the boot loader if the > > +default Image.gz target is used. For bootloaders that do not implement > > +this requirement, the larger Image target is available instead. > > I'm curious why a decompressor isn't provided. I don't find a need for it, at least not at this stage. If the kbytes (or milliseconds?) it saves are really important, I would rather push this to the boot-loader (well, simple .gz, .bz2 etc., doesn't require much standardisation). > The reason I ask is that this change will cause differences in the way > e.g. a U-Boot script boots the kernel; the filename would be different, > you'd need to use a uImage in order for U-Boot to decompress the kernel > instead of a raw zImage, etc. This makes things on AArch64 work just a > little bit different from existing systems, and differences between > systems make for more things for everyone to understand and remember; > more mistakes will be made. U-Boot has recently grown a "bootz" command > to simplify booting a zImage directly for example, and now it seems that > won't be useful moving forward. I'm not sure U-Boot will be at all useful on AArch64. We don't plan any port and the focus currently is UEFI with possibly a second stage boot loader like GRUB. But to your point, AArch64 *will* work differently from existing systems. I want to break away from the separate platform configuration and zImage files and start with single Image supporting multiple platforms by default. Critical hardware initialisation for allowing Linux to boot will be passed down to the firmware. > Also, on Tegra at least and perhaps OMAP too, there are a few parts of > earlyprintk serial port setup (i.e. port selection) which happen as part > of the decompressor rather than the main kernel image, so we'd have to > re-jig that too. Whatever we did on AArch32, if it was useful and we want to follow a similar model it needs porting given that the code cannot be shared. So there is nothing to re-jig but rather implement. As for earlyprintk, you can initialise it in the decompressed kernel anyway. But even though it's a useful debugging tool, it goes against the single Image aim (at least the current printascii/addruart implementation). I don't have a proper implementation yet. > > +4. Call the kernel image > > +------------------------ > > + > > +Requirement: MANDATORY > > + > > +The decompressed kernel image contains a 32-byte header as follows: > > + > > + u32 magic = 0x14000008; /* branch to stext, little-endian */ > > + u32 res0 = 0; /* reserved */ > > + u64 text_offset; /* Image load offset */ > > + u64 res1 = 0; /* reserved */ > > + u64 res2 = 0; /* reserved */ > > + > > +The image must be placed at the specified offset (currently 0x80000) > > +from the start of the system RAM (aligned to 2MB) and called there. > > Is "0x80000" meant to have an extra "0"; 0x80000 isn't aligned to 2MB > unless I'm really missing too much sleep today. The value is correct, it wasn't meant to be aligned to 2MB. Why would that be? It's just an offset from the start of the RAM, which must indeed be 2MB aligned (PHYS_OFFSET). -- Catalin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[Other Archives] [Linux Kernel Newbies] [Linux Driver Development] [Linux Kbuild] [Fedora Kernel] [Linux Kernel Testers] [Linux SH] [Linux Omap] [Linux Tape] [Linux Input] [Linux Kernel Janitors] [Linux Kernel Packagers] [Linux Doc] [Linux Man Pages] [Linux API] [Linux Memory Management] [Linux Modules] [Linux Standards] [Kernel Announce] [Netdev] [Git] [Linux PCI] Linux CAN Development [Linux I2C] [Linux RDMA] [Linux NUMA] [Netfilter] [Netfilter Devel] [SELinux] [Bugtraq] [FIO] [Linux Perf Users] [Linux Serial] [Linux PPP] [Linux ISDN] [Linux Next] [Kernel Stable Commits] [Linux Tip Commits] [Kernel MM Commits] [Linux Security Module] [AutoFS] [Filesystem Development] [Ext3 Filesystem] [Linux bcache] [Ext4 Filesystem] [Linux BTRFS] [Linux CEPH Filesystem] [Linux XFS] [XFS] [Linux NFS] [Linux CIFS] [Ecryptfs] [Linux NILFS] [Linux Cachefs] [Reiser FS] [Initramfs] [Linux FB Devel] [Linux OpenGL] [DRI Devel] [Fastboot] [Linux RT Users] [Linux RT Stable] [eCos] [Corosync] [Linux Clusters] [LVS Devel] [Hot Plug] [Linux Virtualization] [KVM] [KVM PPC] [KVM ia64] [Linux Containers] [Linux Hexagon] [Linux Cgroups] [Util Linux] [Wireless] [Linux Bluetooth] [Bluez Devel] [Ethernet Bridging] [Embedded Linux] [Barebox] [Linux MMC] [Linux IIO] [Sparse] [Smatch] [Linux Arch] [x86 Platform Driver] [Linux ACPI] [Linux IBM ACPI] [LM Sensors] [CPU Freq] [Linux Power Management] [Linmodems] [Linux DCCP] [Linux SCTP] [ALSA Devel] [Linux USB] [Linux PA RISC] [Linux Samsung SOC] [MIPS Linux] [IBM S/390 Linux] [ARM Linux] [ARM Kernel] [ARM MSM] [Tegra Devel] [Sparc Linux] [Linux Security] [Linux Sound] [Linux Media] [Video 4 Linux] [Linux IRDA Users] [Linux for the blind] [Linux RAID] [Linux ATA RAID] [Device Mapper] [Linux SCSI] [SCSI Target Devel] [Linux SCSI Target Infrastructure] [Linux IDE] [Linux SMP] [Linux AXP] [Linux Alpha] [Linux M68K] [Linux ia64] [Linux 8086] [Linux x86_64] [Linux Config] [Linux Apps] [Linux MSDOS] [Linux X.25] [Linux Crypto] [DM Crypt] [Linux Trace Users] [Linux Btrace] [Linux Watchdog] [Utrace Devel] [Linux C Programming] [Linux Assembly] [Dash] [DWARVES] [Hail Devel] [Linux Kernel Debugger] [Linux gcc] [Gcc Help] [X.Org] [Wine]
![]() |
![]() |
[Older Kernel Discussion] [Yosemite National Park Forum] [Large Format Photos] [Gimp] [Yosemite Photos] [Stuff]