e820.hh revision 6216:2f4020838149
19814Sandreas.hansson@arm.com/*
22292SN/A * Copyright (c) 2008 The Hewlett-Packard Development Company
310030SAli.Saidi@ARM.com * All rights reserved.
47597Sminkyu.jeong@arm.com *
57597Sminkyu.jeong@arm.com * Redistribution and use of this software in source and binary forms,
67597Sminkyu.jeong@arm.com * with or without modification, are permitted provided that the
77597Sminkyu.jeong@arm.com * following conditions are met:
87597Sminkyu.jeong@arm.com *
97597Sminkyu.jeong@arm.com * The software must be used only for Non-Commercial Use which means any
107597Sminkyu.jeong@arm.com * use which is NOT directed to receiving any direct monetary
117597Sminkyu.jeong@arm.com * compensation for, or commercial advantage from such use.  Illustrative
127597Sminkyu.jeong@arm.com * examples of non-commercial use are academic research, personal study,
137597Sminkyu.jeong@arm.com * teaching, education and corporate research & development.
147597Sminkyu.jeong@arm.com * Illustrative examples of commercial use are distributing products for
152292SN/A * commercial advantage and providing services using the software for
162292SN/A * commercial advantage.
172292SN/A *
182292SN/A * If you wish to use this software or functionality therein that may be
192292SN/A * covered by patents for commercial use, please contact:
202292SN/A *     Director of Intellectual Property Licensing
212292SN/A *     Office of Strategy and Technology
222292SN/A *     Hewlett-Packard Company
232292SN/A *     1501 Page Mill Road
242292SN/A *     Palo Alto, California  94304
252292SN/A *
262292SN/A * Redistributions of source code must retain the above copyright notice,
272292SN/A * this list of conditions and the following disclaimer.  Redistributions
282292SN/A * in binary form must reproduce the above copyright notice, this list of
292292SN/A * conditions and the following disclaimer in the documentation and/or
302292SN/A * other materials provided with the distribution.  Neither the name of
312292SN/A * the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
322292SN/A * contributors may be used to endorse or promote products derived from
332292SN/A * this software without specific prior written permission.  No right of
342292SN/A * sublicense is granted herewith.  Derivatives of the software and
352292SN/A * output created using the software may be prepared, but only for
362292SN/A * Non-Commercial Uses.  Derivatives of the software may be shared with
372292SN/A * others provided: (i) the others agree to abide by the list of
382292SN/A * conditions herein which includes the Non-Commercial Use restrictions;
392292SN/A * and (ii) such Derivatives of the software include the above copyright
402689Sktlim@umich.edu * notice to acknowledge the contribution from this software where
412689Sktlim@umich.edu * applicable, this list of conditions and the disclaimer below.
422689Sktlim@umich.edu *
432292SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
442292SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
459944Smatt.horsnell@ARM.com * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
469944Smatt.horsnell@ARM.com * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
479944Smatt.horsnell@ARM.com * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
488591Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
493326Sktlim@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
508229Snate@binkert.org * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
516658Snate@binkert.org * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
528887Sgeoffrey.blake@arm.com * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
532907Sktlim@umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
542292SN/A *
558232Snate@binkert.org * Authors: Gabe Black
568232Snate@binkert.org */
578232Snate@binkert.org
589527SMatt.Horsnell@arm.com#ifndef __ARCH_X86_BIOS_E820_HH__
592722Sktlim@umich.edu#define __ARCH_X86_BIOS_E820_HH__
602669Sktlim@umich.edu
612292SN/A#include <vector>
622669Sktlim@umich.edu
632678Sktlim@umich.edu#include "base/types.hh"
642678Sktlim@umich.edu#include "params/X86E820Entry.hh"
658581Ssteve.reinhardt@amd.com#include "params/X86E820Table.hh"
668581Ssteve.reinhardt@amd.com#include "sim/sim_object.hh"
672292SN/A
682292SN/Aclass Port;
692292SN/A
702669Sktlim@umich.edunamespace X86ISA
712292SN/A{
722678Sktlim@umich.edu    class E820Entry : public SimObject
732292SN/A    {
749444SAndreas.Sandberg@ARM.com      public:
759444SAndreas.Sandberg@ARM.com        Addr addr;
769444SAndreas.Sandberg@ARM.com        Addr size;
774319Sktlim@umich.edu        uint32_t type;
784319Sktlim@umich.edu
794319Sktlim@umich.edu      public:
804319Sktlim@umich.edu        typedef X86E820EntryParams Params;
814319Sktlim@umich.edu        E820Entry(Params *p) :
822678Sktlim@umich.edu            SimObject(p), addr(p->addr), size(p->size), type(p->range_type)
832678Sktlim@umich.edu        {}
842292SN/A    };
852678Sktlim@umich.edu
862678Sktlim@umich.edu    class E820Table : public SimObject
875336Shines@cs.fsu.edu    {
882678Sktlim@umich.edu      public:
894873Sstever@eecs.umich.edu        std::vector<E820Entry *> entries;
902678Sktlim@umich.edu
912292SN/A      public:
922678Sktlim@umich.edu        typedef X86E820TableParams Params;
932678Sktlim@umich.edu        E820Table(Params *p) : SimObject(p), entries(p->entries)
942678Sktlim@umich.edu        {}
952678Sktlim@umich.edu
962678Sktlim@umich.edu        void writeTo(Port * port, Addr countAddr, Addr addr);
972678Sktlim@umich.edu    };
987852SMatt.Horsnell@arm.com};
997852SMatt.Horsnell@arm.com
1002344SN/A#endif // __ARCH_X86_BIOS_E820_HH__
1012678Sktlim@umich.edu