// SPDX-License-Identifier: GPL-2.0-or-later1/* -----------------------------------------------------------------------2*3* Copyright 2009 Intel Corporation; author H. Peter Anvin4*5* ----------------------------------------------------------------------- */67/*8* Simple helper function for initializing a register set.9*10* Note that this sets EFLAGS_CF in the input register set; this11* makes it easier to catch functions which do nothing but don't12* explicitly set CF.13*/1415#include "boot.h"16#include "string.h"1718void initregs(struct biosregs *reg)19{20memset(reg, 0, sizeof(*reg));21reg->eflags |= X86_EFLAGS_CF;22reg->ds = ds();23reg->es = ds();24reg->fs = fs();25reg->gs = gs();26}272829