From 7b80e5f76f4cb90ec2c23c1165fb237c686f9138 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 22 Jan 2016 19:27:02 +0100 Subject: [PATCH] i386 removal, part 50/x: Remove the i386 specific kgzldr. It was only needed for kgzip(8)'ed kernels anyway. kgzip(8) was removed in c425a6254f909db65a1ccbc31a09e09e371bf847. All of this was only needed for loading kernels without the standard loader anyway. Pointed-out-by: zrj --- Makefile_upgrade.inc | 1 + sys/boot/pc32/Makefile | 5 +- sys/boot/pc32/kgzldr/Makefile | 24 ------- sys/boot/pc32/kgzldr/boot.c | 129 ---------------------------------- sys/boot/pc32/kgzldr/crt.s | 84 ---------------------- sys/boot/pc32/kgzldr/kgzldr.h | 42 ----------- sys/boot/pc32/kgzldr/lib.c | 88 ----------------------- sys/boot/pc32/kgzldr/sio.s | 45 ------------ sys/boot/pc32/kgzldr/start.s | 46 ------------ 9 files changed, 3 insertions(+), 461 deletions(-) delete mode 100644 sys/boot/pc32/kgzldr/Makefile delete mode 100644 sys/boot/pc32/kgzldr/boot.c delete mode 100644 sys/boot/pc32/kgzldr/crt.s delete mode 100644 sys/boot/pc32/kgzldr/kgzldr.h delete mode 100644 sys/boot/pc32/kgzldr/lib.c delete mode 100644 sys/boot/pc32/kgzldr/sio.s delete mode 100644 sys/boot/pc32/kgzldr/start.s diff --git a/Makefile_upgrade.inc b/Makefile_upgrade.inc index 3624d05441..b3c69e41f5 100644 --- a/Makefile_upgrade.inc +++ b/Makefile_upgrade.inc @@ -2270,6 +2270,7 @@ TO_REMOVE+=/usr/share/man/man8/mount_union.8.gz TO_REMOVE+=/usr/games/piano TO_REMOVE+=/usr/share/man/man6/piano.6.gz TO_REMOVE+=/usr/games/hide/hangman +TO_REMOVE+=/usr/lib/kgzldr.o .if !defined(WANT_INSTALLER) TO_REMOVE+=/usr/sbin/dfuibe_installer diff --git a/sys/boot/pc32/Makefile b/sys/boot/pc32/Makefile index dabf338da5..b698ef4519 100644 --- a/sys/boot/pc32/Makefile +++ b/sys/boot/pc32/Makefile @@ -1,7 +1,6 @@ -SUBDIR= mbr boot0 btx boot2 cdboot kgzldr libi386 loader loader_tftp \ - boot0sio +SUBDIR= mbr boot0 boot0sio boot2 btx cdboot libi386 loader loader_tftp # special boot programs, 'self-extracting boot2+loader' -SUBDIR+= pxeldr pxeldr_tftp +SUBDIR+=pxeldr pxeldr_tftp .include diff --git a/sys/boot/pc32/kgzldr/Makefile b/sys/boot/pc32/kgzldr/Makefile deleted file mode 100644 index ff6c9993a2..0000000000 --- a/sys/boot/pc32/kgzldr/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# $FreeBSD: src/sys/boot/i386/kgzldr/Makefile,v 1.16 2003/06/30 00:15:38 ru Exp $ - -SRCS= start.s boot.c inflate.c lib.c crt.s sio.s -OBJS= ${SRCS:N*.h:R:S/$/.o/g} -CFLAGS+=-Os -CFLAGS+=-DKZIP -COMPILER_LDFLAGS=-nostdlib -static -Wl,-r -.PATH: ${.CURDIR}/../../../kern - -CLEANFILES=kgzldr.o - -BOOT_COMCONSOLE_PORT?= 0x3f8 -AFLAGS+=--defsym SIO_PRT=${BOOT_COMCONSOLE_PORT} - -all: kgzldr.o - -kgzldr.o: ${OBJS} - ${CC} ${COMPILER_LDFLAGS} -o ${.TARGET} ${OBJS} - -realinstall: - ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - kgzldr.o ${DESTDIR}${LIBDIR} - -.include diff --git a/sys/boot/pc32/kgzldr/boot.c b/sys/boot/pc32/kgzldr/boot.c deleted file mode 100644 index 475fdb00b7..0000000000 --- a/sys/boot/pc32/kgzldr/boot.c +++ /dev/null @@ -1,129 +0,0 @@ -/*- - * Copyright (c) 1999 Global Technology Associates, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * $FreeBSD: src/sys/boot/i386/kgzldr/boot.c,v 1.3 2003/08/25 23:28:31 obrien Exp $ - * $DragonFly: src/sys/boot/pc32/kgzldr/boot.c,v 1.3 2003/11/10 06:08:35 dillon Exp $ - */ - -#include -#include -#include - -#include "kgzldr.h" - -#define KGZ_HEAD 0xa /* leading bytes to ignore */ -#define KGZ_TAIL 0x8 /* trailing bytes to ignore */ - -#define E_FMT 1 /* Error: Invalid format */ -#define E_MEM 2 /* Error: Out of memory */ - -struct kgz_hdr { - char ident[4]; /* identification */ - uint32_t dload; /* decoded image load address */ - uint32_t dsize; /* decoded image size */ - uint32_t isize; /* image size in memory */ - uint32_t entry; /* program entry point */ - uint32_t nsize; /* encoded image size */ -}; -extern struct kgz_hdr kgz; /* header */ -extern uint8_t kgz_ndata[]; /* encoded image */ - -static const char *const msg[] = { - "done", - "invalid format", - "out of memory" -}; - -static const u_char *ip; /* input pointer */ -static u_char *op; /* output pointer */ - -static struct inflate infl; /* inflate() parameters */ - -static int decode(void); -static int input(void *); -static int output(void *, u_char *, u_long); - -/* - * Uncompress and boot a kernel. - */ -int -boot(int howto) -{ - int err; - - kgz_con = howto & RB_SERIAL ? KGZ_SIO : KGZ_CRT; - putstr("Uncompressing ... "); - err = decode(); - putstr(msg[err]); - putstr("\n"); - if (err) { - putstr("System halted"); - for (;;) - ; - } - return err; -} - -/* - * Interface with inflate() to uncompress the data. - */ -static int -decode(void) -{ - static u_char slide[GZ_WSIZE]; - int err; - - ip = kgz_ndata + KGZ_HEAD; - op = (u_char *)kgz.dload; - infl.gz_input = input; - infl.gz_output = output; - infl.gz_slide = slide; - err = inflate(&infl); - return err ? err == 3 ? E_MEM : E_FMT : 0; -} - -/* - * Read a byte. - */ -static int -input(void *dummy) -{ - if ((size_t)(ip - kgz_ndata) + KGZ_TAIL > kgz.nsize) - return GZ_EOF; - return *ip++; -} - -/* - * Write some bytes. - */ -static int -output(void *dummy, u_char * ptr, u_long len) -{ - if (op - (u_char *)kgz.dload + len > kgz.dsize) - return -1; - while (len--) - *op++ = *ptr++; - return 0; -} diff --git a/sys/boot/pc32/kgzldr/crt.s b/sys/boot/pc32/kgzldr/crt.s deleted file mode 100644 index 90abf37b1d..0000000000 --- a/sys/boot/pc32/kgzldr/crt.s +++ /dev/null @@ -1,84 +0,0 @@ -# -# Copyright (c) 1999 Global Technology Associates, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. 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. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -# -# From: btx.s 1.10 1999/02/25 16:27:41 rnordier -# $FreeBSD: src/sys/boot/i386/kgzldr/crt.s,v 1.4 2002/09/17 01:48:55 peter Exp $ -# $DragonFly: src/sys/boot/pc32/kgzldr/crt.s,v 1.3 2003/11/10 06:08:35 dillon Exp $ -# - -# Screen defaults and assumptions. - - .set SCR_MAT,0x7 # Mode/attribute - .set SCR_COL,0x50 # Columns per row - .set SCR_ROW,0x19 # Rows per screen - -# BIOS Data Area locations. - - .set BDA_SCR,0x449 # Video mode - .set BDA_POS,0x450 # Cursor position - - .globl crt_putchr - -# void crt_putchr(int c) - -crt_putchr: movb 0x4(%esp,1),%al # Get character - pusha # Save - xorl %ecx,%ecx # Zero for loops - movb $SCR_MAT,%ah # Mode/attribute - movl $BDA_POS,%ebx # BDA pointer - movw (%ebx),%dx # Cursor position - movl $0xb8000,%edi # Regen buffer (color) - cmpb %ah,BDA_SCR-BDA_POS(%ebx) # Mono mode? - jne crt_putchr.1 # No - xorw %di,%di # Regen buffer (mono) -crt_putchr.1: cmpb $0xa,%al # New line? - je crt_putchr.2 # Yes - xchgl %eax,%ecx # Save char - movb $SCR_COL,%al # Columns per row - mulb %dh # * row position - addb %dl,%al # + column - adcb $0x0,%ah # position - shll %eax # * 2 - xchgl %eax,%ecx # Swap char, offset - movw %ax,(%edi,%ecx,1) # Write attr:char - incl %edx # Bump cursor - cmpb $SCR_COL,%dl # Beyond row? - jb crt_putchr.3 # No -crt_putchr.2: xorb %dl,%dl # Zero column - incb %dh # Bump row -crt_putchr.3: cmpb $SCR_ROW,%dh # Beyond screen? - jb crt_putchr.4 # No - leal 2*SCR_COL(%edi),%esi # New top line - movw $(SCR_ROW-1)*SCR_COL/2,%cx # Words to move - rep # Scroll - movsl # screen - movb $' ',%al # Space - movb $SCR_COL,%cl # Columns to clear - rep # Clear - stosw # line - movb $SCR_ROW-1,%dh # Bottom line -crt_putchr.4: movw %dx,(%ebx) # Update position - popa # Restore - ret # To caller diff --git a/sys/boot/pc32/kgzldr/kgzldr.h b/sys/boot/pc32/kgzldr/kgzldr.h deleted file mode 100644 index ead1cd92bd..0000000000 --- a/sys/boot/pc32/kgzldr/kgzldr.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1999 Global Technology Associates, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * $FreeBSD: src/sys/boot/i386/kgzldr/kgzldr.h,v 1.2 1999/08/28 00:40:10 peter Exp $ - * $DragonFly: src/sys/boot/pc32/kgzldr/kgzldr.h,v 1.3 2003/11/10 06:08:35 dillon Exp $ - */ - -#define KGZ_CRT 0x1 /* Video console */ -#define KGZ_SIO 0x2 /* Serial console */ - -extern int kgz_con; - -int boot(int); - -unsigned char *kzipmalloc(int); -void kzipfree(void *); -void putstr(const char *); - -void crt_putchr(int); -void sio_putchr(int); diff --git a/sys/boot/pc32/kgzldr/lib.c b/sys/boot/pc32/kgzldr/lib.c deleted file mode 100644 index aba80b6687..0000000000 --- a/sys/boot/pc32/kgzldr/lib.c +++ /dev/null @@ -1,88 +0,0 @@ -/*- - * Copyright (c) 1999 Global Technology Associates, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - * - * $FreeBSD: src/sys/boot/i386/kgzldr/lib.c,v 1.3 2003/08/25 23:28:31 obrien Exp $ - * $DragonFly: src/sys/boot/pc32/kgzldr/lib.c,v 1.3 2003/11/10 06:08:35 dillon Exp $ - */ - -#include -#include - -#include "kgzldr.h" - -#define MEMSIZ 0x8000 /* Memory pool size */ - -int kgz_con; /* Console control */ - -static size_t memtot; /* Memory allocated: bytes */ -static u_int memcnt; /* Memory allocated: blocks */ - -/* - * Library functions required by inflate(). - */ - -/* - * Allocate memory block. - */ -unsigned char * -kzipmalloc(int size) -{ - static u_char mem[MEMSIZ]; - void *ptr; - - if (memtot + size > MEMSIZ) - return NULL; - ptr = mem + memtot; - memtot += size; - memcnt++; - return ptr; -} - -/* - * Free allocated memory block. - */ -void -kzipfree(void *ptr) -{ - memcnt--; - if (!memcnt) - memtot = 0; -} - -/* - * Write a string to the console. - */ -void -putstr(const char *str) -{ - int c; - - while ((c = *str++)) { - if (kgz_con & KGZ_CRT) - crt_putchr(c); - if (kgz_con & KGZ_SIO) - sio_putchr(c); - } -} diff --git a/sys/boot/pc32/kgzldr/sio.s b/sys/boot/pc32/kgzldr/sio.s deleted file mode 100644 index df02663516..0000000000 --- a/sys/boot/pc32/kgzldr/sio.s +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (c) 1999 Global Technology Associates, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. 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. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -# -# From: sio.s 1.3 1999/01/10 14:48:03 rnordier -# $FreeBSD: src/sys/boot/i386/kgzldr/sio.s,v 1.5 2002/09/30 20:37:57 peter Exp $ -# $DragonFly: src/sys/boot/pc32/kgzldr/sio.s,v 1.3 2003/11/10 06:08:35 dillon Exp $ -# - - .globl sio_putchr - -# void sio_putchr(int c) - -sio_putchr: movw $SIO_PRT+0x5,%dx # Line status reg - xor %ecx,%ecx # Timeout - movb $0x40,%ch # counter -sio_putchr.1: inb %dx,%al # Transmitter - testb $0x20,%al # buffer empty? - loopz sio_putchr.1 # No - jz sio_putchr.2 # If timeout - movb 0x4(%esp,1),%al # Get character - subb $0x5,%dl # Transmitter hold reg - outb %al,%dx # Write character -sio_putchr.2: ret # To caller diff --git a/sys/boot/pc32/kgzldr/start.s b/sys/boot/pc32/kgzldr/start.s deleted file mode 100644 index fec9300df5..0000000000 --- a/sys/boot/pc32/kgzldr/start.s +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright (c) 1999 Global Technology Associates, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. 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. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. -# -# $FreeBSD: src/sys/boot/i386/kgzldr/start.s,v 1.4 2002/09/17 01:48:55 peter Exp $ -# $DragonFly: src/sys/boot/pc32/kgzldr/start.s,v 1.3 2003/11/10 06:08:35 dillon Exp $ -# - - .set entry,0x10 # kgz.entry - - .globl _start - -# C startup code for kgzldr. - -_start: cld # String ops inc - movl $_edata,%edi # Start of bss - movl $_end,%ecx # Compute - subl %edi,%ecx # size - xorl %eax,%eax # Zero - rep # Clear - stosb # bss - pushl 0x4(%esp) # Pass howto flags - call boot # Call C code - popl %ecx # Clear stack - jmp *kgz+entry # To loaded code -- 2.41.0