mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
UPSTREAM: soc/braswell: fix ACPI table by recollecting TOLM
cherry-pick from Chromium, commit 8fbe1e7
On Braswell and Baytrail devices, by userland 'perf top',
observed demanding clocks on __vdso_clock_gettime() since
chromeos_3.18 kernel; besides, evaluated massive calling of
clock_gettime() cost, up to 700 ns in average.
It turns out that Linux kernel of map_vdso() first call of
remap_pfn_range() does not fall into reserve_pfn_range()
due to size parameter, instead it relies on lookup_memtype()
and potentially be failed to be identified as eligible RAM
resource because the function of pat_pagerange_is_ram() actually
walks through root's sibling.
Meanwhile, on current BSW (and BYT) firmware implementation
makes System RAM resources located on child leaf, combining all
of these factors makes the kernel treat the vvar page of vdso
as a uncached-minus one leading slow access in result.
This patch recollects TOLM accessing; as Aaron recalled some
core_msr_script turns off access to TOLM register, he suggests
to store tolm to avoid getting back a zero while setting acpi
nvs space.
Original-Change-Id: Iad4ffa542b22073cb087100a95169e2d2a52efcd
Original-Signed-off-by: Harry Pan <harry.pan@intel.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/368585
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
BUG=none
BRANCH=none
TEST=none
Change-Id: I60646b49268db162deac8614cc80e5712a358ad0
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 43dcbfd855
Original-Change-Id: Idc9765ec5c0920dc98baeb9267a89bec5cadd5a0
Original-Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/20060
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/531694
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
This commit is contained in:
parent
a136143a47
commit
b085c91e8b
1 changed files with 9 additions and 1 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <soc/ramstage.h>
|
||||
#include <soc/smm.h>
|
||||
#include <vendorcode/google/chromeos/chromeos.h>
|
||||
#include <stddef.h>
|
||||
|
||||
/*
|
||||
* Host Memory Map:
|
||||
|
@ -70,7 +71,14 @@
|
|||
|
||||
uint32_t nc_read_top_of_low_memory(void)
|
||||
{
|
||||
return iosf_bunit_read(BUNIT_BMBOUND) & ~((1 << 27) - 1);
|
||||
MAYBE_STATIC uint32_t tolm = 0;
|
||||
|
||||
if (tolm)
|
||||
return tolm;
|
||||
|
||||
tolm = iosf_bunit_read(BUNIT_BMBOUND) & ~((1 << 27) - 1);
|
||||
|
||||
return tolm;
|
||||
}
|
||||
|
||||
static void nc_read_resources(device_t dev)
|
||||
|
|
Loading…
Add table
Reference in a new issue