2010-11-27 10:40:16 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2004 Stefan Reinauer <stepan@openbios.org>
|
|
|
|
* Copyright (C) 2005 Nick Barker <nick.barker9@btinternet.com>
|
|
|
|
* Copyright (C) 2007 Rudolf Marek <r.marek@assembler.cz>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
Remove address from GPLv2 headers
As per discussion with lawyers[tm], it's not a good idea to
shorten the license header too much - not for legal reasons
but because there are tools that look for them, and giving
them a standard pattern simplifies things.
However, we got confirmation that we don't have to update
every file ever added to coreboot whenever the FSF gets a
new lease, but can drop the address instead.
util/kconfig is excluded because that's imported code that
we may want to synchronize every now and then.
$ find * -type f -exec sed -i "s:Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *MA[, ]*02110-1301[, ]*USA:Foundation, Inc.:" {} +
$ find * -type f -exec sed -i "s:Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA:Foundation, Inc.:" {} +
$ find * -type f -exec sed -i "s:Foundation, Inc., 59 Temple Place[-, ]*Suite 330, Boston, MA *02111-1307[, ]*USA:Foundation, Inc.:" {} +
$ find * -type f -exec sed -i "s:Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.:Foundation, Inc.:" {} +
$ find * -type f
-a \! -name \*.patch \
-a \! -name \*_shipped \
-a \! -name LICENSE_GPL \
-a \! -name LGPL.txt \
-a \! -name COPYING \
-a \! -name DISCLAIMER \
-exec sed -i "/Foundation, Inc./ N;s:Foundation, Inc.* USA\.* *:Foundation, Inc. :;s:Foundation, Inc. $:Foundation, Inc.:" {} +
Change-Id: Icc968a5a5f3a5df8d32b940f9cdb35350654bef9
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: http://review.coreboot.org/9233
Tested-by: build bot (Jenkins)
Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
2015-03-26 15:17:45 +01:00
|
|
|
* Foundation, Inc.
|
2010-11-27 10:40:16 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <console/console.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <arch/acpi.h>
|
|
|
|
#include <arch/acpigen.h>
|
|
|
|
#include <arch/smp/mpspec.h>
|
|
|
|
#include <device/device.h>
|
|
|
|
#include <device/pci_ids.h>
|
2010-12-08 22:40:12 +01:00
|
|
|
#include "i82371eb.h"
|
2010-11-27 10:40:16 +01:00
|
|
|
|
2010-12-08 22:40:12 +01:00
|
|
|
static int determine_total_number_of_cores(void)
|
|
|
|
{
|
|
|
|
device_t cpu;
|
|
|
|
int count = 0;
|
|
|
|
for(cpu = all_devices; cpu; cpu = cpu->next) {
|
|
|
|
if ((cpu->path.type != DEVICE_PATH_APIC) ||
|
2013-02-13 00:20:54 +01:00
|
|
|
(cpu->bus->dev->path.type != DEVICE_PATH_CPU_CLUSTER)) {
|
2010-12-08 22:40:12 +01:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (!cpu->enabled) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
return count;
|
|
|
|
}
|
|
|
|
|
|
|
|
void generate_cpu_entries(void)
|
|
|
|
{
|
|
|
|
int cpu, pcontrol_blk=DEFAULT_PMBASE+PCNTRL, plen=6;
|
|
|
|
int numcpus = determine_total_number_of_cores();
|
|
|
|
printk(BIOS_DEBUG, "Found %d CPU(s).\n", numcpus);
|
|
|
|
|
|
|
|
/* without the outer scope, furhter ssdt addition will end up
|
|
|
|
* within the processor statement */
|
2014-09-01 22:18:01 +02:00
|
|
|
acpigen_write_scope("\\_PR");
|
2010-12-08 22:40:12 +01:00
|
|
|
for (cpu=0; cpu < numcpus; cpu++) {
|
2014-09-01 22:18:01 +02:00
|
|
|
acpigen_write_processor(cpu, pcontrol_blk, plen);
|
|
|
|
acpigen_pop_len();
|
2010-12-08 22:40:12 +01:00
|
|
|
}
|
2014-09-01 22:18:01 +02:00
|
|
|
acpigen_pop_len();
|
2010-12-08 22:40:12 +01:00
|
|
|
}
|
|
|
|
|
2014-11-09 16:15:00 +01:00
|
|
|
unsigned long acpi_fill_mcfg(unsigned long current)
|
2010-11-27 10:40:16 +01:00
|
|
|
{
|
|
|
|
/* chipset doesn't have mmconfig */
|
|
|
|
return current;
|
|
|
|
}
|