diff mbox series

[1/4] hw/hppa: Sync hppa_hardware.h file with SeaBIOS sources

Message ID 20200727214608.32710-2-deller@gmx.de
State New
Headers show
Series Various fixes for hppa architecture | expand

Commit Message

Helge Deller July 27, 2020, 9:46 p.m. UTC
The hppa_hardware.h file is shared with SeaBIOS. Sync it.

Signed-off-by: Helge Deller <deller@gmx.de>
---
 hw/hppa/hppa_hardware.h | 6 ++++++
 hw/hppa/lasi.c          | 2 --
 2 files changed, 6 insertions(+), 2 deletions(-)

--
2.21.3

Comments

Richard Henderson July 29, 2020, 4:36 p.m. UTC | #1
On 7/27/20 2:46 PM, Helge Deller wrote:
> The hppa_hardware.h file is shared with SeaBIOS. Sync it.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> ---
>  hw/hppa/hppa_hardware.h | 6 ++++++
>  hw/hppa/lasi.c          | 2 --
>  2 files changed, 6 insertions(+), 2 deletions(-)

Acked-by: Richard Henderson <richard.henderson@linaro.org>

r~
Philippe Mathieu-Daudé July 29, 2020, 6:21 p.m. UTC | #2
On 7/27/20 11:46 PM, Helge Deller wrote:
> The hppa_hardware.h file is shared with SeaBIOS. Sync it.
> 
> Signed-off-by: Helge Deller <deller@gmx.de>
> ---
>  hw/hppa/hppa_hardware.h | 6 ++++++
>  hw/hppa/lasi.c          | 2 --
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/hppa/hppa_hardware.h b/hw/hppa/hppa_hardware.h
> index 4a2fe2df60..cdb7fa6240 100644
> --- a/hw/hppa/hppa_hardware.h
> +++ b/hw/hppa/hppa_hardware.h
> @@ -17,6 +17,7 @@
>  #define LASI_UART_HPA   0xffd05000
>  #define LASI_SCSI_HPA   0xffd06000
>  #define LASI_LAN_HPA    0xffd07000
> +#define LASI_RTC_HPA    0xffd09000

I find the line you are removing cleaner:

-#define LASI_RTC_HPA    (LASI_HPA + 0x9000)

"Offset in the LASI memory region".

Anyway not a blocker.

Having these values sorted would help.

>  #define LASI_LPT_HPA    0xffd02000
>  #define LASI_AUDIO_HPA  0xffd04000
>  #define LASI_PS2KBD_HPA 0xffd08000
> @@ -37,10 +38,15 @@
>  #define PORT_PCI_CMD    (PCI_HPA + DINO_PCI_ADDR)
>  #define PORT_PCI_DATA   (PCI_HPA + DINO_CONFIG_DATA)
> 
> +/* QEMU fw_cfg interface port */
> +#define QEMU_FW_CFG_IO_BASE     (MEMORY_HPA + 0x80)
> +
>  #define PORT_SERIAL1    (DINO_UART_HPA + 0x800)
>  #define PORT_SERIAL2    (LASI_UART_HPA + 0x800)
> 
>  #define HPPA_MAX_CPUS   8       /* max. number of SMP CPUs */
>  #define CPU_CLOCK_MHZ   250     /* emulate a 250 MHz CPU */
> 
> +#define CPU_HPA_CR_REG  7       /* store CPU HPA in cr7 (SeaBIOS internal) */
> +
>  #endif
> diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
> index 19974034f3..ffcbb988b8 100644
> --- a/hw/hppa/lasi.c
> +++ b/hw/hppa/lasi.c
> @@ -54,8 +54,6 @@
>  #define LASI_CHIP(obj) \
>      OBJECT_CHECK(LasiState, (obj), TYPE_LASI_CHIP)
> 
> -#define LASI_RTC_HPA    (LASI_HPA + 0x9000)
> -
>  typedef struct LasiState {
>      PCIHostState parent_obj;
> 
> --
> 2.21.3
> 
>
Helge Deller Aug. 1, 2020, 1:11 p.m. UTC | #3
On 29.07.20 20:21, Philippe Mathieu-Daudé wrote:
> On 7/27/20 11:46 PM, Helge Deller wrote:
>> The hppa_hardware.h file is shared with SeaBIOS. Sync it.
>>
>> Signed-off-by: Helge Deller <deller@gmx.de>
>> ---
>>  hw/hppa/hppa_hardware.h | 6 ++++++
>>  hw/hppa/lasi.c          | 2 --
>>  2 files changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/hppa/hppa_hardware.h b/hw/hppa/hppa_hardware.h
>> index 4a2fe2df60..cdb7fa6240 100644
>> --- a/hw/hppa/hppa_hardware.h
>> +++ b/hw/hppa/hppa_hardware.h
>> @@ -17,6 +17,7 @@
>>  #define LASI_UART_HPA   0xffd05000
>>  #define LASI_SCSI_HPA   0xffd06000
>>  #define LASI_LAN_HPA    0xffd07000
>> +#define LASI_RTC_HPA    0xffd09000
>
> I find the line you are removing cleaner:
> -#define LASI_RTC_HPA    (LASI_HPA + 0x9000)

Yes, but at least temporarily it should be consistent inside
the header file.

> "Offset in the LASI memory region".
>
> Anyway not a blocker.

Ok, thanks!

Helge


> Having these values sorted would help.
>
>>  #define LASI_LPT_HPA    0xffd02000
>>  #define LASI_AUDIO_HPA  0xffd04000
>>  #define LASI_PS2KBD_HPA 0xffd08000
>> @@ -37,10 +38,15 @@
>>  #define PORT_PCI_CMD    (PCI_HPA + DINO_PCI_ADDR)
>>  #define PORT_PCI_DATA   (PCI_HPA + DINO_CONFIG_DATA)
>>
>> +/* QEMU fw_cfg interface port */
>> +#define QEMU_FW_CFG_IO_BASE     (MEMORY_HPA + 0x80)
>> +
>>  #define PORT_SERIAL1    (DINO_UART_HPA + 0x800)
>>  #define PORT_SERIAL2    (LASI_UART_HPA + 0x800)
>>
>>  #define HPPA_MAX_CPUS   8       /* max. number of SMP CPUs */
>>  #define CPU_CLOCK_MHZ   250     /* emulate a 250 MHz CPU */
>>
>> +#define CPU_HPA_CR_REG  7       /* store CPU HPA in cr7 (SeaBIOS internal) */
>> +
>>  #endif
>> diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
>> index 19974034f3..ffcbb988b8 100644
>> --- a/hw/hppa/lasi.c
>> +++ b/hw/hppa/lasi.c
>> @@ -54,8 +54,6 @@
>>  #define LASI_CHIP(obj) \
>>      OBJECT_CHECK(LasiState, (obj), TYPE_LASI_CHIP)
>>
>> -#define LASI_RTC_HPA    (LASI_HPA + 0x9000)
>> -
>>  typedef struct LasiState {
>>      PCIHostState parent_obj;
>>
>> --
>> 2.21.3
>>
>>
>
diff mbox series

Patch

diff --git a/hw/hppa/hppa_hardware.h b/hw/hppa/hppa_hardware.h
index 4a2fe2df60..cdb7fa6240 100644
--- a/hw/hppa/hppa_hardware.h
+++ b/hw/hppa/hppa_hardware.h
@@ -17,6 +17,7 @@ 
 #define LASI_UART_HPA   0xffd05000
 #define LASI_SCSI_HPA   0xffd06000
 #define LASI_LAN_HPA    0xffd07000
+#define LASI_RTC_HPA    0xffd09000
 #define LASI_LPT_HPA    0xffd02000
 #define LASI_AUDIO_HPA  0xffd04000
 #define LASI_PS2KBD_HPA 0xffd08000
@@ -37,10 +38,15 @@ 
 #define PORT_PCI_CMD    (PCI_HPA + DINO_PCI_ADDR)
 #define PORT_PCI_DATA   (PCI_HPA + DINO_CONFIG_DATA)

+/* QEMU fw_cfg interface port */
+#define QEMU_FW_CFG_IO_BASE     (MEMORY_HPA + 0x80)
+
 #define PORT_SERIAL1    (DINO_UART_HPA + 0x800)
 #define PORT_SERIAL2    (LASI_UART_HPA + 0x800)

 #define HPPA_MAX_CPUS   8       /* max. number of SMP CPUs */
 #define CPU_CLOCK_MHZ   250     /* emulate a 250 MHz CPU */

+#define CPU_HPA_CR_REG  7       /* store CPU HPA in cr7 (SeaBIOS internal) */
+
 #endif
diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
index 19974034f3..ffcbb988b8 100644
--- a/hw/hppa/lasi.c
+++ b/hw/hppa/lasi.c
@@ -54,8 +54,6 @@ 
 #define LASI_CHIP(obj) \
     OBJECT_CHECK(LasiState, (obj), TYPE_LASI_CHIP)

-#define LASI_RTC_HPA    (LASI_HPA + 0x9000)
-
 typedef struct LasiState {
     PCIHostState parent_obj;