* ========== Copyright Header Begin ==========================================
* OpenSPARC T2 Processor File: ll_mod.h
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
* The above named program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 as published by the Free Software Foundation.
* The above named 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 work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
* ========== Copyright Header End ============================================
* Copyright 2004 by Sun Microsystems, Inc.
* @(#)ll_mod.h 1.3 04/08/04
#define TARGET_PAGE_SIZE 0x2000 /* This should _not_ be here.*/
#define TARGET_PAGE_OFFSET (TARGET_PAGE_SIZE - 1) /* Ditto. */
struct ll_rdce
*prev
, *next
;
char name
[LL_MAXNAMELEN
];
class LL
: public Module
, public genericPciDev
{
//mmi_instance_t instance;
struct ll_rdce
*rdce_head
;
struct ll_rdce
*rdce_tail
;
ll_structT
*allocation_obj();
int LL::reg_access(char *buf
, LWord paddr
, bool_t wr
);
void wr_control(uint32_t val
);
void wr_arg_addr(uint32_t val
);
void wr_res_addr(uint32_t val
);
void path_canon(char *canonpath
, const char *path
, const char *name
);
int rdc_init(struct ll_fhandle
*fhp
);
void dma_in(uint64_t vaddr
, void *data
, long count
);
void dma_out(uint64_t vaddr
, void *data
, long count
);
uint64_t get_translation(uint64_t vaddr
);
void crc(uint32_t *crcp
, uchar_t
*bp
, size_t n
);
LL(const char *modname
, const char *instance_name
);
public: // Module interface
bool parse_arg(const char *);
void module_added(mmi_instance_t
, const char*);
void module_deleted(mmi_instance_t
, const char*);
void *get_interface(const char*);
//pure virtual functions of genricPciDev class
mmi_instance_t
pciDev_getInstance();
const char * pciDev_getName();
void pciDev_confAccessCb(bool_t wr
, uint64_t offset
, uint8_t size
);
//override the pciTarget_mem32access function
pciXactnStatus
pciTarget_mem32access(uint64_t offset
, bool wr
,uint64_t * buf
, uint8_t size
);