All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 23/82] x86: Use unsigned long for address in table generation
Date: Sun, 25 Sep 2016 21:33:26 -0600	[thread overview]
Message-ID: <1474860866-16406-24-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1474860866-16406-1-git-send-email-sjg@chromium.org>

We should use unsigned long rather than u32 for addresses. Update this so
that the table-generation code builds correctly on 64-bit machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/x86/cpu/irq.c                | 2 +-
 arch/x86/include/asm/acpi_table.h | 2 +-
 arch/x86/include/asm/mpspec.h     | 2 +-
 arch/x86/include/asm/sfi.h        | 2 +-
 arch/x86/include/asm/smbios.h     | 2 +-
 arch/x86/include/asm/tables.h     | 2 +-
 arch/x86/lib/acpi_table.c         | 4 ++--
 arch/x86/lib/mpspec.c             | 2 +-
 arch/x86/lib/sfi.c                | 2 +-
 arch/x86/lib/smbios.c             | 2 +-
 arch/x86/lib/tables.c             | 2 +-
 drivers/misc/qfw.c                | 4 ++--
 12 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/arch/x86/cpu/irq.c b/arch/x86/cpu/irq.c
index df3cd0a..516d84a 100644
--- a/arch/x86/cpu/irq.c
+++ b/arch/x86/cpu/irq.c
@@ -263,7 +263,7 @@ int irq_router_probe(struct udevice *dev)
 	return irq_router_common_init(dev);
 }
 
-u32 write_pirq_routing_table(u32 addr)
+ulong write_pirq_routing_table(ulong addr)
 {
 	if (!pirq_routing_table)
 		return addr;
diff --git a/arch/x86/include/asm/acpi_table.h b/arch/x86/include/asm/acpi_table.h
index caff4d8..bbd80a1 100644
--- a/arch/x86/include/asm/acpi_table.h
+++ b/arch/x86/include/asm/acpi_table.h
@@ -316,4 +316,4 @@ int acpi_create_madt_lapic_nmi(struct acpi_madt_lapic_nmi *lapic_nmi,
 			       u8 cpu, u16 flags, u8 lint);
 u32 acpi_fill_madt(u32 current);
 void acpi_create_gnvs(struct acpi_global_nvs *gnvs);
-u32 write_acpi_tables(u32 start);
+ulong write_acpi_tables(ulong start);
diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h
index ad8eba9..146a4b0 100644
--- a/arch/x86/include/asm/mpspec.h
+++ b/arch/x86/include/asm/mpspec.h
@@ -456,6 +456,6 @@ int mp_determine_pci_dstirq(int bus, int dev, int func, int pirq);
  * @addr:	start address to write MP table
  * @return:	end address of MP table
  */
-u32 write_mp_table(u32 addr);
+ulong write_mp_table(ulong addr);
 
 #endif /* __ASM_MPSPEC_H */
diff --git a/arch/x86/include/asm/sfi.h b/arch/x86/include/asm/sfi.h
index d1f0f0c..d6c44c9 100644
--- a/arch/x86/include/asm/sfi.h
+++ b/arch/x86/include/asm/sfi.h
@@ -132,6 +132,6 @@ typedef int (*sfi_table_handler) (struct sfi_table_header *table);
  * @base:	Address to write table to
  * @return address to use for the next table
  */
-u32 write_sfi_table(u32 base);
+ulong write_sfi_table(ulong base);
 
 #endif /*_LINUX_SFI_H */
diff --git a/arch/x86/include/asm/smbios.h b/arch/x86/include/asm/smbios.h
index fd13f2d..4e508c3 100644
--- a/arch/x86/include/asm/smbios.h
+++ b/arch/x86/include/asm/smbios.h
@@ -231,6 +231,6 @@ typedef int (*smbios_write_type)(ulong *addr, int handle);
  * @addr:	start address to write SMBIOS table
  * @return:	end address of SMBIOS table
  */
-u32 write_smbios_table(u32 addr);
+ulong write_smbios_table(ulong addr);
 
 #endif /* _SMBIOS_H_ */
diff --git a/arch/x86/include/asm/tables.h b/arch/x86/include/asm/tables.h
index ae9f0d0..6154dd1 100644
--- a/arch/x86/include/asm/tables.h
+++ b/arch/x86/include/asm/tables.h
@@ -63,6 +63,6 @@ void write_tables(void);
  * @start:	start address to write PIRQ routing table
  * @return:	end address of PIRQ routing table
  */
-u32 write_pirq_routing_table(u32 start);
+ulong write_pirq_routing_table(ulong start);
 
 #endif /* _X86_TABLES_H_ */
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 7001e8b..355456d 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -327,7 +327,7 @@ static void enter_acpi_mode(int pm1_cnt)
  * QEMU's version of write_acpi_tables is defined in
  * arch/x86/cpu/qemu/acpi_table.c
  */
-u32 write_acpi_tables(u32 start)
+ulong write_acpi_tables(ulong start)
 {
 	u32 current;
 	struct acpi_rsdp *rsdp;
@@ -345,7 +345,7 @@ u32 write_acpi_tables(u32 start)
 	/* Align ACPI tables to 16 byte */
 	current = ALIGN(current, 16);
 
-	debug("ACPI: Writing ACPI tables at %x\n", start);
+	debug("ACPI: Writing ACPI tables at %lx\n", start);
 
 	/* We need at least an RSDP and an RSDT Table */
 	rsdp = (struct acpi_rsdp *)current;
diff --git a/arch/x86/lib/mpspec.c b/arch/x86/lib/mpspec.c
index 6ab43f1..516d7b3 100644
--- a/arch/x86/lib/mpspec.c
+++ b/arch/x86/lib/mpspec.c
@@ -365,7 +365,7 @@ static void mptable_add_lintsrc(struct mp_config_table *mc, int bus_isa)
 			 bus_isa, 0, MP_APIC_ALL, 1);
 }
 
-u32 write_mp_table(u32 addr)
+ulong write_mp_table(ulong addr)
 {
 	struct mp_config_table *mc;
 	int ioapic_id, ioapic_ver;
diff --git a/arch/x86/lib/sfi.c b/arch/x86/lib/sfi.c
index 3d36580..9564853 100644
--- a/arch/x86/lib/sfi.c
+++ b/arch/x86/lib/sfi.c
@@ -131,7 +131,7 @@ static int sfi_write_xsdt(struct table_info *tab)
 	return 0;
 }
 
-u32 write_sfi_table(u32 base)
+ulong write_sfi_table(ulong base)
 {
 	struct table_info table;
 
diff --git a/arch/x86/lib/smbios.c b/arch/x86/lib/smbios.c
index c338b82..975bbf2 100644
--- a/arch/x86/lib/smbios.c
+++ b/arch/x86/lib/smbios.c
@@ -221,7 +221,7 @@ static smbios_write_type smbios_write_funcs[] = {
 	smbios_write_type127
 };
 
-u32 write_smbios_table(u32 addr)
+ulong write_smbios_table(ulong addr)
 {
 	struct smbios_entry *se;
 	ulong tables;
diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c
index f92111e..351fc44 100644
--- a/arch/x86/lib/tables.c
+++ b/arch/x86/lib/tables.c
@@ -18,7 +18,7 @@
  * @addr:	start address to write the table
  * @return:	end address of the table
  */
-typedef u32 (*table_write)(u32 addr);
+typedef ulong (*table_write)(ulong addr);
 
 static table_write table_write_funcs[] = {
 #ifdef CONFIG_GENERATE_PIRQ_TABLE
diff --git a/drivers/misc/qfw.c b/drivers/misc/qfw.c
index d43d1d3..a8af9e0 100644
--- a/drivers/misc/qfw.c
+++ b/drivers/misc/qfw.c
@@ -32,7 +32,7 @@ static LIST_HEAD(fw_list);
  *          be ignored.
  * @return: 0 on success, or negative value on failure
  */
-static int bios_linker_allocate(struct bios_linker_entry *entry, u32 *addr)
+static int bios_linker_allocate(struct bios_linker_entry *entry, ulong *addr)
 {
 	uint32_t size, align;
 	struct fw_file *file;
@@ -147,7 +147,7 @@ static int bios_linker_add_checksum(struct bios_linker_entry *entry)
 }
 
 /* This function loads and patches ACPI tables provided by QEMU */
-u32 write_acpi_tables(u32 addr)
+ulong write_acpi_tables(ulong addr)
 {
 	int i, ret = 0;
 	struct fw_file *file;
-- 
2.8.0.rc3.226.g39d4020

  parent reply	other threads:[~2016-09-26  3:33 UTC|newest]

Thread overview: 135+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-26  3:33 [U-Boot] [PATCH 00/82] x86: Add initial support for 64-bit U-Boot Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 01/82] WIP: x86: Fix up types in smbios code Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 02/82] Add _image_binary_end section declaration Simon Glass
2016-10-11  3:15   ` Bin Meng
2016-10-11  3:41     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 03/82] bios_emulator: Fix cast for 64-bit compilation Simon Glass
2016-10-11  3:15   ` Bin Meng
2016-10-11  3:41     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 04/82] board_f: Drop the extra fdtdec_prepare_fdt() Simon Glass
2016-10-11  3:15   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 05/82] console: Don't enable CONFIG-CONSOLE_MUX, etc. in SPL Simon Glass
2016-10-11  3:15   ` Bin Meng
2016-10-17 22:17     ` Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 06/82] elf: Add the Elf64_Rela type Simon Glass
2016-10-11  3:15   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 07/82] mmc: Fix cast for 64-bit compilation Simon Glass
2016-10-10  6:37   ` Jaehoon Chung
2016-10-10  6:56     ` Bin Meng
2016-10-10  6:56   ` Bin Meng
2016-10-10 23:31     ` Jaehoon Chung
2016-09-26  3:33 ` [U-Boot] [PATCH 08/82] rtc: Use CONFIG_X86 instead of __I386__ Simon Glass
2016-10-11  3:15   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 09/82] spl: spi: Add a debug message if loading fails Simon Glass
2016-10-11  3:15   ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 10/82] spl: Makefile: Define SPL_ earlier Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 11/82] spl: Allow CPU drivers to be used in SPL Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 12/82] spl: Allow PCI " Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 13/82] spl: Allow RTC " Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 14/82] spl: Allow timer " Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 15/82] spl: Allow PCH " Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 16/82] spl: Don't create a BSS padding when it is separate Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 17/82] tpm: Tidy up use of size_t Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 18/82] usb: pci: Fix cast for 64-bit compilation Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 19/82] video: Use ulong for video frame buffer address Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 20/82] x86: Allow interrupts to be disabled in 64-bit mode Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 21/82] x86: Correct address casts in cpu code Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 22/82] x86: Correct address casts in interrupt code Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` Simon Glass [this message]
2016-09-26  3:33 ` [U-Boot] [PATCH 24/82] WIP: x86: Update mpspec to build on 64-bit machines Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 25/82] x86: Add basic support for U-Boot as a 64-bit EFI application Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 26/82] x86: ivybridge: Declare global data where it is used Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 27/82] x86: i2c: Fix cast of address to 32-bit value Simon Glass
2016-09-26  4:33   ` Heiko Schocher
2016-10-11  3:16   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 28/82] x86: Don't export interrupt handlers with x86_64 Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 29/82] x86: ivybridge: Add more debugging for failures Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 30/82] x86: ivybridge: Fix types for 64-bit compilation Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 31/82] x86: ivybridge: Fix PCH power setup Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 32/82] x86: ivybridge: Tidy up enable_clock_gating() for 64-bit Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 33/82] x86: dts: Mark serial as needed before relocation Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-10-17 22:17     ` Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 34/82] x86: fsp: Fix cast for 64-bit compilation Simon Glass
2016-10-11  3:16   ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 35/82] x86: Drop unused init_helper functions Simon Glass
2016-10-11  3:17   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 36/82] x86: lib: Fix types and casts for 64-bit compilation Simon Glass
2016-10-11  3:17   ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 37/82] x86: mrccache: Fix error handling in mrccache_get_region() Simon Glass
2016-10-11  3:17   ` Bin Meng
2016-10-11  3:42     ` Bin Meng
2016-09-26  3:33 ` [U-Boot] [PATCH 38/82] x86: Add Kconfig options to build 64-bit U-Boot Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 39/82] x86: Kconfig: Add location options for 16/32-bit init Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 40/82] x86: Use X86_16BIT_INIT instead of X86_RESET_VECTOR Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 41/82] x86: Use X86_32BIT_INIT " Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 42/82] x86: ivybridge: Allow 32-bit init to move to SPL Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 43/82] x86: Add 64-bit start-up code Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 44/82] x86: board_f: Update init sequence for 64-bit startup Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 45/82] x86: board_r: Set the global data pointer after relocation Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 46/82] x86: Do relocation before clearing BSS Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 47/82] x86: Refactor relocation to prepare for 64-bit Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 48/82] x86: Add support for 64-bit relocation Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 49/82] x86: Tidy up use of size_t in relocation Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 50/82] x86: Add an SPL implementation Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 51/82] x86: Move the i386 code into its own directory Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 52/82] x86: Add cpu code for x86_64 Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 53/82] x86: Support global_data on x86_64 Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 54/82] x86: Fix up CONFIG_X86_64 check Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 55/82] x86: Add a link script for 64-bit x86 Simon Glass
2016-09-26  3:33 ` [U-Boot] [PATCH 56/82] x86: Add a link script for SPL Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 57/82] x86: Add SPL build rules for start-up code Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 58/82] x86: Fix up byteorder.h for x86_64 Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 59/82] x86: Drop flag_is_changable() on x86_64 Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 60/82] x86: Fix up type sizes for 64-bit Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 61/82] x86: Mention the MRC region in the README Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 62/82] x86: ivybridge: Only do graphics init in 32-bit mode Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 63/82] x86: ivybridge: Skipt SATA init in SPL Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 64/82] x86: ivybridge: Provide a dummy SDRAM init for 64-bit Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 65/82] x86: Don't try to run the VGA BIOS in 64-bit mode Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 66/82] x86: Don't build call64 and setjmp on 64-bit Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 67/82] x86: Don't build cpu files which are not supported " Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 68/82] x86: Don't try to boot Linux from SPL Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 69/82] x86: Drop interrupt support in 64-bit mode Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 70/82] x86: Support jumping from SPL to U-Boot Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 71/82] x86: Move pirq_routing_table to global_data Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 72/82] x86: Move turbo_state " Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 73/82] x86: Change irq_already_routed to a local variable Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 74/82] x86: Move call64 to the i386 directory Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 75/82] x86: Move setjmp " Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 76/82] x86: Add a dummy setjmp implementation for x86_64 Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 77/82] x86: link: Add a text base for 64-bit U-Boot Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 78/82] x86: link: Add SPL declarations to the binman image Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 79/82] x86: link: Set up device tree for SPL Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 80/82] x86: link: Add build options " Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 81/82] x86: Update compile/link flags to support 64-bit U-Boot Simon Glass
2016-09-26  3:34 ` [U-Boot] [PATCH 82/82] x86: link: Switch to " Simon Glass
2016-10-11  5:36 ` [U-Boot] [PATCH 00/82] x86: Add initial support for " Bin Meng
2016-10-17 22:17   ` Simon Glass
2016-10-18  1:25     ` Bin Meng
2016-11-25 19:37       ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474860866-16406-24-git-send-email-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.