Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/philmd-gitlab/tags/mips-2021022…
Browse files Browse the repository at this point in the history
…1' into staging

MIPS patches queue

- Drop redundant struct MemmapEntry (Bin)
- Fix for Coverity CID 1438965 and 1438967 (Jiaxun)
- Add MIPS bootloader API (Jiaxun)
- Use MIPS bootloader API on fuloong2e and boston machines (Jiaxun)
- Add PMON test for Loongson-3A1000 CPU (Jiaxun)
- Convert to translator API (Philippe)
- MMU cleanups (Philippe)
- Promote 128-bit multimedia registers as global ones (Philippe)
- Various cleanups/fixes on the VT82C686B southbridge (Zoltan)

# gpg: Signature made Sun 21 Feb 2021 18:43:57 GMT
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* remotes/philmd-gitlab/tags/mips-20210221: (43 commits)
  vt82c686: Fix superio_cfg_{read,write}() functions
  vt82c686: Log superio_cfg unimplemented accesses
  vt82c686: Simplify by returning earlier
  vt82c686: Reduce indentation by returning early
  vt82c686: Remove index field of SuperIOConfig
  vt82c686: Move creation of ISA devices to the ISA bridge
  vt82c686: Simplify vt82c686b_realize()
  vt82c686: Make vt82c686b-pm an abstract base class and add vt8231-pm based on it
  vt82c686: Set user_creatable=false for VT82C686B_PM
  vt82c686: Fix up power management io base and config
  vt82c686: Correctly reset all registers to default values on reset
  vt82c686: Correct vt82c686-pm I/O size
  vt82c686: Make vt82c686-pm an I/O tracing region
  vt82c686: Fix SMBus IO base and configuration registers
  vt82c686: Reorganise code
  vt82c686: Move superio memory region to SuperIOConfig struct
  target/mips: Use GPR move functions in gen_HILO1_tx79()
  target/mips: Introduce gen_load_gpr_hi() / gen_store_gpr_hi() helpers
  target/mips: Rename 128-bit upper halve GPR registers
  target/mips: Promote 128-bit multimedia registers as global ones
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Feb 21, 2021
2 parents 4115aec + cc2b455 commit 00d8ba9
Show file tree
Hide file tree
Showing 21 changed files with 710 additions and 420 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Expand Up @@ -1183,6 +1183,7 @@ F: hw/intc/loongson_liointc.c
F: hw/mips/loongson3_bootp.c
F: hw/mips/loongson3_bootp.h
F: hw/mips/loongson3_virt.c
F: tests/acceptance/machine_mips_loongson3v.py

Boston
M: Paul Burton <paulburton@kernel.org>
Expand Down
16 changes: 13 additions & 3 deletions hw/intc/loongson_liointc.c
Expand Up @@ -41,7 +41,7 @@
#define R_IEN_CLR 0x2c
#define R_ISR_SIZE 0x8
#define R_START 0x40
#define R_END 0x64
#define R_END (R_START + R_ISR_SIZE * NUM_CORES)

struct loongson_liointc {
SysBusDevice parent_obj;
Expand Down Expand Up @@ -125,7 +125,12 @@ liointc_read(void *opaque, hwaddr addr, unsigned int size)
}

if (addr >= R_START && addr < R_END) {
int core = (addr - R_START) / R_ISR_SIZE;
hwaddr offset = addr - R_START;
int core = offset / R_ISR_SIZE;

if (offset % R_ISR_SIZE) {
goto out;
}
r = p->per_core_isr[core];
goto out;
}
Expand Down Expand Up @@ -169,7 +174,12 @@ liointc_write(void *opaque, hwaddr addr,
}

if (addr >= R_START && addr < R_END) {
int core = (addr - R_START) / R_ISR_SIZE;
hwaddr offset = addr - R_START;
int core = offset / R_ISR_SIZE;

if (offset % R_ISR_SIZE) {
goto out;
}
p->per_core_isr[core] = value;
goto out;
}
Expand Down
2 changes: 2 additions & 0 deletions hw/isa/trace-events
Expand Up @@ -17,5 +17,7 @@ apm_io_write(uint8_t addr, uint8_t val) "write addr=0x%x val=0x%02x"
# vt82c686.c
via_isa_write(uint32_t addr, uint32_t val, int len) "addr 0x%x val 0x%x len 0x%x"
via_pm_write(uint32_t addr, uint32_t val, int len) "addr 0x%x val 0x%x len 0x%x"
via_pm_io_read(uint32_t addr, uint32_t val, int len) "addr 0x%x val 0x%x len 0x%x"
via_pm_io_write(uint32_t addr, uint32_t val, int len) "addr 0x%x val 0x%x len 0x%x"
via_superio_read(uint8_t addr, uint8_t val) "addr 0x%x val 0x%x"
via_superio_write(uint8_t addr, uint32_t val) "addr 0x%x val 0x%x"

0 comments on commit 00d8ba9

Please sign in to comment.