gem5  v20.1.0.0
Public Member Functions | Protected Attributes | List of all members
Loader::DtbFile Class Reference

#include <dtb_file.hh>

Inheritance diagram for Loader::DtbFile:
Loader::ImageFile

Public Member Functions

 DtbFile (const std::string &name)
 
 ~DtbFile ()
 
bool addBootCmdLine (const char *_args, size_t len)
 Adds the passed in Command Line options for the kernel to the proper location in the device tree. More...
 
Addr findReleaseAddr ()
 Parse the DTB file enough to find the provided release address and return it. More...
 
MemoryImage buildImage () const override
 

Protected Attributes

bool fileDataMmapped
 Bool marking if this dtb file has replaced the original read in DTB file with a new modified buffer. More...
 
uint8_t * fileData = nullptr
 
size_t length = 0
 
- Protected Attributes inherited from Loader::ImageFile
ImageFileDataPtr imageData
 

Additional Inherited Members

- Protected Member Functions inherited from Loader::ImageFile
 ImageFile (ImageFileDataPtr data)
 
virtual ~ImageFile ()
 

Detailed Description

Definition at line 42 of file dtb_file.hh.

Constructor & Destructor Documentation

◆ DtbFile()

Loader::DtbFile::DtbFile ( const std::string &  name)

Definition at line 43 of file dtb_file.cc.

References fileData, fileDataMmapped, Loader::ImageFile::imageData, length, and panic_if.

◆ ~DtbFile()

Loader::DtbFile::~DtbFile ( )

Definition at line 53 of file dtb_file.cc.

References fileData, and fileDataMmapped.

Member Function Documentation

◆ addBootCmdLine()

bool Loader::DtbFile::addBootCmdLine ( const char *  _args,
size_t  len 
)

Adds the passed in Command Line options for the kernel to the proper location in the device tree.

Parameters
_argscommand line to append
lenlength of the command line string
Returns
returns true on success, false otherwise

Definition at line 62 of file dtb_file.cc.

References fileData, fileDataMmapped, ArmISA::len, length, ArmISA::offset, and warn.

◆ buildImage()

MemoryImage Loader::DtbFile::buildImage ( ) const
overridevirtual

Implements Loader::ImageFile.

Definition at line 151 of file dtb_file.cc.

References fileData, fileDataMmapped, Loader::ImageFile::imageData, and length.

◆ findReleaseAddr()

Addr Loader::DtbFile::findReleaseAddr ( )

Parse the DTB file enough to find the provided release address and return it.

Returns
release address for SMP boot

Definition at line 130 of file dtb_file.cc.

References betoh(), ArmISA::fd, fileData, ArmISA::len, and ArmISA::offset.

Member Data Documentation

◆ fileData

uint8_t* Loader::DtbFile::fileData = nullptr
protected

Definition at line 49 of file dtb_file.hh.

Referenced by addBootCmdLine(), buildImage(), DtbFile(), findReleaseAddr(), and ~DtbFile().

◆ fileDataMmapped

bool Loader::DtbFile::fileDataMmapped
protected

Bool marking if this dtb file has replaced the original read in DTB file with a new modified buffer.

Definition at line 48 of file dtb_file.hh.

Referenced by addBootCmdLine(), buildImage(), DtbFile(), and ~DtbFile().

◆ length

size_t Loader::DtbFile::length = 0
protected

Definition at line 50 of file dtb_file.hh.

Referenced by addBootCmdLine(), buildImage(), and DtbFile().


The documentation for this class was generated from the following files:

Generated on Wed Sep 30 2020 14:03:06 for gem5 by doxygen 1.8.17