blob: e48c9b957447e7a84a7ab0161436f9091f382515 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Saket Sinha331141a2015-08-22 12:20:55 +05302/*
3 * Based on acpi.c from coreboot
4 *
5 * Copyright (C) 2015, Saket Sinha <saket.sinha89@gmail.com>
Bin Meng44256b02016-05-07 07:46:25 -07006 * Copyright (C) 2016, Bin Meng <bmeng.cn@gmail.com>
Saket Sinha331141a2015-08-22 12:20:55 +05307 */
8
9#include <common.h>
10#include <cpu.h>
11#include <dm.h>
12#include <dm/uclass-internal.h>
Andy Shevchenko87e95372017-07-21 22:32:02 +030013#include <version.h>
Bin Mengd9050c62016-06-17 02:13:16 -070014#include <asm/acpi/global_nvs.h>
Saket Sinha331141a2015-08-22 12:20:55 +053015#include <asm/acpi_table.h>
Andy Shevchenko13a5d872017-07-21 22:32:04 +030016#include <asm/ioapic.h>
Saket Sinha331141a2015-08-22 12:20:55 +053017#include <asm/lapic.h>
Andy Shevchenko13a5d872017-07-21 22:32:04 +030018#include <asm/mpspec.h>
Saket Sinha331141a2015-08-22 12:20:55 +053019#include <asm/tables.h>
Bin Mengd9050c62016-06-17 02:13:16 -070020#include <asm/arch/global_nvs.h>
Saket Sinha331141a2015-08-22 12:20:55 +053021
22/*
Bin Mengb063d5f2016-05-07 07:46:24 -070023 * IASL compiles the dsdt entries and writes the hex values
24 * to a C array AmlCode[] (see dsdt.c).
Saket Sinha331141a2015-08-22 12:20:55 +053025 */
26extern const unsigned char AmlCode[];
27
Andy Shevchenko66d3e632018-01-10 19:40:15 +020028/* ACPI RSDP address to be used in boot parameters */
Bin Menge1029252018-01-30 05:01:16 -080029static ulong acpi_rsdp_addr;
Andy Shevchenko66d3e632018-01-10 19:40:15 +020030
Bin Meng44256b02016-05-07 07:46:25 -070031static void acpi_write_rsdp(struct acpi_rsdp *rsdp, struct acpi_rsdt *rsdt,
32 struct acpi_xsdt *xsdt)
33{
34 memset(rsdp, 0, sizeof(struct acpi_rsdp));
35
36 memcpy(rsdp->signature, RSDP_SIG, 8);
37 memcpy(rsdp->oem_id, OEM_ID, 6);
38
39 rsdp->length = sizeof(struct acpi_rsdp);
40 rsdp->rsdt_address = (u32)rsdt;
41
42 /*
43 * Revision: ACPI 1.0: 0, ACPI 2.0/3.0/4.0: 2
44 *
45 * Some OSes expect an XSDT to be present for RSD PTR revisions >= 2.
46 * If we don't have an ACPI XSDT, force ACPI 1.0 (and thus RSD PTR
47 * revision 0)
48 */
49 if (xsdt == NULL) {
50 rsdp->revision = ACPI_RSDP_REV_ACPI_1_0;
51 } else {
52 rsdp->xsdt_address = (u64)(u32)xsdt;
53 rsdp->revision = ACPI_RSDP_REV_ACPI_2_0;
54 }
55
56 /* Calculate checksums */
57 rsdp->checksum = table_compute_checksum((void *)rsdp, 20);
58 rsdp->ext_checksum = table_compute_checksum((void *)rsdp,
59 sizeof(struct acpi_rsdp));
60}
61
62void acpi_fill_header(struct acpi_table_header *header, char *signature)
63{
64 memcpy(header->signature, signature, 4);
65 memcpy(header->oem_id, OEM_ID, 6);
66 memcpy(header->oem_table_id, OEM_TABLE_ID, 8);
Andy Shevchenko87e95372017-07-21 22:32:02 +030067 header->oem_revision = U_BOOT_BUILD_DATE;
Bin Meng44256b02016-05-07 07:46:25 -070068 memcpy(header->aslc_id, ASLC_ID, 4);
69}
70
71static void acpi_write_rsdt(struct acpi_rsdt *rsdt)
72{
73 struct acpi_table_header *header = &(rsdt->header);
74
75 /* Fill out header fields */
76 acpi_fill_header(header, "RSDT");
77 header->length = sizeof(struct acpi_rsdt);
Bin Mengf662fe42016-05-07 07:46:28 -070078 header->revision = 1;
Bin Meng44256b02016-05-07 07:46:25 -070079
80 /* Entries are filled in later, we come with an empty set */
81
82 /* Fix checksum */
83 header->checksum = table_compute_checksum((void *)rsdt,
84 sizeof(struct acpi_rsdt));
85}
86
87static void acpi_write_xsdt(struct acpi_xsdt *xsdt)
88{
89 struct acpi_table_header *header = &(xsdt->header);
90
91 /* Fill out header fields */
92 acpi_fill_header(header, "XSDT");
93 header->length = sizeof(struct acpi_xsdt);
Bin Mengf662fe42016-05-07 07:46:28 -070094 header->revision = 1;
Bin Meng44256b02016-05-07 07:46:25 -070095
96 /* Entries are filled in later, we come with an empty set */
97
98 /* Fix checksum */
99 header->checksum = table_compute_checksum((void *)xsdt,
100 sizeof(struct acpi_xsdt));
101}
102
Saket Sinha331141a2015-08-22 12:20:55 +0530103/**
Bin Meng44256b02016-05-07 07:46:25 -0700104 * Add an ACPI table to the RSDT (and XSDT) structure, recalculate length
105 * and checksum.
106 */
Saket Sinha331141a2015-08-22 12:20:55 +0530107static void acpi_add_table(struct acpi_rsdp *rsdp, void *table)
108{
109 int i, entries_num;
110 struct acpi_rsdt *rsdt;
111 struct acpi_xsdt *xsdt = NULL;
112
113 /* The RSDT is mandatory while the XSDT is not */
114 rsdt = (struct acpi_rsdt *)rsdp->rsdt_address;
115
116 if (rsdp->xsdt_address)
117 xsdt = (struct acpi_xsdt *)((u32)rsdp->xsdt_address);
118
119 /* This should always be MAX_ACPI_TABLES */
120 entries_num = ARRAY_SIZE(rsdt->entry);
121
122 for (i = 0; i < entries_num; i++) {
123 if (rsdt->entry[i] == 0)
124 break;
125 }
126
127 if (i >= entries_num) {
Bin Mengd2d22182016-05-07 07:46:12 -0700128 debug("ACPI: Error: too many tables\n");
Saket Sinha331141a2015-08-22 12:20:55 +0530129 return;
130 }
131
132 /* Add table to the RSDT */
133 rsdt->entry[i] = (u32)table;
134
135 /* Fix RSDT length or the kernel will assume invalid entries */
Bin Meng6a421582016-05-07 07:46:21 -0700136 rsdt->header.length = sizeof(struct acpi_table_header) +
Bin Meng44256b02016-05-07 07:46:25 -0700137 (sizeof(u32) * (i + 1));
Saket Sinha331141a2015-08-22 12:20:55 +0530138
139 /* Re-calculate checksum */
140 rsdt->header.checksum = 0;
141 rsdt->header.checksum = table_compute_checksum((u8 *)rsdt,
Bin Meng44256b02016-05-07 07:46:25 -0700142 rsdt->header.length);
Saket Sinha331141a2015-08-22 12:20:55 +0530143
144 /*
145 * And now the same thing for the XSDT. We use the same index as for
146 * now we want the XSDT and RSDT to always be in sync in U-Boot
147 */
148 if (xsdt) {
149 /* Add table to the XSDT */
150 xsdt->entry[i] = (u64)(u32)table;
151
152 /* Fix XSDT length */
Bin Meng6a421582016-05-07 07:46:21 -0700153 xsdt->header.length = sizeof(struct acpi_table_header) +
Bin Meng44256b02016-05-07 07:46:25 -0700154 (sizeof(u64) * (i + 1));
Saket Sinha331141a2015-08-22 12:20:55 +0530155
156 /* Re-calculate checksum */
157 xsdt->header.checksum = 0;
158 xsdt->header.checksum = table_compute_checksum((u8 *)xsdt,
159 xsdt->header.length);
160 }
161}
162
Bin Meng44256b02016-05-07 07:46:25 -0700163static void acpi_create_facs(struct acpi_facs *facs)
164{
165 memset((void *)facs, 0, sizeof(struct acpi_facs));
166
167 memcpy(facs->signature, "FACS", 4);
168 facs->length = sizeof(struct acpi_facs);
169 facs->hardware_signature = 0;
170 facs->firmware_waking_vector = 0;
171 facs->global_lock = 0;
172 facs->flags = 0;
173 facs->x_firmware_waking_vector_l = 0;
174 facs->x_firmware_waking_vector_h = 0;
175 facs->version = 1;
176}
177
Saket Sinha331141a2015-08-22 12:20:55 +0530178static int acpi_create_madt_lapic(struct acpi_madt_lapic *lapic,
Bin Meng44256b02016-05-07 07:46:25 -0700179 u8 cpu, u8 apic)
Saket Sinha331141a2015-08-22 12:20:55 +0530180{
Bin Meng44256b02016-05-07 07:46:25 -0700181 lapic->type = ACPI_APIC_LAPIC;
Saket Sinha331141a2015-08-22 12:20:55 +0530182 lapic->length = sizeof(struct acpi_madt_lapic);
Bin Meng44256b02016-05-07 07:46:25 -0700183 lapic->flags = LOCAL_APIC_FLAG_ENABLED;
Saket Sinha331141a2015-08-22 12:20:55 +0530184 lapic->processor_id = cpu;
185 lapic->apic_id = apic;
186
187 return lapic->length;
188}
189
Bin Meng3c5234e2016-05-07 07:46:30 -0700190int acpi_create_madt_lapics(u32 current)
Saket Sinha331141a2015-08-22 12:20:55 +0530191{
192 struct udevice *dev;
George McCollister5a49f872016-06-07 13:40:18 -0500193 int total_length = 0;
Saket Sinha331141a2015-08-22 12:20:55 +0530194
195 for (uclass_find_first_device(UCLASS_CPU, &dev);
196 dev;
197 uclass_find_next_device(&dev)) {
198 struct cpu_platdata *plat = dev_get_parent_platdata(dev);
George McCollister5a49f872016-06-07 13:40:18 -0500199 int length = acpi_create_madt_lapic(
200 (struct acpi_madt_lapic *)current,
201 plat->cpu_id, plat->cpu_id);
Bin Meng3c5234e2016-05-07 07:46:30 -0700202 current += length;
George McCollister5a49f872016-06-07 13:40:18 -0500203 total_length += length;
Bin Meng44256b02016-05-07 07:46:25 -0700204 }
205
George McCollister5a49f872016-06-07 13:40:18 -0500206 return total_length;
Saket Sinha331141a2015-08-22 12:20:55 +0530207}
208
Bin Meng44256b02016-05-07 07:46:25 -0700209int acpi_create_madt_ioapic(struct acpi_madt_ioapic *ioapic, u8 id,
210 u32 addr, u32 gsi_base)
Saket Sinha331141a2015-08-22 12:20:55 +0530211{
Bin Meng6a421582016-05-07 07:46:21 -0700212 ioapic->type = ACPI_APIC_IOAPIC;
Saket Sinha331141a2015-08-22 12:20:55 +0530213 ioapic->length = sizeof(struct acpi_madt_ioapic);
214 ioapic->reserved = 0x00;
215 ioapic->gsi_base = gsi_base;
216 ioapic->ioapic_id = id;
217 ioapic->ioapic_addr = addr;
218
219 return ioapic->length;
220}
221
222int acpi_create_madt_irqoverride(struct acpi_madt_irqoverride *irqoverride,
Bin Meng44256b02016-05-07 07:46:25 -0700223 u8 bus, u8 source, u32 gsirq, u16 flags)
Saket Sinha331141a2015-08-22 12:20:55 +0530224{
Bin Meng6a421582016-05-07 07:46:21 -0700225 irqoverride->type = ACPI_APIC_IRQ_SRC_OVERRIDE;
Saket Sinha331141a2015-08-22 12:20:55 +0530226 irqoverride->length = sizeof(struct acpi_madt_irqoverride);
227 irqoverride->bus = bus;
228 irqoverride->source = source;
229 irqoverride->gsirq = gsirq;
230 irqoverride->flags = flags;
231
232 return irqoverride->length;
233}
234
235int acpi_create_madt_lapic_nmi(struct acpi_madt_lapic_nmi *lapic_nmi,
Bin Meng44256b02016-05-07 07:46:25 -0700236 u8 cpu, u16 flags, u8 lint)
Saket Sinha331141a2015-08-22 12:20:55 +0530237{
Bin Meng6a421582016-05-07 07:46:21 -0700238 lapic_nmi->type = ACPI_APIC_LAPIC_NMI;
Saket Sinha331141a2015-08-22 12:20:55 +0530239 lapic_nmi->length = sizeof(struct acpi_madt_lapic_nmi);
240 lapic_nmi->flags = flags;
241 lapic_nmi->processor_id = cpu;
242 lapic_nmi->lint = lint;
243
244 return lapic_nmi->length;
245}
246
Andy Shevchenko13a5d872017-07-21 22:32:04 +0300247static int acpi_create_madt_irq_overrides(u32 current)
248{
249 struct acpi_madt_irqoverride *irqovr;
250 u16 sci_flags = MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_HIGH;
251 int length = 0;
252
253 irqovr = (void *)current;
254 length += acpi_create_madt_irqoverride(irqovr, 0, 0, 2, 0);
255
256 irqovr = (void *)(current + length);
257 length += acpi_create_madt_irqoverride(irqovr, 0, 9, 9, sci_flags);
258
259 return length;
260}
261
262__weak u32 acpi_fill_madt(u32 current)
263{
264 current += acpi_create_madt_lapics(current);
265
266 current += acpi_create_madt_ioapic((struct acpi_madt_ioapic *)current,
267 io_apic_read(IO_APIC_ID) >> 24, IO_APIC_ADDR, 0);
268
269 current += acpi_create_madt_irq_overrides(current);
270
271 return current;
272}
273
Saket Sinha331141a2015-08-22 12:20:55 +0530274static void acpi_create_madt(struct acpi_madt *madt)
275{
Bin Meng6a421582016-05-07 07:46:21 -0700276 struct acpi_table_header *header = &(madt->header);
Bin Menga1ec7db2016-05-07 07:46:26 -0700277 u32 current = (u32)madt + sizeof(struct acpi_madt);
Saket Sinha331141a2015-08-22 12:20:55 +0530278
279 memset((void *)madt, 0, sizeof(struct acpi_madt));
280
281 /* Fill out header fields */
Bin Mengb063d5f2016-05-07 07:46:24 -0700282 acpi_fill_header(header, "APIC");
Saket Sinha331141a2015-08-22 12:20:55 +0530283 header->length = sizeof(struct acpi_madt);
Bin Mengf662fe42016-05-07 07:46:28 -0700284 header->revision = 4;
Saket Sinha331141a2015-08-22 12:20:55 +0530285
286 madt->lapic_addr = LAPIC_DEFAULT_BASE;
Bin Meng6a421582016-05-07 07:46:21 -0700287 madt->flags = ACPI_MADT_PCAT_COMPAT;
Saket Sinha331141a2015-08-22 12:20:55 +0530288
289 current = acpi_fill_madt(current);
290
291 /* (Re)calculate length and checksum */
Bin Menga1ec7db2016-05-07 07:46:26 -0700292 header->length = current - (u32)madt;
Saket Sinha331141a2015-08-22 12:20:55 +0530293
294 header->checksum = table_compute_checksum((void *)madt, header->length);
295}
296
Andy Shevchenkoc1ae9802017-07-21 22:32:05 +0300297int acpi_create_mcfg_mmconfig(struct acpi_mcfg_mmconfig *mmconfig, u32 base,
298 u16 seg_nr, u8 start, u8 end)
Saket Sinha331141a2015-08-22 12:20:55 +0530299{
300 memset(mmconfig, 0, sizeof(*mmconfig));
Bin Meng6a421582016-05-07 07:46:21 -0700301 mmconfig->base_address_l = base;
302 mmconfig->base_address_h = 0;
Saket Sinha331141a2015-08-22 12:20:55 +0530303 mmconfig->pci_segment_group_number = seg_nr;
304 mmconfig->start_bus_number = start;
305 mmconfig->end_bus_number = end;
306
307 return sizeof(struct acpi_mcfg_mmconfig);
308}
309
Andy Shevchenkoc1ae9802017-07-21 22:32:05 +0300310__weak u32 acpi_fill_mcfg(u32 current)
Saket Sinha331141a2015-08-22 12:20:55 +0530311{
312 current += acpi_create_mcfg_mmconfig
313 ((struct acpi_mcfg_mmconfig *)current,
Bin Meng44256b02016-05-07 07:46:25 -0700314 CONFIG_PCIE_ECAM_BASE, 0x0, 0x0, 255);
Saket Sinha331141a2015-08-22 12:20:55 +0530315
316 return current;
317}
318
319/* MCFG is defined in the PCI Firmware Specification 3.0 */
320static void acpi_create_mcfg(struct acpi_mcfg *mcfg)
321{
Bin Meng6a421582016-05-07 07:46:21 -0700322 struct acpi_table_header *header = &(mcfg->header);
Bin Menga1ec7db2016-05-07 07:46:26 -0700323 u32 current = (u32)mcfg + sizeof(struct acpi_mcfg);
Saket Sinha331141a2015-08-22 12:20:55 +0530324
325 memset((void *)mcfg, 0, sizeof(struct acpi_mcfg));
326
327 /* Fill out header fields */
Bin Mengb063d5f2016-05-07 07:46:24 -0700328 acpi_fill_header(header, "MCFG");
Saket Sinha331141a2015-08-22 12:20:55 +0530329 header->length = sizeof(struct acpi_mcfg);
Bin Mengf662fe42016-05-07 07:46:28 -0700330 header->revision = 1;
Saket Sinha331141a2015-08-22 12:20:55 +0530331
332 current = acpi_fill_mcfg(current);
333
334 /* (Re)calculate length and checksum */
Bin Menga1ec7db2016-05-07 07:46:26 -0700335 header->length = current - (u32)mcfg;
Saket Sinha331141a2015-08-22 12:20:55 +0530336 header->checksum = table_compute_checksum((void *)mcfg, header->length);
337}
338
Miao Yan3b68c522016-01-20 01:57:06 -0800339/*
Andy Shevchenko4b05bac2018-01-10 19:33:10 +0200340 * QEMU's version of write_acpi_tables is defined in drivers/misc/qfw.c
Miao Yan3b68c522016-01-20 01:57:06 -0800341 */
Simon Glassca37a392017-01-16 07:03:35 -0700342ulong write_acpi_tables(ulong start)
Saket Sinha331141a2015-08-22 12:20:55 +0530343{
Bin Meng5c549102016-02-27 22:58:00 -0800344 u32 current;
Saket Sinha331141a2015-08-22 12:20:55 +0530345 struct acpi_rsdp *rsdp;
346 struct acpi_rsdt *rsdt;
347 struct acpi_xsdt *xsdt;
348 struct acpi_facs *facs;
Bin Meng6a421582016-05-07 07:46:21 -0700349 struct acpi_table_header *dsdt;
Saket Sinha331141a2015-08-22 12:20:55 +0530350 struct acpi_fadt *fadt;
351 struct acpi_mcfg *mcfg;
352 struct acpi_madt *madt;
Bin Mengd9050c62016-06-17 02:13:16 -0700353 int i;
Saket Sinha331141a2015-08-22 12:20:55 +0530354
355 current = start;
356
Bin Meng44256b02016-05-07 07:46:25 -0700357 /* Align ACPI tables to 16 byte */
Saket Sinha331141a2015-08-22 12:20:55 +0530358 current = ALIGN(current, 16);
359
Simon Glassca37a392017-01-16 07:03:35 -0700360 debug("ACPI: Writing ACPI tables at %lx\n", start);
Saket Sinha331141a2015-08-22 12:20:55 +0530361
362 /* We need at least an RSDP and an RSDT Table */
363 rsdp = (struct acpi_rsdp *)current;
364 current += sizeof(struct acpi_rsdp);
365 current = ALIGN(current, 16);
366 rsdt = (struct acpi_rsdt *)current;
367 current += sizeof(struct acpi_rsdt);
368 current = ALIGN(current, 16);
369 xsdt = (struct acpi_xsdt *)current;
370 current += sizeof(struct acpi_xsdt);
Bin Meng3d938d12016-05-07 07:46:27 -0700371 /*
372 * Per ACPI spec, the FACS table address must be aligned to a 64 byte
373 * boundary (Windows checks this, but Linux does not).
374 */
375 current = ALIGN(current, 64);
Saket Sinha331141a2015-08-22 12:20:55 +0530376
377 /* clear all table memory */
378 memset((void *)start, 0, current - start);
379
380 acpi_write_rsdp(rsdp, rsdt, xsdt);
381 acpi_write_rsdt(rsdt);
382 acpi_write_xsdt(xsdt);
383
384 debug("ACPI: * FACS\n");
385 facs = (struct acpi_facs *)current;
386 current += sizeof(struct acpi_facs);
387 current = ALIGN(current, 16);
388
389 acpi_create_facs(facs);
390
391 debug("ACPI: * DSDT\n");
Bin Meng6a421582016-05-07 07:46:21 -0700392 dsdt = (struct acpi_table_header *)current;
393 memcpy(dsdt, &AmlCode, sizeof(struct acpi_table_header));
Bin Mengd90434b2016-05-11 07:45:05 -0700394 current += sizeof(struct acpi_table_header);
395 memcpy((char *)current,
396 (char *)&AmlCode + sizeof(struct acpi_table_header),
397 dsdt->length - sizeof(struct acpi_table_header));
398 current += dsdt->length - sizeof(struct acpi_table_header);
Saket Sinha331141a2015-08-22 12:20:55 +0530399 current = ALIGN(current, 16);
400
Bin Mengd9050c62016-06-17 02:13:16 -0700401 /* Pack GNVS into the ACPI table area */
402 for (i = 0; i < dsdt->length; i++) {
403 u32 *gnvs = (u32 *)((u32)dsdt + i);
404 if (*gnvs == ACPI_GNVS_ADDR) {
405 debug("Fix up global NVS in DSDT to 0x%08x\n", current);
406 *gnvs = current;
407 break;
408 }
409 }
410
411 /* Update DSDT checksum since we patched the GNVS address */
412 dsdt->checksum = 0;
413 dsdt->checksum = table_compute_checksum((void *)dsdt, dsdt->length);
414
415 /* Fill in platform-specific global NVS variables */
416 acpi_create_gnvs((struct acpi_global_nvs *)current);
417 current += sizeof(struct acpi_global_nvs);
418 current = ALIGN(current, 16);
419
Saket Sinha331141a2015-08-22 12:20:55 +0530420 debug("ACPI: * FADT\n");
421 fadt = (struct acpi_fadt *)current;
422 current += sizeof(struct acpi_fadt);
423 current = ALIGN(current, 16);
424 acpi_create_fadt(fadt, facs, dsdt);
425 acpi_add_table(rsdp, fadt);
426
Saket Sinha331141a2015-08-22 12:20:55 +0530427 debug("ACPI: * MADT\n");
428 madt = (struct acpi_madt *)current;
429 acpi_create_madt(madt);
Bin Mengd90434b2016-05-11 07:45:05 -0700430 current += madt->header.length;
431 acpi_add_table(rsdp, madt);
Saket Sinha331141a2015-08-22 12:20:55 +0530432 current = ALIGN(current, 16);
433
Bin Meng44256b02016-05-07 07:46:25 -0700434 debug("ACPI: * MCFG\n");
435 mcfg = (struct acpi_mcfg *)current;
436 acpi_create_mcfg(mcfg);
Bin Mengd90434b2016-05-11 07:45:05 -0700437 current += mcfg->header.length;
438 acpi_add_table(rsdp, mcfg);
439 current = ALIGN(current, 16);
Bin Meng44256b02016-05-07 07:46:25 -0700440
Bin Mengd2d22182016-05-07 07:46:12 -0700441 debug("current = %x\n", current);
Saket Sinha331141a2015-08-22 12:20:55 +0530442
Andy Shevchenko66d3e632018-01-10 19:40:15 +0200443 acpi_rsdp_addr = (unsigned long)rsdp;
Bin Mengd2d22182016-05-07 07:46:12 -0700444 debug("ACPI: done\n");
Saket Sinha331141a2015-08-22 12:20:55 +0530445
Saket Sinha331141a2015-08-22 12:20:55 +0530446 return current;
447}
Bin Meng34bc74a2017-04-21 07:24:36 -0700448
Bin Menge1029252018-01-30 05:01:16 -0800449ulong acpi_get_rsdp_addr(void)
450{
451 return acpi_rsdp_addr;
452}