📄 board.h
字号:
/* -*- C++ -*- */
/**
* Copyright (c) 2005 Zhejiang University, P.R.China
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
///==================================================
/**
* @file Board.h
*
* @brief Evaluation Board(Ebony)'s configuration
* More devices to be added;
*
* @author Chenfeng Zhou <ini_autumn@163.com>
*
* Created : <2005-02-24 16:37:04 by Cheney Chow>
* Last update: <2005-02-24 16:43:29 by Cheney Chow>
*
* $Id: Board.h,v 1.1 2005/06/16 06:01:43 qilj Exp $
*/
///==================================================
#ifndef _PPC_BOARD_H_
#define _PPC_BOARD_H_
#include "Core/Board.h"
#include "PPC.h"
namespace PPC
{
class PPC_API PPC_Board : public Core::Board_32Bit
{
public:
virtual ~PPC_Board() {}
virtual void io_do_cycle();
//! Loading filesystem(ext2, cramfs, etc)
bool load_fs(std::string name, Core::u32 addr);
//! prepare for ramdisk loading;
virtual bool prepare_rom();
virtual Core::Interrupt_Type get_highest_interrupt();
//! Dispatch read/write request to our devices region;
virtual Core::Memory_Result io_dispatch(Core::Memory_Access_Type type,
Core::u32 start, size_t size,
Core::Bytecode_Type & buffer);
//! device address space read;
Core::Memory_Result io_read(Core::u32 start, size_t size, Core::Bytecode_Type & buffer);
//! device address space write;
Core::Memory_Result io_write(Core::u32 start, size_t size, Core::Bytecode_Type & buffer);
virtual void on_create();
virtual void on_destroy();
virtual void on_reset() {}
virtual void poll_extern_exception(){}
virtual void on_interrupt(Core::Interrupt_Type){}
private:
//! IO Region map;
enum {UART_START = 0x40000200, UART_END = 0x40000208,
RTC_START = 0x48000000, RTC_END = 0x48002000,
UCOS_IO_START = 0x80000000, UCOS_IO_END = 0x80010000};
};
} // namespace PPC
#endif // _PPC_BOARD_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -