Skip to content

Commit

Permalink
hdata: Move 'HRMOR_BIT' macro to header file
Browse files Browse the repository at this point in the history
Its already defined twice. And soon I want to use in few other place.
Lets move it to header file.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
Vasant Hegde authored and stewartsmith committed Apr 11, 2018
1 parent e7a2da8 commit 9f85e40
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 0 additions & 2 deletions hdata/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,6 @@ static struct dt_node *add_hb_reserve_node(const char *name, u64 start, u64 end)
return node;
}

#define HRMOR_BIT (1ul << 63)

static void get_hb_reserved_mem(struct HDIF_common_hdr *ms_vpd)
{
const struct msvpd_hb_reserved_mem *hb_resv_mem;
Expand Down
5 changes: 2 additions & 3 deletions hdata/spira.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,15 @@ __section(".cpuctrl.data") struct cpu_ctl_init_data cpu_ctl_init_data = {
* To help the FSP distinguishing between TCE tokens and actual physical
* addresses, we set the top bit to 1 on physical addresses
*/
#define ADDR_TOP_BIT (1ul << 63)

__section(".mdst.data") struct dump_mdst_table init_mdst_table[2] = {
{
.addr = CPU_TO_BE64(INMEM_CON_START | ADDR_TOP_BIT),
.addr = CPU_TO_BE64(INMEM_CON_START | HRMOR_BIT),
.type = CPU_TO_BE32(DUMP_REGION_CONSOLE),
.size = CPU_TO_BE32(INMEM_CON_LEN),
},
{
.addr = CPU_TO_BE64(HBRT_CON_START | ADDR_TOP_BIT),
.addr = CPU_TO_BE64(HBRT_CON_START | HRMOR_BIT),
.type = CPU_TO_BE32(DUMP_REGION_HBRT_LOG),
.size = CPU_TO_BE32(HBRT_CON_LEN),
},
Expand Down
6 changes: 6 additions & 0 deletions hdata/spira.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@

#include "hdif.h"

/*
* To help the FSP to distinguish between physical address and TCE mapped address.
* Also to help hostboot to distinguish physical and relative address.
*/
#define HRMOR_BIT (1ul << 63)

/*
* The SPIRA structure
*
Expand Down

0 comments on commit 9f85e40

Please sign in to comment.