qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/1] Set TARGET_PAGE_BITS to be 10 instead of 8 bits


From: Dr. David Alan Gilbert
Subject: Re: [PATCH 1/1] Set TARGET_PAGE_BITS to be 10 instead of 8 bits
Date: Tue, 23 Mar 2021 12:46:37 +0000
User-agent: Mutt/2.0.5 (2021-01-21)

* Michael Rolnik (mrolnik@gmail.com) wrote:
> Signed-off-by: Michael Rolnik <mrolnik@gmail.com>
> ---
>  target/avr/cpu-param.h | 8 +-------
>  target/avr/helper.c    | 2 --
>  2 files changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/target/avr/cpu-param.h b/target/avr/cpu-param.h
> index 7ef4e7c679..9765a9d0db 100644
> --- a/target/avr/cpu-param.h
> +++ b/target/avr/cpu-param.h
> @@ -22,13 +22,7 @@
>  #define AVR_CPU_PARAM_H
>  
>  #define TARGET_LONG_BITS 32
> -/*
> - * TARGET_PAGE_BITS cannot be more than 8 bits because
> - * 1.  all IO registers occupy [0x0000 .. 0x00ff] address range, and they
> - *     should be implemented as a device and not memory
> - * 2.  SRAM starts at the address 0x0100

I don't know AVR; but that seems to say why you can't make it any larger
- how do you solve that?

Dave

> -#define TARGET_PAGE_BITS 8
> +#define TARGET_PAGE_BITS 10
>  #define TARGET_PHYS_ADDR_SPACE_BITS 24
>  #define TARGET_VIRT_ADDR_SPACE_BITS 24
>  #define NB_MMU_MODES 2
> diff --git a/target/avr/helper.c b/target/avr/helper.c
> index 35e1019594..da658afed3 100644
> --- a/target/avr/helper.c
> +++ b/target/avr/helper.c
> @@ -111,8 +111,6 @@ bool avr_cpu_tlb_fill(CPUState *cs, vaddr address, int 
> size,
>      MemTxAttrs attrs = {};
>      uint32_t paddr;
>  
> -    address &= TARGET_PAGE_MASK;
> -
>      if (mmu_idx == MMU_CODE_IDX) {
>          /* access to code in flash */
>          paddr = OFFSET_CODE + address;
> -- 
> 2.25.1
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]