Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
b9bf6a33
Commit
b9bf6a33
authored
Aug 29, 2003
by
Dave Jones
Committed by
Dave Jones
Aug 29, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[AGPGART] Make AMD64 GART driver marchitecture compliant.
X86_64 -> AMD64
parent
94e7b66d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
drivers/char/agp/agp.h
drivers/char/agp/agp.h
+6
-5
drivers/char/agp/amd-k8-agp.c
drivers/char/agp/amd-k8-agp.c
+10
-10
No files found.
drivers/char/agp/agp.h
View file @
b9bf6a33
...
...
@@ -297,11 +297,12 @@ struct agp_bridge_data {
#define AMD_TLBFLUSH 0x0c
/* In mmio region (32-bit register) */
#define AMD_CACHEENTRY 0x10
/* In mmio region (32-bit register) */
#define AMD_X86_64_GARTAPERTURECTL 0x90
#define AMD_X86_64_GARTAPERTUREBASE 0x94
#define AMD_X86_64_GARTTABLEBASE 0x98
#define AMD_X86_64_GARTCACHECTL 0x9c
#define AMD_X86_64_GARTEN 1<<0
/* AMD64 registers */
#define AMD64_GARTAPERTURECTL 0x90
#define AMD64_GARTAPERTUREBASE 0x94
#define AMD64_GARTTABLEBASE 0x98
#define AMD64_GARTCACHECTL 0x9c
#define AMD64_GARTEN 1<<0
/* ALi registers */
#define ALI_AGPCTRL 0xb8
...
...
drivers/char/agp/amd-k8-agp.c
View file @
b9bf6a33
...
...
@@ -46,9 +46,9 @@ static void flush_x86_64_tlb(struct pci_dev *dev)
{
u32
tmp
;
pci_read_config_dword
(
dev
,
AMD
_X86_
64_GARTCACHECTL
,
&
tmp
);
pci_read_config_dword
(
dev
,
AMD64_GARTCACHECTL
,
&
tmp
);
tmp
|=
INVGART
;
pci_write_config_dword
(
dev
,
AMD
_X86_
64_GARTCACHECTL
,
tmp
);
pci_write_config_dword
(
dev
,
AMD64_GARTCACHECTL
,
tmp
);
}
static
void
amd_x86_64_tlbflush
(
struct
agp_memory
*
temp
)
...
...
@@ -135,7 +135,7 @@ static int amd_x86_64_fetch_size(void)
if
(
dev
==
NULL
)
return
0
;
pci_read_config_dword
(
dev
,
AMD
_X86_
64_GARTAPERTURECTL
,
&
temp
);
pci_read_config_dword
(
dev
,
AMD64_GARTAPERTURECTL
,
&
temp
);
temp
=
(
temp
&
0xe
);
values
=
A_SIZE_32
(
x86_64_aperture_sizes
);
...
...
@@ -162,7 +162,7 @@ static u64 amd_x86_64_configure (struct pci_dev *hammer, u64 gatt_table)
u64
addr
,
aper_base
;
/* Address to map to */
pci_read_config_dword
(
hammer
,
AMD
_X86_
64_GARTAPERTUREBASE
,
&
tmp
);
pci_read_config_dword
(
hammer
,
AMD64_GARTAPERTUREBASE
,
&
tmp
);
aperturebase
=
tmp
<<
25
;
aper_base
=
(
aperturebase
&
PCI_BASE_ADDRESS_MEM_MASK
);
...
...
@@ -171,13 +171,13 @@ static u64 amd_x86_64_configure (struct pci_dev *hammer, u64 gatt_table)
addr
>>=
12
;
tmp
=
(
u32
)
addr
<<
4
;
tmp
&=
~
0xf
;
pci_write_config_dword
(
hammer
,
AMD
_X86_
64_GARTTABLEBASE
,
tmp
);
pci_write_config_dword
(
hammer
,
AMD64_GARTTABLEBASE
,
tmp
);
/* Enable GART translation for this hammer. */
pci_read_config_dword
(
hammer
,
AMD
_X86_
64_GARTAPERTURECTL
,
&
tmp
);
pci_read_config_dword
(
hammer
,
AMD64_GARTAPERTURECTL
,
&
tmp
);
tmp
|=
GARTEN
;
tmp
&=
~
(
DISGARTCPU
|
DISGARTIO
);
pci_write_config_dword
(
hammer
,
AMD
_X86_
64_GARTAPERTURECTL
,
tmp
);
pci_write_config_dword
(
hammer
,
AMD64_GARTAPERTURECTL
,
tmp
);
/* keep CPU's coherent. */
flush_x86_64_tlb
(
hammer
);
...
...
@@ -216,9 +216,9 @@ static void amd_8151_cleanup(void)
for_each_nb
()
{
/* disable gart translation */
pci_read_config_dword
(
hammers
[
gart_iterator
],
AMD
_X86_
64_GARTAPERTURECTL
,
&
tmp
);
tmp
&=
~
(
AMD_X86_64_GARTEN
)
;
pci_write_config_dword
(
hammers
[
gart_iterator
],
AMD
_X86_
64_GARTAPERTURECTL
,
tmp
);
pci_read_config_dword
(
hammers
[
gart_iterator
],
AMD64_GARTAPERTURECTL
,
&
tmp
);
tmp
&=
~
AMD64_GARTEN
;
pci_write_config_dword
(
hammers
[
gart_iterator
],
AMD64_GARTAPERTURECTL
,
tmp
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment