binaryPI: Drop CAR teardown without POSTCAR_STAGE
[coreboot.git] / src / drivers / amd / agesa / exit_car.S
blobf9d056e599713621fe3872d5943635517f70ea18
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2011 Advanced Micro Devices, Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  */
16 #include <gcccar.inc>
17 #include <cpu/x86/cache.h>
19 .code32
20 .globl chipset_teardown_car
22 chipset_teardown_car:
23         pop     %esp
25         /* Disable cache */
26         movl    %cr0, %eax
27         orl     $CR0_CacheDisable, %eax
28         movl    %eax, %cr0
30         AMD_DISABLE_STACK
32         /* enable cache */
33         movl    %cr0, %eax
34         andl    $(~(CR0_CD | CR0_NW)), %eax
35         movl    %eax, %cr0
37         jmp     *%esp