summaryrefslogtreecommitdiffstats
path: root/qemu/include/hw/misc/tmp105_regs.h
blob: 9b55abaf904e547e43b7763c7cefc60aef675c4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * Texas Instruments TMP105 Temperature Sensor I2C messages
 *
 * Browse the data sheet:
 *
 *    http://www.ti.com/lit/gpn/tmp105
 *
 * Copyright (C) 2012 Alex Horn <alex.horn@cs.ox.ac.uk>
 * Copyright (C) 2008-2012 Andrzej Zaborowski <balrogg@gmail.com>
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or
 * later. See the COPYING file in the top-level directory.
 */
#ifndef QEMU_TMP105_MSGS_H
#define QEMU_TMP105_MSGS_H

/**
 * TMP105Reg:
 * @TMP105_REG_TEMPERATURE: Temperature register
 * @TMP105_REG_CONFIG: Configuration register
 * @TMP105_REG_T_LOW: Low temperature register (also known as T_hyst)
 * @TMP105_REG_T_HIGH: High temperature register (also known as T_OS)
 *
 * The following temperature sensors are
 * compatible with the TMP105 registers:
 * - adt75
 * - ds1775
 * - ds75
 * - lm75
 * - lm75a
 * - max6625
 * - max6626
 * - mcp980x
 * - stds75
 * - tcn75
 * - tmp100
 * - tmp101
 * - tmp105
 * - tmp175
 * - tmp275
 * - tmp75
 **/
typedef enum TMP105Reg {
    TMP105_REG_TEMPERATURE = 0,
    TMP105_REG_CONFIG,
    TMP105_REG_T_LOW,
    TMP105_REG_T_HIGH,
} TMP105Reg;

#endif
0xc8000 - 0xcbfff * 0xcc000 - 0xcffff * 0xd0000 - 0xd3fff * 0xd4000 - 0xd7fff * 0xd8000 - 0xdbfff * 0xdc000 - 0xdffff * 0xe0000 - 0xe3fff Extended System BIOS Area Memory Segments * 0xe4000 - 0xe7fff * 0xe8000 - 0xebfff * 0xec000 - 0xeffff * * 0xf0000 - 0xfffff System BIOS Area Memory Segments */ #include "qemu-common.h" #include "exec/memory.h" #define SMRAM_C_BASE 0xa0000 #define SMRAM_C_END 0xc0000 #define SMRAM_C_SIZE 0x20000 #define PAM_EXPAN_BASE 0xc0000 #define PAM_EXPAN_SIZE 0x04000 #define PAM_EXBIOS_BASE 0xe0000 #define PAM_EXBIOS_SIZE 0x04000 #define PAM_BIOS_BASE 0xf0000 #define PAM_BIOS_END 0xfffff /* 64KB: Intel 3 series express chipset family p. 58*/ #define PAM_BIOS_SIZE 0x10000 /* PAM registers: log nibble and high nibble*/ #define PAM_ATTR_WE ((uint8_t)2) #define PAM_ATTR_RE ((uint8_t)1) #define PAM_ATTR_MASK ((uint8_t)3) /* SMRAM register */ #define SMRAM_D_OPEN ((uint8_t)(1 << 6)) #define SMRAM_D_CLS ((uint8_t)(1 << 5)) #define SMRAM_D_LCK ((uint8_t)(1 << 4)) #define SMRAM_G_SMRAME ((uint8_t)(1 << 3)) #define SMRAM_C_BASE_SEG_MASK ((uint8_t)0x7) #define SMRAM_C_BASE_SEG ((uint8_t)0x2) /* hardwired to b010 */ typedef struct PAMMemoryRegion { MemoryRegion alias[4]; /* index = PAM value */ unsigned current; } PAMMemoryRegion; void init_pam(DeviceState *dev, MemoryRegion *ram, MemoryRegion *system, MemoryRegion *pci, PAMMemoryRegion *mem, uint32_t start, uint32_t size); void pam_update(PAMMemoryRegion *mem, int idx, uint8_t val); #endif /* QEMU_PAM_H */