coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mem.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (c) 2004, 2008 IBM Corporation
3  *
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are
8  * met:
9  *
10  * Redistributions of source code must retain the above copyright
11  * notice, this list of conditions and the following disclaimer.
12  *
13  * Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer
15  * in the documentation and/or other materials provided with the
16  * distribution.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22  * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  *
30  * Contributors:
31  * IBM Corporation - initial implementation
32  *****************************************************************************/
33 
34 #ifndef _BIOSEMU_MEM_H_
35 #define _BIOSEMU_MEM_H_
36 #include <x86emu/x86emu.h>
37 #include <types.h>
38 
39 // read byte from memory
40 u8 my_rdb(u32 addr);
41 
42 //read word from memory
44 
45 //read long from memory
47 
48 //write byte to memory
49 void my_wrb(u32 addr, u8 val);
50 
51 //write word to memory
52 void my_wrw(u32 addr, u16 val);
53 
54 //write long to memory
55 void my_wrl(u32 addr, u32 val);
56 
57 #endif
static u32 addr
Definition: cirrus.c:14
void my_wrb(u32 addr, u8 val)
Definition: mem.c:363
u16 my_rdw(u32 addr)
Definition: mem.c:249
u32 my_rdl(u32 addr)
Definition: mem.c:300
void my_wrw(u32 addr, u16 val)
Definition: mem.c:388
u8 my_rdb(u32 addr)
Definition: mem.c:217
void my_wrl(u32 addr, u32 val)
Definition: mem.c:433
uint32_t u32
Definition: stdint.h:51
uint16_t u16
Definition: stdint.h:48
uint8_t u8
Definition: stdint.h:45
u8 val
Definition: sys.c:300