/* -----------------------------------------------------------------------1*2* Copyright 2009 Intel Corporation; author H. Peter Anvin3*4* This file is part of the Linux kernel, and is made available under5* the terms of the GNU General Public License version 2 or (at your6* option) any later version; incorporated herein by reference.7*8* ----------------------------------------------------------------------- */910/*11* Simple helper function for initializing a register set.12*13* Note that this sets EFLAGS_CF in the input register set; this14* makes it easier to catch functions which do nothing but don't15* explicitly set CF.16*/1718#include "boot.h"1920void initregs(struct biosregs *reg)21{22memset(reg, 0, sizeof *reg);23reg->eflags |= X86_EFLAGS_CF;24reg->ds = ds();25reg->es = ds();26reg->fs = fs();27reg->gs = gs();28}293031