linux.hh revision 4188
12579SN/A/*
22579SN/A * Copyright (c) 2003-2005 The Regents of The University of Michigan
32579SN/A * All rights reserved.
42579SN/A *
52579SN/A * Redistribution and use in source and binary forms, with or without
62579SN/A * modification, are permitted provided that the following conditions are
72579SN/A * met: redistributions of source code must retain the above copyright
82579SN/A * notice, this list of conditions and the following disclaimer;
92579SN/A * redistributions in binary form must reproduce the above copyright
102579SN/A * notice, this list of conditions and the following disclaimer in the
112579SN/A * documentation and/or other materials provided with the distribution;
122579SN/A * neither the name of the copyright holders nor the names of its
132579SN/A * contributors may be used to endorse or promote products derived from
142579SN/A * this software without specific prior written permission.
152579SN/A *
162579SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
172579SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
182579SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
192579SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
202579SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
212579SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
222579SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
232579SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
242579SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
252579SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
262579SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * Authors: Gabe Black
292579SN/A */
302579SN/A
312599SN/A#ifndef __ARCH_SPARC_LINUX_LINUX_HH__
322599SN/A#define __ARCH_SPARC_LINUX_LINUX_HH__
332579SN/A
342579SN/A#include "kern/linux/linux.hh"
352579SN/A
362579SN/Aclass SparcLinux : public Linux
372579SN/A{
382579SN/A  public:
392579SN/A
403113Sgblack@eecs.umich.edu    typedef struct {
413113Sgblack@eecs.umich.edu        uint32_t st_dev;
423113Sgblack@eecs.umich.edu        char __pad1[4];
433113Sgblack@eecs.umich.edu        uint64_t st_ino;
443113Sgblack@eecs.umich.edu        uint32_t st_mode;
453113Sgblack@eecs.umich.edu        uint16_t st_nlink;
463113Sgblack@eecs.umich.edu        uint32_t st_uid;
473113Sgblack@eecs.umich.edu        uint32_t st_gid;
483113Sgblack@eecs.umich.edu        uint32_t st_rdev;
493113Sgblack@eecs.umich.edu        char __pad2[4];
503113Sgblack@eecs.umich.edu        int64_t st_size;
513113Sgblack@eecs.umich.edu        int64_t st_atimeX;
523113Sgblack@eecs.umich.edu        int64_t st_mtimeX;
533113Sgblack@eecs.umich.edu        int64_t st_ctimeX;
543113Sgblack@eecs.umich.edu        int64_t st_blksize;
553113Sgblack@eecs.umich.edu        int64_t st_blocks;
563113Sgblack@eecs.umich.edu        uint64_t __unused4[2];
573113Sgblack@eecs.umich.edu    } tgt_stat;
583113Sgblack@eecs.umich.edu
592579SN/A    static OpenFlagTransTable openFlagTable[];
602579SN/A
612579SN/A    static const int TGT_O_RDONLY	= 0x00000000;	//!< O_RDONLY
622579SN/A    static const int TGT_O_WRONLY	= 0x00000001;	//!< O_WRONLY
632579SN/A    static const int TGT_O_RDWR	        = 0x00000002;	//!< O_RDWR
642579SN/A    static const int TGT_O_NONBLOCK     = 0x00004000;	//!< O_NONBLOCK
652579SN/A    static const int TGT_O_APPEND	= 0x00000008;	//!< O_APPEND
662579SN/A    static const int TGT_O_CREAT	= 0x00000200;	//!< O_CREAT
672579SN/A    static const int TGT_O_TRUNC	= 0x00000400;	//!< O_TRUNC
682579SN/A    static const int TGT_O_EXCL	        = 0x00000800;	//!< O_EXCL
692579SN/A    static const int TGT_O_NOCTTY	= 0x00008000;	//!< O_NOCTTY
702579SN/A    static const int TGT_O_SYNC	        = 0x00002000;	//!< O_SYNC
712579SN/A//    static const int TGT_O_DRD	        = 0x00010000;	//!< O_DRD
722579SN/A//    static const int TGT_O_DIRECTIO     = 0x00020000;	//!< O_DIRECTIO
732579SN/A//    static const int TGT_O_CACHE	= 0x00002000;	//!< O_CACHE
742579SN/A//    static const int TGT_O_DSYNC	= 0x00008000;	//!< O_DSYNC
752579SN/A//    static const int TGT_O_RSYNC	= 0x00040000;	//!< O_RSYNC
762579SN/A
772579SN/A    static const int NUM_OPEN_FLAGS;
782579SN/A
792579SN/A    static const unsigned TGT_MAP_ANONYMOUS = 0x20;
802579SN/A};
812579SN/A
824188Sgblack@eecs.umich.educlass Sparc32Linux : public SparcLinux
834188Sgblack@eecs.umich.edu{
844188Sgblack@eecs.umich.edu  public:
854188Sgblack@eecs.umich.edu
864188Sgblack@eecs.umich.edu    typedef struct {
874188Sgblack@eecs.umich.edu        uint64_t st_dev;
884188Sgblack@eecs.umich.edu        uint64_t st_ino;
894188Sgblack@eecs.umich.edu        uint32_t st_mode;
904188Sgblack@eecs.umich.edu        uint32_t st_nlink;
914188Sgblack@eecs.umich.edu        uint32_t st_uid;
924188Sgblack@eecs.umich.edu        uint32_t st_gid;
934188Sgblack@eecs.umich.edu        uint64_t st_rdev;
944188Sgblack@eecs.umich.edu        uint8_t __pad3[8];
954188Sgblack@eecs.umich.edu        int64_t st_size;
964188Sgblack@eecs.umich.edu        int32_t st_blksize;
974188Sgblack@eecs.umich.edu        uint8_t __pad4[8];
984188Sgblack@eecs.umich.edu        int64_t st_blocks;
994188Sgblack@eecs.umich.edu        uint64_t st_atimeX;
1004188Sgblack@eecs.umich.edu        uint64_t st_atime_nsec;
1014188Sgblack@eecs.umich.edu        uint64_t st_mtimeX;
1024188Sgblack@eecs.umich.edu        uint64_t st_mtime_nsec;
1034188Sgblack@eecs.umich.edu        uint64_t st_ctimeX;
1044188Sgblack@eecs.umich.edu        uint64_t st_ctime_nsec;
1054188Sgblack@eecs.umich.edu        uint32_t __unused4;
1064188Sgblack@eecs.umich.edu        uint32_t __unused5;
1074188Sgblack@eecs.umich.edu    } tgt_stat64;
1084188Sgblack@eecs.umich.edu};
1094188Sgblack@eecs.umich.edu
1102579SN/A#endif
111